-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
per-test-execution: add html report (#3776)
* per-test-execution: add html report Refactoring wrt functions included. Signed-off-by: Daniel Hiller <[email protected]> * per-test-execution: parallelize test lane data retrieval Signed-off-by: Daniel Hiller <[email protected]> * per-test-execution,report: add link to latest failed Adds a link per each test that will navigate to the latest run where the test had failed. Signed-off-by: Daniel Hiller <[email protected]> * per-test-execution: introduce sorting by highest rate Sort output by highest overall test failure rate from top to bottom. Signed-off-by: Daniel Hiller <[email protected]> * per-test-execution: change to write to directory All files now have persistent names (test lane name, index.html), only the target directory name is generated. Signed-off-by: Daniel Hiller <[email protected]> * per-test-execution: add flag output-directory Since we need to have a clear destination we are adding the flakg `output-directory`, in order to use it inside a prow job. Signed-off-by: Daniel Hiller <[email protected]> * per-test-results: create periodic job Signed-off-by: Daniel Hiller <[email protected]> * per-test-execution: fix bazel build Signed-off-by: Daniel Hiller <[email protected]> * per-test-execution: add link to generated report Adds a link to the `reports.md` report overview page, so that we can easily navigate to the generated report. Signed-off-by: Daniel Hiller <[email protected]> * per-test-execution: address review comment Signed-off-by: Daniel Hiller <[email protected]> * per-test-execution: improve readability Signed-off-by: Daniel Hiller <[email protected]> --------- Signed-off-by: Daniel Hiller <[email protected]>
- Loading branch information
Showing
7 changed files
with
470 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# per-test-execution | ||
|
||
Creates a set of CSV files in the format | ||
|
||
| test-name | number-of-executions | number-of-failures | {build-url-1} | ... | {build-url-m} | | ||
|-----------------|--------------------------|------------------------|---------------|-----|---------------| | ||
| {{test-name-1}} | {{number-of-executions}} | {{number-of-failures}} | {p,f,s} | ... | {p,f,s} | | ||
| ... | ... | ... | ... | ... | ... | | ||
| {{test-name-n}} | {{number-of-executions}} | {{number-of-failures}} | {p,f,s} | ... | {p,f,s} | | ||
|
||
where `n` is the number of tests and `m` is the number of builds. | ||
|
||
Data is fetched from the build artifacts of the prow jobs, namely the `junit.xml` files that contain the test result data. | ||
|
||
In detail the process works as follows: | ||
* Per a target directory depending on the job we want to look at, we look at it's content directories, which resemble a job run each | ||
* each job run we check whether it's inside the interval we want, and then extract the junit results | ||
* we then aggregate the results and write them into a csv file | ||
|
||
## Pre-requisites | ||
|
||
env `GOOGLE_APPLICATION_CREDENTIALS` set to point to a GCS credentials file - see GCloud credentials docs [1] . | ||
|
||
## Examples | ||
|
||
```bash | ||
go run ./robots/cmd/per-test-execution --days 7 | ||
``` | ||
|
||
```bash | ||
go run ./robots/cmd/per-test-execution --months 6 | ||
``` | ||
|
||
[1]: https://cloud.google.com/docs/authentication/application-default-credentials |
Oops, something went wrong.