Skip to content

Commit 9972ec0

Browse files
committed
Ensure that the allure reports are always generated, even for test failures
1 parent acaa216 commit 9972ec0

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

pom.xml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
<artifactId>maven-surefire-plugin</artifactId>
109109
<version>3.5.1</version>
110110
<configuration>
111+
<skipTests>true</skipTests>
111112
<argLine>
112113
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
113114
</argLine>
@@ -120,6 +121,35 @@
120121
</dependency>
121122
</dependencies>
122123
</plugin>
124+
<plugin>
125+
<groupId>org.apache.maven.plugins</groupId>
126+
<artifactId>maven-failsafe-plugin</artifactId>
127+
<version>3.5.1</version>
128+
<executions>
129+
<execution>
130+
<goals>
131+
<goal>integration-test</goal>
132+
<goal>verify</goal>
133+
</goals>
134+
</execution>
135+
</executions>
136+
<configuration>
137+
<argLine>
138+
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
139+
</argLine>
140+
<includes>
141+
<include>**/*Test.java</include>
142+
<include>**/*Tests.java</include>
143+
</includes>
144+
</configuration>
145+
<dependencies>
146+
<dependency>
147+
<groupId>org.aspectj</groupId>
148+
<artifactId>aspectjweaver</artifactId>
149+
<version>${aspectj.version}</version>
150+
</dependency>
151+
</dependencies>
152+
</plugin>
123153
<plugin>
124154
<groupId>io.qameta.allure</groupId>
125155
<artifactId>allure-maven</artifactId>
@@ -129,7 +159,7 @@
129159
</configuration>
130160
<executions>
131161
<execution>
132-
<phase>verify</phase>
162+
<phase>post-integration-test</phase>
133163
<goals>
134164
<goal>report</goal>
135165
</goals>

src/test/java/com/serenitydojo/playwright/toolshop/contact/ContactFormTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ void recordTrace(TestInfo testInfo, BrowserContext context) {
5757
);
5858
}
5959

60+
6061
@Story("Submitting a request")
6162
@DisplayName("Customers can use the contact form to contact us")
6263
@Test

0 commit comments

Comments
 (0)