TestNG results upload via CLI creates empty Source

Hi everyone,

I’m trying to import a TestNG test report into Testiny using the CLI. I’m running the following command:

npx @testiny/cli automation --project 1 --source "TestNg" --testng testng-results.xml

The file (testng-results.xml) is generated by the Surefire plugin and looks valid. The upload completes successfully — a new Source is created in Testiny — but it contains no test cases or results. It’s just empty.

Has anyone encountered this before?

Hi and welcome to the Testiny forum!

Have you tried changing the time filter to something different than “7 days”?
When imported, the results have the time stamp included in the file, i.e. the original dates when the tests were performed - and not the time the tests were actually imported on.

Best regards,
Alex

Hi Alex, thanks — yes, I set the date range between 1900-01-01 and 2025-04-10, and now my test results appear. It works! :raised_hands:

But I have another question:

When I try to upload the default TestNG report, I get this error:
Import error: Expected number at AutomationResults.results.0.ts (API_INVALID_INPUT_DATA)

After some testing, I found that if I open the testng-results.xml file and manually remove the UTC part from all timestamps, the upload works — and the results appear (with the issue I originally described in this topic, i.e. empty Source unless mapped correctly).

Is UTC in timestamps unsupported by the CLI parser? Or is there a specific format Testiny expects for TestNG timestamps?

Thanks again!

Could you send us the sample files you used, please? This would help us in reproducing the issues.
So either upload here or send in a private message to me :slight_smile:

The “UTC” suffix is actually not ISO 8601 compliant, it should be a simple “Z” suffix. Is this by default generated by the Surefire TestNG plugin or a custom implementation?

Thank you!

Best regards,
Alex

We just released a fix for this issue, so make sure to download the latest CLI/npm package and try again, please - thanks!

Best regards,
Alex