allure-framework / allure-maven Goto Github PK
View Code? Open in Web Editor NEWMaven plugin generating Allure report from test results
License: Apache License 2.0
Maven plugin generating Allure report from test results
License: Apache License 2.0
When running mvn allure:report allure:serve
the serve works correctly but the report is not preserved in the target directory. Running mvn allure:report
alone correctly generates the report.
Run mvn allure:report allure:serve
The reports directory should be preserved
There is no way to view the report that was generated by allure:report
when it is used with allure:serve
at the same time
Hello,
I like to know how you go about with generating the trendline? So far I know there is some manual file copy step involved.
Steps I use now:
mvn clean test
mvn allure:report
cp -R target/site/allure-maven-plugin/history target/allure-results/
mvn test
mvn allure:report
This all works! I get a nice report including trendline. But,
mvn allure:report
it checks for the previous report and copies the files.I'm happy to hear from you, if step 2 should be implemented, I'm happy to help,
Roy
I am running my test on AWS and there target directory doesn't create.
So I want to create allure-report outside the target,
is there any way to do ?
Sometimes we don't run tests via mvn commands, we just use IDE to run tests or "mvn test" can't be available.
In this situation, how we set allure.results.directory during run-time?
If I run tests under TestNG 6.8.21 with Allure Maven Plugin 2.2 and Allure version 1.4.14, it works great, if I update to version 6.9.4 of TestNG, I get the following error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project Automation: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test failed: There was an error in the forked process
[ERROR] java.util.ServiceConfigurationError: org.testng.ITestNGListener: Provider ru.yandex.qatools.allure.testng.AllureTestListener not found
[ERROR] at java.util.ServiceLoader.fail(ServiceLoader.java:231)
[ERROR] at java.util.ServiceLoader.access$300(ServiceLoader.java:181)
[ERROR] at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:365)
[ERROR] at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
[ERROR] at org.testng.TestNG.addServiceLoaderListeners(TestNG.java:945)
[ERROR] at org.testng.TestNG.initializeConfiguration(TestNG.java:895)
[ERROR] at org.testng.TestNG.run(TestNG.java:1006)
[ERROR] at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:295)
[ERROR] at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:84)
[ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:90)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[ERROR] -> [Help 1]
Got exception while mvn allure:report
[ERROR] Failed to execute goal io.qameta.allure:allure-maven:2.9:report (default-cli) on project autotest: An error has occurred in Allure report generation.: Could not generate the report: Can't install allure: Server returned HTTP response code: 403 for URL: https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.7.0/allure-2.7.0.zip
To Reproduce
pom.xml
...
<build>
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>2.9</version>
<configuration>
<reportVersion>2.7.0</reportVersion>
</configuration>
</plugin>
</plugins>
</build>
...
execute generation
mvn allure:report
Expected behavior
Alure report successfully generated in ./target/site/allure-maven-plugin
Environment
maven:3.6.1-jdk-8
I'm submitting a bug report. The outputted Allure report differs depending if report is generated by allure-maven plugin or by Allure CLI, even if the allure results are the same. I'm expecting the report generated by allure-maven plugin would be the same compared to report run by Allure CLI.
The report outputted from allure-maven plugin (mvn allure:report) seems to be incorrect (missing fields/information).
See screenshot:
The report outputted from Allure CLI seems to be correct
allure generate -c /Users/heikmjar/git/tietoallas/citest/target/allure-results -o /Users/heikmjar/git/tietoallas/citest/target/myreport
See screenshot from Allure CLI run in Mac OS X:
Environment:
Additional information:
Command I used to generate results (json): mvn clean install -Dcucumber.options="--plugin io.qameta.allure.cucumberjvm.AllureCucumberJvm --tags @caresuite"
Clip from pom.xml:
io.qameta.allure
allure-cucumber-jvm
2.0-BETA16
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
-Dcucumber.options="--plugin io.qameta.allure.cucumberjvm.AllureCucumberJvm"
</argLine>
<systemPropertyVariables>
<allure.results.directory>target/allure-results</allure.results.directory>
</systemPropertyVariables>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>2.8</version>
<configuration>
<reportVersion>2.0.1</reportVersion>
<resultsDirectory>allure-results</resultsDirectory>
</configuration>
</plugin>
</plugins>
</build>
Jaris-MacBook-Pro-2:citest heikmjar$ mvn allure:report
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building HUS CI tests 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- allure-maven:2.8:report (default-cli) @ hus-ci-tests ---
[INFO] Allure installation directory /Users/heikmjar/git/tietoallas/citest/.allure
[INFO] Try to finding out allure 2.0.1
[INFO] Generate Allure report (report) with version 2.0.1
[INFO] Generate Allure report to /Users/heikmjar/git/tietoallas/citest/target/site/allure-maven-plugin
[INFO] Found results directory /Users/heikmjar/git/tietoallas/citest/target/allure-results
[INFO] Can't find information about categories.
[INFO] Generate report to /Users/heikmjar/git/tietoallas/citest/target/site/allure-maven-plugin
Report successfully generated to /Users/heikmjar/git/tietoallas/citest/target/site/allure-maven-plugin
[INFO] Report generated successfully.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.043 s
[INFO] Finished at: 2017-08-01T10:53:10+03:00
[INFO] Final Memory: 17M/309M
There is no executor info
Add executor info like I made it in gradle plugin:
https://github.com/allure-framework/allure-gradle/pull/22/files
i encountering an issue with allure-maven plugin, maven is unable to find the plugin
unable to find allure-maven plugin
maven should be able to import the plugin normally
[](
4.0.0
<groupId>MobileAutomationTest</groupId>
<artifactId>app</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<jre.level>1.8</jre.level>
<jdk.level>1.8</jdk.level>
<aspectj.version>1.9.5</aspectj.version>
</properties>
<build>
<plugins>
<!-- Compiler plug-in -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${jdk.level}</source>
<target>${jdk.level}</target>
</configuration>
</plugin>
<!-- Added Surefire Plugin configuration to execute tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<configuration>
<testFailureIgnore>false</testFailureIgnore>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
<suiteXmlFiles>
<suiteXmlFile>src/test/java/Suites/AddCaseTests.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.testng/testng -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.1.0</version>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-testng</artifactId>
<version>2.13.2</version>
</dependency>
<!--https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-server-->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>3.141.59</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.appium/java-client -->
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>7.3.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.relevantcodes/extentreports -->
<dependency>
<groupId>com.relevantcodes</groupId>
<artifactId>extentreports</artifactId>
<version>2.41.2</version>
</dependency>
<!-- log4j2 -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.30</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.6.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.testcontainers/testcontainers -->
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>1.13.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<reporting>
<excludeDefaults>true</excludeDefaults>
<plugins>
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>2.10.0</version>
<configuration>
<reportDirectory>${basedir}/target/allure-report</reportDirectory>
</configuration>
</plugin>
</plugins>
</reporting>
)
If we configuration the numbers of allurepath, the around numbers of EXECUTORS will display on Allure report - overview. All links of executors pointing to one link
Only display on executor.
| Allure version | 2.6.0 |
| Allure adaptor | [email protected] |
| Generate report using | [email protected] |
<properties>
<junit.version>4.12</junit.version>
<selenium.version>3.4.0</selenium.version>
<cucumber.version>1.2.5</cucumber.version>
<jasperreports.version>6.3.1</jasperreports.version>
<allure.version>1.5.4</allure.version>
<aspectj.version>1.7.4</aspectj.version>
<release.number>1</release.number>
<allure.results.directory>${release.number}/allure-results</allure.results.directory>
<allure.report.directory>${release.number}/allure-results/allure-report</allure.report.directory>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<testFailureIgnore>false</testFailureIgnore>
<argLine>
-javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar
</argLine>
<systemProperties>
<property>
<name>allure.results.directory</name>
<value>${allure.results.directory}</value>
<name>allure.report.directory</name>
<value>${allure.report.directory}</value>
</property>
</systemProperties>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.7.4</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<reporting>
<excludeDefaults>true</excludeDefaults>
<plugins>
<plugin>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-maven-plugin</artifactId>
<version>2.6</version>
<configuration>
<resultsDirectory>${release.number}/allure-results</resultsDirectory>
<inputDirectories>${release.number}/allure-results</inputDirectories>
<reportDirectory>${allure.report.directory}</reportDirectory>
<reportingOutputDirectory>${allure.report.directory}</reportingOutputDirectory>
<failReportIfEmpty>false</failReportIfEmpty>
</configuration>
</plugin>
</plugins>
</reporting>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.8.0-alpha2</version>
</dependency>
<dependency>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-junit-adaptor</artifactId>
<version>${allure.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>5.0.0-BETA8</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>${cucumber.version}</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>${cucumber.version}</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>${cucumber.version}</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>${jasperreports.version}</version>
</dependency>
</dependencies>
After adding allure in pom, my original logger pattern is not reflecting in loggers in console
I'm having
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>[%5p] [%t] %m [%M::%F:%L] %n</pattern>
</encoder>
</appender>
which gives logs like this:
[INFO] [main] TC-1234612:Determining By locator for: id=cal [createObject::Resolver.java:87]]
But after adding allure dependency, logger comes like-
15:56:48.018 [main] INFO com.domain.qa.fw.util.Resolver - TC-1234612:Determining By locator for: id=cal
What is the work around to get back my logger pattern !
Default report version is 2.0.1 (https://docs.qameta.io/allure/#_maven_6)
The default Allure version is 2.0.1
If isn't present, by default downloading latest stable version, and this is 2.6.0
Also after needed to update version in documentation.
Hi,
It seems that the report is displayed properly and working fine only on Firefox.
However if I try opening it on Chrome (46.0.2490.71 m) or Edge (20.10240.16384.0) the "Your report seems to be broken" message is displayed.
E.g.
~/target/site/allure-maven-plugin/index.html#/home is displaying
Message: {{error.status}}
Debug: {{error}}
Let me know if additional details are needed.
Good job with the framework, it;s a life-saver and hoping to see it working on Chrome at least, as Firefox is only used for testing purposes.
Cosmin
I don't like hard-coded paths and I want to use properties.
But this configuration doesn't work
<plugin>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-maven-plugin</artifactId>
<version>2.0</version>
<configuration>
<resultsPattern>${project.build.directory}/allure</resultsPattern>
<reportVersion>1.4.1-SNAPSHOT</reportVersion>
</configuration>
</plugin>
I've got this output
[INFO] Generating "Allure" report --- allure-maven-plugin:2.0
[INFO] Report Version: 1.4.1-SNAPSHOT
[INFO] Results Pattern: /Users/just-boris/coding/allure-junit-variant/target/allure
[INFO] Found [0] results directories by pattern [/Users/just-boris/coding/allure-junit-variant/target/allure]
If I set results pattern to target/allure
directly, all works good, but it is not clean way. I think
Java 8 and 9 are installed. Maven is set up to use Java 8 in IDE.
While report generation via allure:report
, allure-maven
plugin uses Java specified via JAVA_HOME
(9th version), which causes Java 9 specific exception.
allure-testng
adaptor.allure:report
from IDE.allure-maven
plugin uses the same Java version as the root maven process.
Currently it's not possible to generate report without overriding JAVA_HOME
, as in Java 9 there were some structural changes made, which cause javax
exceptions.
Stacktrace:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at io.qameta.allure.allure1.Allure1Plugin.xmlFiles(Allure1Plugin.java:375)
at io.qameta.allure.allure1.Allure1Plugin.getStreamOfAllure1Results(Allure1Plugin.java:370)
at io.qameta.allure.allure1.Allure1Plugin.readResults(Allure1Plugin.java:101)
at io.qameta.allure.ReportGenerator.lambda$readResults$0(ReportGenerator.java:32)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1378)
at io.qameta.allure.ReportGenerator.readResults(ReportGenerator.java:32)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1492)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:511)
at io.qameta.allure.ReportGenerator.generate(ReportGenerator.java:54)
at io.qameta.allure.ReportGenerator.generate(ReportGenerator.java:43)
at io.qameta.allure.Commands.generate(Commands.java:88)
at io.qameta.allure.CommandLine.run(CommandLine.java:129)
at java.base/java.util.Optional.orElseGet(Optional.java:361)
at io.qameta.allure.CommandLine.main(CommandLine.java:72)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
... 20 more
I believe that history
generation is missing. I read the docs and configured the plugin to use but I did not see any documentation explaining how to generate the history
folder using this plugin. All the documentation that I read so far mentions that the history folder will be at the allure-results
folder but I don't see such folder to generate the trends.
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>2.7</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<systemPropertyVariables>
<allure.results.directory>target/allure-results</allure.results.directory>
</systemPropertyVariables>
<testFailureIgnore>false</testFailureIgnore>
<argLine>
${surefireArgLine} -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
<properties>
<property>
<name>listener</name>
<value>io.qameta.allure.junit4.AllureJunit4</value>
</property>
</properties>
</configuration>
</plugin>
Steps
mvn clean test
mvn allure:report
Expected : There is a folder called history
inside allure-results
that can be used for future builds
Actual : I do not see any history folder and thus I can't generate trends
I expect to see an history
folder to be able to generate history with subsequent builds.
When using a proxy server with exception in the maven config, like this:
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxy</host>
<port>8080</port>
<nonProxyHosts>localhost*|127.0.0.1|*.example.com|*.intern.example.com</nonProxyHosts>
</proxy>
it is not possible to direct the allure-maven
plugin to download from a host covered by the exception (For example https://artifactory.intern.example.com/), since those exceptions are not honoured.
www.google.com
since it shouldn't been usedrepo.maven.apache.org
to the nonProxyHost list<reportVersion>2.13.7</reportVersion>
<allureDownloadUrl>https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/%s/allure-commandline-%s.zip</allureDownloadUrl>
allure-maven shouldn't download the command line tool via proxy if the host it should download from is covered by a proxy exception. (Since current versions of the allure cli are present in Maven Central, maybe it would be best to skip downloading inside this plugin and letting Maven handle it instead)
Failure to run in a corperate environment with a mandatory proxy to the internet, but no proxy to the internal Artifactory installation
I try add allure.issues.tracker.pattern and allure.tests.management.pattern to allure.properties, but the property doesn't read. Can you investigate this issue please?
The newly released Allure 2.8 can not be used with the Maven plugin.
The plugin tries to download https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.8.0/allure-2.8.0.zip, which is missing.
[INFO] --- allure-maven:2.9:report (default-cli) @ foo ---
[INFO] Allure installation directory /foo/.allure
[INFO] Try to finding out allure 2.8.0
[INFO] Downloading allure commandline...
[ERROR] Can't install allure
java.io.FileNotFoundException: https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.8.0/allure-2.8.0.zip
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0 (HttpURLConnection.java:1890)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream (HttpURLConnection.java:1492)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream (HttpsURLConnectionImpl.java:263)
at io.qameta.allure.maven.AllureCommandline.download (AllureCommandline.java:132)
at io.qameta.allure.maven.AllureGenerateMojo.installAllure (AllureGenerateMojo.java:196)
at io.qameta.allure.maven.AllureGenerateMojo.executeReport (AllureGenerateMojo.java:123)
at org.apache.maven.reporting.AbstractMavenReport.generate (AbstractMavenReport.java:255)
at org.apache.maven.reporting.AbstractMavenReport.execute (AbstractMavenReport.java:143)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
Hi,
I have maven-testng-allure project . Allure-report integration was done according to example. The problem is that no XML files are generated after executing tests via "mvn clean test" command. But, in case if test execution was made via TestNG (in Eclipse: Run as TestNG suit) everything is OK. What problem could cause such behaviour?
The version released 19 days ago (version 2.10.0) is still not updated in Maven central.
It is reporting the latest version as 2.9.
I'm using maven with protractor, while taking build or running by maven, I want allure reports to be generated in target folder. In conf.js I've given the resultDir path. But screenshot and xml files are not generated in the specified path in resultDir. Plz give solution.
onPrepare: function () {
var AllureReporter = require('jasmine-allure-reporter');
jasmine.getEnv().addReporter(new AllureReporter({
allureReport: {
resultsDir: '${basedir}/target/allure-report'
}
}));
IllegalArgumentException
occurs on report generation. However, report itself is generated.
allure-testng
adaptor.allure:report
goal and set JAVA_HOME
environment variable pointing to JDK 8 folder.Report is generated, no exceptions have thrown.
Plugin shouldn't ever throw such exceptions on report generation.
Stacktrace:
[ERROR] Failed to execute goal io.qameta.allure:allure-maven:2.8:report (default-cli) on project allure2-maven-testng-samples: An error has occurred in Allure report generation.: Could not generate the report: 'other' is different type of Path -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.qameta.allure:allure-maven:2.8:report (default-cli) on project allure2-maven-testng-samples: An error has occurred in Allure report generation.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Caused by: org.apache.maven.plugin.MojoExecutionException: An error has occurred in Allure report generation.
at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:171)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 21 more
Caused by: org.apache.maven.reporting.MavenReportException: Could not generate the report
at io.qameta.allure.maven.AllureGenerateMojo.executeReport(AllureGenerateMojo.java:132)
at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:255)
at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:143)
... 23 more
Caused by: java.lang.IllegalArgumentException: 'other' is different type of Path
at sun.nio.fs.UnixPath.relativize(UnixPath.java:416)
at sun.nio.fs.UnixPath.relativize(UnixPath.java:43)
at io.qameta.allure.maven.AllureGenerateMojo.render(AllureGenerateMojo.java:251)
at io.qameta.allure.maven.AllureGenerateMojo.executeReport(AllureGenerateMojo.java:130)
... 25 more
I use an old version of allure-junit-adapter
<properties>
<allure.version>1.5.3</allure.version>
...
</properties>
<dependency>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-junit-adaptor</artifactId>
<version>${allure.version}</version>
</dependency>
And when I generate report with new allure-maven:2.7-SNAPSHOT
plugin i get an error like that
mvn site
...
[INFO] Generating "Allure" report --- allure-maven:2.7-SNAPSHOT
[INFO] Allure installation directory /Users/kurau/git/allure-junit-example/.allure
[INFO] Try to finding out allure 1.5.3
[INFO] Downloading allure commandline...
[INFO] Proxy is not specified.
[ERROR] Can't install allure
java.io.FileNotFoundException: https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/1.5.3/allure-1.5.3.zip
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1836)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at java.net.URL.openStream(URL.java:1045)
...
This helps for me:
allure.version
to 2.0.1
<properties>
<allure.version>2.0.1</allure.version>
...
</properties>
allure-junit-adapter
version<dependency>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-junit-adaptor</artifactId>
<version>1.5.3</version>
</dependency>
It is look like the path to allure commandline
depends on allure.version
and will be failing with an old adapters (if insert the allure version to properties section)
Need support to generate the allure reports by using maven, but unfortunately it couldn't possible.
Error:
[INFO] --- allure-maven:2.8:report (default-cli) @ YovoAutomation ---
[INFO] Allure installation directory E:\Appium\YovoAutomation/.allure
[INFO] Try to finding out allure 2.3.1
[INFO] Generate Allure report (report) with version 2.3.1
[INFO] Generate Allure report to E:\Appium\YovoAutomation\target\site/allure-mav
en-plugin
[INFO] Found results directory E:\Appium\YovoAutomation\target\allure-results
[INFO] Can't find information about categories.
[INFO] Generate report to E:\Appium\YovoAutomation\target\site\allure-maven-plug
in
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/JAXBEx
ception
at io.qameta.allure.allure1.Allure1Plugin.xmlFiles(Allure1Plugin.java:37
5)
at io.qameta.allure.allure1.Allure1Plugin.getStreamOfAllure1Results(Allu
re1Plugin.java:370)
at io.qameta.allure.allure1.Allure1Plugin.readResults(Allure1Plugin.java
:101)
at io.qameta.allure.ReportGenerator.lambda$readResults$0(ReportGenerator
.java:32)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1507)
at io.qameta.allure.ReportGenerator.readResults(ReportGenerator.java:32)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipe
line.java:195)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipe
line.java:177)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(A
rrayList.java:1621)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline
.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractP
ipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Redu
ceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline
.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipelin
e.java:578)
at io.qameta.allure.ReportGenerator.generate(ReportGenerator.java:54)
at io.qameta.allure.ReportGenerator.generate(ReportGenerator.java:43)
at io.qameta.allure.Commands.generate(Commands.java:88)
at io.qameta.allure.CommandLine.run(CommandLine.java:129)
at java.base/java.util.Optional.orElseGet(Optional.java:362)
at io.qameta.allure.CommandLine.main(CommandLine.java:72)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinCla
ssLoader.java:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(C
lassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 20 more
[ERROR] Can't generate allure report data
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit
value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.
java:404)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166
)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:153
)
at io.qameta.allure.maven.AllureCommandline.execute (AllureCommandline.java:
79)
at io.qameta.allure.maven.AllureCommandline.generateReport (AllureCommandlin
e.java:49)
at io.qameta.allure.maven.AllureGenerateMojo.generateReport (AllureGenerateM
ojo.java:189)
at io.qameta.allure.maven.AllureGenerateMojo.executeReport (AllureGenerateMo
jo.java:128)
at org.apache.maven.reporting.AbstractMavenReport.generate (AbstractMavenRep
ort.java:255)
at org.apache.maven.reporting.AbstractMavenReport.execute (AbstractMavenRepo
rt.java:143)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBui
ldPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (
LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (
LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreaded
Builder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleSt
arter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccesso
rImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMetho
dAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:567)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launche
r.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:2
25)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launc
her.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347
)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.741 s
[INFO] Finished at: 2020-05-30T09:24:55+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.qameta.allure:allure-maven:2.8:report (default
-cli) on project YovoAutomation: An error has occurred in Allure report generati
on.: Could not generate the report: Can't generate allure report data: Process e
xited with an error: 1 (Exit value: 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception
Pom.xml
io.qameta.allure
allure-maven
2.8
2.3.1
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-testng</artifactId>
<version>2.13.1</version>
</dependency>
Allure Maven plugin fails to generate reports when there are no tests failing. In one sentence it says
Found results directory /home/dev/workspace/envhealth-tests@2/envhealth-tests/target/allure-results",
and then
InvocationTargetException: Could not find any allure results
Looking at content of allure-results file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:test-suite start="1499930595813" stop="1499930595830" version="1.5.4" xmlns:ns2="urn:model.allure.qatools.yandex.ru">
<name>Surefire suite : Surefire test</name>
<title>Surefire suite : Surefire test</title>
<labels>
<label name="framework" value="TestNG"/>
<label name="language" value="JAVA"/>
</labels>
</ns2:test-suite>
Here's more complete log:
[INFO] Generating "Allure" report --- allure-maven-plugin:2.6
[INFO] Generate Allure report (report) with version RELEASE
[INFO] Generate Allure report to /home/dev/workspace/envhealth-tests@2/envhealth-tests/target/site/allure-maven-plugin-rest
[INFO] Found results directory /home/dev/workspace/envhealth-tests@2/envhealth-tests/target/allure-results
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] envhealth-tests .................................... FAILURE [ 13.549 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 43.294 s
[INFO] Finished at: 2017-07-13T07:23:19+00:00
[INFO] Final Memory: 59M/174M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project envhealth-tests: Error during page generation: Error rendering Maven report: Could not generate the report: InvocationTargetException: Could not find any allure results -> [Help 1]
The empty report should be generated even if all tests are passing.
Error: Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project allure-testng-example: Error during page generation: Error rendering Maven report: Could not generate the report: InvocationTargetException: Unable to provision, see the following errors:
[ERROR]
[ERROR] 1) Error injecting constructor, java.lang.NoClassDefFoundError: javax/xml/bind/ValidationEventLocator
[ERROR] at ru.yandex.qatools.allure.data.converters.DefaultTestCaseConverter.(DefaultTestCaseConverter.groovy:35)
[ERROR] while locating ru.yandex.qatools.allure.data.converters.DefaultTestCaseConverter
[ERROR] while locating ru.yandex.qatools.allure.data.converters.TestCaseConverter
[ERROR] for field at ru.yandex.qatools.allure.data.AllureReportGenerator.converter(AllureReportGenerator.java:37)
[ERROR] while locating ru.yandex.qatools.allure.data.AllureReportGenerator
[ERROR]
[ERROR] 1 error: javax.xml.bind.ValidationEventLocator
[ERROR] -> [Help 1]
XML:
4.0.0
<parent>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-examples-parent</artifactId>
<version>1.0</version>
</parent>
<artifactId>allure-testng-example</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<allure.version>1.5.4</allure.version>
<aspectj.version>1.9.2</aspectj.version>
<suiteXmlFile>Executer.xml</suiteXmlFile>
</properties>
<name>Testing</name>
<description>Testing application</description>
<repositories>
<repository>
<id>central</id>
<name>Repo1</name>
<url>http://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<name>Repo1</name>
<url>http://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-testng-adaptor</artifactId>
<version>${allure.version}</version>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.14.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<version>1.1.6</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.12</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<version>3.141.59</version>
<!-- <version>2.47.1</version> -->
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-support</artifactId>
<version>3.141.59</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
<version>3.141.59</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>3.141.59</version>
</dependency>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans-xmlpublic</artifactId>
<version>2.6.0</version>
</dependency>
<dependency>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-java-adaptor-api</artifactId>
<version>1.5.4</version>
<organization>
<name>Yandex</name>
<url>http://company.yandex.com</url>
</organization>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://github.com/allure-framework/allure-maven-plugin</url>
<connection>scm:[email protected]:allure-framework/allure-maven-plugin.git</connection>
<developerConnection>scm:git:[email protected]:allure-framework/allure-maven-plugin.git</developerConnection>
</scm>
<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/allure-framework/allure-maven-plugin/issues</url>
</issueManagement>
<ciManagement>
<system>TeamCity</system>
<url>http://teamcity.qatools.ru/</url>
</ciManagement>
<mailingLists>
<mailingList>
<name>Allure Mailing List</name>
<post>[email protected]</post>
</mailingList>
</mailingLists>
<prerequisites>
<maven>3.3.3</maven>
</prerequisites>
<build>
<resources>
<resource>
<directory>src/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
<!--Below Executer.xml is nothing but it is a testng.xml file -->
<!-- <suiteXmlFiles>
<suiteXmlFile>Executer.xml</suiteXmlFile>
</suiteXmlFiles> -->
<forkMode>always</forkMode>
<systemPropertyVariables>
<reporter.debug>false</reporter.debug>
</systemPropertyVariables>
<suiteXmlFiles>
<suiteXmlFile>${suiteXmlFile}</suiteXmlFile>
</suiteXmlFiles>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<!--Needed only to show reports locally. Run jetty:run and
open localhost:8080 to show the report-->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.2.10.v20150310</version>
<configuration>
<webAppSourceDirectory>${project.build.directory}/site/allure-maven-plugin</webAppSourceDirectory>
<stopKey>stop</stopKey>
<stopPort>1234</stopPort>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<excludeDefaults>true</excludeDefaults>
<plugins>
<plugin>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-maven-plugin</artifactId>
<version>2.6</version>
</plugin>
</plugins>
</reporting>
can you make more history builds available in the report, it seems limited to 5 builds ?
it's a very used feature.
is there a way to aggregate history build reports into one report ?
thx
Maven multi-module project results aggregation fails in Windows
I got into this problem while running mvn io.qameta.allure:allure-maven:2.8:aggregate -Dreport.version=2.3.4
on a multi-module Maven project.
Error apparently comes from Allure command line, but not sure.
[ERROR] Failed to execute goal io.qameta.allure:allure-maven:2.8:aggregate (default-cli) on project mule-runtime-project: An error has occurred in Allure report generation. Could not generate the report: Can't generate allure report data: Process exited with an error: 255 (Exit value: 255) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.qameta.allure:allure-maven:2.8:aggregate (default-cli) on project mule-runtime-project: An error has occurred in Allure report generation.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: An error has occurred in Allure report generation.
at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:171)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: org.apache.maven.reporting.MavenReportException: Could not generate the report
at io.qameta.allure.maven.AllureGenerateMojo.executeReport(AllureGenerateMojo.java:132)
at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:255)
at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:143)
... 22 more
Caused by: org.apache.maven.reporting.MavenReportException: Can't generate allure report data
at io.qameta.allure.maven.AllureGenerateMojo.generateReport(AllureGenerateMojo.java:193)
at io.qameta.allure.maven.AllureGenerateMojo.executeReport(AllureGenerateMojo.java:128)
... 24 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 255 (Exit value: 255)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:153)
at io.qameta.allure.maven.AllureCommandline.execute(AllureCommandline.java:79)
at io.qameta.allure.maven.AllureCommandline.generateReport(AllureCommandline.java:49)
at io.qameta.allure.maven.AllureGenerateMojo.generateReport(AllureGenerateMojo.java:189)
... 25 more
When running the command - mvn clean test site, the reports is not generated.
Here is the execution log - execution-log.txt
Here is the full execution stacktrace - log.txt
For large amount of test results, allure framework generates report longer than 60 sec which cause timeout of ExecuteWatchdog. Allure framework process is killed and report is only partially generated. Exception is thrown:
[ERROR] Can't generate allure report data
org.apache.commons.exec.ExecuteException: Process exited with an error: 143 (Exit value: 143)
To reproduce the bug you have to generate large amount of data for allure framework. For example: web application tests which stores each send and received messages.
Timeout for AllureCommandline::generateReport should be configurable just like in case of AllureCommandline::serve.
Fix the malfunction of the main functionality.
Using allure-maven 2.8, when you execute the allure:serve option, it starts the web server with the results but it will only last 60 seconds up, which seems to be the default timeout.
There is no visible option to change this setting, and the server always goes down after 60 seconds.
Hi,
I am overriding the allure.results.directory and allure.report.directory but I am unable to generate allure report
Below is the error I am getting
[DEBUG] Configuring mojo ru.yandex.qatools.allure:allure-maven-plugin:2.5:bulk from plugin realm ClassRealm[plugin>ru.yandex.qatools.allure:allure-maven-plugin:2.5, parent: ClassRealm[plugin>org.apache.maven.plugins:maven-site-plugin:3.3, parent: sun.misc.Launcher$AppClassLoader@5c647e05]]
[DEBUG] Configuring mojo 'ru.yandex.qatools.allure:allure-maven-plugin:2.5:bulk' with basic configurator -->
DEBUG resultsDirectory = target/16-21/allure-results_2016_05_19_02_56_AM
DEBUG inputDirectories = target/16-21/allure-results_2016_05_19_02_56_AM
DEBUG reportDirectory = target/16-21/allure-results_2016_05_19_02_56_AM/allure-report
DEBUG reportingOutputDirectory = target/16-21/allure-results_2016_05_19_02_56_AM/allure-report
DEBUG allureMain = ru.yandex.qatools.allure.AllureMain
DEBUG buildDirectory = /Users/a6001074/BBY_Cloudbrowse/target
DEBUG project = MavenProject: com.bby:BBY_Cloudbrowse:0.0.1-SNAPSHOT @ /Users/a6001074/BBY_Cloudbrowse/pom.xml
DEBUG projectRepositories = [central (https://repo.maven.apache.org/maven2, default, releases)]
DEBUG propertiesFilePath = report.properties
DEBUG repositorySession = org.eclipse.aether.DefaultRepositorySystemSession@28369db0
DEBUG version = 1.4.23
DEBUG pluginDescriptor = Component Descriptor: role: 'org.apache.maven.plugin.Mojo', implementation: 'ru.yandex.qatools.allure.report.AlureAggregateMojo', role hint: 'ru.yandex.qatools.allure:allure-maven-plugin:2.5:aggregate'
role: 'org.apache.maven.plugin.Mojo', implementation: 'ru.yandex.qatools.allure.report.AllureReportMojo', role hint: 'ru.yandex.qatools.allure:allure-maven-plugin:2.5:report'
role: 'org.apache.maven.plugin.Mojo', implementation: 'ru.yandex.qatools.allure.report.HelpMojo', role hint: 'ru.yandex.qatools.allure:allure-maven-plugin:2.5:help'
[DEBUG] -- end configuration --
[DEBUG] Mapped url: /Users/a6001074/BBY_Cloudbrowse/src/site to relative path: src/site
[WARNING] No project URL defined - decoration links will not be relativized!
[INFO] Rendering site with org.apache.maven.skins:maven-default-skin:jar:1.0 skin.
[INFO] Skipped "Allure" report, file "allure-maven-plugin.html" already exists for the English version.
[INFO] Skipped "Allure" report, file "allure-maven-plugin.html" already exists for the English version.
[DEBUG] Generating /Users/a6001074/BBY_Cloudbrowse/target/site/allure-maven-plugin.html
[INFO] Generating "Allure" report --- allure-maven-plugin:2.5
[INFO] Generate Allure report (aggregate) with version 1.4.23
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=36, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=29, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1, ConflictResolver.conflictItemCount=36, DefaultDependencyCollector.collectTime=29, DefaultDependencyCollector.transformTime=1}
[DEBUG] Found 29 dependencies for Dependency {groupId=ru.yandex.qatools.allure, artifactId=allure-bundle, version=1.4.23, type=jar}
[DEBUG] ru.yandex.qatools.allure:allure-bundle:1.4.23
[DEBUG] org.slf4j:slf4j-simple:1.7.12
[DEBUG] org.slf4j:slf4j-api:1.7.12
[DEBUG] ru.yandex.qatools.allure:allure-report-data:1.4.23
[DEBUG] ru.yandex.qatools.allure:allure-report-plugin-api:1.4.23
[DEBUG] ru.yandex.qatools.allure:allure-model:1.4.23
[DEBUG] org.jvnet.jaxb2_commons:jaxb2-basics-runtime:0.9.3
[DEBUG] ru.yandex.qatools.properties:properties-loader:1.5
[DEBUG] commons-beanutils:commons-beanutils-core:1.8.3
[DEBUG] commons-logging:commons-logging:1.1.1
[DEBUG] com.google.inject:guice:4.0
[DEBUG] javax.inject:javax.inject:1
[DEBUG] aopalliance:aopalliance:1.0
[DEBUG] ru.yandex.qatools.allure:allure-commons:1.4.23
[DEBUG] commons-io:commons-io:2.4
[DEBUG] com.fasterxml.jackson.core:jackson-databind:2.3.0
[DEBUG] com.fasterxml.jackson.core:jackson-annotations:2.3.0
[DEBUG] com.fasterxml.jackson.core:jackson-core:2.3.0
[DEBUG] com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.3.0
[DEBUG] org.pegdown:pegdown:1.4.2
[DEBUG] org.parboiled:parboiled-java:1.1.6
[DEBUG] org.parboiled:parboiled-core:1.1.6
[DEBUG] org.ow2.asm:asm:4.1
[DEBUG] org.ow2.asm:asm-tree:4.1
[DEBUG] org.ow2.asm:asm-analysis:4.1
[DEBUG] org.ow2.asm:asm-util:4.1
[DEBUG] org.modelmapper:modelmapper:0.7.3
[DEBUG] org.codehaus.groovy:groovy:2.4.3
[DEBUG] com.google.guava:guava:18.0
[INFO] Generate Allure report to target/16-21/allure-results_2016_05_19_02_56_AM/allure-report
[WARNING] Results directory for module Cloudbrowse tests not found.
[WARNING] Allure report was skipped because there is no results directories found.
[DEBUG] Multipage report: 0 subreports
Current link in readme points to non-existing (probably just moved) jenkins build
Seems that if we change default output path - link will be broken.
Hi, I have a problem.It does not generate the results file in allure-results
As a result of going to an empty report after tests
When changing allure.version on 1.4.14, I get an error at the start of tests
Running TestSuite
java.lang.reflect.UndeclaredThrowableException
at sun.proxy.$Proxy0.invoke(Unknown Source)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
... 4 more
Caused by: java.util.ServiceConfigurationError: org.testng.ITestNGListener: Provider ru.yandex.qatools.allure.testng.AllureTestListener not found
at java.util.ServiceLoader.fail(ServiceLoader.java:231)
at java.util.ServiceLoader.access$300(ServiceLoader.java:181)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:365)
at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
at org.testng.TestNG.addServiceLoaderListeners(TestNG.java:945)
at org.testng.TestNG.initializeConfiguration(TestNG.java:895)
at org.testng.TestNG.run(TestNG.java:1006)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:70)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:149)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:95)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:114)
... 9 more
[ERROR] There are test failures.</code>
pom.xml
<groupId>com.ats</groupId>
<artifactId>vis-web-testing</artifactId>
<version>0.0.1</version>
<properties>
<surefire.version>2.8.1</surefire.version>
<allure.version>1.3.9</allure.version>
<aspectj.version>1.8.5</aspectj.version>
<encoding>UTF-8</encoding>
</properties>
<dependencies>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>RELEASE</version>
</dependency>
<dependency>
<groupId>nl.javadude.assumeng</groupId>
<artifactId>assumeng</artifactId>
<version>RELEASE</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>RELEASE</version>
</dependency>
<dependency>
<groupId>org.cthul</groupId>
<artifactId>cthul-matchers</artifactId>
<version>RELEASE</version>
</dependency>
<dependency>
<groupId>ru.yandex.qatools.matchers</groupId>
<artifactId>webdriver-matchers</artifactId>
<version>RELEASE</version>
</dependency>
<dependency>
<groupId>ru.yandex.qatools.matchers</groupId>
<artifactId>matcher-decorators</artifactId>
<version>RELEASE</version>
</dependency>
<dependency>
<groupId>ru.yandex.qatools.matchers</groupId>
<artifactId>collection-matchers</artifactId>
<version>RELEASE</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-testng-adaptor</artifactId>
<version>${allure.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-java-aspects</artifactId>
<version>1.4.11</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.42.2</version>
</dependency>
<dependency>
<groupId>ru.stqa.selenium</groupId>
<artifactId>webdriver-factory</artifactId>
<version>RELEASE</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>ru.yandex.qatools.htmlelements</groupId>
<artifactId>htmlelements-java</artifactId>
<version>1.13</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.docx4j</groupId>
<artifactId>docx4j</artifactId>
<version>2.8.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<groups>new</groups>
<testFailureIgnore>true</testFailureIgnore>
<systemPropertyVariables>
<webdriver.chrome.driver>src/test/resources/chromedriver.exe</webdriver.chrome.driver>
</systemPropertyVariables>
<argLine>
-javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar
</argLine>
<systemProperties>
<property>
<name>aj.weaving.verbose</name>
<value>true</value>
</property>
</systemProperties>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<configuration>
<sources>
<source>
<basedir>src</basedir>
<includes>
<include>**/*.java</include>
</includes>
</source>
</sources>
<complianceLevel>1.7</complianceLevel>
<outxml>false</outxml>
<verbose>true</verbose>
<showWeaveInfo>true</showWeaveInfo>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.16.v20140903</version>
<configuration>
<stopKey>stopjetty</stopKey>
<stopPort>8079</stopPort>
<webAppSourceDirectory>${project.build.directory}/site/allure-maven-plugin</webAppSourceDirectory>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<excludeDefaults>true</excludeDefaults>
<outputDirectory>${project.build.directory}/site</outputDirectory>
<plugins>
<plugin>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<resultsPattern>${project.build.directory}/allure-results</resultsPattern>
<reportVersion>1.3.9</reportVersion>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
Use Maven 3.3.3
Sorry, I can't figure out how to set custom allure.results.directory,
I have
<allure.results.directory>target_${id}/allure-results_${id}</allure.results.directory>
but results goes to target/allure-results folder.
How can I set this path ?
Also tried
resultsDirectory>target_${id}/allure-results_${id}</resultsDirectory
inputDirectories>target_${id}/allure-results_${id}/allure-report</inputDirectories
didn't help
I manage my allure dependencies in a stand alone reporting library to better manage allure versions across multiple test projects. I've found that when I generate a report using allure-maven-plugin (mvn allure:report) that the report isn't generated as expected
What I mean by dependency inheritance is this..
pom
└ my-reporting-lib
└ allure-testng-adapter-1.4.23
With allure-testng-adapter defined through an indirect dependency, I get the following output when generating the report,. Notice that the version is reported as RELEASE.
[INFO] --- allure-maven-plugin:2.5:report (default-cli) @ example-test-pom ---
[INFO] Generate Allure report (report) with version RELEASE
[INFO] Generate Allure report to S:\git\example\site\allure-maven-plugin
[INFO] Found results directory S:\git\example\target\allure-results
If I place a direct dependency on allure-testng-adapter...
pom
└ my-reporting-lib
└ allure-testng-adapter-1.4.23
└ allure-testng-adapter-1.4.23
and I run the same report command, I get the output I expect. Notice the version is now properly set as my dependency version 1.4.23.
[INFO] --- allure-maven-plugin:2.5:report (default-cli) @ honeypot-test-pom ---
[INFO] Generate Allure report (report) with version 1.4.23
[INFO] Generate Allure report to S:\git\example\site\allure-maven-plugin
[INFO] Found results directory S:\git\example\target\allure-results
To be honest, I'm not sure if this issue is due to a Maven quirk, allure-maven-plugin, or allure-testng-adapter. I have found that if I define the version in a parent pom the report is created as expected (the version is noted properly, instead of RELEASE).
parent-pom
└ allure-testng-adapter-1.4.23
└ pom
└ my-reporting-lib
└ allure-testng-adapter-1.4.23
This makes sense as effective POM contains all the defined dependencies. However, this still forces me to manage the version in two different projects; where I'd prefer to manage the allure version in a single project.
Should the report be properly generated if the allure jars are inherited indirectly, or is this behavior expected?
HI,
it seems the release 2.11.0 didn't make it to Maven Central: https://repo1.maven.org/maven2/io/qameta/allure/allure-maven/ ...
When aggregate report is used, all executors are reported with the name of the parent module.
Create a project with a submodule. submodule must provide test results and activate allure reportSet report; parent module must activate reportSet aggregate.
Run
# generate child
mvn site
# generate aggregate
mvn site
Generated aggregated report show an executor named with the parent module name instead of the child module name.
Executor should be named with the child module name
aggregate report (AllureAggregateMojo) triggers AllureGenerateMojo#copyExecutorInfo
for each inputDirectories, so for each child module allure-results folder. It overwrites the correctly generated file (generated by report on child module) with a new one with buildName
=
I think that copyExecutorInfo should be called only for inputDirectories related to the current module, even when aggregate report is done.
Report consistency
maven allure-maven Goal: allure:aggregate requires a result folder in the target folder, which is not configurable
Code:
It is not possible to aggregate several Maven modules if you have defined your own results folder
like this:
<resultsDirectory>${project.basedir}/allure-results</resultsDirectory>
results folder can be outside of the target folder
we wan´t to save the results and target is cleaned up during normal maven prozess
Maven POM:
<reporting>
<plugins>
<plugin>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.3</version>
<reportSets>
<reportSet>
<id>aggregate</id>
<inherited>false</inherited>
<reports>
<report>aggregate</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>${allure-maven.version}</version>
<configuration>
<allureDownloadUrl>https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/${allure.version}/allure-commandline-${allure.version}.zip</allureDownloadUrl>
<reportVersion>2.10.0</reportVersion>
<resultsDirectory>${project.build.directory}/allure-results/</resultsDirectory>
<reportDirectory>${project.build.directory}/site/allure</reportDirectory>
</configuration>
</plugin>
</plugins>
</reporting>
The environment variable is not resolved in the allure.results.directory file
For example: in the next line the variable name is not resolved, it was used as a string:
allure.results.directory=${project.build.directory}/allure-results
Resolve the variable name in the allure.properties file.
Instead of having allure.results.directory=${project.build.directory}/allure-results
expected to see
allure.results.directory=<resolved path to the build directory>/allure-results
,
Without this functionality, it is not possible to run tests in AWS Device Farm when the project is integrated with Allure 2.
The request is opened based on this ticket: #45
Allure 2 is trying to create allure.results.directory
directory which path is set in the allure.properties
file.
In AWS DF environment, the directory of test execution is read-only, so tests fail because Allure 2 was unable to create the allure.results.directory
directory in the read-only location.
Each test run in AWS has an r/w working directory where the Allure2 results directory can be created. The path of that r/w directory is available through the 'WORKING_DIRECTORY' environment variable in AWS. As it is a random path, it can't be set initially in the local environment at packaging time.
The solution would be to pass the Allure 2 results path as a variable locally which will work in AWS. like:
allure.results.directory=${WORKING_DIRECTORY}/allure-results
Hi I run test by tags e.g. mvn clean test -U -Dtest=TestRunner -Dcucumber.options="--tags @test1"
and then raport in allure-results don't generate but when i run all tests by
mvn clean test -U -Dtest=TestRunner
allure-results are generate
how generate allure-results for single test ?
When you want to use custom categories in your report, you need to somehow manually copy a categories.json file into your allure-results folder, which requires the use of some other plugin or script in our CI environment.
Include a configuration in the Allure Maven plugin to specify the path to your categories.json file, so the same plugin can take care of placing it in the allure-results folder, just before generating the report.
With this configuration, you wouldn't need for a custom process, another Maven plugin or a script to copy the file for you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.