Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add some alternative method of linking executed autotests to already created tests in Testomat #466

Open
alexks02 opened this issue Dec 18, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@alexks02
Copy link

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 alexks02 added the enhancement New feature or request label Dec 18, 2024
@DavertMik
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants