Skip to content

Commit

Permalink
ARCH-2011 - Renaming for the multiple trx files and single trx file.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielle-casella-adams committed Feb 26, 2024
1 parent 1b8edb6 commit 6fe59fc
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 68 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build-and-review-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -550,9 +550,9 @@ jobs:
if: always()
run: |
# Verify the trx-files list matches what we expect
fidget="./test/files/multiple-trx/fidget.trx"
widget="./test/files/multiple-trx/widget.trx"
./test/assert-values-match.sh --name "trx-files output" --expected "[$fidget,$widget]" --actual "${{ steps.multiple-trx.outputs.trx-files }}"
trx1="./test/files/multiple-trx/trx1.trx"
trx2="./test/files/multiple-trx/trx2.trx"
./test/assert-values-match.sh --name "trx-files output" --expected "[$trx1,$trx2]" --actual "${{ steps.multiple-trx.outputs.trx-files }}"
# Verify the test-outcome is passed
./test/assert-values-match.sh --name "test-outcome output" --expected "Passed" --actual "${{ steps.multiple-trx.outputs.test-outcome }}"
Expand Down Expand Up @@ -593,7 +593,7 @@ jobs:
uses: ./
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
base-directory: './test/files/failing-test'
base-directory: './test/files/failing-test-ignore'
create-results-file: true # Keep this so we have an "actual" output to compare against
create-status-check: false
create-pr-comment: false
Expand Down Expand Up @@ -703,23 +703,23 @@ jobs:
const expectedBody = fs.readFileSync('./test-results.md', 'utf8');
const expectedFidgetValues = {
name: 'status check - dotnet unit tests (fidget.tests)',
name: 'status check - dotnet unit tests (multiple.trx1.tests)',
status: 'completed',
conclusion: 'success',
title: 'FIDGET.TESTS',
title: 'MULTIPLE.TRX1.TESTS',
text: expectedBody
};
const actualFidgetCheck = actualStatusChecks.find(check => check.name.includes('fidget'));
const actualFidgetCheck = actualStatusChecks.find(check => check.name.includes('trx1'));
assertStatusCheckMatchesExpectations(core, actualFidgetCheck, expectedFidgetValues);
const expectedWidgetValues = {
name: 'status check - dotnet unit tests (widget.tests)',
name: 'status check - dotnet unit tests (multiple.trx2.tests)',
status: 'completed',
conclusion: 'success',
title: 'WIDGET.TESTS',
title: 'MULTIPLE.TRX2.TESTS',
text: expectedBody
};
const actualWidgetCheck = actualStatusChecks.find(check => check.name.includes('widget'));
const actualWidgetCheck = actualStatusChecks.find(check => check.name.includes('trx2'));
assertStatusCheckMatchesExpectations(core, actualWidgetCheck, expectedWidgetValues);
- name: '-------------------------------------------------------------------------------------------------------------'
Expand Down
4 changes: 2 additions & 2 deletions test/files/failing-test-ignore/expected-test-results.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Ignore.Failures
# IGNORE.FAILURES

