openstax / cnx-automation

Automated testing for CNX products
https://cnx.org
Mozilla Public License 2.0
3 stars 1 forks source link

As a tester, I'd like a webview test that asserts REMINDER: check for caching issues (do NOT use private browser) #83

Closed m1yag1 closed 6 years ago

m1yag1 commented 6 years ago

REMINDER: Check for new user-facing features in a browser that has previously cached data from webview -- especially js, css, images. Do NOT use an incognito or private browser.

The idea is to replicate an end user experience and catch any problems that may arise due to caching issues.

Dantemss commented 6 years ago

Reference: https://stackoverflow.com/questions/22685755/retaining-cache-in-firefox-and-chrome-browser-selenium-webdriver

Stack Overflow
retaining cache in firefox and chrome browser - Selenium WebDriver
Currently our web application takes around 3 mins to load completely without caching and 10 secs with caching. When I open the app through WebDriver its taking around 3 mins to load i.e. caching is...
Dantemss commented 6 years ago

I see 2 possible solutions for local tests. Will not work on Travis because we cannot persist the cache there.

Solution A: Add a flag (such as --cache) and require the tester to run the tests both before and after the deployment with the flag set.

Solution B: Always enable caching by default.

When caching is enabled, we will set the Chrome profile path to a fixed path in the filesystem. That should enable caching. Will require changes to the legacy tests that always assume the user is not logged in at the beginning.

Dantemss commented 6 years ago

This answer to a different issue may allow us to specify the profile by name instead of path: https://stackoverflow.com/a/6830109

Stack Overflow
How to stop Selenium from creating temporary Firefox Profiles using Web Driver?
I am using Selenium Web Driver API with Java. Every time I want to debug my test cases, a temporary profile for Firefox is created in the temporary files directory. This is a headache in two ways. ...
kerwinso commented 6 years ago

😄 This was originally written as just a reminder to the manual tester. But I'm glad we're thinking about caching issues (and how to automate testing them).

m1yag1 commented 6 years ago

Closing issue as I don't think we'll get around to this anytime soon. We can re-open when the need arises.