Circleci tests run custom delimiter

We have a list of testcases which look like this:

Auth Feature Session expired › should redirect to auto logout when session expired
Auth Feature Session expired › should redirect to auto logout when switching tab and session has expired

These are also their names in the resulting junit-report:

<testcase name="Auth Feature Session expired › should redirect to auto logout when session expired" classname="session-expired.spec.ts" time="0">

In theory this can be used with circleci run tests --command="...". However, since the names include spaces, each word is recognized as individual test:

No timing found for "Auth"
No timing found for "Feature"
No timing found for "Session"
No timing found for "expired"
....

Is there a way to define a custom delimiter like \n or ,?

Some more context. We extract the testnames from our playwright files so we can split our tests by individual testcases and not only by files.

Additionally, passing a file to circleci tests split like so: circleci tests split --split-by=timings --timings-type=testname testnames.txt worked and each line was recognized as individual test (but we cannot use: Rerun failed tests).

However circleci tests run --command="..." < testnames.txt does not seem to be able to do the same.

1 Like

Commenting to verify the OP - I saw the same behaviour. You can use spaces in test names if you put them in a file, but rerun failed tests then doesn’t work, presumably because it tries to pass the test names to circleci run tests via stdin/the input stream.

So we have a large number of tests that have spaces replaced with underscores, and we have to map back and forth between the version with spaces and the version with underscores.

This also means that if an engineer copies a test name from the CircleCI “Tests’“ tab, it is the underscores variant, so they can’t search within our own database or log files, or the drive that holds the test definitions, as it is the wrong format.

Very annoying.