зеркало из https://github.com/microsoft/testfx.git
Update playground project (#2612)
This commit is contained in:
Родитель
3d9ddb6599
Коммит
261430037d
|
@ -5,11 +5,21 @@
|
|||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateProgramFile>false</GenerateProgramFile>
|
||||
<NoWarn>$(NoWarn);NETSDK1023</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="$(RepoRoot)src\Platform\Microsoft.Testing.Platform\Microsoft.Testing.Platform.csproj" />
|
||||
<ProjectReference Include="$(RepoRoot)src\Adapter\MSTest.TestAdapter\MSTest.TestAdapter.csproj" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0-preview-24080-01" />
|
||||
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Version="1.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="config.runsettings">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -17,6 +17,9 @@ public class Program
|
|||
|
||||
var testApplicationBuilder = await TestApplication.CreateBuilderAsync(args);
|
||||
testApplicationBuilder.AddMSTest(() => new[] { Assembly.GetEntryAssembly()! });
|
||||
|
||||
// Enable Trx
|
||||
// testApplicationBuilder.AddTrxReportProvider();
|
||||
using var testApplication = await testApplicationBuilder.BuildAsync();
|
||||
return await testApplication.RunAsync();
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
[assembly: Parallelize(Scope = ExecutionScope.ClassLevel, Workers = 0)]
|
||||
[assembly: Parallelize(Scope = ExecutionScope.MethodLevel, Workers = 0)]
|
||||
|
||||
namespace Playground;
|
||||
|
||||
|
@ -13,8 +13,7 @@ namespace Playground;
|
|||
public class TestClass
|
||||
{
|
||||
[TestMethod]
|
||||
public async Task Test1()
|
||||
public void Test()
|
||||
{
|
||||
await Task.Delay(1000);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RunSettings>
|
||||
<!-- https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#runconfiguration-element -->
|
||||
<RunConfiguration>
|
||||
</RunConfiguration>
|
||||
<!-- https://learn.microsoft.com/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file#mstest-element -->
|
||||
<MSTest>
|
||||
</MSTest>
|
||||
</RunSettings>
|
Загрузка…
Ссылка в новой задаче