Basic automation tests of Microsoft's website, with Cypress. Following tests are included:
- Basic functional tests (visiting homepage, and trying to add Xbox console to buying wishlist): Via vanilla Cypress.
- Accessibility testing: A11y standards conformity check via cypress-axe plugin.
- Lighthouse auditing: Performance, accessibility, SEO and Progressive-Web-App checks through Lighthouse, via cypress-audit plugin.
- Automated visual testing: Visual checking of homepage done via Percy.
- Cross platform and cross browser testing: Done on Browserstack.
- Clone repository locally: (If using GitHub CLI)
gh repo clone AsadHasan/cypress-microsoft-tests
- Run tests via Docker. This is the easiest method, as it doesn't require Node, Cypress or any browsers to be pre-installed (only Docker is required). It does not run tests cross-browser though, neither does it do visual checks on Percy, or record run on Cypress dashboard: In project root, run (in a bash terminal or similar)
./docker_run_tests.sh
Some tests fail on CI or during cross-browser runs. As Cypress project does not recommend using Cypress to automate interactions with external websites that you do not control, and does not offer out-of-the-box support for conditional testing; some tests (such as those which sometimes encounter an unexpected popup/dialog) fail and I've not yet got around to fixing them.