10000 Better document test metadata usage with 'files' modifier · github-cloud/circleci-docs@c69597e · GitHub
[go: up one dir, main page]

Skip to content

Commit c69597e

Browse files
committed
Better document test metadata usage with 'files' modifier
1 parent 70ea9ac commit c69597e

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

jekyll/_docs/test-metadata.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ description: Collecting test metadata
77

88
CircleCI can collect test metadata from JUnit XML files and Cucumber JSON files.
99
We'll use the test metadata to give you better insight into your build. For our
10-
inferred steps that use parallelism, we'll use the timing information to get you
11-
better test splits and finish your builds faster.
10+
inferred steps that use parallelism, we'll always use the timing information to get you
11+
better test splits and finish your builds faster. You can also take advantage
12+
of this runtime-based test splitting in custom steps if you follow [these steps](#using-the-files-modifier).
1213

1314
## Automatic test metadata collection
1415

@@ -121,6 +122,16 @@ test:
121122
### test2junit for Clojure tests
122123
You can use [test2junit](https://github.com/ruedigergad/test2junit) to convert Clojure test output to XML format. For more details, please checkout our [sample project](https://github.com/kimh/circleci-build-recipies).
123124

125+
## Using the `files` modifier
126+
127+
If you are collecting test metadata for a custom build step as documented above, you can
128+
still use runtime-based test splitting with the `files` [modifier](/docs/configuration/#modifiers).
129+
This modifier lets will pass a list of filename arguments to the end of your custom command
130+
which can be used by your test runner to run a subset of test files on each build node.
131+
If the "file" attribute is populated in the junit-formatted XML metadata for these
132+
tests, then their runtime data will be used with the `files` modifier to pass a time-weighted
133+
list of filename args on each build node, ensuring an optimal split of test files across containers.
134+
124135
## API
125136

126137
You can access test metadata for a build from the [API]({{ site.baseurl }}/api/#test-metadata).

0 commit comments

Comments
 (0)
0