From f12ef96727681682f69d13ed58d9b2a20a43b314 Mon Sep 17 00:00:00 2001 From: Miha Jakovac Date: Sun, 15 Nov 2020 19:33:50 +0100 Subject: [PATCH] xunit runner --- .../IgnoreOnGithubFact.cs | 17 ++++++++++------- .../QAToolKit.Engine.Bombardier.Test.csproj | 4 ++++ .../xunit.runner.json | 6 ++++++ .../QAToolKit.Engine.Bombardier.csproj | 2 +- 4 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 src/QAToolKit.Engine.Bombardier.Test/xunit.runner.json diff --git a/src/QAToolKit.Engine.Bombardier.Test/IgnoreOnGithubFact.cs b/src/QAToolKit.Engine.Bombardier.Test/IgnoreOnGithubFact.cs index d55d1a4..dbece0b 100644 --- a/src/QAToolKit.Engine.Bombardier.Test/IgnoreOnGithubFact.cs +++ b/src/QAToolKit.Engine.Bombardier.Test/IgnoreOnGithubFact.cs @@ -1,16 +1,19 @@ using System; using Xunit; -public sealed class IgnoreOnGithubFact : FactAttribute +namespace QAToolKit.Engine.Bombardier.Test { - public IgnoreOnGithubFact() + public class IgnoreOnGithubFact : FactAttribute { - if (IsGitHubAction()) + public IgnoreOnGithubFact() { - Skip = "Ignore the test when run in Github agent."; + if (IsGitHubAction()) + { + Skip = "Ignore the test when run in Github agent."; + } } - } - private static bool IsGitHubAction() - => Environment.GetEnvironmentVariable("GITHUB_ACTION") != null; + private static bool IsGitHubAction() + => Environment.GetEnvironmentVariable("GITHUB_ACTION") != null; + } } \ No newline at end of file diff --git a/src/QAToolKit.Engine.Bombardier.Test/QAToolKit.Engine.Bombardier.Test.csproj b/src/QAToolKit.Engine.Bombardier.Test/QAToolKit.Engine.Bombardier.Test.csproj index fdde6fe..a801222 100644 --- a/src/QAToolKit.Engine.Bombardier.Test/QAToolKit.Engine.Bombardier.Test.csproj +++ b/src/QAToolKit.Engine.Bombardier.Test/QAToolKit.Engine.Bombardier.Test.csproj @@ -53,4 +53,8 @@ + + + + diff --git a/src/QAToolKit.Engine.Bombardier.Test/xunit.runner.json b/src/QAToolKit.Engine.Bombardier.Test/xunit.runner.json new file mode 100644 index 0000000..ead71ae --- /dev/null +++ b/src/QAToolKit.Engine.Bombardier.Test/xunit.runner.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", + "maxParallelThreads": 1, + "parallelizeAssembly": false, + "parallelizeTestCollections": false +} \ No newline at end of file diff --git a/src/QAToolKit.Engine.Bombardier/QAToolKit.Engine.Bombardier.csproj b/src/QAToolKit.Engine.Bombardier/QAToolKit.Engine.Bombardier.csproj index a51dd11..74f0964 100644 --- a/src/QAToolKit.Engine.Bombardier/QAToolKit.Engine.Bombardier.csproj +++ b/src/QAToolKit.Engine.Bombardier/QAToolKit.Engine.Bombardier.csproj @@ -19,7 +19,7 @@ https://github.com/qatoolkit/qatoolkit-engine-bombardier-net qatoolkit-64x64.png https://github.com/qatoolkit/qatoolkit-engine-bombardier-net - qatoolkit-core-net;.net;c#;f#;load-tests;bombardier;dotnet;netstandard;net5 + qatoolkit-engine-bombardier-net;.net;c#;f#;load-tests;bombardier;dotnet;netstandard;net5 Debug;Release;Debug With Project References