|
10 | 10 | import java.util.List; |
11 | 11 | import java.util.Map; |
12 | 12 |
|
13 | | -/** |
14 | | - * Tags intermediate {@code initializationError} retries with {@code dd_tags[test.final_status]=skip}. |
15 | | - * |
16 | | - * <p>Gradle generates synthetic "initializationError" testcases in JUnit reports for setup methods. |
17 | | - * When a setup is retried and eventually succeeds, multiple testcases are created, with only the |
18 | | - * last one passing. All intermediate attempts are marked skip so Test Optimization is not misled. |
19 | | - * |
20 | | - * <p>For any suite with multiple {@code initializationError} test cases (when retries occurred), all entries |
21 | | - * but the last one are tagged by this script with `dd_tags[test.final_status]=skip`. The last |
22 | | - * entry is left unmodified, allowing <em>Test Optimization</em> to apply its default status inference based |
23 | | - * on the actual outcome. Files with only one (or zero) {@code initializationError} test cases are left unmodified. |
24 | | - * |
25 | | - * <p>Usage (Java 25): {@code java TagInitializationErrors.java junit-report.xml} |
26 | | - */ |
| 13 | +/// Tags intermediate `initializationError` retries with `dd_tags[test.final_status]=skip`. |
| 14 | +/// |
| 15 | +/// Gradle generates synthetic "initializationError" testcases in JUnit reports for setup methods. |
| 16 | +/// When a setup is retried and eventually succeeds, multiple testcases are created, with only the |
| 17 | +/// last one passing. All intermediate attempts are marked skip so Test Optimization is not misled. |
| 18 | +/// |
| 19 | +/// For any suite with multiple `initializationError` test cases (when retries occurred), all entries |
| 20 | +/// but the last one are tagged by this script with `dd_tags[test.final_status]=skip`. The last |
| 21 | +/// entry is left unmodified, allowing **Test Optimization** to apply its default status inference based |
| 22 | +/// on the actual outcome. Files with only one (or zero) `initializationError` test cases are left unmodified. |
| 23 | +/// |
| 24 | +/// Before: |
| 25 | +/// |
| 26 | +/// ``` |
| 27 | +/// <testcase name="initializationError" /> |
| 28 | +/// ``` |
| 29 | +/// |
| 30 | +/// After: |
| 31 | +/// |
| 32 | +/// ``` |
| 33 | +/// <testcase name="initializationError"> |
| 34 | +/// <properties> |
| 35 | +/// <property name="dd_tags[test.final_status]" value="skip" /> |
| 36 | +/// </properties> |
| 37 | +/// </testcase> |
| 38 | +/// ``` |
| 39 | +/// |
| 40 | +/// Usage (Java 25): `java TagInitializationErrors.java junit-report.xml` |
| 41 | + |
27 | 42 | class TagInitializationErrors { |
28 | 43 | public static void main(String[] args) throws Exception { |
29 | 44 | if (args.length == 0) { |
|
0 commit comments