This project reads JUnit XML files from S3 and compiles that data to provide an interactive UI summarizing your test performance and stability. This is useful for improving test run performance and for finding your transient/flaky tests.
CircleCI can provide JUnit files if you use their gem in your rails projects.
Create your DB:
Provide these environment variables:
- AWS_BUCKET (where you want to read the JUnit files from)
- AWS_REGION (for the bucket above)
We use mysql and redis. You may need to set related environment variables for those (they have defaults):
For production you need to set SECRET_KEY_BASE
In development, set BUILDS_TO_PULL to pull more than the default 3 builds when grabbing data. This exists to speed up development pulls so they don't grab all the data available.
This project is available in a docker image: https://hub.docker.com/r/avvo/junit_visualizer/
How it works
JUnit Visualizer will inspect the bucket you provide, creating a "project" for each parent level directory.
For example, in a bucket called
ci-logs you have:
project-1/SUITE=my_suite_1/sub_directory/build_number_123/some/other/path/test.xml project-1/SUITE=my_suite_1/sub_directory/build_number_124/some/other/path/test.xml project-1/SUITE=my_suite_2/build_number_123/some/other/path/test.xml project-1/SUITE=my_suite_2/build_number_124/some/other/path/test.xml project-2/build_number_1/test.xml
This would create 2 projects, the first one with 2 suites, the second with a
The directory structure should follow this pattern:
<Project Name>/(<Suite Name parent>/(Suite sub directory))/build_number_####/**/<filename>.xml
If the project has a suite, all of the build directories must be in a suite. If you don't have a suite, the build directories can be directly under the parent.
We recommend that you create a retention policy to delete the files after 30 days. This will help keep the pulling process as light as possible. Your data will still be available in the local db.
circle_dropper can help transfer your CircleCI files to S3