feat: add @Tag reporting and CSV/plain output
- Default CSV output with header; -plain enables labeled text format - Extract repeated @Tag and @Tags container values - Configure JavaParser language level for modern syntax (records) - Add fixture-based JUnit tests and README usage/examples
This commit is contained in:
10
src/test/resources/fixtures/AnotherTest.java.txt
Normal file
10
src/test/resources/fixtures/AnotherTest.java.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
package com.acme.other;
|
||||
|
||||
import org.junit.jupiter.api.RepeatedTest;
|
||||
|
||||
public class AnotherTest {
|
||||
|
||||
@RepeatedTest(2)
|
||||
void delta() {
|
||||
}
|
||||
}
|
||||
31
src/test/resources/fixtures/SampleOneTest.java.txt
Normal file
31
src/test/resources/fixtures/SampleOneTest.java.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
package com.acme.tests;
|
||||
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Tags;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.ValueSource;
|
||||
|
||||
public class SampleOneTest {
|
||||
|
||||
@Test
|
||||
@Tag("fast")
|
||||
@Tag("crypto")
|
||||
void alpha() {
|
||||
int a = 1;
|
||||
int b = 2;
|
||||
int c = a + b;
|
||||
}
|
||||
|
||||
@ParameterizedTest
|
||||
@ValueSource(ints = { 1, 2 })
|
||||
@Tag("param")
|
||||
void beta(int x) {
|
||||
// single line
|
||||
}
|
||||
|
||||
@Test
|
||||
@Tags({ @Tag("nested1"), @Tag("nested2") })
|
||||
void gamma() {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user