![Generic badge](https://img.shields.io/badge/1/4-FAILED-red.svg)
![Generic badge](https://img.shields.io/badge/1/2-FAILED-red.svg)
<details>
<summary>Duration: 0.805 seconds</summary>
<table>
Expand Down
4 changes: 2 additions & 2 deletions test/files/multiple-trx/expected-test-results.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# FIDGET.TESTS
# MULTIPLE.TRX1.TESTS

![Generic badge](https://img.shields.io/badge/1/1-PASSED-brightgreen.svg)
<details>
Expand Down Expand Up @@ -50,7 +50,7 @@
</details>


# WIDGET.TESTS
# MULTIPLE.TRX2.TESTS

![Generic badge](https://img.shields.io/badge/4/4-PASSED-brightgreen.svg)
<details>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<Deployment runDeploymentRoot="myuser_MY-MACHINE_2024-02-20_12_39_54" />
</TestSettings>
<Results>
<UnitTestResult executionId="1cb0e28f-f003-4728-88e5-cd447fddc9a5" testId="09917f6f-ce84-0a6f-b407-bec561fda4c1" testName="Fidget.Tests.MathTests.TwoPlusTwoShouldNotEqualFive" computerName="MY-MACHINE" duration="00:00:00.0010362" startTime="2024-02-20T12:39:54.3830052-07:00" endTime="2024-02-20T12:39:54.3830209-07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="1cb0e28f-f003-4728-88e5-cd447fddc9a5" />
<UnitTestResult executionId="1cb0e28f-f003-4728-88e5-cd447fddc9a5" testId="09917f6f-ce84-0a6f-b407-bec561fda4c1" testName="Multiple.Trx1.Tests.MathTests.TwoPlusTwoShouldNotEqualFive" computerName="MY-MACHINE" duration="00:00:00.0010362" startTime="2024-02-20T12:39:54.3830052-07:00" endTime="2024-02-20T12:39:54.3830209-07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="1cb0e28f-f003-4728-88e5-cd447fddc9a5" />
</Results>
<TestDefinitions>
<UnitTest name="Fidget.Tests.MathTests.TwoPlusTwoShouldNotEqualFive" storage="c:\code\Fidget\bin\release\net6.0\Fidget.tests.dll" id="09917f6f-ce84-0a6f-b407-bec561fda4c1">
<UnitTest name="Multiple.Trx1.Tests.MathTests.TwoPlusTwoShouldNotEqualFive" storage="c:\code\Multiple.Trx1\bin\release\net6.0\Multiple.Trx1.tests.dll" id="09917f6f-ce84-0a6f-b407-bec561fda4c1">
<Execution id="1cb0e28f-f003-4728-88e5-cd447fddc9a5" />
<TestMethod codeBase="C:\code\Fidget\bin\Release\net6.0\Fidget.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="Fidget.Tests.MathTests" name="TwoPlusTwoShouldNotEqualFive" />
<TestMethod codeBase="C:\code\Multiple.Trx1\bin\Release\net6.0\Multiple.Trx1.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="Multiple.Trx1.Tests.MathTests" name="TwoPlusTwoShouldNotEqualFive" />
</UnitTest>
</TestDefinitions>
<TestEntries>
Expand Down
44 changes: 44 additions & 0 deletions test/files/multiple-trx/trx2.trx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<TestRun id="a5216d54-d277-4074-b7cf-3151d9d9c301" name="myuser@MY-MACHINE 2024-02-20 13:03:54" runUser="MYDOMAIN\myuser" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Times creation="2024-02-20T13:03:54.5592759-07:00" queuing="2024-02-20T13:03:54.5592762-07:00" start="2024-02-20T13:03:53.9166239-07:00" finish="2024-02-20T13:03:54.5638978-07:00" />
<TestSettings name="default" id="79178397-4ba8-4561-9cb2-e36069fcb9db">
<Deployment runDeploymentRoot="myuser_MY-MACHINE_2024-02-20_13_03_54" />
</TestSettings>
<Results>
<UnitTestResult executionId="f41ca8a3-b073-4b37-995a-dc0223ca4648" testId="9631a370-9720-44c9-70b2-11e51e32ba9f" testName="Multiple.Trx2.Tests.MathTests.AddShouldReturnCorrectValue(number1: 1, number2: 1, expectedValue: 2)" computerName="MY-MACHINE" duration="00:00:00.0042209" startTime="2024-02-20T13:03:54.4810717-07:00" endTime="2024-02-20T13:03:54.4810978-07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="f41ca8a3-b073-4b37-995a-dc0223ca4648" />
<UnitTestResult executionId="88561ce0-df2e-4b4d-b978-78ab971da501" testId="09917f6f-ce84-0a6f-b407-bec561fda4c1" testName="Multiple.Trx2.Tests.MathTests.OnePlusOneShouldNotEqualFive" computerName="MY-MACHINE" duration="00:00:00.0008597" startTime="2024-02-20T13:03:54.4850706-07:00" endTime="2024-02-20T13:03:54.4850706-07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="88561ce0-df2e-4b4d-b978-78ab971da501" />
<UnitTestResult executionId="44908eab-5f2f-4553-add7-aa0d8870a1ee" testId="9af6d3c7-0160-1c91-e2c9-1f3b63cd4ca6" testName="Multiple.Trx2.Tests.MathTests.AddShouldReturnCorrectValue(number1: 960, number2: 4, expectedValue: 964)" computerName="MY-MACHINE" duration="00:00:00.0000173" startTime="2024-02-20T13:03:54.4849923-07:00" endTime="2024-02-20T13:03:54.4849923-07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="44908eab-5f2f-4553-add7-aa0d8870a1ee" />
<UnitTestResult executionId="9126ec32-c9ae-4434-bc34-f87014c581e5" testId="be281ffb-a4d6-67ab-d9af-941232c31283" testName="Multiple.Trx2.Tests.MathTests.AddShouldReturnCorrectValue(number1: 1, number2: 2, expectedValue: 3)" computerName="MY-MACHINE" duration="00:00:00.0000016" startTime="2024-02-20T13:03:54.4850334-07:00" endTime="2024-02-20T13:03:54.4850334-07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="9126ec32-c9ae-4434-bc34-f87014c581e5" />
</Results>
<TestDefinitions>
<UnitTest name="Multiple.Trx2.Tests.MathTests.AddShouldReturnCorrectValue(number1: 1, number2: 2, expectedValue: 3)" storage="c:\code\Multiple.Trx2\bin\release\net6.0\Multiple.Trx2.tests.dll" id="be281ffb-a4d6-67ab-d9af-941232c31283">
<Execution id="9126ec32-c9ae-4434-bc34-f87014c581e5" />
<TestMethod codeBase="C:\code\Multiple.Trx2\bin\Release\net6.0\Multiple.Trx2.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="Multiple.Trx2.Tests.MathTests" name="AddShouldReturnCorrectValue" />
</UnitTest>
<UnitTest name="Multiple.Trx2.Tests.MathTests.AddShouldReturnCorrectValue(number1: 960, number2: 4, expectedValue: 964)" storage="c:\code\Multiple.Trx2\bin\release\net6.0\Multiple.Trx2.tests.dll" id="9af6d3c7-0160-1c91-e2c9-1f3b63cd4ca6">
<Execution id="44908eab-5f2f-4553-add7-aa0d8870a1ee" />
<TestMethod codeBase="C:\code\Multiple.Trx2\bin\Release\net6.0\Multiple.Trx2.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="Multiple.Trx2.Tests.MathTests" name="AddShouldReturnCorrectValue" />
</UnitTest>
<UnitTest name="Multiple.Trx2.Tests.MathTests.AddShouldReturnCorrectValue(number1: 1, number2: 1, expectedValue: 2)" storage="c:\code\Multiple.Trx2\bin\release\net6.0\Multiple.Trx2.tests.dll" id="9631a370-9720-44c9-70b2-11e51e32ba9f">
<Execution id="f41ca8a3-b073-4b37-995a-dc0223ca4648" />
<TestMethod codeBase="C:\code\Multiple.Trx2\bin\Release\net6.0\Multiple.Trx2.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="Multiple.Trx2.Tests.MathTests" name="AddShouldReturnCorrectValue" />
</UnitTest>
<UnitTest name="Multiple.Trx2.Tests.MathTests.OnePlusOneShouldNotEqualFive" storage="c:\code\Multiple.Trx2\bin\release\net6.0\Multiple.Trx2.tests.dll" id="09917f6f-ce84-0a6f-b407-bec561fda4c1">
<Execution id="88561ce0-df2e-4b4d-b978-78ab971da501" />
<TestMethod codeBase="C:\code\Multiple.Trx2\bin\Release\net6.0\Multiple.Trx2.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="Multiple.Trx2.Tests.MathTests" name="OnePlusOneShouldNotEqualFive" />
</UnitTest>
</TestDefinitions>
<TestEntries>
<TestEntry testId="9631a370-9720-44c9-70b2-11e51e32ba9f" executionId="f41ca8a3-b073-4b37-995a-dc0223ca4648" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestEntry testId="09917f6f-ce84-0a6f-b407-bec561fda4c1" executionId="88561ce0-df2e-4b4d-b978-78ab971da501" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestEntry testId="9af6d3c7-0160-1c91-e2c9-1f3b63cd4ca6" executionId="44908eab-5f2f-4553-add7-aa0d8870a1ee" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestEntry testId="be281ffb-a4d6-67ab-d9af-941232c31283" executionId="9126ec32-c9ae-4434-bc34-f87014c581e5" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
</TestEntries>
<TestLists>
<TestList name="Results Not in a List" id="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
<TestList name="All Loaded Results" id="19431567-8539-422a-85d7-44ee4e166bda" />
</TestLists>
<ResultSummary outcome="Completed">
<Counters total="4" executed="4" passed="4" failed="0" error="0" timeout="0" aborted="0" inconclusive="0" passedButRunAborted="0" notRunnable="0" notExecuted="0" disconnected="0" warning="0" completed="0" inProgress="0" pending="0" />
</ResultSummary>
</TestRun>
44 changes: 0 additions & 44 deletions test/files/multiple-trx/widget.trx

This file was deleted.

2 changes: 1 addition & 1 deletion test/files/single-test/expected-test-results.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# DIGIT.TESTS
# SINGLE.TESTS

![Generic badge](https://img.shields.io/badge/1/1-PASSED-brightgreen.svg)
<details>
Expand Down
6 changes: 3 additions & 3 deletions test/files/single-test/single-test.trx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<Deployment runDeploymentRoot="myuser_MY-MACHINE_2024-02-20_12_39_54" />
</TestSettings>
<Results>
<UnitTestResult executionId="1cb0e28f-f003-4728-88e5-cd447fddc9a5" testId="09917f6f-ce84-0a6f-b407-bec561fda4c1" testName="Digit.Tests.MathTests.OnePlusOneShouldNotEqualFive" computerName="MY-MACHINE" duration="00:00:00.0010362" startTime="2024-02-20T12:39:54.3830052-07:00" endTime="2024-02-20T12:39:54.3830209-07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="1cb0e28f-f003-4728-88e5-cd447fddc9a5" />
<UnitTestResult executionId="1cb0e28f-f003-4728-88e5-cd447fddc9a5" testId="09917f6f-ce84-0a6f-b407-bec561fda4c1" testName="Single.Tests.MathTests.OnePlusOneShouldNotEqualFive" computerName="MY-MACHINE" duration="00:00:00.0010362" startTime="2024-02-20T12:39:54.3830052-07:00" endTime="2024-02-20T12:39:54.3830209-07:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="1cb0e28f-f003-4728-88e5-cd447fddc9a5" />
</Results>
<TestDefinitions>
<UnitTest name="Digit.Tests.MathTests.OnePlusOneShouldNotEqualFive" storage="c:\code\widget\bin\release\net6.0\digit.Tests.dll" id="09917f6f-ce84-0a6f-b407-bec561fda4c1">
<UnitTest name="Single.Tests.MathTests.OnePlusOneShouldNotEqualFive" storage="c:\code\single\bin\release\net6.0\Single.Tests.dll" id="09917f6f-ce84-0a6f-b407-bec561fda4c1">
<Execution id="1cb0e28f-f003-4728-88e5-cd447fddc9a5" />
<TestMethod codeBase="C:\code\widget\bin\Release\net6.0\Digit.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="Digit.Tests.MathTests" name="OnePlusOneShouldNotEqualFive" />
<TestMethod codeBase="C:\code\single\bin\Release\net6.0\Single.Tests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="Single.Tests.MathTests" name="OnePlusOneShouldNotEqualFive" />
</UnitTest>
</TestDefinitions>
<TestEntries>
Expand Down
Loading

0 comments on commit 6fe59fc

Please sign in to comment.