Closed sengupta-saikat closed 2 years ago
The property is named allure.results.directory
not allure.report.directory
.
A sample allure.properties file can be found here: https://github.com/allure-examples/allure-junit5-example/blob/master/src/test/resources/allure.properties
You could also use to stay flexible in case of a changed Maven output directory:
allure.results.directory=${project.build.directory}/allure-results
but then you might need to enable resource filtering for testResources:
<project>
<build>
(...)
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
</build>
</project>
The property is named
allure.results.directory
notallure.report.directory
.A sample allure.properties file can be found here: https://github.com/allure-examples/allure-junit5-example/blob/master/src/test/resources/allure.properties
You could also use to stay flexible in case of a changed Maven output directory:
allure.results.directory=${project.build.directory}/allure-results
but then you might need to enable resource filtering for testResources:
<project> <build> (...) <testResources> <testResource> <directory>src/test/resources</directory> <filtering>true</filtering> </testResource> </testResources> </build> </project>
These 2 are different properties, result is generated first then comes report :)
up
allure.report.directory
can't be configured via allure.properties
file. The actual report directory depends on build tool you use to generate the report. So, in case of Maven, you have 3 options: set allure.report.directory
property in pom.xml, set system property using mvn -Dallure.report.directory
or use reportDirectory
configuration option for allure-maven-plugin
Describe the bug The
allure.report.directory
property inallure.properties
file is not being considered.To Reproduce Steps to reproduce the behavior:
- Create
allure.properties
file in your project- Add
allure.report.directory=target/allure-report
- Run test with
mvn clean test site
(e.g. https://github.com/allure-examples/allure-testng-example)Expected behavior Report should be generated in the given directory i.e.
target/allure-report
not in default one i.e.target/site/allure-maven-plugin
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Allure version 2.13.2 Test framework testng@7.1.0 Allure adaptor allure-testng@2.13.2 Generate report using allure-maven@2.10 Additional context When I add the following configuration for
allure-maven
in thepom.xml
then it works:<configuration> <reportDirectory>${basedir}/target/allure-report</reportDirectory> </configuration>
Where did you add the configuration?
Describe the bug The
allure.report.directory
property inallure.properties
file is not being considered.To Reproduce Steps to reproduce the behavior:
- Create
allure.properties
file in your project- Add
allure.report.directory=target/allure-report
- Run test with
mvn clean test site
(e.g. https://github.com/allure-examples/allure-testng-example)Expected behavior Report should be generated in the given directory i.e.
target/allure-report
not in default one i.e.target/site/allure-maven-plugin
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Allure version 2.13.2 Test framework testng@7.1.0 Allure adaptor allure-testng@2.13.2 Generate report using allure-maven@2.10 Additional context When I add the following configuration for
allure-maven
in thepom.xml
then it works:<configuration> <reportDirectory>${basedir}/target/allure-report</reportDirectory> </configuration>
Where was this configuration added? I tried adding it in allure-maven plug in but it doesn't seem to work.
I tried adding allure.report.directory
in pom.xml. But still no luck.
Describe the bug The
allure.report.directory
property inallure.properties
file is not being considered.To Reproduce Steps to reproduce the behavior:
allure.properties
file in your projectallure.report.directory=target/allure-report
mvn clean test site
(e.g. https://github.com/allure-examples/allure-testng-example)Expected behavior Report should be generated in the given directory i.e.
target/allure-report
not in default one i.e.target/site/allure-maven-plugin
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context When I add the following configuration for
allure-maven
in thepom.xml
then it works: