Skip to content

Latest commit

 

History

History
104 lines (72 loc) · 4.82 KB

github-actions.md

File metadata and controls

104 lines (72 loc) · 4.82 KB

On-Demand Github Actions Workflows

You can perform a number of actions directly from this repository's Github Actions UI:

From the Actions UI, you can click on any workflow and then the "Run Workflow" button to get started. If a particular workflow does not have a "Run Workflow" button, it is not meant to be executed manually.

After clicking the "Run Workflow" button, you will be given the opportunity to select a branch and (maybe) fill in some other options. Unless you are testing a change to the workflow itself, you should leave the branch set to mainline.

Run the tests

Link to workflow

If you run this workflow manually, please also turn off the test SP's when you are done!

These tests are run automatically each day, but you can execute them at any time and configure certain options to meet your testing needs.

Test run options

target-idp-env

Options are eval (default) and prod. This is the IdP you will be testing.

target-idp-host

Optional. The short name of an IdP host you want to route all the test traffic to, e.g., idp11 or idpeval01.

reason

Optional. A short message indicating why you are running this test. For instance, if running for an RFC, adding a link to the RFC under the reason might be helpful.

pytest-args

Optional. Any additional arguments you want to supply to pytest. Anything here will be added to the default pytest arguments.

Note. If you will be running the action more than once, for instance, to debug something, you might prefer to include the argument --skip-test-service-provider-stop, which will make subsequent runs faster by not shutting down the test SP's. Just try to remember to run normally once so that the test SPs will be shut down when you're done!

Turn off the test Service Providers (SP's)

The test SP's are turned on at the start of testing, but are not turned off by tests, due to complexity with overlapping test runs. Therefore, they are turned off twice a day automatically (after the early morning scheduled runs, and after the end of the work day).

You can turn off the test SP's by executing the workflow .

There are no additional options here. Just click the button and go.

Generate IdP login requests

To generate requests from multiple IP addresses, you can use the IdP Login Request Generator Workflow.

Click the "Run Workflow" button. You will be presented with a form to configure the number of login attempts per host, and the wait time between login attempts.

The number of hosts is fixed, but can be changed by updating the workflow in a separate branch, then selecting that branch on the form. (Otherwise, you should always run this with the default branch selected).

The IP addresses for the test runners will be available in the action run summary, and the webdriver-report screenshots will also be included as artifacts in the same summary.

Re-build and re-cache the testing docker image

Debugging the Teams notifications and workflows

Sometime, you might find it handy to debug the workflows and not have the tests run. When you want to turn off the tests to debug some other part of the workflows, you can disable the test part. Go to [docker-compose.yml] (https://github.com/UWIT-IAM/uw-idp-web-tests/blob/mainline/docker-compose.yml) Remove the line command: pytest ${PYTEST_ARGS} --selenium-server selenium:4444 and replace it with another command. You can replace to with command: echo "The test would start here". That will not run the tests and instead, it will put an entry in the logs/terminal that says "The test would start here". You'll still see the test run and end notifications but the tests won't run. You can also run a specific test with this command: command: pytest ${PYTEST_ARGS} --selenium-server selenium:4444 path/to/testfile or command: pytest ${PYTEST_ARGS} --selenium-server selenium:4444 path/to/testfile::<test_name> command: pytest ${PYTEST_ARGS} --selenium-server selenium:4444 tests/test_2fa_duo.py::test_remember_me_cookie