Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the JUnit 5 XML output #246

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.github.bazel_contrib.contrib_rules_jvm.comparative.DynamicTests" tests="3" skipped="0" failures="0" errors="0" timestamp="2023-11-08T12:49:19" hostname="Simons-Chunky-MBP.local" time="0.002">
<testsuite name="com.github.bazel_contrib.contrib_rules_jvm.comparative.DynamicTests" tests="3" skipped="0" failures="0" errors="0" timestamp="2024-02-02T18:14:16" hostname="MacBook-Pro.local" time="0.001">
<properties/>
<testcase name="Test of one" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.DynamicTests" time="0.001"/>
<testcase name="Test of two" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.DynamicTests" time="0.0"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.github.bazel_contrib.contrib_rules_jvm.comparative.MixedTest" tests="4" skipped="0" failures="0" errors="0" timestamp="2024-02-02T18:14:16" hostname="MacBook-Pro.local" time="0.002">
<properties/>
<testcase name="[1] alpha" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.MixedTest" time="0.0"/>
<testcase name="[2] beta" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.MixedTest" time="0.0"/>
<testcase name="[3] gamma" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.MixedTest" time="0.001"/>
<testcase name="empty()" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.MixedTest" time="0.0"/>
<system-out><![CDATA[alpha
beta
gamma
]]></system-out>
<system-err><![CDATA[]]></system-err>
</testsuite>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" tests="3" skipped="0" failures="0" errors="0" timestamp="2023-11-08T12:49:19" hostname="Simons-Chunky-MBP.local" time="0.009">
<testsuite name="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" tests="3" skipped="0" failures="0" errors="0" timestamp="2024-02-02T18:14:16" hostname="MacBook-Pro.local" time="0.001">
<properties/>
<testcase name="[1] alpha" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" time="0.007"/>
<testcase name="[1] alpha" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" time="0.0"/>
<testcase name="[2] beta" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" time="0.0"/>
<testcase name="[3] gamma" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" time="0.0"/>
<system-out><![CDATA[alpha
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.github.bazel_contrib.contrib_rules_jvm.comparative.PathologicalTest" tests="1" skipped="1" failures="0" errors="0" timestamp="2023-11-08T12:49:19" hostname="Simons-Chunky-MBP.local" time="0.0">
<testsuite name="com.github.bazel_contrib.contrib_rules_jvm.comparative.PathologicalTest" tests="1" skipped="1" failures="0" errors="0" timestamp="2024-02-02T18:14:16" hostname="MacBook-Pro.local" time="0.0">
<properties/>
<testcase name="bootstrap(String)" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.PathologicalTest" time="0.0">
<skipped/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.github.bazel_contrib.contrib_rules_jvm.comparative.SimpleTest" tests="1" skipped="0" failures="0" errors="0" timestamp="2023-11-08T12:49:19" hostname="Simons-Chunky-MBP.local" time="0.0">
<testsuite name="com.github.bazel_contrib.contrib_rules_jvm.comparative.SimpleTest" tests="1" skipped="0" failures="0" errors="0" timestamp="2024-02-02T18:14:16" hostname="MacBook-Pro.local" time="0.0">
<properties/>
<testcase name="empty()" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SimpleTest" time="0.0"/>
<system-out><![CDATA[]]></system-out>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest1" tests="2" skipped="0" failures="0" errors="0" timestamp="2023-11-08T12:49:19" hostname="Simons-Chunky-MBP.local" time="0.042">
<testsuite name="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest1" tests="8" skipped="0" failures="0" errors="0" timestamp="2024-02-02T18:14:16" hostname="MacBook-Pro.local" time="0.032">
<properties/>
<testcase name="doSomething()" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest1" time="0.007"/>
<testcase name="[1] alpha" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest1" time="0.01"/>
<testcase name="[2] beta" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest1" time="0.0"/>
<testcase name="[3] gamma" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest1" time="0.0"/>
<testcase name="doSomething()" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest1" time="0.0"/>
<system-out><![CDATA[Hello, World!
<testcase name="[1] alpha" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest1" time="0.001"/>
<testcase name="[2] beta" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest1" time="0.001"/>
<testcase name="[3] gamma" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest1" time="0.001"/>
<testcase name="doSomething()" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest1" time="0.0"/>
<system-out><![CDATA[Suite Test 1: alpha
Suite Test 1: beta
Suite Test 1: gamma
Hello, World!
Suite Test 1: alpha
Suite Test 1: beta
Suite Test 1: gamma
Hello, World!
]]></system-out>
<system-err><![CDATA[]]></system-err>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest2" tests="2" skipped="0" failures="0" errors="0" timestamp="2023-11-08T12:49:19" hostname="Simons-Chunky-MBP.local" time="0.034">
<testsuite name="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest2" tests="2" skipped="0" failures="0" errors="0" timestamp="2024-02-02T18:14:16" hostname="MacBook-Pro.local" time="0.018">
<properties/>
<testcase name="doSomethingElse()" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest2" time="0.002"/>
<testcase name="doSomethingElse()" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest2" time="0.0"/>
<testcase name="doSomethingElse()" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest2" time="0.001"/>
<testcase name="doSomethingElse()" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.SuiteTest2" time="0.001"/>
<system-out><![CDATA[]]></system-out>
<system-err><![CDATA[]]></system-err>
</testsuite>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.github.bazel_contrib.contrib_rules_jvm.comparative;

import java.util.stream.Stream;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;

public class MixedTest {

private static Stream<Arguments> argsProvider() {
return Stream.of(Arguments.of("alpha"), Arguments.of("beta"), Arguments.of("gamma"));
}

@ParameterizedTest
@MethodSource("argsProvider")
public void bootstrap(String goGreek) {
System.out.println(goGreek);
}

@Test
void empty() {
// Does nothing
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
package com.github.bazel_contrib.contrib_rules_jvm.comparative;

import java.util.stream.Stream;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;

public class SuiteTest1 {

private static Stream<Arguments> argsProvider() {
return Stream.of(Arguments.of("alpha"), Arguments.of("beta"), Arguments.of("gamma"));
}

@Test
void doSomething() {
System.out.println("Hello, World!");
}

@ParameterizedTest
@MethodSource("argsProvider")
void testSuiteParameters(String goGreek) {
System.out.println("Suite Test 1: " + goGreek);
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd" version="3.0" name="com.github.bazel_contrib.contrib_rules_jvm.comparative.DynamicTests" time="0.005" tests="3" errors="0" skipped="0" failures="0">
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd" version="3.0" name="com.github.bazel_contrib.contrib_rules_jvm.comparative.DynamicTests" time="0.02" tests="3" errors="0" skipped="0" failures="0">
<properties>
<property name="java.specification.version" value="17"/>
<property name="java.specification.version" value="11"/>
<property name="sun.jnu.encoding" value="UTF-8"/>
<property name="java.vm.specification.version" value="17"/>
<property name="java.vm.specification.version" value="11"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="user.country" value="GB"/>
<property name="user.country" value="US"/>
<property name="jdk.debug" value="release"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.language" value="en"/>
Expand All @@ -14,23 +14,19 @@
<property name="file.separator" value="/"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="line.separator" value="&#10;"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="path.separator" value=":"/>
<property name="file.encoding" value="UTF-8"/>
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
<property name="java.vendor.version" value="AppleJDK-17.0.8.7.2"/>
<property name="java.io.tmpdir" value="/var/folders/3r/7x4j_zmj0js6w0kl19jlmclr0000gn/T/"/>
<property name="java.version" value="17.0.8"/>
<property name="os.arch" value="aarch64"/>
<property name="java.version" value="11.0.20"/>
<property name="os.arch" value="x86_64"/>
<property name="native.encoding" value="UTF-8"/>
<property name="java.vm.info" value="mixed mode, sharing"/>
<property name="java.vendor" value="Apple Inc."/>
<property name="java.vm.version" value="17.0.8+7-LTS"/>
<property name="sun.io.unicode.encoding" value="UnicodeBig"/>
<property name="java.class.version" value="61.0"/>
<property name="java.class.version" value="55.0"/>
</properties>
<testcase name="translateDynamicTestsFromStream" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.DynamicTests" time="0.001"/>
<testcase name="translateDynamicTestsFromStream" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.DynamicTests" time="0.0"/>
<testcase name="translateDynamicTestsFromStream" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.DynamicTests" time="0.001"/>
<testcase name="translateDynamicTestsFromStream" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.DynamicTests" time="0.0"/>
</testsuite>
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd" version="3.0" name="com.github.bazel_contrib.contrib_rules_jvm.comparative.MixedTest" time="0.017" tests="4" errors="0" skipped="0" failures="0">
<properties>
<property name="java.specification.version" value="11"/>
<property name="sun.jnu.encoding" value="UTF-8"/>
<property name="java.vm.specification.version" value="11"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="user.country" value="US"/>
<property name="jdk.debug" value="release"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.language" value="en"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="java.version.date" value="2023-07-18"/>
<property name="file.separator" value="/"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="line.separator" value="&#10;"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="path.separator" value=":"/>
<property name="file.encoding" value="UTF-8"/>
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
<property name="java.version" value="11.0.20"/>
<property name="os.arch" value="x86_64"/>
<property name="native.encoding" value="UTF-8"/>
<property name="sun.io.unicode.encoding" value="UnicodeBig"/>
<property name="java.class.version" value="55.0"/>
</properties>
<testcase name="bootstrap(String)[1]" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.MixedTest" time="0.002">
<system-out><![CDATA[alpha
]]></system-out>
</testcase>
<testcase name="bootstrap(String)[2]" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.MixedTest" time="0.001">
<system-out><![CDATA[beta
]]></system-out>
</testcase>
<testcase name="bootstrap(String)[3]" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.MixedTest" time="0.001">
<system-out><![CDATA[gamma
]]></system-out>
</testcase>
<testcase name="empty" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.MixedTest" time="0.001"/>
</testsuite>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd" version="3.0" name="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" time="0.031" tests="3" errors="0" skipped="0" failures="0">
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd" version="3.0" name="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" time="0.135" tests="3" errors="0" skipped="0" failures="0">
<properties>
<property name="java.specification.version" value="17"/>
<property name="java.specification.version" value="11"/>
<property name="sun.jnu.encoding" value="UTF-8"/>
<property name="java.vm.specification.version" value="17"/>
<property name="java.vm.specification.version" value="11"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="user.country" value="GB"/>
<property name="user.country" value="US"/>
<property name="jdk.debug" value="release"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.language" value="en"/>
Expand All @@ -14,31 +14,27 @@
<property name="file.separator" value="/"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="line.separator" value="&#10;"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="path.separator" value=":"/>
<property name="file.encoding" value="UTF-8"/>
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
<property name="java.vendor.version" value="AppleJDK-17.0.8.7.2"/>
<property name="java.io.tmpdir" value="/var/folders/3r/7x4j_zmj0js6w0kl19jlmclr0000gn/T/"/>
<property name="java.version" value="17.0.8"/>
<property name="os.arch" value="aarch64"/>
<property name="java.version" value="11.0.20"/>
<property name="os.arch" value="x86_64"/>
<property name="native.encoding" value="UTF-8"/>
<property name="java.vm.info" value="mixed mode, sharing"/>
<property name="java.vendor" value="Apple Inc."/>
<property name="java.vm.version" value="17.0.8+7-LTS"/>
<property name="sun.io.unicode.encoding" value="UnicodeBig"/>
<property name="java.class.version" value="61.0"/>
<property name="java.class.version" value="55.0"/>
</properties>
<testcase name="bootstrap(String)[1]" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" time="0.01">
<testcase name="bootstrap(String)[1]" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" time="0.041">
<system-out><![CDATA[alpha
]]></system-out>
</testcase>
<testcase name="bootstrap(String)[2]" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" time="0.0">
<testcase name="bootstrap(String)[2]" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" time="0.002">
<system-out><![CDATA[beta
]]></system-out>
</testcase>
<testcase name="bootstrap(String)[3]" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" time="0.0">
<testcase name="bootstrap(String)[3]" classname="com.github.bazel_contrib.contrib_rules_jvm.comparative.ParameterisedTest" time="0.004">
<system-out><![CDATA[gamma
]]></system-out>
</testcase>
Expand Down
Loading
Loading