Knapsack Pro tracks your CI builds and how long each test files took to run on one of parallel CI nodes. Thanks to that Knapsack Pro can prepare the optimal test suite split for your future test suite runs on your CI provider.
You may find useful to export data about your CI builds and timing for your test files in case you would like to analyze it and observe trends how your test files change over time.
How to get a list of all CI builds
You can get the list of all CI builds recorded by Knapsack Pro tool. You need test suite API token. You can get it from user dashboard.
You will get a response from API with the list of CI builds.
Note the CI build from Knapsack Pro API perspective means a unique combination of commit_hash, branch, node_total. Even when you run multiple CI builds in your CI provider for the same combination of fields there will be only single CI build on Knapsack Pro API side.
You can use id of the build to fetch detailed info about tests recorded for that CI build by doing request to https://api.knapsackpro.com/v1/builds/:id endpoint. You will learn about it in next section.
You can use optional query params like commit_hash, branch, node_total to filter list of CI builds. See example:
How to get the timing of test files for CI build
You can get detailed info about CI build with all build subsets containing the test files recorded timing for that CI build.
Note the CI build means unique combination of commit_hash, branch, node_total.
If you will run your tests multiple times for that combination then you will get multiple recorded build subset records with test files timing for particular CI node indexes.
For instance, you can get a response from Knapsack Pro API:
As you can see in the response you have two records for node_index=0 and two for node_index=1 because test suite was executed twice on CI provider.