diff --git a/flaky-tests/detection/pass-on-retry-monitor.mdx b/flaky-tests/detection/pass-on-retry-monitor.mdx
index 371f205c..519bc042 100644
--- a/flaky-tests/detection/pass-on-retry-monitor.mdx
+++ b/flaky-tests/detection/pass-on-retry-monitor.mdx
@@ -49,7 +49,7 @@ You can create more than one pass-on-retry monitor for the same repository. Each
A common pattern is to run one monitor scoped to stable branches (like `main`) with a shorter recovery period for fast feedback, and a second monitor scoped to `release/*` branches with a longer recovery period for builds where intermittent failures are more expensive to re-investigate.
-To add a monitor, navigate to **Settings** in the Trunk web app, open the repository, open the **Monitors** tab, and click **Add monitor**. Each monitor you create appears as a separate row in the monitors table and can be individually enabled, disabled, or deleted.
+To add a monitor, open the **Monitors** tab — on a [test collection](/flaky-tests/get-started/test-collections) or on a repository — and click **Add monitor**. Each monitor you create appears as a separate row in the monitors table and can be individually enabled, disabled, or deleted.
diff --git a/flaky-tests/get-started/ci-providers/atlassian-bamboo.mdx b/flaky-tests/get-started/ci-providers/atlassian-bamboo.mdx
index 35b0867e..1b92c9e1 100644
--- a/flaky-tests/get-started/ci-providers/atlassian-bamboo.mdx
+++ b/flaky-tests/get-started/ci-providers/atlassian-bamboo.mdx
@@ -86,6 +86,7 @@ Run Tests and Upload to Trunk:
./trunk-analytics-cli upload \
--junit-paths "" \
--org-url-slug ${bamboo.TRUNK_ORG_URL_SLUG} \
+ --test-collection-id ${bamboo.TRUNK_TEST_COLLECTION_ID} \
--token ${bamboo.TRUNK_API_TOKEN}
variables:
@@ -119,6 +120,7 @@ Run Tests and Upload to Trunk:
./trunk-analytics-cli upload \
--bazel-bep-path \
--org-url-slug ${bamboo.TRUNK_ORG_URL_SLUG} \
+ --test-collection-id ${bamboo.TRUNK_TEST_COLLECTION_ID} \
--token ${bamboo.TRUNK_API_TOKEN}
variables:
@@ -152,6 +154,7 @@ Run Tests and Upload to Trunk:
./trunk-analytics-cli upload \
--xcresult-path \
--org-url-slug ${bamboo.TRUNK_ORG_URL_SLUG} \
+ --test-collection-id ${bamboo.TRUNK_TEST_COLLECTION_ID} \
--token ${bamboo.TRUNK_API_TOKEN}
variables:
diff --git a/flaky-tests/get-started/ci-providers/azure-devops-pipelines.mdx b/flaky-tests/get-started/ci-providers/azure-devops-pipelines.mdx
index baffa318..03dbb688 100644
--- a/flaky-tests/get-started/ci-providers/azure-devops-pipelines.mdx
+++ b/flaky-tests/get-started/ci-providers/azure-devops-pipelines.mdx
@@ -74,6 +74,7 @@ steps:
chmod +x trunk-analytics-cli
./trunk-analytics-cli upload --junit-paths "" \
--org-url-slug $(TRUNK_ORG_URL_SLUG) \
+ --test-collection-id $(TRUNK_TEST_COLLECTION_ID) \
--token $(TRUNK_API_TOKEN)
condition: always() # this should always run
displayName: Upload test results to Trunk.io
@@ -93,6 +94,7 @@ steps:
chmod +x trunk-analytics-cli
./trunk-analytics-cli upload --bazel-bep-path \
--org-url-slug $(TRUNK_ORG_URL_SLUG) \
+ --test-collection-id $(TRUNK_TEST_COLLECTION_ID) \
--token $(TRUNK_API_TOKEN)
condition: always() # this should always run
displayName: Upload test results to Trunk.io
@@ -112,6 +114,7 @@ steps:
chmod +x trunk-analytics-cli
./trunk-analytics-cli upload --xcresult-path \
--org-url-slug $(TRUNK_ORG_URL_SLUG) \
+ --test-collection-id $(TRUNK_TEST_COLLECTION_ID) \
--token $(TRUNK_API_TOKEN)
condition: always() # this should always run
displayName: Upload test results to Trunk.io
@@ -128,6 +131,7 @@ steps:
- script: |
TRUNK_ORG_URL_SLUG=$(TRUNK_ORG_URL_SLUG) \
+ TRUNK_TEST_COLLECTION_ID=$(TRUNK_TEST_COLLECTION_ID) \
TRUNK_API_TOKEN=$(TRUNK_API_TOKEN) \
bundle exec rspec
displayName: Run RSpec tests and upload results to Trunk.io
diff --git a/flaky-tests/get-started/ci-providers/bitbucket-pipelines.mdx b/flaky-tests/get-started/ci-providers/bitbucket-pipelines.mdx
index 2da681ca..0b64328e 100644
--- a/flaky-tests/get-started/ci-providers/bitbucket-pipelines.mdx
+++ b/flaky-tests/get-started/ci-providers/bitbucket-pipelines.mdx
@@ -77,6 +77,7 @@ pipelines:
chmod +x trunk-analytics-cli
./trunk-analytics-cli upload --junit-paths "**/junit.xml" \
--org-url-slug $TRUNK_ORG_URL_SLUG \
+ --test-collection-id $TRUNK_TEST_COLLECTION_ID \
--token $TRUNK_API_TOKEN
```
```yaml Bazel
@@ -97,6 +98,7 @@ pipelines:
chmod +x trunk-analytics-cli
./trunk-analytics-cli upload --bazel-bep-path \
--org-url-slug $TRUNK_ORG_URL_SLUG \
+ --test-collection-id $TRUNK_TEST_COLLECTION_ID \
--token $TRUNK_API_TOKEN
```
```yaml XCode
@@ -117,6 +119,7 @@ pipelines:
chmod +x trunk-analytics-cli
./trunk-analytics-cli upload --xcresult-path \
--org-url-slug $TRUNK_ORG_URL_SLUG \
+ --test-collection-id $TRUNK_TEST_COLLECTION_ID \
--token $TRUNK_API_TOKEN
```
```yaml RSpec plugin
@@ -131,6 +134,7 @@ pipelines:
script:
- |
TRUNK_ORG_URL_SLUG=$TRUNK_ORG_URL_SLUG \
+ TRUNK_TEST_COLLECTION_ID=$TRUNK_TEST_COLLECTION_ID \
TRUNK_API_TOKEN=$TRUNK_API_TOKEN \
bundle exec rspec
```
diff --git a/flaky-tests/get-started/ci-providers/buildkite.mdx b/flaky-tests/get-started/ci-providers/buildkite.mdx
index c6ae6246..86cad025 100644
--- a/flaky-tests/get-started/ci-providers/buildkite.mdx
+++ b/flaky-tests/get-started/ci-providers/buildkite.mdx
@@ -104,7 +104,7 @@ steps:
```yaml RSpec plugin
steps:
- label: Run Tests and Upload Results to Trunk.io
- command: TRUNK_ORG_URL_SLUG=$TRUNK_ORG_URL_SLUG TRUNK_API_TOKEN=$TRUNK_API_TOKEN bundle exec rspec
+ command: TRUNK_ORG_URL_SLUG=$TRUNK_ORG_URL_SLUG TRUNK_TEST_COLLECTION_ID=$TRUNK_TEST_COLLECTION_ID TRUNK_API_TOKEN=$TRUNK_API_TOKEN bundle exec rspec
key: tests
```
diff --git a/flaky-tests/get-started/ci-providers/circleci.mdx b/flaky-tests/get-started/ci-providers/circleci.mdx
index 4e4bb4da..1d8815c4 100644
--- a/flaky-tests/get-started/ci-providers/circleci.mdx
+++ b/flaky-tests/get-started/ci-providers/circleci.mdx
@@ -119,7 +119,7 @@ jobs:
steps:
- run:
name: Run Tests and Upload Results to Trunk.io
- command: TRUNK_ORG_URL_SLUG=${TRUNK_ORG_URL_SLUG} TRUNK_API_TOKEN=${TRUNK_API_TOKEN} bundle exec rspec
+ command: TRUNK_ORG_URL_SLUG=${TRUNK_ORG_URL_SLUG} TRUNK_TEST_COLLECTION_ID=${TRUNK_TEST_COLLECTION_ID} TRUNK_API_TOKEN=${TRUNK_API_TOKEN} bundle exec rspec
```
diff --git a/flaky-tests/get-started/ci-providers/droneci.mdx b/flaky-tests/get-started/ci-providers/droneci.mdx
index 1c78f83d..3f32b28e 100644
--- a/flaky-tests/get-started/ci-providers/droneci.mdx
+++ b/flaky-tests/get-started/ci-providers/droneci.mdx
@@ -129,7 +129,7 @@ steps:
TRUNK_API_TOKEN:
from_secret: TRUNK_API_TOKEN
commands:
- - TRUNK_ORG_URL_SLUG=$TRUNK_ORG_URL_SLUG TRUNK_API_TOKEN=$TRUNK_API_TOKEN bundle exec rspec
+ - TRUNK_ORG_URL_SLUG=$TRUNK_ORG_URL_SLUG TRUNK_TEST_COLLECTION_ID=$TRUNK_TEST_COLLECTION_ID TRUNK_API_TOKEN=$TRUNK_API_TOKEN bundle exec rspec
```
diff --git a/flaky-tests/get-started/ci-providers/github-actions.mdx b/flaky-tests/get-started/ci-providers/github-actions.mdx
index 818621b5..b9f78227 100644
--- a/flaky-tests/get-started/ci-providers/github-actions.mdx
+++ b/flaky-tests/get-started/ci-providers/github-actions.mdx
@@ -70,6 +70,7 @@ jobs:
with:
junit-paths: **/junit.xml
org-slug:
+ test-collection-id:
token: ${{ secrets.TRUNK_API_TOKEN }}
```
```yaml XCResult Path
@@ -89,6 +90,7 @@ jobs:
with:
xcresult-path: ./test-results.xcresult
org-slug:
+ test-collection-id:
token: ${{ secrets.TRUNK_API_TOKEN }}
```
```yaml Bazel BEP JSON
@@ -108,6 +110,7 @@ jobs:
with:
bazel-bep-path: ./build_events.json
org-slug:
+ test-collection-id:
token: ${{ secrets.TRUNK_API_TOKEN }}
```
```yaml RSpec plugin
@@ -118,7 +121,7 @@ jobs:
steps:
- name: Run Tests and Upload Results to Trunk.io
- run: TRUNK_ORG_URL_SLUG=${{ secrets.TRUNK_ORG_URL_SLUG }} TRUNK_API_TOKEN=${{ secrets.TRUNK_API_TOKEN }} bundle exec rspec
+ run: TRUNK_ORG_URL_SLUG=${{ vars.TRUNK_ORG_URL_SLUG }} TRUNK_TEST_COLLECTION_ID=${{ vars.TRUNK_TEST_COLLECTION_ID }} TRUNK_API_TOKEN=${{ secrets.TRUNK_API_TOKEN }} bundle exec rspec
```
@@ -160,6 +163,7 @@ Here's an example file.
with:
junit-paths:
org-slug: my-trunk-org-slug
+ test-collection-id:
token: ${{ secrets.TRUNK_API_TOKEN }}
```
@@ -185,6 +189,7 @@ This will override the response code of the test command. Make sure to set `cont
junit-paths:
run: # command to run tests goes here
org-slug: my-trunk-org-slug
+ test-collection-id:
token: ${{ secrets.TRUNK_API_TOKEN }}
```
@@ -202,6 +207,7 @@ When quarantining is enabled, the `trunk-analytics-cli upload` command will **re
|
./trunk-analytics-cli upload \
--org-url-slug $TRUNK_ORG_URL_SLUG \
+ --test-collection-id $TRUNK_TEST_COLLECTION_ID \
--token $TRUNK_API_TOKEN \
--junit-paths $JUNIT_PATH
```
@@ -213,6 +219,7 @@ You can also wrap the test command with the Trunk Analytics CLI. When wrapping t
```bash
./trunk-analytics-cli test \
--org-url-slug \
+ --test-collection-id \
--token $TRUNK_API_TOKEN \
--junit-paths $JUNIT_PATH \
--allow-empty-test-results \
@@ -281,6 +288,7 @@ jobs:
with:
junit-paths:
org-slug: my-trunk-org-slug
+ test-collection-id:
token: ${{ secrets.TRUNK_API_TOKEN }}
env:
JOB_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ steps.get-job-id.outputs.jobId }}
@@ -322,6 +330,7 @@ jobs:
with:
junit-paths: junit.xml
org-slug: my-trunk-org-slug
+ test-collection-id:
token: ${{ secrets.TRUNK_API_TOKEN }}
env:
JOB_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ steps.get-job-id.outputs.jobId }}
diff --git a/flaky-tests/get-started/ci-providers/gitlab.mdx b/flaky-tests/get-started/ci-providers/gitlab.mdx
index 37c42f3c..16860187 100644
--- a/flaky-tests/get-started/ci-providers/gitlab.mdx
+++ b/flaky-tests/get-started/ci-providers/gitlab.mdx
@@ -119,7 +119,7 @@ stages: # List of stages for jobs, and their order of execution
unit_test_job: # This job runs the tests and uploads the results to Trunk.io
stage: test
script:
- - TRUNK_ORG_URL_SLUG=$TRUNK_ORG_URL_SLUG TRUNK_API_TOKEN=$TRUNK_API_TOKEN bundle exec rspec
+ - TRUNK_ORG_URL_SLUG=$TRUNK_ORG_URL_SLUG TRUNK_TEST_COLLECTION_ID=$TRUNK_TEST_COLLECTION_ID TRUNK_API_TOKEN=$TRUNK_API_TOKEN bundle exec rspec
```
diff --git a/flaky-tests/get-started/ci-providers/google-cloud-build.mdx b/flaky-tests/get-started/ci-providers/google-cloud-build.mdx
index b7bf842d..e3524cb1 100644
--- a/flaky-tests/get-started/ci-providers/google-cloud-build.mdx
+++ b/flaky-tests/get-started/ci-providers/google-cloud-build.mdx
@@ -121,6 +121,7 @@ steps:
./trunk-analytics-cli upload \
--junit-paths "" \
--org-url-slug \
+ --test-collection-id \
--token "${TRUNK_API_TOKEN}"
waitFor:
- run-tests
@@ -159,6 +160,7 @@ steps:
./trunk-analytics-cli upload \
--bazel-bep-path bep.json \
--org-url-slug \
+ --test-collection-id \
--token "${TRUNK_API_TOKEN}"
waitFor:
- run-tests
diff --git a/flaky-tests/get-started/ci-providers/jenkins.mdx b/flaky-tests/get-started/ci-providers/jenkins.mdx
index 7c66a7f1..07000327 100644
--- a/flaky-tests/get-started/ci-providers/jenkins.mdx
+++ b/flaky-tests/get-started/ci-providers/jenkins.mdx
@@ -115,7 +115,7 @@ pipeline {
}
stages {
stage('Run Tests and Upload Results to Trunk.io'){
- sh 'TRUNK_ORG_URL_SLUG=$TRUNK_ORG_URL_SLUG TRUNK_API_TOKEN=$TRUNK_API_TOKEN bundle exec rspec'
+ sh 'TRUNK_ORG_URL_SLUG=$TRUNK_ORG_URL_SLUG TRUNK_TEST_COLLECTION_ID=$TRUNK_TEST_COLLECTION_ID TRUNK_API_TOKEN=$TRUNK_API_TOKEN bundle exec rspec'
}
}
}
diff --git a/flaky-tests/get-started/ci-providers/otherci.mdx b/flaky-tests/get-started/ci-providers/otherci.mdx
index cbf8ec31..613502ae 100644
--- a/flaky-tests/get-started/ci-providers/otherci.mdx
+++ b/flaky-tests/get-started/ci-providers/otherci.mdx
@@ -40,6 +40,8 @@ You can find your token under **Settings** → **Organization** → **General**,
Store the Trunk slug and API token obtained in the previous step in your CI provider as a secret, environment variable, or an equivalent concept and name them `TRUNK_ORG_URL_SLUG` and `TRUNK_API_TOKEN` respectively.
+Set `TRUNK_TEST_COLLECTION_ID` as well, to the ID of the [test collection](/flaky-tests/get-started/test-collections) the results belong to. It is not a secret, and it is per job rather than per organization — a job that uploads to a different collection sets a different value.
+
## Upload to Trunk
Add an `Upload Test Results` step after running tests in each of your CI jobs that run tests. This should be minimally all jobs that run on pull requests, as well as from jobs that run on your main or [stable branches](../../detection/), for example,`main`, `master`, or `develop`.
diff --git a/flaky-tests/get-started/ci-providers/semaphoreci.mdx b/flaky-tests/get-started/ci-providers/semaphoreci.mdx
index a04c2fde..47966293 100644
--- a/flaky-tests/get-started/ci-providers/semaphoreci.mdx
+++ b/flaky-tests/get-started/ci-providers/semaphoreci.mdx
@@ -169,7 +169,7 @@ blocks:
jobs:
- name: Run Tests
commands:
- - TRUNK_ORG_URL_SLUG=${TRUNK_ORG_URL_SLUG} TRUNK_API_TOKEN=${TRUNK_API_TOKEN} bundle exec rspec
+ - TRUNK_ORG_URL_SLUG=${TRUNK_ORG_URL_SLUG} TRUNK_TEST_COLLECTION_ID=${TRUNK_TEST_COLLECTION_ID} TRUNK_API_TOKEN=${TRUNK_API_TOKEN} bundle exec rspec
```
diff --git a/flaky-tests/get-started/ci-providers/travisci.mdx b/flaky-tests/get-started/ci-providers/travisci.mdx
index 45e6f3c2..13c646a8 100644
--- a/flaky-tests/get-started/ci-providers/travisci.mdx
+++ b/flaky-tests/get-started/ci-providers/travisci.mdx
@@ -96,7 +96,7 @@ dist: jammy
node_js:
- 20
script:
- - TRUNK_ORG_URL_SLUG=$TRUNK_ORG_URL_SLUG TRUNK_API_TOKEN=$TRUNK_API_TOKEN bundle exec rspec
+ - TRUNK_ORG_URL_SLUG=$TRUNK_ORG_URL_SLUG TRUNK_TEST_COLLECTION_ID=$TRUNK_TEST_COLLECTION_ID TRUNK_API_TOKEN=$TRUNK_API_TOKEN bundle exec rspec
```
diff --git a/flaky-tests/get-started/frameworks/android.mdx b/flaky-tests/get-started/frameworks/android.mdx
index 425f90de..22412075 100644
--- a/flaky-tests/get-started/frameworks/android.mdx
+++ b/flaky-tests/get-started/frameworks/android.mdx
@@ -122,6 +122,7 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./junit-reports/*.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
diff --git a/flaky-tests/get-started/frameworks/bazel.mdx b/flaky-tests/get-started/frameworks/bazel.mdx
index e78f5b78..ef456eb6 100644
--- a/flaky-tests/get-started/frameworks/bazel.mdx
+++ b/flaky-tests/get-started/frameworks/bazel.mdx
@@ -110,6 +110,7 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --bazel-bep-path=build_events.json \
--org-url-slug \
+ --test-collection-id \
--token
```
@@ -120,6 +121,7 @@ If your test cases don't have file paths that can be matched against your CODEOW
```sh
./trunk-analytics-cli upload --bazel-bep-path=build_events.json \
--org-url-slug \
+ --test-collection-id \
--token \
--use-bazel-target-for-codeowners
```
diff --git a/flaky-tests/get-started/frameworks/behave.mdx b/flaky-tests/get-started/frameworks/behave.mdx
index ffbe30de..98b346c1 100644
--- a/flaky-tests/get-started/frameworks/behave.mdx
+++ b/flaky-tests/get-started/frameworks/behave.mdx
@@ -96,10 +96,11 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./junit-reports/*.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/cypress.mdx b/flaky-tests/get-started/frameworks/cypress.mdx
index 526028f2..f609f897 100644
--- a/flaky-tests/get-started/frameworks/cypress.mdx
+++ b/flaky-tests/get-started/frameworks/cypress.mdx
@@ -134,10 +134,11 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./junit.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/dart-test.mdx b/flaky-tests/get-started/frameworks/dart-test.mdx
index 536ba55e..b79f1a9b 100644
--- a/flaky-tests/get-started/frameworks/dart-test.mdx
+++ b/flaky-tests/get-started/frameworks/dart-test.mdx
@@ -92,6 +92,7 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./junit.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
diff --git a/flaky-tests/get-started/frameworks/googletest.mdx b/flaky-tests/get-started/frameworks/googletest.mdx
index f9c0aa7a..0de99ab9 100644
--- a/flaky-tests/get-started/frameworks/googletest.mdx
+++ b/flaky-tests/get-started/frameworks/googletest.mdx
@@ -98,6 +98,7 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./junit.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
diff --git a/flaky-tests/get-started/frameworks/gotestsum.mdx b/flaky-tests/get-started/frameworks/gotestsum.mdx
index 6f190783..33894407 100644
--- a/flaky-tests/get-started/frameworks/gotestsum.mdx
+++ b/flaky-tests/get-started/frameworks/gotestsum.mdx
@@ -115,10 +115,11 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./junit.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/gradle.mdx b/flaky-tests/get-started/frameworks/gradle.mdx
index 3dae1586..32b48864 100644
--- a/flaky-tests/get-started/frameworks/gradle.mdx
+++ b/flaky-tests/get-started/frameworks/gradle.mdx
@@ -107,10 +107,11 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./app/build/test-results/test/*.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/jasmine.mdx b/flaky-tests/get-started/frameworks/jasmine.mdx
index d6d4be27..490b50e8 100644
--- a/flaky-tests/get-started/frameworks/jasmine.mdx
+++ b/flaky-tests/get-started/frameworks/jasmine.mdx
@@ -120,10 +120,11 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./test-reports/*.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/jest.mdx b/flaky-tests/get-started/frameworks/jest.mdx
index 33b868e5..57526c51 100644
--- a/flaky-tests/get-started/frameworks/jest.mdx
+++ b/flaky-tests/get-started/frameworks/jest.mdx
@@ -133,10 +133,11 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./junit.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/karma.mdx b/flaky-tests/get-started/frameworks/karma.mdx
index dd4d2539..9f9b2f5a 100644
--- a/flaky-tests/get-started/frameworks/karma.mdx
+++ b/flaky-tests/get-started/frameworks/karma.mdx
@@ -107,10 +107,11 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./test-reports/*.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/kotest.mdx b/flaky-tests/get-started/frameworks/kotest.mdx
index 4b5558d3..93fec351 100644
--- a/flaky-tests/get-started/frameworks/kotest.mdx
+++ b/flaky-tests/get-started/frameworks/kotest.mdx
@@ -177,10 +177,11 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./app/build/test-results/test/*.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/maven.mdx b/flaky-tests/get-started/frameworks/maven.mdx
index 61a2ba2d..a3e9e9a3 100644
--- a/flaky-tests/get-started/frameworks/maven.mdx
+++ b/flaky-tests/get-started/frameworks/maven.mdx
@@ -122,10 +122,11 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./target/junit/*.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/minitest.mdx b/flaky-tests/get-started/frameworks/minitest.mdx
index 5e6bdb8e..5856fc64 100644
--- a/flaky-tests/get-started/frameworks/minitest.mdx
+++ b/flaky-tests/get-started/frameworks/minitest.mdx
@@ -105,10 +105,11 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./results/*.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/mocha.mdx b/flaky-tests/get-started/frameworks/mocha.mdx
index 52814497..cc25f0c7 100644
--- a/flaky-tests/get-started/frameworks/mocha.mdx
+++ b/flaky-tests/get-started/frameworks/mocha.mdx
@@ -109,10 +109,11 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./junit.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/nightwatch.mdx b/flaky-tests/get-started/frameworks/nightwatch.mdx
index f468a3b0..93843305 100644
--- a/flaky-tests/get-started/frameworks/nightwatch.mdx
+++ b/flaky-tests/get-started/frameworks/nightwatch.mdx
@@ -107,10 +107,11 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./test-reports/**/*.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/nunit.mdx b/flaky-tests/get-started/frameworks/nunit.mdx
index 3b1c77bd..8d34250c 100644
--- a/flaky-tests/get-started/frameworks/nunit.mdx
+++ b/flaky-tests/get-started/frameworks/nunit.mdx
@@ -94,10 +94,11 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./build/test-reports/junit/*.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/pest.mdx b/flaky-tests/get-started/frameworks/pest.mdx
index f8f5401e..0124f548 100644
--- a/flaky-tests/get-started/frameworks/pest.mdx
+++ b/flaky-tests/get-started/frameworks/pest.mdx
@@ -92,10 +92,11 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./junit.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/phpunit.mdx b/flaky-tests/get-started/frameworks/phpunit.mdx
index 45c5ba58..f8d39f9f 100644
--- a/flaky-tests/get-started/frameworks/phpunit.mdx
+++ b/flaky-tests/get-started/frameworks/phpunit.mdx
@@ -92,10 +92,11 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./junit.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/playwright.mdx b/flaky-tests/get-started/frameworks/playwright.mdx
index 73777263..0b343b5b 100644
--- a/flaky-tests/get-started/frameworks/playwright.mdx
+++ b/flaky-tests/get-started/frameworks/playwright.mdx
@@ -116,10 +116,11 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./junit.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/pytest.mdx b/flaky-tests/get-started/frameworks/pytest.mdx
index 73296fc4..12edd39e 100644
--- a/flaky-tests/get-started/frameworks/pytest.mdx
+++ b/flaky-tests/get-started/frameworks/pytest.mdx
@@ -92,10 +92,11 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./junit.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/robot-framework.mdx b/flaky-tests/get-started/frameworks/robot-framework.mdx
index 6090ddbd..51564ce2 100644
--- a/flaky-tests/get-started/frameworks/robot-framework.mdx
+++ b/flaky-tests/get-started/frameworks/robot-framework.mdx
@@ -92,10 +92,11 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./junit.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/rspec/index.mdx b/flaky-tests/get-started/frameworks/rspec/index.mdx
index 06fb1fc4..ea474b7e 100644
--- a/flaky-tests/get-started/frameworks/rspec/index.mdx
+++ b/flaky-tests/get-started/frameworks/rspec/index.mdx
@@ -99,6 +99,7 @@ You make an upload to Trunk using the following command:
```sh
TRUNK_ORG_URL_SLUG= \
+TRUNK_TEST_COLLECTION_ID= \
TRUNK_API_TOKEN= \
bundle exec rspec
```
@@ -113,7 +114,7 @@ After your upload, you can verify that Trunk has received and processed it succe
-You do not need to download the `trunk-analytics-cli` when using the Trunk RSpec plugin. Uploads are handled for you as long as you have set `TRUNK_ORG_URL_SLUG` and `TRUNK_API_TOKEN`.
+You do not need to download the `trunk-analytics-cli` when using the Trunk RSpec plugin. Uploads are handled for you as long as you have set `TRUNK_ORG_URL_SLUG`, `TRUNK_API_TOKEN`, and `TRUNK_TEST_COLLECTION_ID`.
## Next Steps
diff --git a/flaky-tests/get-started/frameworks/rspec/manual-uploads.mdx b/flaky-tests/get-started/frameworks/rspec/manual-uploads.mdx
index a8962830..1d72e110 100644
--- a/flaky-tests/get-started/frameworks/rspec/manual-uploads.mdx
+++ b/flaky-tests/get-started/frameworks/rspec/manual-uploads.mdx
@@ -102,10 +102,11 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./junit.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/rust.mdx b/flaky-tests/get-started/frameworks/rust.mdx
index 8313d59b..f69a9ae1 100644
--- a/flaky-tests/get-started/frameworks/rust.mdx
+++ b/flaky-tests/get-started/frameworks/rust.mdx
@@ -97,6 +97,7 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./target/nextest/ci/junit.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
diff --git a/flaky-tests/get-started/frameworks/swift-testing.mdx b/flaky-tests/get-started/frameworks/swift-testing.mdx
index 92398984..13656035 100644
--- a/flaky-tests/get-started/frameworks/swift-testing.mdx
+++ b/flaky-tests/get-started/frameworks/swift-testing.mdx
@@ -94,10 +94,11 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./junit.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/testplan.mdx b/flaky-tests/get-started/frameworks/testplan.mdx
index 1c3fab6c..01d7ec72 100644
--- a/flaky-tests/get-started/frameworks/testplan.mdx
+++ b/flaky-tests/get-started/frameworks/testplan.mdx
@@ -130,11 +130,12 @@ You make an upload to Trunk using the following command:
```sh
./trunk-analytics-cli upload --junit-paths "./junit-reports/*.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
## Next Steps
diff --git a/flaky-tests/get-started/frameworks/vitest.mdx b/flaky-tests/get-started/frameworks/vitest.mdx
index b4f098a4..3722fbb0 100644
--- a/flaky-tests/get-started/frameworks/vitest.mdx
+++ b/flaky-tests/get-started/frameworks/vitest.mdx
@@ -151,10 +151,11 @@ You make an upload to Trunk using the following command:
curl -fL --retry 3 "https://github.com/trunk-io/analytics-cli/releases/latest/download/trunk-analytics-cli-x86_64-unknown-linux.tar.gz" | tar -xz && chmod +x trunk-analytics-cli
./trunk-analytics-cli upload --junit-paths "./junit.xml" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/frameworks/xctest.mdx b/flaky-tests/get-started/frameworks/xctest.mdx
index 38981fd6..0a388310 100644
--- a/flaky-tests/get-started/frameworks/xctest.mdx
+++ b/flaky-tests/get-started/frameworks/xctest.mdx
@@ -57,6 +57,7 @@ curl -fL --retry 3 \
chmod +x trunk-analytics-cli
./trunk-analytics-cli upload --xcresult-path "./test-results.xcresult" \
--org-url-slug \
+ --test-collection-id \
--token
```
```bash Linux (arm64)
@@ -68,6 +69,7 @@ curl -fL --retry 3 \
chmod +x trunk-analytics-cli
./trunk-analytics-cli upload --xcresult-path "./test-results.xcresult" \
--org-url-slug \
+ --test-collection-id \
--token
```
```bash macOS (arm64)
@@ -79,6 +81,7 @@ curl -fL --retry 3 \
chmod +x trunk-analytics-cli
./trunk-analytics-cli upload --xcresult-path "./test-results.xcresult" \
--org-url-slug \
+ --test-collection-id \
--token
```
```bash macOS (x64)
@@ -90,11 +93,12 @@ curl -fL --retry 3 \
chmod +x trunk-analytics-cli
./trunk-analytics-cli upload --xcresult-path "./test-results.xcresult" \
--org-url-slug \
+ --test-collection-id \
--token
```
-You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
+You can find your Trunk organization slug and token in the settings or by following these [instructions](/flaky-tests/get-started/ci-providers/otherci#id-1.-store-a-trunk_token-secret-in-your-ci-system). The collection ID identifies the [test collection](/flaky-tests/get-started/test-collections) the results belong to, and you copy it from that collection in the Trunk app. After your upload, you can verify that Trunk has received and processed it successfully in the **Uploads** tab. Warnings will be displayed if the report has issues.
diff --git a/flaky-tests/get-started/multiple-repositories.mdx b/flaky-tests/get-started/multiple-repositories.mdx
index dd8a08a0..57e55e35 100644
--- a/flaky-tests/get-started/multiple-repositories.mdx
+++ b/flaky-tests/get-started/multiple-repositories.mdx
@@ -109,6 +109,7 @@ Override the repository URL with the `--repo-url` flag:
./trunk-analytics-cli upload \
--junit-paths "test_output.xml" \
--org-url-slug \
+ --test-collection-id \
--token $TRUNK_API_TOKEN \
--repo-url "https://github.com/your-company/your-repo.git"
```
@@ -120,6 +121,7 @@ export TRUNK_REPO_URL="https://github.com/your-company/your-repo.git"
./trunk-analytics-cli upload \
--junit-paths "test_output.xml" \
--org-url-slug \
+ --test-collection-id \
--token $TRUNK_API_TOKEN
```
@@ -135,6 +137,7 @@ To track different test suites within the same repository separately, use the `-
--junit-paths "frontend/test_output.xml" \
--variant "frontend" \
--org-url-slug \
+ --test-collection-id \
--token $TRUNK_API_TOKEN
# Backend tests
@@ -142,6 +145,7 @@ To track different test suites within the same repository separately, use the `-
--junit-paths "backend/test_output.xml" \
--variant "backend" \
--org-url-slug \
+ --test-collection-id \
--token $TRUNK_API_TOKEN
```
diff --git a/flaky-tests/quarantining/index.mdx b/flaky-tests/quarantining/index.mdx
index aa2e3412..a874a4d5 100644
--- a/flaky-tests/quarantining/index.mdx
+++ b/flaky-tests/quarantining/index.mdx
@@ -99,9 +99,9 @@ Wrap each command and specify its JUnit output path. Trunk captures the exit cod
```bash
# run test 1
-./trunk-analytics-cli test --org-url-slug=[org] --token=[token] --junit-paths=test1_output/*.xml -- npm run test1
+./trunk-analytics-cli test --org-url-slug=[org] --test-collection-id=[collection-id] --token=[token] --junit-paths=test1_output/*.xml -- npm run test1
# run test 2
-./trunk-analytics-cli test --org-url-slug=[org] --token=[token] --junit-paths=test2_output/*.xml -- npm run test2
+./trunk-analytics-cli test --org-url-slug=[org] --test-collection-id=[collection-id] --token=[token] --junit-paths=test2_output/*.xml -- npm run test2
```
**Option 2: Handling quarantining during upload**
@@ -117,6 +117,7 @@ To handle build issues that occur outside test runs, use the --test-process-exit
```sh
./trunk-analytics-cli test --junit-paths "test_output.xml" \
--org-url-slug \
+ --test-collection-id \
--token $TRUNK_API_TOKEN \
--junit-paths="**/results/*.xml" \
--test-process-exit-code=1
@@ -201,6 +202,7 @@ If you upload your test results as a second step after you run your tests, you n
|
./trunk-analytics-cli upload \
--org-url-slug $TRUNK_ORG_URL_SLUG \
+ --test-collection-id $TRUNK_TEST_COLLECTION_ID \
--token $TRUNK_API_TOKEN \
--junit-paths $JUNIT_PATH
```
@@ -212,6 +214,7 @@ You can also wrap the test command with the Trunk Analytics CLI. When wrapping t
```bash
./trunk-analytics-cli test \
--org-url-slug \
+ --test-collection-id \
--token $TRUNK_API_TOKEN \
--junit-paths $JUNIT_PATH \
--allow-empty-test-results \
@@ -227,6 +230,7 @@ If you want quarantining to gate your CI job but don't want that run's test resu
```bash
./trunk-analytics-cli upload \
--org-url-slug $TRUNK_ORG_URL_SLUG \
+ --test-collection-id $TRUNK_TEST_COLLECTION_ID \
--token $TRUNK_API_TOKEN \
--junit-paths $JUNIT_PATH \
--dry-run