/build_subsets

post

Endpoint expects partial test suite execution data for particular test build.

For instance send here data collected after execution half of test suite on the first CI node. Send here also data collected for the second half of the test suite executed on the second CI node.

We will merge the data automatically to have complete information about the particular build.

/build_distributions

post

Endpoint expects a list of all test files in your test suite.

In response, you will get a list of test files that should be run on a node with particular node_index value.

You will get also build_distribution_id (seed) to compare if all your CI nodes are running based on the same test suite split.

get

This endpoint returns a list of test files recorded for CI build that closely matches given params like commit_hash, branch, node_total.

If test files include paths to test cases then you need to merge them on your client-side to determine what test files are slow.

You need to verify if the test files still exist on your disk before running tests.

You can use the list of test files to determine what test files are slow and could be split by test cases.

knapsack_pro gem uses this API endpoint to split slow test files by test cases.

/queues

post

Endpoint expects a list of all test files in your test suite.

In response, you will get a list of test files that should be run on a node with particular node_index value. The CI node can request this endpoint multiple times til it gets an empty list of test files which means the end of the queue.

You will get also queue_name to compare if all your CI nodes are running against the same test suite queue created for particular CI build.

In response you will see build_subset_id when you have fixed_queue_split=true in request. When build_subset_id has a value then the test suite split was done based on this old recorded build subset. In that case the queue_name will be null.

/builds

get

Get list of all CI builds you have run. Array of CI builds is inside of data key.

There are also available pagination urls in links key so you can easily get CI builds for next page. Key meta contains basic info about current CI builds page.


You can provide optional query params to filter list of CI builds by commit_hash, branch, node_total.

Example 1: /v1/builds?page=1&branch=master&node_total=2

Example 2: /v1/builds?page=1&commit_hash=d1acb81ac1bead703eb6de64d1af24104d5d4b2c


CI build means unique combination of commit_hash, branch, node_total.

You can use id of the build to fetch detailed info about tests recorded for that CI build by doing request to /v1/builds/:id endpoint.

get

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.