-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: store test cluster logs and improve test readme [DET-3269] #657
Changes from all commits
e960078
cedc9d9
2a5e5b3
7698770
418430d
ba326f5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules/ | ||
results/ | ||
*.log |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ two SPAs, Elm and React, and in some sense the whole det cluster. | |
We provide a test script to take care of depdencies around Cypress commands. | ||
Let's call this the "test script" for the rest of the this document. | ||
|
||
## Requirements | ||
## Running the Tests | ||
|
||
When the tester loads up it loads the WebUI through a given master address | ||
(`$HOST`) and port (`$PORT`) | ||
|
@@ -28,7 +28,7 @@ Once the cluster is ready and accessible run the tests: | |
Note that it's is important that one immediately follows the other since the | ||
pre-e2e-tests target starts some experiments. | ||
|
||
### Using the bundled cluster manager | ||
### Using the Bundled Cluster Manager | ||
|
||
For ease of use and quicker local testing we provide an option to set up and | ||
tear down such a cluster through the test script. | ||
|
@@ -37,8 +37,34 @@ Before the tests can be started we need to build the cluster including the WebUI | |
to make sure the served WebUI and cluster in general are up to date. | ||
|
||
Issue the following command: | ||
`./bin/e2e-tests.py e2e-tests` which in turn will: | ||
`./bin/e2e-tests.py e2e-tests` (or `make test`) which in turn will: | ||
|
||
1. Set up a test cluster | ||
2. Run the Cyrpess tests `Cypress run` | ||
3. Tear down the cluster and clean up in case of errors | ||
|
||
## Test Development | ||
|
||
Use `make dev-tests` to set up for test development and then proceed to add new | ||
tests suites or update and rebuild the WebUI artifacts to see changes in tests. | ||
|
||
### Debugging Test Issues | ||
|
||
For reproducing and catching test flakes there is a simple helper script `./bin/try-for-flake.sh`. | ||
Just executing the script will run `make test` over and over until it hits a error. | ||
|
||
To speed up this process you can: | ||
|
||
1. try to avoid the whole cluster set up and tear down on each iteration. If the suspected tests are | ||
re-runable or you have a way of setting up and tearing down the cluster that is faster than the provided | ||
`test-cluster` refer to the "Re-runnable Tests" section. | ||
2. limit the test scope: | ||
- use `.skip` on each unwanted test suite or `.only` on the target suite. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question: does this actually work with our cypress setup? It looks like it's a mix bag. I tried applying There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. update: here's what worked for blocking full test files. If you apply There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it was mixed bag last time I used it. from my googling, it's about the Jest version that Cypress is using. It is supposed to work so I think it's safe to have it in the readme. I usually just delete the unwanted test suites. |
||
- temporarily delete the unwanted test suites | ||
|
||
#### Re-runnable Tests | ||
|
||
By default the tests are not re-runnable without meeting the conditions in the "Running the Tests" section. | ||
However if you can get the tests to a state where they are re-runnable without the need for the cluster to be | ||
reset, pass in `true` to the test flake script to instruct it to skip the cluster set up and tear down and | ||
greatly speed up the process |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: add that you can pass in a parameter to limit the number of times to run tests. eg)
./bin/try-for-flake.sh 30
to runmake test
30 times.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that would be helpful but the script doesn't support this option we can add that (separately) though.