From d77487d982cb9cd34cd980a50b2b7ae16d6d8a81 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Mon, 17 Aug 2026 19:25:41 +0100 Subject: [PATCH 1/8] nuget updates --- Directory.Packages.props | 62 +++++++++---------- .../Common/DockerHelper.cs | 17 ++++- .../Shared/SharedSteps.cs | 5 +- 3 files changed, 50 insertions(+), 34 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index f5a6632..75d0ed9 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,7 +5,7 @@ - + @@ -13,45 +13,45 @@ - + - - - - - - - - - - + + + + + + + + + + - + - - + + - - - - - + + + + + - - + + - - - - - - - - + + + + + + + + - + \ No newline at end of file diff --git a/TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs b/TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs index 2acb6ff..a76d1c5 100644 --- a/TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs +++ b/TransactionProcessorACL.IntegrationTests/Common/DockerHelper.cs @@ -12,6 +12,7 @@ namespace TransactionProcessor.IntegrationTests.Common using System.Net.Http; using System.Threading; using System.Threading.Tasks; + using TestHosts.Clients; /// /// @@ -44,6 +45,8 @@ public class DockerHelper : global::Shared.IntegrationTesting.TestContainers.Doc public EventStoreProjectionManagementClient ProjectionManagementClient; + public IAgencyBankingClient AgencyBankingClient; + #endregion #region Constructors @@ -96,7 +99,8 @@ public override async Task StartContainersForScenarioRun(String scenarioName, Do String SecurityServiceBaseAddressResolver(String api) => $"https://127.0.0.1:{this.SecurityServicePort}"; String TransactionProcessorBaseAddressResolver(String api) => $"http://127.0.0.1:{this.TransactionProcessorPort}"; String TransactionProcessorAclBaseAddressResolver(String api) => $"http://127.0.0.1:{this.TransactionProcessorAclPort}"; - + String TestHostServiceBaseAddressResolver(String api) => $"http://127.0.0.1:{this.TestHostServicePort}"; + HttpClientHandler clientHandler = new HttpClientHandler { ServerCertificateCustomValidationCallback = (message, @@ -113,6 +117,7 @@ public override async Task StartContainersForScenarioRun(String scenarioName, Do this.TransactionProcessorClient = new TransactionProcessorClient(TransactionProcessorBaseAddressResolver, httpClient, Serialise, Deserialise); this.TestHostHttpClient = new HttpClient(clientHandler); this.TestHostHttpClient.BaseAddress = new Uri($"http://127.0.0.1:{this.TestHostServicePort}"); + this.AgencyBankingClient = new AgencyBankingClient(TestHostServiceBaseAddressResolver, httpClient, Serialise_CamelCase, this.Deserialise_CamelCase); this.HttpClient = new HttpClient(); this.HttpClient.BaseAddress = new Uri(TransactionProcessorAclBaseAddressResolver(string.Empty)); @@ -131,6 +136,16 @@ Object Deserialise(String arg, Type type) return StringSerialiser.DeserializeObject(arg, type, new SerialiserOptions(SerialiserPropertyFormat.SnakeCase)); } + String Serialise_CamelCase(Object arg) + { + return StringSerialiser.Serialise(arg, new SerialiserOptions(SerialiserPropertyFormat.CamelCase)); + } + + Object Deserialise_CamelCase(String arg, Type type) + { + return StringSerialiser.DeserializeObject(arg, type, new SerialiserOptions(SerialiserPropertyFormat.CamelCase)); + } + public override Dictionary GetAdditionalVariables(ContainerType containerType) { Dictionary additionalVariables = base.GetAdditionalVariables(containerType); diff --git a/TransactionProcessorACL.IntegrationTests/Shared/SharedSteps.cs b/TransactionProcessorACL.IntegrationTests/Shared/SharedSteps.cs index b282772..0209826 100644 --- a/TransactionProcessorACL.IntegrationTests/Shared/SharedSteps.cs +++ b/TransactionProcessorACL.IntegrationTests/Shared/SharedSteps.cs @@ -63,7 +63,8 @@ public SharedSteps(ScenarioContext scenarioContext, this.ScenarioContext = scenarioContext; this.TestingContext = testingContext; this.SecurityServiceSteps = new SecurityServiceSteps(testingContext.DockerHelper.SecurityServiceClient); - this.TransactionProcessorSteps = new TransactionProcessorSteps(testingContext.DockerHelper.TransactionProcessorClient, testingContext.DockerHelper.TestHostHttpClient, testingContext.DockerHelper.ProjectionManagementClient); + this.TransactionProcessorSteps = new TransactionProcessorSteps(testingContext.DockerHelper.TransactionProcessorClient, testingContext.DockerHelper.TestHostHttpClient, testingContext.DockerHelper.ProjectionManagementClient, + testingContext.DockerHelper.AgencyBankingClient); this.AclSteps = new ACLSteps(testingContext.DockerHelper.HttpClient, this.TestingContext.DockerHelper.TransactionProcessorClient); } @@ -322,7 +323,7 @@ public async Task WhenICreateTheFollowingEstates(DataTable table){ [When(@"I create the following merchants")] public async Task WhenICreateTheFollowingMerchants(DataTable table){ List estates = this.TestingContext.Estates.Select(e => e.EstateDetails).ToList(); - List<(EstateDetails estate, CreateMerchantRequest)> requests = table.Rows.ToCreateMerchantRequests(estates); + List<(EstateDetails estate, CreateMerchantRequest, Boolean EnableAgencyBanking)> requests = table.Rows.ToCreateMerchantRequests(estates); List verifiedMerchants = await this.TransactionProcessorSteps.WhenICreateTheFollowingMerchants(this.TestingContext.AccessToken, requests); From ab57e0dcbca589d76c7fd8e485c8afc5fce6b735 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Mon, 17 Aug 2026 19:47:25 +0100 Subject: [PATCH 2/8] .. --- .github/workflows/nightlybuild.yml | 6 +++--- .github/workflows/pullrequest.yml | 6 +++--- Directory.Packages.props | 3 ++- .../TransactionProcessorACL.BusinessLogic.Tests.csproj | 2 ++ .../TransactionProcessorACL.IntegrationTests.csproj | 3 +++ .../TransactionProcessorACL.Tests.csproj | 2 ++ global.json | 8 ++++++++ 7 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 global.json diff --git a/.github/workflows/nightlybuild.yml b/.github/workflows/nightlybuild.yml index 76e3088..7c6ed7f 100644 --- a/.github/workflows/nightlybuild.yml +++ b/.github/workflows/nightlybuild.yml @@ -42,14 +42,14 @@ jobs: - name: Run Unit Tests run: | echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}" - dotnet test "TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj" --logger "trx;LogFileName=TransactionProcessorACL.Tests.trx" --results-directory "./TestResults" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" - dotnet test "TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj" --logger "trx;LogFileName=TransactionProcessorACL.BusinessLogic.Tests.trx" --results-directory "./TestResults" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov2.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" + dotnet test "TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj" --results-directory "./TestResults" --report-trx --report-trx-filename "TransactionProcessorACL.Tests.trx" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" + dotnet test "TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj" --results-directory "./TestResults" --report-trx --report-trx-filename "TransactionProcessorACL.BusinessLogic.Tests.trx" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov2.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" - name: Build Docker Image run: docker build . --file TransactionProcessorACL/Dockerfile --tag transactionprocessoracl:latest - name: Run Integration Tests - run: dotnet test "TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj" --logger "trx;LogFileName=TransactionProcessorACL.IntegrationTests.trx" --results-directory "./TestResults" + run: dotnet test "TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj" --results-directory "./TestResults" --report-trx --report-trx-filename "TransactionProcessorACL.IntegrationTests.trx" - uses: actions/upload-artifact@v4.4.0 if: always() diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index d2aeac4..1f1e335 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -25,14 +25,14 @@ jobs: - name: Run Unit Tests run: | echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}" - dotnet test "TransactionProcessorACL.Tests\TransactionProcessorACL.Tests.csproj" --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=acl-test-results.trx" - dotnet test "TransactionProcessorACL.BusinessLogic.Tests\TransactionProcessorACL.BusinessLogic.Tests.csproj" --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=bl-test-results.trx" + dotnet test "TransactionProcessorACL.Tests\TransactionProcessorACL.Tests.csproj" --configuration Release --no-build --verbosity normal --results-directory "./TestResults" --report-trx --report-trx-filename "acl-test-results.trx" + dotnet test "TransactionProcessorACL.BusinessLogic.Tests\TransactionProcessorACL.BusinessLogic.Tests.csproj" --configuration Release --no-build --verbosity normal --results-directory "./TestResults" --report-trx --report-trx-filename "bl-test-results.trx" - name: Build Docker Image run: docker build . --file TransactionProcessorACL/Dockerfile --tag transactionprocessoracl:latest - name: Run Integration Tests - run: dotnet test "TransactionProcessorACL.IntegrationTests\TransactionProcessorACL.IntegrationTests.csproj" --filter Category=PRTest --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=integration-test-results.trx" + run: dotnet test "TransactionProcessorACL.IntegrationTests\TransactionProcessorACL.IntegrationTests.csproj" --filter Category=PRTest --configuration Release --no-build --verbosity normal --results-directory "./TestResults" --report-trx --report-trx-filename "integration-test-results.trx" - uses: actions/upload-artifact@v4.4.0 if: always() diff --git a/Directory.Packages.props b/Directory.Packages.props index 75d0ed9..82e3f2e 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -25,6 +25,7 @@ + @@ -54,4 +55,4 @@ - \ No newline at end of file + diff --git a/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj b/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj index 05c2383..67027cb 100644 --- a/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj +++ b/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj @@ -4,6 +4,7 @@ net10.0 None false + true @@ -14,6 +15,7 @@ + diff --git a/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj b/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj index d6d883a..524817f 100644 --- a/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj +++ b/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj @@ -4,6 +4,8 @@ net10.0 Full false + true + Exe @@ -23,6 +25,7 @@ + diff --git a/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj b/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj index f172d64..bc23247 100644 --- a/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj +++ b/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj @@ -4,6 +4,7 @@ net10.0 None false + true @@ -13,6 +14,7 @@ + diff --git a/global.json b/global.json new file mode 100644 index 0000000..b66f2a5 --- /dev/null +++ b/global.json @@ -0,0 +1,8 @@ +{ + "sdk": { + "version": "10.0.400" + }, + "test": { + "runner": "Microsoft.Testing.Platform" + } +} From 3f8c28796d94c2583ecf4029516e52ad42d24c65 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Mon, 17 Aug 2026 19:51:00 +0100 Subject: [PATCH 3/8] .. --- global.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/global.json b/global.json index b66f2a5..7325398 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,7 @@ { "sdk": { - "version": "10.0.400" + "version": "10.0.302", + "rollForward": "latestFeature" }, "test": { "runner": "Microsoft.Testing.Platform" From e7c50729caf646a5510d38d636f600550ec78221 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Mon, 17 Aug 2026 20:00:03 +0100 Subject: [PATCH 4/8] Fix PR test filter for MTP --- .github/workflows/pullrequest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 1f1e335..36024a4 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -32,7 +32,7 @@ jobs: run: docker build . --file TransactionProcessorACL/Dockerfile --tag transactionprocessoracl:latest - name: Run Integration Tests - run: dotnet test "TransactionProcessorACL.IntegrationTests\TransactionProcessorACL.IntegrationTests.csproj" --filter Category=PRTest --configuration Release --no-build --verbosity normal --results-directory "./TestResults" --report-trx --report-trx-filename "integration-test-results.trx" + run: dotnet test "TransactionProcessorACL.IntegrationTests\TransactionProcessorACL.IntegrationTests.csproj" --filter "TestCategory=PRTest" --configuration Release --no-build --verbosity normal --results-directory "./TestResults" --report-trx --report-trx-filename "integration-test-results.trx" - uses: actions/upload-artifact@v4.4.0 if: always() From 5bb49602de69bf648df2ee32463db39e3d41ba77 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Mon, 17 Aug 2026 20:09:01 +0100 Subject: [PATCH 5/8] Run PR tests with build --- .github/workflows/pullrequest.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 36024a4..fbc93b6 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -25,14 +25,14 @@ jobs: - name: Run Unit Tests run: | echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}" - dotnet test "TransactionProcessorACL.Tests\TransactionProcessorACL.Tests.csproj" --configuration Release --no-build --verbosity normal --results-directory "./TestResults" --report-trx --report-trx-filename "acl-test-results.trx" - dotnet test "TransactionProcessorACL.BusinessLogic.Tests\TransactionProcessorACL.BusinessLogic.Tests.csproj" --configuration Release --no-build --verbosity normal --results-directory "./TestResults" --report-trx --report-trx-filename "bl-test-results.trx" + dotnet test "TransactionProcessorACL.Tests\TransactionProcessorACL.Tests.csproj" --configuration Release --verbosity normal --results-directory "./TestResults" --report-trx --report-trx-filename "acl-test-results.trx" + dotnet test "TransactionProcessorACL.BusinessLogic.Tests\TransactionProcessorACL.BusinessLogic.Tests.csproj" --configuration Release --verbosity normal --results-directory "./TestResults" --report-trx --report-trx-filename "bl-test-results.trx" - name: Build Docker Image run: docker build . --file TransactionProcessorACL/Dockerfile --tag transactionprocessoracl:latest - name: Run Integration Tests - run: dotnet test "TransactionProcessorACL.IntegrationTests\TransactionProcessorACL.IntegrationTests.csproj" --filter "TestCategory=PRTest" --configuration Release --no-build --verbosity normal --results-directory "./TestResults" --report-trx --report-trx-filename "integration-test-results.trx" + run: dotnet test "TransactionProcessorACL.IntegrationTests\TransactionProcessorACL.IntegrationTests.csproj" --filter "TestCategory=PRTest" --configuration Release --verbosity normal --results-directory "./TestResults" --report-trx --report-trx-filename "integration-test-results.trx" - uses: actions/upload-artifact@v4.4.0 if: always() From fd897d13fb8a41c6f3bb7f06547343ccef7615f7 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Mon, 17 Aug 2026 20:22:57 +0100 Subject: [PATCH 6/8] Stabilize MTP test discovery --- .../TransactionProcessorACL.BusinessLogic.Tests.csproj | 1 + TransactionProcessorACL.BusinessLogic.Tests/testconfig.json | 5 +++++ .../TransactionProcessorACL.Tests.csproj | 1 + 3 files changed, 7 insertions(+) create mode 100644 TransactionProcessorACL.BusinessLogic.Tests/testconfig.json diff --git a/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj b/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj index 67027cb..75f1969 100644 --- a/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj +++ b/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj @@ -4,6 +4,7 @@ net10.0 None false + Exe true diff --git a/TransactionProcessorACL.BusinessLogic.Tests/testconfig.json b/TransactionProcessorACL.BusinessLogic.Tests/testconfig.json new file mode 100644 index 0000000..8beb4a0 --- /dev/null +++ b/TransactionProcessorACL.BusinessLogic.Tests/testconfig.json @@ -0,0 +1,5 @@ +{ + "xUnit": { + "parallelizeTestCollections": false + } +} diff --git a/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj b/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj index bc23247..269f591 100644 --- a/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj +++ b/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj @@ -4,6 +4,7 @@ net10.0 None false + Exe true From 552e6b92bd901fa9df8d979192428ffa04d5949b Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Mon, 17 Aug 2026 20:32:45 +0100 Subject: [PATCH 7/8] Add explicit MTP build support --- Directory.Packages.props | 1 + .../TransactionProcessorACL.BusinessLogic.Tests.csproj | 1 + .../TransactionProcessorACL.IntegrationTests.csproj | 1 + .../TransactionProcessorACL.Tests.csproj | 1 + 4 files changed, 4 insertions(+) diff --git a/Directory.Packages.props b/Directory.Packages.props index 82e3f2e..3d70351 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -25,6 +25,7 @@ + diff --git a/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj b/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj index 75f1969..73b858a 100644 --- a/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj +++ b/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj @@ -16,6 +16,7 @@ + diff --git a/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj b/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj index 524817f..26496c0 100644 --- a/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj +++ b/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj @@ -25,6 +25,7 @@ + diff --git a/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj b/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj index 269f591..28db704 100644 --- a/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj +++ b/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj @@ -15,6 +15,7 @@ + From 76e7c036f186ff304fc47b8f5a29bc38ff808de8 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Mon, 17 Aug 2026 20:43:35 +0100 Subject: [PATCH 8/8] Align test runner with Messaging fix --- .github/workflows/nightlybuild.yml | 25 ++++++++++++++++--- .github/workflows/pullrequest.yml | 25 ++++++++++++++++--- Directory.Packages.props | 1 - ...ionProcessorACL.BusinessLogic.Tests.csproj | 1 - .../Integration.runsettings | 6 +++++ ...actionProcessorACL.IntegrationTests.csproj | 2 -- .../TransactionProcessorACL.Tests.csproj | 1 - 7 files changed, 48 insertions(+), 13 deletions(-) create mode 100644 TransactionProcessorACL.IntegrationTests/Integration.runsettings diff --git a/.github/workflows/nightlybuild.yml b/.github/workflows/nightlybuild.yml index 7c6ed7f..4deaabb 100644 --- a/.github/workflows/nightlybuild.yml +++ b/.github/workflows/nightlybuild.yml @@ -42,14 +42,14 @@ jobs: - name: Run Unit Tests run: | echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}" - dotnet test "TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj" --results-directory "./TestResults" --report-trx --report-trx-filename "TransactionProcessorACL.Tests.trx" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" - dotnet test "TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj" --results-directory "./TestResults" --report-trx --report-trx-filename "TransactionProcessorACL.BusinessLogic.Tests.trx" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov2.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" + dotnet test "TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj" --configuration Release --no-build --verbosity normal /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" -- --report-trx + dotnet test "TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj" --configuration Release --no-build --verbosity normal /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov2.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov" -- --report-trx - name: Build Docker Image run: docker build . --file TransactionProcessorACL/Dockerfile --tag transactionprocessoracl:latest - name: Run Integration Tests - run: dotnet test "TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj" --results-directory "./TestResults" --report-trx --report-trx-filename "TransactionProcessorACL.IntegrationTests.trx" + run: dotnet test "TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj" --configuration Release --no-build --verbosity normal --results-directory "${{ github.workspace }}/TestResults" --settings "TransactionProcessorACL.IntegrationTests/Integration.runsettings" - uses: actions/upload-artifact@v4.4.0 if: always() @@ -57,7 +57,7 @@ jobs: name: tracelogs path: /home/runner/trace/ - - name: Publish test results + - name: Publish unit test results uses: dorny/test-reporter@v1 if: always() with: @@ -65,6 +65,15 @@ jobs: path: '**/TestResults/*.trx' reporter: dotnet-trx fail-on-error: false + + - name: Publish integration test results + uses: dorny/test-reporter@v1 + if: always() + with: + name: Integration Test Results + path: 'TestResults/TransactionProcessorACL.IntegrationTests.xml' + reporter: dotnet-nunit + fail-on-error: false - name: Upload test results uses: actions/upload-artifact@v4 @@ -74,6 +83,14 @@ jobs: path: '**/TestResults/*.trx' retention-days: 30 + - name: Upload integration test results + uses: actions/upload-artifact@v4 + if: always() + with: + name: integration-test-results + path: 'TestResults/TransactionProcessorACL.IntegrationTests.xml' + retention-days: 30 + - name: Notify on nightly failure if: ${{ failure() }} uses: TransactionProcessing/org-ci-workflows/.github/actions/nightly-failure-issue@main diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index fbc93b6..715ceba 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -25,14 +25,14 @@ jobs: - name: Run Unit Tests run: | echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}" - dotnet test "TransactionProcessorACL.Tests\TransactionProcessorACL.Tests.csproj" --configuration Release --verbosity normal --results-directory "./TestResults" --report-trx --report-trx-filename "acl-test-results.trx" - dotnet test "TransactionProcessorACL.BusinessLogic.Tests\TransactionProcessorACL.BusinessLogic.Tests.csproj" --configuration Release --verbosity normal --results-directory "./TestResults" --report-trx --report-trx-filename "bl-test-results.trx" + dotnet test "TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj" --configuration Release --no-build --verbosity normal -- --report-trx + dotnet test "TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj" --configuration Release --no-build --verbosity normal -- --report-trx - name: Build Docker Image run: docker build . --file TransactionProcessorACL/Dockerfile --tag transactionprocessoracl:latest - name: Run Integration Tests - run: dotnet test "TransactionProcessorACL.IntegrationTests\TransactionProcessorACL.IntegrationTests.csproj" --filter "TestCategory=PRTest" --configuration Release --verbosity normal --results-directory "./TestResults" --report-trx --report-trx-filename "integration-test-results.trx" + run: dotnet test "TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj" --filter "TestCategory=PRTest" --configuration Release --no-build --verbosity normal --results-directory "${{ github.workspace }}/TestResults" --settings "TransactionProcessorACL.IntegrationTests/Integration.runsettings" - uses: actions/upload-artifact@v4.4.0 if: always() @@ -40,7 +40,7 @@ jobs: name: tracelogs path: /home/runner/trace/ - - name: Publish test results + - name: Publish unit test results uses: dorny/test-reporter@v1 if: always() with: @@ -48,6 +48,15 @@ jobs: path: '**/TestResults/*.trx' reporter: dotnet-trx fail-on-error: true + + - name: Publish integration test results + uses: dorny/test-reporter@v1 + if: always() + with: + name: Integration Test Results + path: 'TestResults/TransactionProcessorACL.IntegrationTests.xml' + reporter: dotnet-nunit + fail-on-error: true - name: Upload test results uses: actions/upload-artifact@v4 @@ -56,3 +65,11 @@ jobs: name: test-results path: '**/TestResults/*.trx' retention-days: 30 + + - name: Upload integration test results + uses: actions/upload-artifact@v4 + if: always() + with: + name: integration-test-results + path: 'TestResults/TransactionProcessorACL.IntegrationTests.xml' + retention-days: 30 diff --git a/Directory.Packages.props b/Directory.Packages.props index 3d70351..82e3f2e 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -25,7 +25,6 @@ - diff --git a/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj b/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj index 73b858a..75f1969 100644 --- a/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj +++ b/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj @@ -16,7 +16,6 @@ - diff --git a/TransactionProcessorACL.IntegrationTests/Integration.runsettings b/TransactionProcessorACL.IntegrationTests/Integration.runsettings new file mode 100644 index 0000000..94fbaaf --- /dev/null +++ b/TransactionProcessorACL.IntegrationTests/Integration.runsettings @@ -0,0 +1,6 @@ + + + TransactionProcessorACL.IntegrationTests + UseResultDirectory + + diff --git a/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj b/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj index 26496c0..80f640d 100644 --- a/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj +++ b/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj @@ -25,8 +25,6 @@ - - diff --git a/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj b/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj index 28db704..269f591 100644 --- a/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj +++ b/TransactionProcessorACL.Tests/TransactionProcessorACL.Tests.csproj @@ -15,7 +15,6 @@ -