Skip to main content
A test collection is a named group of tests with its own settings. Each collection has independent flake detection, quarantining, and ticketing, so you can hold fast unit tests and fragile end-to-end tests to different standards. You create a collection in the Trunk app, then point a CI job at it by passing the collection’s ID to the uploader.
The Overview tab of a collection named trunk2-pr-e2e, showing its Collection ID, flaky and broken test counts, PRs impacted, three daily charts, and the top ten most unstable tests.The Overview tab of a collection named trunk2-pr-e2e, showing its Collection ID, flaky and broken test counts, PRs impacted, three daily charts, and the top ten most unstable tests.

A collection's Overview tab, once test results are flowing.

Collections and repositories

Collections and repositories are many-to-many. A collection can include tests from multiple repositories, and a repository can be broken into multiple collections. This is decided by which collection you specify at upload time.
Three repositories uploading into two collections: the api repository sends its unit tests to one collection and its end-to-end tests to another, while the unit test collection also receives uploads from the web repository.

The Collection ID

Every collection has an ID: eight alphanumeric characters, unique across all of Trunk. It appears in the collection’s URL, on the collection’s page header, and in the ID column of the collections list, each with a button to copy it.
The ID is what CI needs. Nothing else about a collection is used to route uploads.

Create a collection

Any member of your organization can create a collection.
  1. In Flaky Tests, open Collections.
  2. Click Create Collection.
  3. Enter a Collection name, and a description if you want one.
  4. Click Create collection.
You land on the new collection. Its Tests and Uploads tabs stay disabled until test results arrive.

What a new collection starts with

A new collection starts with a basic set of flake-detection monitors, so detection starts working as soon as test results arrive. You can change them, and everything else about the collection, from its Monitors and Settings tabs.

Upload test results to a collection

Pass the collection ID to the uploader alongside your organization slug. Both are required:
You can set the ID as the TRUNK_TEST_COLLECTION_ID environment variable instead, or pass it as the test-collection-id input to the uploader action. Everything else about your setup is unchanged. Adding the collection ID to a working upload step is the whole change. See Test Frameworks and CI Providers for the setup itself, and the CLI reference for the full flag list.
A CI job uploads to exactly one collection. To send results to more than one collection, add an upload step per collection.

Collection tabs

Finish setting up a collection

Each collection has a setup checklist, on its Overview tab before results arrive and on its Settings tab permanently. It tracks four steps:
  1. Send your first upload
  2. Ingest your test results
  3. Review flake detection
  4. Review quarantining
The first two complete on their own once uploads are flowing. The rest can be configured in the app.

Permissions

Delete a collection

Only organization admins can delete a collection.
  1. Open the collection’s Settings tab.
  2. Click Delete collection.
  3. Confirm in the dialog.
The collection disappears from the collections list. Test results already uploaded to it are not deleted.

Questions

Ask us in Slack or email support@trunk.io.