Skip to content

Commit 7a0e6bc

Browse files
author
Tom Thorogood
committed
Refactor documentation; add documentation for all Actions UI-enabled workflows.
1 parent e30a5f6 commit 7a0e6bc

4 files changed

+97
-70
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Contains a test suite for UW's identity provider, using mock Shibboleth service providers.
44

5-
To run the tests from the Github UI, [start here](docs/running-from-github.md)
5+
To run the tests from the Github UI, [start here](docs/github-actions.md#run-the-tests).
66

77
Other detailed information can be found in the [docs](docs) directory.
88

docs/github-actions.md

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# On-Demand Github Actions Workflows
2+
3+
You can perform a number of actions directly from this
4+
repository's [Github Actions UI]:
5+
6+
- [Run the tests](#run-the-tests)
7+
- [Turn off the test SPs](#turn-off-the-test-service-providers)
8+
- [Generate IdP login requests](#generate-idp-login-requests)
9+
- [Re-build and re-cache the docker image](#re-build-and-re-cache-the-testing-docker-image)
10+
11+
From the Actions UI, you can click on any workflow and then the "Run Workflow" button
12+
to get started. If a particular workflow does not have a "Run Workflow" button,
13+
it is not meant to be executed manually.
14+
15+
After clicking the "Run Workflow" button, you will be given the opportunity to
16+
select a branch and (maybe) fill in some other options. Unless you are testing
17+
a change to the workflow itself, you should leave the branch set to `mainline`.
18+
19+
## Run the tests
20+
21+
[Link to workflow](https://github.com/UWIT-IAM/uw-idp-web-tests/actions/workflows/automated-idp-web-tests.yml)
22+
23+
**If you run this workflow manually, please also [turn off the test SP's when you
24+
are done](#turn-off-the-test-service-providers-sps)!**
25+
26+
These tests are run automatically each day, but you can execute them at any time
27+
and configure certain options to meet your testing needs.
28+
29+
### Test run options
30+
31+
#### `target-idp-env`
32+
33+
Options are `eval` (default) and `prod`. This is the IdP you will be testing.
34+
35+
#### `target-idp-host`
36+
37+
*Optional*. The short name of an IdP host you want to route all the test traffic to,
38+
e.g., `idp11` or `idpeval01`.
39+
40+
#### `reason`
41+
42+
*Optional*. A short message indicating why you are running this test. For instance,
43+
if running for an RFC, adding a link to the RFC under the reason might be helpful.
44+
45+
46+
#### `pytest-args`
47+
48+
*Optional*. Any additional arguments you want to supply to pytest. Anything here
49+
will be added to the default pytest arguments.
50+
51+
**Note**. If you will be running the action more than once, for instance, to debug
52+
something, you might prefer to include the argument
53+
`--skip-test-service-provider-stop`, which will make subsequent runs faster by not
54+
shutting down the test SP's. Just try to remember to run normally once so that the
55+
test SPs will be shut down when you're done!
56+
57+
#### `slack-channel`
58+
59+
The channel you want to send output to. This channel must have invited the Github
60+
Actions Crier (`/invite @iam-github-actions-crier`).
61+
62+
## Turn off the test Service Providers (SP's)
63+
64+
The test SP's are turned on at the start of testing, but
65+
are not turned off by tests, due to complexity with overlapping
66+
test runs. Therefore, they are turned off twice a day automatically
67+
(after the early morning scheduled runs, and after the end of the work day).
68+
69+
You can turn off the test SP's by executing the
70+
[workflow](https://github.com/UWIT-IAM/uw-idp-web-tests/actions/workflows/stop-test-service-providers.yml)
71+
.
72+
73+
There are no additional options here. Just click the button and go.
74+
75+
## Generate IdP login requests
76+
77+
To generate requests from multiple IP addresses, you can use the
78+
[IdP Login Request Generator Workflow](https://github.com/UWIT-IAM/uw-idp-web-tests/actions/workflows/idp-login-request-generator.yml).
79+
80+
Click the "Run Workflow" button. You will be presented with a form to configure
81+
the number of login attempts per host, and the wait time between login attempts.
82+
83+
The number of hosts is fixed, but can be changed by updating the workflow in a
84+
separate branch, then selecting that branch on the form. (Otherwise, you should
85+
always run this with the default branch selected).
86+
87+
The IP addresses for the test runners will be available in the action run summary,
88+
and the webdriver-report screenshots will also be included as artifacts in the same
89+
summary.
90+
91+
## Re-build and re-cache the testing docker image
92+
93+
94+
[test workflow]: https://github.com/UWIT-IAM/uw-idp-web-tests/actions/workflows/automated-idp-web-tests.yml
95+
[Github Actions UI]: https://github.com/uwit-iam/uw-idp-web-tests/actions

docs/running-from-github.md

-43
This file was deleted.

docs/testing-sustained-requests.md

+1-26
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,4 @@ requests from a single IP address.
1010

1111
## Running from Github Actions
1212

13-
To generate requests from multiple IP addresses, you can use the
14-
[IdP Login Request Generator Workflow](https://github.com/UWIT-IAM/uw-idp-web-tests/actions/workflows/idp-login-request-generator.yml).
15-
16-
Click the "Run Workflow" button. You will be presented with a form to configure
17-
the number of login attempts per host, and the wait time between login attempts.
18-
19-
The number of hosts is fixed, but can be changed by updating the workflow in a
20-
separate branch, then selecting that branch on the form. (Otherwise, you should
21-
always run this with the default branch selected).
22-
23-
The IP addresses for the test runners will be available in the action run summary,
24-
and the webdriver-report screenshots will also be included as artifacts in the same
25-
summary.
26-
27-
## Running from the CLI
28-
29-
To run this locally using docker compose, you can just execute the
30-
bash helper script:
31-
32-
```
33-
./scripts/run-idp-login-request-generator.sh
34-
```
35-
36-
Use the `--help` flag for a menu of options that can be provided.
37-
38-
Just remember that this will only generate requests from _your_ host.
13+
Refer to [github-actions.md](github-actions.md#generate-idp-login-requests).

0 commit comments

Comments
 (0)