When I am running my tests from with testng.xml it works but when I run with main method (code added below) these allure-results are NOT created while the TestNG test-output folder is created successfully
I have set the allure.properties as allure.results.directory=allure-results
and placed it at the location “src/test/resources”
<properties>
<allure.version>2.27.0</allure.version>
<aspectj.version>1.9.22.1</aspectj.version>
</properties>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-testng</artifactId>
<version>${allure.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-java-commons</artifactId>
<version>${allure.version}</version>
<scope>compile</scope>
</dependency>
// Run the test with this Runner class
public class Runner {
public static void main(String[] args) {
TestListenerAdapter tla = new TestListenerAdapter();
TestNG testng = new TestNG();
List<String> suites = Lists.newArrayList();
suites.add("testng.xml");
testng.setTestSuites(suites);
testng.run();
}
}