Skip to content

Commit

Permalink
xunit runner
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaj authored Nov 15, 2020
1 parent 32c92fd commit f12ef96
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
17 changes: 10 additions & 7 deletions src/QAToolKit.Engine.Bombardier.Test/IgnoreOnGithubFact.cs
Original file line number Diff line number Diff line change
@@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,8 @@
</None>
</ItemGroup>

<ItemGroup>
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

</Project>
6 changes: 6 additions & 0 deletions src/QAToolKit.Engine.Bombardier.Test/xunit.runner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
"maxParallelThreads": 1,
"parallelizeAssembly": false,
"parallelizeTestCollections": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageProjectUrl>https://github.com/qatoolkit/qatoolkit-engine-bombardier-net</PackageProjectUrl>
<PackageIcon>qatoolkit-64x64.png</PackageIcon>
<RepositoryUrl>https://github.com/qatoolkit/qatoolkit-engine-bombardier-net</RepositoryUrl>
<PackageTags>qatoolkit-core-net;.net;c#;f#;load-tests;bombardier;dotnet;netstandard;net5</PackageTags>
<PackageTags>qatoolkit-engine-bombardier-net;.net;c#;f#;load-tests;bombardier;dotnet;netstandard;net5</PackageTags>
<Configurations>Debug;Release;Debug With Project References</Configurations>
</PropertyGroup>

Expand Down

0 comments on commit f12ef96

Please sign in to comment.