reporter icon indicating copy to clipboard operation
reporter copied to clipboard

[junit] Please add some alternative method of linking executed autotests to already created tests in Testomat

Open alexks02 opened this issue 1 year ago • 1 comments

Hello!

I tried to set up JUnit reporter and import test results to the Testomat. It's my test example

@Test
  void test() {
    System.out.println("tid://@Tone-of-our-test-ids");
    dummyActionsBlaBlaBla();
  }

and then I try to run it

% mvn clean test
// output - doesn't matter
% grep "system-out" target/surefire-reports/*.xml
  <system-out><![CDATA[tid://@Tone-of-our-test-ids
]]></system-out>
% TESTOMATIO=our-project-reporting-apikey npx report-xml 'target/surefire-reports/**.xml' --lang=Java

In ths case it works fine, as you see, data is attached to this .xml file and testomat can found test with that test ID and attach report results to it But! Usually we run tests with the following parameter

% mvn clean test -Dsurefire.rerunFailingTestsCount=1
% grep "system-out" target/surefire-reports/*.xml
%

That's all. section is missing in the report => testomat can't attach this test run with actual test We use latest JUnit 5 and maven-surefire plugin for it. You can check my minimal reproducible example here - https://github.com/alexks02/surefire-test Do you have any suggestions, how to pass Test ID's to Testomat without giving up the use of "-Dsurefire.rerunFailingTestsCount=1"?

Thanks in advance, Olek

alexks02 avatar Dec 18 '24 12:12 alexks02

Hi, we are working to introduce annotations for this. No ETA but this is in our plans.

If you have alternative ideas how to make it in a simpler way, we can also think on approach that can work for you.

DavertMik avatar Jan 07 '25 12:01 DavertMik

Please use our native Java reporter https://github.com/testomatio/java-check-tests https://github.com/testomatio/java-reporter

DavertMik avatar Dec 11 '25 01:12 DavertMik