TLDR: Let's run some tests - Follow the instructions here to get started.
This repo contains the E2E Test Framework for the SSO Requests Application.
The test framework is based on Cypress. It is designed to be run in a CI/CD pipeline, but can also be run locally. It comes with several support directories for documentaton, media and testing.
Contains a sample workflows for running Cypress in Github actions and a full description of what is contained in the complex workflow. You can use this as a starting point for your own implementation.
Contains the wiki documents. Updates to the wiki will be stored here and then automatically propagated to the wiki. Updates made to the wiki manually will be lost when the wiki is updated from here. The reason for this set up is providing traceability for the wiki content.
Contains the media files used in our README-s and the Wiki.
The main test framework is contained in this directory. It is a standard Cypress framework with a few additions.
Contains the Cypress-based test framework. All tests and supporting files are contained in this directory.
In this directory we store the actual test scripts.
In this directory we store the page objects for the Cypress tests. Page objects are used to store selectors and methods for interacting with the application.
This way we centralize the selectors and methods and can reuse them in multiple tests or when the application changes we would only have one location to change the definition.
- Official Cypress Documentation: https://docs.cypress.io/
- Cypress GitHub Repository: https://github.com/cypress-io/cypress
- Cypress Example Recipes: https://github.com/cypress-io/cypress-example-recipes
- Cypress Community: https://www.cypress.io/community/
- Running locally, getting chrome-error://chromewebdata/ when logging in? Ensure the baseURL is updated in cypress.config.json to also point to your local, and restart cypress.
BCSC must run against sso-requests-preview until available in sandbox, so is not in CI. To run locally:
- In the cypress config file, change the e2e.baseUrl parameter to "https://bcgov.github.io/sso-requests-preview/"
- In your cypress.env.json, set the host to "https://bcgov.github.io/sso-requests-preview/", and loginproxy to "https://test.loginproxy.gov.bc.ca".
- In the integration test file change the json project "Create BCSC OIDC 1 Team" disabled flag to false.
You can now run the integrations-crud test. You can disable the others to test it alone.