https://github.com/tidepool-org/webuitests
The home of Tidepool UI testing with nightwatch
https://github.com/tidepool-org/webuitests
Last synced: 23 days ago
JSON representation
The home of Tidepool UI testing with nightwatch
- Host: GitHub
- URL: https://github.com/tidepool-org/webuitests
- Owner: tidepool-org
- Created: 2020-09-11T15:35:03.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-19T13:56:10.000Z (about 1 month ago)
- Last Synced: 2025-03-19T14:42:04.984Z (about 1 month ago)
- Language: JavaScript
- Size: 3.97 MB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nightwatch + Browserstack UI Tests
The home of Tidepool UI testing with nightwatch/browser stack combination## Background Information
### Nightwatch
Nightwatch is a Node.js end to end testing solution using the W3C Webdriver API. See the documentation here: https://nightwatchjs.org/#### Browserstack
BrowserStack is a cloud web and mobile testing platform that enables developers to test their websites and mobile applications across on-demand browsers, operating systems and real mobile devices, without requiring users to install or maintain an internal lab of virtual machines, devices or emulators. Learn more here: https://www.browserstack.com/### Page Objects
The tests here use page objects. This means that frequently used UI elements and actions are mapped out in an appropriately named page objects file and imported into the test files to run tests. This means the test themselves can remain relatively unchanged and, if there is a change to an element that's causing a test to fail (selector/text/ect), it can be updated in the corresponding page object file without having to navigate through and rewrite every single test that uses said element. If you'd like to learn more about page objects... https://martinfowler.com/bliki/PageObject.html## Testing Locally (with Browserstack)
- Clone this Repo and install dev dependencies
- Create a .env file containing:BROWSERSTACK_USER=
BROWSERSTACK_KEY=
DSA_USERNAME_TANDEM=
DSA_PASSWORD_TANDEM=
* run `npm testParallel` to test all setup environments (qa1, qa2, prd) on all browsers (currently only chrome on windows 10 for now) for tests that are eligible to be run in parallel (tests that don't change user state or access tidepool emails)
* run `npm run testSeq` to test tests that cannot be run in parallel on all browsers (currently only chrome on windows 10 for now) for a given environment (qa1, qa2, or prd). This is typically only used for CI.
* run `npm run testqa1Chrome` to test qa1 on all browsers (currently only chrome on windows 10 for now)
* run `npm run testqa2Chrome` to test qa2 on all browsers (currently only chrome on windows 10 for now)
* run `npm run testprdChrome` to test prd on all browsers (currently only chrome on windows 10 for now)## Testing Locally (without Browserstack)
The nightwatch tests can be run without using the browserstack service. You will, however, need to install selenium and the appropriate web driver dependencies for the browsers you wish to test as well as update the `nightwatch.conf.js` to use these dependencies instead of browserstack. There's really no reason to do this.