From ee8dbde5c7af5009355fb1fa1e9d32ae3d75f79d Mon Sep 17 00:00:00 2001 From: Arun Mahapatra Date: Mon, 16 Dec 2024 17:34:57 +0530 Subject: [PATCH 1/3] feat: update junit xsd to allow test case level outputs. --- test/assets/JUnit.xsd | 330 +++++++++++++++--------------------------- 1 file changed, 118 insertions(+), 212 deletions(-) diff --git a/test/assets/JUnit.xsd b/test/assets/JUnit.xsd index 320779e..9ee9cea 100644 --- a/test/assets/JUnit.xsd +++ b/test/assets/JUnit.xsd @@ -1,212 +1,118 @@ - - - - JUnit test result schema for the Apache Ant JUnit and JUnitReport tasks -Copyright © 2011, Windy Road Technology Pty. Limited -The Apache Ant JUnit XML Schema is distributed under the terms of the Apache License Version 2.0 http://www.apache.org/licenses/ -Permission to waive conditions of this license may be requested from Windy Road Support (http://windyroad.org/support). - - - - - - - - - - Contains an aggregation of testsuite results - - - - - - - - - - Derived from testsuite/@name in the non-aggregated documents - - - - - Starts at '0' for the first testsuite and is incremented by 1 for each following testsuite - - - - - - - - - - - - Contains the results of exexuting a testsuite - - - - - Properties (e.g., environment settings) set during test execution - - - - - - - - - - - - - - - - - - - - - - - - - Indicates that the test errored. An errored test is one that had an unanticipated problem. e.g., an unchecked throwable; or a problem with the implementation of the test. Contains as a text node relevant data for the error, e.g., a stack trace - - - - - - - The error message. e.g., if a java exception is thrown, the return value of getMessage() - - - - - The type of error that occured. e.g., if a java execption is thrown the full class name of the exception. - - - - - - - - - Indicates that the test failed. A failure is a test which the code has explicitly failed by using the mechanisms for that purpose. e.g., via an assertEquals. Contains as a text node relevant data for the failure, e.g., a stack trace - - - - - - - The message specified in the assert - - - - - The type of the assert. - - - - - - - - - - Name of the test method - - - - - Full class name for the class the test method is in. - - - - - Time taken (in seconds) to execute the test - - - - - - - Data that was written to standard out while the test was executed - - - - - - - - - - Data that was written to standard error while the test was executed - - - - - - - - - - - Full class name of the test for non-aggregated testsuite documents. Class name without the package for aggregated testsuites documents - - - - - - - - - - when the test was executed. Timezone may not be specified. - - - - - Host on which the tests were executed. 'localhost' should be used if the hostname cannot be determined. - - - - - - - - - - The total number of tests in the suite - - - - - The total number of tests in the suite that failed. A failure is a test which the code has explicitly failed by using the mechanisms for that purpose. e.g., via an assertEquals - - - - - The total number of tests in the suite that errored. An errored test is one that had an unanticipated problem. e.g., an unchecked throwable; or a problem with the implementation of the test. - - - - - The total number of ignored or skipped tests in the suite. - - - - - Time taken (in seconds) to execute the tests in the suite - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 5cc759d75a732368c1a215baa6cf78ec632290e4 Mon Sep 17 00:00:00 2001 From: Arun Mahapatra Date: Mon, 16 Dec 2024 17:59:39 +0530 Subject: [PATCH 2/3] fix: junit property minOccurs=0 for compatibility --- .../JUnit.Xml.TestLogger.AcceptanceTests.csproj | 1 + .../JUnitTestLoggerStoreConsoleOutputOptionsAcceptanceTests.cs | 1 - .../JUnit.Xml.TestLogger.UnitTests.csproj | 1 + .../NUnit.Xml.TestLogger.AcceptanceTests.csproj | 1 + .../NUnit.Xml.TestLogger.UnitTests.csproj | 1 + test/assets/JUnit.xsd | 2 +- 6 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test/JUnit.Xml.TestLogger.AcceptanceTests/JUnit.Xml.TestLogger.AcceptanceTests.csproj b/test/JUnit.Xml.TestLogger.AcceptanceTests/JUnit.Xml.TestLogger.AcceptanceTests.csproj index 455400b..70b0e10 100644 --- a/test/JUnit.Xml.TestLogger.AcceptanceTests/JUnit.Xml.TestLogger.AcceptanceTests.csproj +++ b/test/JUnit.Xml.TestLogger.AcceptanceTests/JUnit.Xml.TestLogger.AcceptanceTests.csproj @@ -10,6 +10,7 @@ + diff --git a/test/JUnit.Xml.TestLogger.AcceptanceTests/JUnitTestLoggerStoreConsoleOutputOptionsAcceptanceTests.cs b/test/JUnit.Xml.TestLogger.AcceptanceTests/JUnitTestLoggerStoreConsoleOutputOptionsAcceptanceTests.cs index e97a837..7fca9ad 100644 --- a/test/JUnit.Xml.TestLogger.AcceptanceTests/JUnitTestLoggerStoreConsoleOutputOptionsAcceptanceTests.cs +++ b/test/JUnit.Xml.TestLogger.AcceptanceTests/JUnitTestLoggerStoreConsoleOutputOptionsAcceptanceTests.cs @@ -10,7 +10,6 @@ namespace JUnit.Xml.TestLogger.AcceptanceTests using System.Xml.XPath; using global::TestLogger.Fixtures; using Microsoft.VisualStudio.TestTools.UnitTesting; - using Spekt.TestLogger.Core; /// /// Acceptance tests evaluate the most recent output of the build.ps1 script, NOT the most diff --git a/test/JUnit.Xml.TestLogger.UnitTests/JUnit.Xml.TestLogger.UnitTests.csproj b/test/JUnit.Xml.TestLogger.UnitTests/JUnit.Xml.TestLogger.UnitTests.csproj index c2b7d07..0688dc4 100644 --- a/test/JUnit.Xml.TestLogger.UnitTests/JUnit.Xml.TestLogger.UnitTests.csproj +++ b/test/JUnit.Xml.TestLogger.UnitTests/JUnit.Xml.TestLogger.UnitTests.csproj @@ -18,6 +18,7 @@ + diff --git a/test/NUnit.Xml.TestLogger.AcceptanceTests/NUnit.Xml.TestLogger.AcceptanceTests.csproj b/test/NUnit.Xml.TestLogger.AcceptanceTests/NUnit.Xml.TestLogger.AcceptanceTests.csproj index d8d1823..c046349 100644 --- a/test/NUnit.Xml.TestLogger.AcceptanceTests/NUnit.Xml.TestLogger.AcceptanceTests.csproj +++ b/test/NUnit.Xml.TestLogger.AcceptanceTests/NUnit.Xml.TestLogger.AcceptanceTests.csproj @@ -10,6 +10,7 @@ + diff --git a/test/NUnit.Xml.TestLogger.UnitTests/NUnit.Xml.TestLogger.UnitTests.csproj b/test/NUnit.Xml.TestLogger.UnitTests/NUnit.Xml.TestLogger.UnitTests.csproj index 925dfeb..72a448b 100644 --- a/test/NUnit.Xml.TestLogger.UnitTests/NUnit.Xml.TestLogger.UnitTests.csproj +++ b/test/NUnit.Xml.TestLogger.UnitTests/NUnit.Xml.TestLogger.UnitTests.csproj @@ -18,6 +18,7 @@ + diff --git a/test/assets/JUnit.xsd b/test/assets/JUnit.xsd index 9ee9cea..e6f9646 100644 --- a/test/assets/JUnit.xsd +++ b/test/assets/JUnit.xsd @@ -45,7 +45,7 @@ - + From 16ae9702e6593ad0291f1533c9c65966cae37e4d Mon Sep 17 00:00:00 2001 From: codito Date: Mon, 16 Dec 2024 20:13:37 +0530 Subject: [PATCH 3/3] ci: use ubuntu-22.04 since mono is not in 24.04 --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index ee92722..f9714e4 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -40,7 +40,7 @@ jobs: build: strategy: matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-22.04, windows-latest] runs-on: ${{ matrix.os }} needs: [version] env: