Skip to content

Commit ac12ac3

Browse files
fix: configure Surefire to generate JUnit-compatible test reports
1 parent dab5f43 commit ac12ac3

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ jobs:
4040
if: always()
4141
with:
4242
files: |
43-
target/surefire-reports/*.xml
43+
target/surefire-reports/junitreports/TEST-*.xml
44+
check_name: "Test Results (Java ${{ matrix.java }})"
4445

4546
- name: Upload test results
4647
uses: actions/upload-artifact@v4

pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,20 @@
173173
<includes>
174174
<include>**/*Test.java</include>
175175
</includes>
176+
<!-- Generate both TestNG and JUnit compatible reports -->
176177
<reportFormat>xml</reportFormat>
178+
<useFile>true</useFile>
179+
<!-- This ensures JUnit-style XML is generated alongside TestNG -->
180+
<properties>
181+
<property>
182+
<name>usedefaultlisteners</name>
183+
<value>false</value>
184+
</property>
185+
<property>
186+
<name>listener</name>
187+
<value>org.testng.reporters.JUnitReportReporter</value>
188+
</property>
189+
</properties>
177190
</configuration>
178191
</plugin>
179192

0 commit comments

Comments
 (0)