12 Commits

Author SHA1 Message Date
Matteo Cominetti 0eeef52d51 feat: updates xunit 2023-03-09 18:28:47 +01:00
Matteo Cominetti 8564d58439 feat: outputs full stack trace and messages 2020-10-31 18:22:15 +00:00
Matteo Cominetti 8d1679bef7 Update README.md 2020-09-28 22:14:20 +01:00
Matteo Cominetti ed266339f2 Update azure-pipelines.yml for Azure Pipelines 2020-09-15 15:20:09 +02:00
Matteo Cominetti cb9c9019f3 Update azure-pipelines.yml for Azure Pipelines 2020-09-15 13:19:47 +02:00
Matteo Cominetti 18583d394d Update README.md 2020-09-15 11:30:54 +01:00
Matteo Cominetti 5c92d08841 updated readme 2020-07-30 19:27:36 +01:00
Matteo Cominetti c0e691e6e9 bump version 2020-07-30 17:13:51 +01:00
Matteo Cominetti bf7fb4d0a4 fixes RemoveAssemblyTestCases 2020-07-30 17:12:45 +01:00
Matteo Cominetti 572ea33edb Update azure-pipelines.yml for Azure Pipelines 2020-07-30 15:32:45 +01:00
Matteo Cominetti b0cab443bb Update azure-pipelines.yml for Azure Pipelines 2020-07-30 15:27:10 +01:00
Matteo Cominetti c572444603 Update azure-pipelines.yml for Azure Pipelines 2020-07-30 15:22:03 +01:00
6 changed files with 26 additions and 15 deletions
+12 -4
View File
@@ -1,12 +1,20 @@
# xunit.runner.wpf
# speckle.xunit.runner.wpf
[![Build Status](https://teocomi.visualstudio.com/Speckle/_apis/build/status/Speckle-Next.speckle.xunit.runner.wpf?branchName=master)](https://teocomi.visualstudio.com/Speckle/_build/latest?definitionId=1&branchName=master)
[![Build Status](https://teocomi.visualstudio.com/Speckle/_apis/build/status/specklesystems.speckle.xunit.runner.wpf?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 !
+2 -1
View File
@@ -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 -3
View File
@@ -6,7 +6,8 @@
trigger:
branches:
include:
- refs/tags/*
- master
- refs/tags/*
pool:
vmImage: 'windows-latest'
@@ -46,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)
+2 -2
View File
@@ -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,9 +16,9 @@
<PackageIcon></PackageIcon>
<PackageIconUrl>https://avatars2.githubusercontent.com/u/2092016</PackageIconUrl>
<PackageIconUrl>https://avatars2.githubusercontent.com/u/2092016</PackageIconUrl>
<Version>1.0.7</Version>
<AssemblyVersion>1.0.7.0</AssemblyVersion>
<FileVersion>1.0.7.0</FileVersion>
<Version>1.0.9</Version>
<AssemblyVersion>1.0.9.0</AssemblyVersion>
<FileVersion>1.0.9.0</FileVersion>
</PropertyGroup>
<ItemGroup>
@@ -39,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>