AllureLifecycle for tests launched via intelliJ "Could not add attachment: no test is running"
See original GitHub issueI’m submitting a …
- bug report
What is the current behavior?
2018-12-19 12:12:06 ERROR AllureLifecycle:563 - Could not add attachment: no test is running
2018-12-19 12:12:08 ERROR AllureLifecycle:414 - Could not start step: no test case running
2018-12-19 12:12:08 ERROR AllureLifecycle:470 - Could not update step: step with uuid 9cb0199b-f0db-45cc-97f9-2e2cc396633a not found
2018-12-19 12:12:08 ERROR AllureLifecycle:504 - Could not stop step: step with uuid 9cb0199b-f0db-45cc-97f9-2e2cc396633a not found
Using maven command to launch the tests, I have not this issue, but using intelliJ run/debug conf (for local tests) I have the previous logs.
So the console output is flooded by AllureLifecycle logs
What is the expected behavior?
With an allure previous version (2.7.0), we didn’t have it.
Please tell us about your environment:
Allure version | 2.8.1 |
---|---|
Test framework | junit@4.12 |
aspectj version | 1.8.10 |
Other information
<allure.version>2.8.1</allure.version>
<aspectj.version>1.8.10</aspectj.version>
<maven-surefire-plugin.version>2.20.1</maven-surefire-plugin.version>
<plugin-listener>io.qameta.allure.junit4.AllureJunit4</plugin-listener>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-junit4</artifactId>
<version>${allure.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<configuration>
<configLocation>google_checks.xml</configLocation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<systemPropertyVariables>
<allure.link.mylink.pattern>https://testrail-url?/cases/view/{}</allure.link.mylink.pattern>
<allure.link.issue.pattern>https://jira-url/{}</allure.link.issue.pattern>
<allure.link.tms.pattern>https://to.define/{}</allure.link.tms.pattern>
<allure.results.directory>${project.build.directory}/allure-results</allure.results.directory>
</systemPropertyVariables>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
<properties>
<property>
<name>listener</name>
<value>
${plugin-listener}
</value>
</property>
</properties>
</configuration>
</plugin>
</plugins>
</build>
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
"No tests were found" happens at random
Without changing anything to the tests I could not run any test. I then tried a mvn clean install and all the test...
Read more >Run tests | IntelliJ IDEA Documentation - JetBrains
The the Rerun the Run button gutter icon marks failed tests. Running a test using the gutter icon. To run all tests in...
Read more >Prepare for testing | IntelliJ IDEA Documentation - JetBrains
In the IDE, you can create a test class directly from the source code together with the necessary test methods. You can switch...
Read more >Unable to Run Certain Unit Tests
Are there any solutions to fix this? I can run the test command line and attach a debugger but I think we should...
Read more >Testing | IntelliJ IDEA Documentation - JetBrains
File : to run all tests from a testing file. In the Files field, type a path to a testing file. Ensure that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Fanch- just add
log4j.logger.io.qameta.allure.AllureLifecycle = OFF
in your log4j.properties bisousI mean it works using maven command line, it’s when I launch a test with intelliJ that I get the error.
Every steps during my test (so not linked to set up/tear down - Before/After) are throwing AllureLifecycle errors (everything works fine with mvn).
I guess with maven commandline, the plugin phase is correctly interpreted, the listener also, and with the IDE there is something wrong. The strange thing is that the attachments are still generated.
The behavior might be the same as before, logs in addition, it’s just for local purpose have something to not show them could be great, otherwise we will still stay in 2.7.0 forever 😦