diff --git a/.github/workflows/nightlybuild.yml b/.github/workflows/nightlybuild.yml
index 76e3088..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" --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" --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" --logger "trx;LogFileName=TransactionProcessorACL.IntegrationTests.trx" --results-directory "./TestResults"
+ 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 d2aeac4..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 --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 -- --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 Category=PRTest --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=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 f5a6632..82e3f2e 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -5,7 +5,7 @@
-
+
@@ -13,45 +13,46 @@
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj b/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj
index 05c2383..75f1969 100644
--- a/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj
+++ b/TransactionProcessorACL.BusinessLogic.Tests/TransactionProcessorACL.BusinessLogic.Tests.csproj
@@ -4,6 +4,8 @@
net10.0
None
false
+ Exe
+ true
@@ -14,6 +16,7 @@
+
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.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