You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: security/README.md
+16-9Lines changed: 16 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,16 +29,23 @@ Includes instructions only for how to run the tests on MacOS. (PRs welcome for i
29
29
30
30
## A/B end-to-end acceptance tests
31
31
32
-
At the moment, A/B E2E test verification for CVE fixes is done manually. We should automate this (QUnit, testem). (PRs welcome!)
32
+
Tests run on every push in CI via [GitHub workflow](https://github.com/ctcpip/jquery-security-patches/actions/workflows/security-test.yml)
33
33
34
-
### How to run A/B end-to-end acceptance tests
34
+
You can run the A/B tests locally in CI mode or manually in the browser
35
+
36
+
### How to run A/B end-to-end acceptance tests in CI mode
37
+
38
+
- Checkout the `main` branch
39
+
- Run `nom test` in `/security/test`
40
+
- Rejoice!
41
+
42
+
### How to run A/B end-to-end acceptance tests manually
35
43
36
44
- Checkout the `main` branch
37
-
- Run the node/express server in `/security/server`: `node index.js`
38
-
- Use a local webserver to serve the static files in the folder for the version you care about in this repo, e.g. `security/1.6.5-sec`.
39
-
- This is trivial using something like VS Code. Just open up one of the HTML files, such as `/security/1.6.5-sec/index-1.6.4.html` and using the command palette, select `Live Preview: Show Preview (External Browser)`
40
-
- Open the A HTML file (in this example that would be `index-1.6.4.html` and if you're using VS Code to serve the files, it will likely be served at `http://127.0.0.1:3000/security/1.6.5-sec/index-1.6.4.html`)
41
-
- Click on every button, verifying each vulnerability manifests in the log, e.g. with an 'alert!' or 'prototype has been polluted' message. Also verify no unexpected errors appear.
42
-
- Open the B HTML file (in this example that would be `index-1.6.5-sec.html` and if you're using VS Code to serve the files, it will likely be served at `http://127.0.0.1:3000/security/1.6.5-sec/index-1.6.5-sec.html`)
43
-
- Click on every button, verifying each vulnerability DOES NOT manifest in the log, e.g. only showing that the CVE reproduction methods were called, but failed to reproduce the issue. Also verify no unexpected errors appear
45
+
- Run `nom run serve` in `/security/test`
46
+
- Open <http://localhost:3333> in your browser of choice
47
+
- Select the jQuery version you are interested in
48
+
- All CVEs are reproduced automatically, but you can trigger them again by clicking their respective buttons
49
+
- Check the `Patched` checkbox to load the patched version of the jQuery version you selected
50
+
- An attempt is made to trigger all CVEs automatically, but you can attempt to trigger them again by clicking their respective buttons
0 commit comments