Importing Multiple JUnit XML Files into Test Run – Only One File Processed

Hi,

I’m running into an issue when trying to import multiple JUnit XML files into a Test Run using the Testiny CLI. Even though there are two (or more) XML files in my reports/junit/ directory, the import command only processes the first file and ignores the rest.

Here’s what I’m using:

files=(reports/junit/*.xml)
junitArgs=()
for f in "${files[@]}"; do
  junitArgs+=(--junit "$f")
done
npx @testiny/cli testrun \
  --project "$PROJECT_ID" \
  --name "$RUN_NAME" \
  "${junitArgs[@]}" \
  --testcases create \
  --enable-nested-folders \
  --junit-classname-as-folder nested \
  -q -y

Hi and welcome to the Testiny forum!

Yes, the importer in general only takes one file argument, but you can just call the importer multiple times with the different files.

That said, you may want to try the new automation approach in Testiny, since the new automation importer can import multiple files at once by specifying a wild card for the files to import:

Would be great if you can give it a try. The automation feature will be the way to go for automated test results in Testiny.

Best regards,
Alex