-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d6bec65
commit 3110a71
Showing
19 changed files
with
310 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
Tennisi.Xunit.ParallelTestFramework.UI.Tests/Forms/TestWindow.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<Window x:Class="Tennisi.Xunit.ParallelTestFramework.UI.Tests.Forms.TestWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
Title="MainWindow" Height="450" Width="800"> | ||
<Grid> | ||
<TextBox x:Name="SampleTextBox" Width="200" Height="30" Margin="50"/> | ||
<Button x:Name="SampleButton" Content="Click Me" Width="100" Height="30" Margin="50,50,0,0"/> | ||
</Grid> | ||
</Window> |
21 changes: 21 additions & 0 deletions
21
Tennisi.Xunit.ParallelTestFramework.UI.Tests/Forms/TestWindow.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
|
||
namespace Tennisi.Xunit.ParallelTestFramework.UI.Tests.Forms; | ||
|
||
/// <summary> | ||
/// Interaction logic for TestWindow.xaml | ||
/// </summary> | ||
public partial class TestWindow : Window | ||
{ | ||
public string OutputText { get; private set; } | ||
|
||
public TestWindow() | ||
{ | ||
InitializeComponent(); | ||
SampleButton.Click += (sender, args) => OutputText = SampleTextBox.Text; | ||
} | ||
|
||
public new TextBox PublicTextBox { get => FindName("SampleTextBox") as TextBox; } | ||
public new Button PublicButton { get => FindName("SampleButton") as Button; } | ||
} |
36 changes: 36 additions & 0 deletions
36
....Xunit.ParallelTestFramework.UI.Tests/Tennisi.Xunit.ParallelTestFramework.UI.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net7.0-windows</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<IsPackable>false</IsPackable> | ||
<UseWpf>true</UseWpf> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<FullTestParallelization>true</FullTestParallelization> | ||
</PropertyGroup> | ||
|
||
<ImportGroup> | ||
<Import Project="../Tennisi.Xunit.ParallelTestFramework/build/Tennisi.Xunit.ParallelTestFramework.props" /> | ||
</ImportGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Tennisi.Xunit.ParallelTestFramework.Tests\Tennisi.Xunit.ParallelTestFramework.Tests.csproj" /> | ||
<ProjectReference Include="..\Tennisi.Xunit.ParallelTestFramework.UI\Tennisi.Xunit.ParallelTestFramework.UI.csproj" /> | ||
<ProjectReference Include="..\Tennisi.Xunit.ParallelTestFramework\Tennisi.Xunit.ParallelTestFramework.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" /> | ||
<PackageReference Include="xunit" Version="2.9.2" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
<PackageReference Include="Xunit.StaFact" Version="1.1.11" /> | ||
<PackageReference Include="xunit.extensibility.execution" Version="2.9.2" /> | ||
</ItemGroup> | ||
|
||
</Project> |
19 changes: 19 additions & 0 deletions
19
Tennisi.Xunit.ParallelTestFramework.UI.Tests/TestWindowTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Xunit; | ||
using Tennisi.Xunit.ParallelTestFramework.UI.Tests.Forms; | ||
|
||
|
||
namespace Tennisi.Xunit.ParallelTestFramework.UI.Tests; | ||
|
||
public class TestWindowTests | ||
{ | ||
[StaFact] | ||
public void ItShouldClick() | ||
{ | ||
var window = new TestWindow(); | ||
|
||
var button = window.PublicButton; | ||
|
||
Assert.NotNull(button); | ||
Assert.Equal("Click Me", button.Content); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
UNDER CONSTRUCTION |
22 changes: 22 additions & 0 deletions
22
Tennisi.Xunit.ParallelTestFramework.UI/Tennisi.Xunit.ParallelTestFramework.UI.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>net7.0-windows;net8.0-windows</TargetFrameworks> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<Description>Run xUnit test cases in parallel</Description> | ||
<IsPackable>True</IsPackable> | ||
<PackageReadmeFile>README.md</PackageReadmeFile> | ||
<RootNamespace>Tennisi.Xunit</RootNamespace> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="xunit.extensibility.execution" Version="2.9.2" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<FrameworkReference Include="Microsoft.WindowsDesktop.App" /> | ||
<ProjectReference Include="..\Tennisi.Xunit.ParallelTestFramework\Tennisi.Xunit.ParallelTestFramework.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
Tennisi.Xunit.ParallelTestFramework/DisableTestParallelizationAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace Tennisi.Xunit; | ||
|
||
/// <summary> | ||
/// Assembly-level attribute that disables <c>xunit.discovery.PreEnumerateTheories</c>, <c>xunit.parallelizeTestCollections</c>, <c>xunit.parallelizeAssembly</c> | ||
/// and enables xunit.execution.DisableParallelization in the xUnit framework. | ||
/// Alternatively, the <c>DisbaleTestParallelization</c> property can be set in the project file to achieve the same effect. | ||
/// </summary> | ||
/// <remarks> | ||
/// <para> | ||
/// When applied, it reverts the behavior of test execution to the standard xUnit execution model. | ||
/// </para> | ||
/// </remarks> | ||
[AttributeUsage(AttributeTargets.Assembly)] | ||
public sealed class DisableTestParallelizationAttribute : Attribute | ||
{ | ||
} |
11 changes: 9 additions & 2 deletions
11
Tennisi.Xunit.ParallelTestFramework/FullTestParallelizationAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.