Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0eeef52d51 | |||
| 8564d58439 | |||
| 8d1679bef7 | |||
| ed266339f2 | |||
| cb9c9019f3 | |||
| 18583d394d | |||
| 5c92d08841 | |||
| c0e691e6e9 | |||
| bf7fb4d0a4 | |||
| 572ea33edb | |||
| b0cab443bb | |||
| c572444603 | |||
| da4baa6f12 | |||
| 81c396dd80 | |||
| d12738e609 | |||
| 2187a6129f | |||
| 0e2dda20a3 | |||
| 39e42e894e |
@@ -1,12 +1,20 @@
|
||||
# xunit.runner.wpf
|
||||
# speckle.xunit.runner.wpf
|
||||
|
||||
[](https://teocomi.visualstudio.com/Speckle/_build/latest?definitionId=1&branchName=master)
|
||||
[](https://teocomi.visualstudio.com/Speckle/_build/latest?definitionId=4&branchName=master)
|
||||
|
||||
XUnit Gui written in WPF
|
||||
|
||||
Fork of [xunit.runner.wpf](https://www.nuget.org/packages/xunit.runner.wpf).
|
||||
|
||||
This version, currently in WIP, uses the [AssemblyRunner](xunit.v3.runner.utility) found in xunit.v3.runner.utility to run the tests so that the external dlls are loaded in the same AppDomain.
|
||||
This fork, uses the [AssemblyRunner](https://github.com/xunit/xunit/blob/main/src/xunit.v3.runner.utility/Runners/AssemblyRunner.cs) of xunit.v3.runner.utility to run the tests so that the external dlls are loaded via reflection in the same AppDomain.
|
||||
This is necessary when running unit tests of code hosted by external applications (Revit etc).
|
||||
|
||||
Coming soon, a xunit runner for Revit.
|
||||
NuGet package: https://www.nuget.org/packages/speckle.xunit.runner.wpf/
|
||||
|
||||
Sample application using it: https://github.com/Speckle-Next/xUnitRevit
|
||||
|
||||
Many thanks to all the developers of xunit and xunit.runner.wpf!
|
||||
|
||||
|
||||
|
||||
Check out our blog post on this 👉 https://speckle.systems/blog/xunitrevit !
|
||||
|
||||
@@ -10,10 +10,11 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SampleTestAssembly</RootNamespace>
|
||||
<AssemblyName>SampleTestAssembly</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
||||
+5
-16
@@ -6,30 +6,18 @@
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- refs/tags/*
|
||||
- master
|
||||
- refs/tags/*
|
||||
|
||||
pool:
|
||||
vmImage: 'windows-latest'
|
||||
|
||||
|
||||
|
||||
variables:
|
||||
solution: '**/*.sln'
|
||||
buildPlatform: 'Any CPU'
|
||||
buildConfiguration: 'Release'
|
||||
|
||||
|
||||
steps:
|
||||
- powershell: |
|
||||
$tags = git tag --sort=-creatordate
|
||||
$tag = $tags[0]
|
||||
|
||||
#update build number
|
||||
- bash: |
|
||||
echo "##vso[build.updatebuildnumber]Release $(tag)"
|
||||
condition: eq(variables['release.enabled'], 'true')
|
||||
name: SetReleaseBuildName
|
||||
|
||||
- task: NuGetToolInstaller@1
|
||||
|
||||
- task: NuGetCommand@2
|
||||
@@ -59,6 +47,7 @@ steps:
|
||||
publishLocation: 'Container'
|
||||
|
||||
- powershell: |
|
||||
nuget push -ApiKey $env:APIKEY -Source https://api.nuget.org/v3/index.json $(Build.ArtifactStagingDirectory)/**/*.nupkg
|
||||
If ($env:BRANCH.StartsWith('refs/tags/')) { nuget push -ApiKey $env:APIKEY -Source https://api.nuget.org/v3/index.json $(Build.ArtifactStagingDirectory)/**/*.nupkg }
|
||||
env:
|
||||
APIKEY: $(nuget-apikey)
|
||||
APIKEY: $(nuget-apikey)
|
||||
BRANCH: $(Build.SourceBranch)
|
||||
@@ -332,7 +332,7 @@ namespace Xunit.Runners
|
||||
|
||||
if (DispatchMessage<ITestAssemblyFinished>(message, messageTypes, assemblyFinished =>
|
||||
{
|
||||
|
||||
|
||||
OnExecutionComplete?.Invoke(new ExecutionCompleteInfo(assemblyFinished.TestsRun, assemblyFinished.TestsFailed, assemblyFinished.TestsSkipped, assemblyFinished.ExecutionTime));
|
||||
tcs.TrySetResult("");
|
||||
}))
|
||||
@@ -342,7 +342,7 @@ namespace Xunit.Runners
|
||||
if (DispatchMessage<IDiagnosticMessage>(message, messageTypes, m => OnDiagnosticMessage(new DiagnosticMessageInfo(m.Message))))
|
||||
return !cancelled;
|
||||
if (OnTestFailed != null)
|
||||
if (DispatchMessage<ITestFailed>(message, messageTypes, m => OnTestFailed(new TestFailedInfo(m.TestClass.Class.Name, m.TestMethod.Method.Name, m.TestCase.Traits, m.Test.DisplayName, m.TestCollection.DisplayName, m.ExecutionTime, m.Output, m.ExceptionTypes.FirstOrDefault(), m.Messages.FirstOrDefault(), m.StackTraces.FirstOrDefault()))))
|
||||
if (DispatchMessage<ITestFailed>(message, messageTypes, m => OnTestFailed(new TestFailedInfo(m.TestClass.Class.Name, m.TestMethod.Method.Name, m.TestCase.Traits, m.Test.DisplayName, m.TestCollection.DisplayName, m.ExecutionTime, m.Output, string.Join("\n\n", m.ExceptionTypes), string.Join("\n\n", m.Messages), string.Join("\n\n", m.StackTraces)))))
|
||||
return !cancelled;
|
||||
if (OnTestFinished != null)
|
||||
if (DispatchMessage<ITestFinished>(message, messageTypes, m => OnTestFinished(new TestFinishedInfo(m.TestClass.Class.Name, m.TestMethod.Method.Name, m.TestCase.Traits, m.Test.DisplayName, m.TestCollection.DisplayName, m.ExecutionTime, m.Output))))
|
||||
|
||||
@@ -505,7 +505,7 @@ namespace Xunit.Runner.Wpf.ViewModel
|
||||
var i = 0;
|
||||
while (i < this.allTestCases.Count)
|
||||
{
|
||||
if (string.Compare(this.allTestCases[i].AssemblyFileName, assemblyPath, StringComparison.OrdinalIgnoreCase) == 0)
|
||||
if (string.Compare(this.allTestCases[i].AssemblyPath, assemblyPath, StringComparison.OrdinalIgnoreCase) == 0)
|
||||
{
|
||||
this.allTestCaseUniqueIDs.Remove(this.allTestCases[i].UniqueID);
|
||||
this.allTestCases.RemoveAt(i);
|
||||
|
||||
@@ -16,7 +16,9 @@
|
||||
<PackageIcon></PackageIcon>
|
||||
<PackageIconUrl>https://avatars2.githubusercontent.com/u/2092016</PackageIconUrl>
|
||||
<PackageIconUrl>https://avatars2.githubusercontent.com/u/2092016</PackageIconUrl>
|
||||
<Version>1.0.5</Version>
|
||||
<Version>1.0.9</Version>
|
||||
<AssemblyVersion>1.0.9.0</AssemblyVersion>
|
||||
<FileVersion>1.0.9.0</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -37,7 +39,7 @@
|
||||
<PackageReference Include="MvvmLightLibs" Version="5.4.1.1" />
|
||||
<PackageReference Include="System.Collections.Immutable" Version="1.7.1" />
|
||||
<PackageReference Include="WindowsAPICodePack-Shell" Version="1.1.1" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit" Version="2.4.2" />
|
||||
<PackageReference Include="xunit.runner.utility" Version="2.4.1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user