🐞: There is no test body in the report after executing the test code in the main directory and generating all items
3255834892 opened this issue · 1 comments
What happened?
I called the code in the test directory in the main directory class, but found that when executing the jar package, it must be executed in the pom directory. Therefore, I did not use mvn to execute the test code and generate the report. Instead, I executed and generated it using the cmd command. After generating the report, I found that there was no test body in the report.
This is my Maven Surefire plugin: tstetng-version:7.4
org.apache.maven.plugins
maven-surefire-plugin
3.2.5
true
-Dfile.encoding=${project.build.sourceEncoding}
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar";
listener
io.qameta.allure.testng.AllureTestNg
org.aspectj
aspectjweaver
${aspectj.version}
This is the code I called for testing:
Thread taskThread = new Thread(() -> {
TestNG testng = new TestNG();
testng.setTestClasses(new Class[] { TestRunnertest.class });
testng.addListener(new AllureTestNg());
testng.run();
new Thread(() -> executeMavenCommand("allure serve target/allure-results", "Allure")).start();
What Allure Integration are you using?
allure-assertj, allure-testng
What version of Allure Integration you are using?
2.25.0
What version of Allure Report you are using?
2.25.0
Code of Conduct
- I agree to follow this project's Code of Conduct
I'm not sure if the allure framework doesn't support main, please advise. Thank you