File tree Expand file tree Collapse file tree 4 files changed +36
-9
lines changed
UnitTests/UnitTests.Notifications.NetCore Expand file tree Collapse file tree 4 files changed +36
-9
lines changed Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <RunSettings >
3
+ <MSTest >
4
+ <MaxCpuCount >0</MaxCpuCount >
5
+ <Parallelize >
6
+ <Workers >0</Workers >
7
+ <Scope >ClassLevel</Scope >
8
+ </Parallelize >
9
+ </MSTest >
10
+ </RunSettings >
Original file line number Diff line number Diff line change 10
10
</PropertyGroup >
11
11
12
12
<ItemGroup >
13
- <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 16.4.0 " />
13
+ <PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 16.0.1 " />
14
14
<PackageReference Include =" MSTest.TestAdapter" Version =" 2.1.0" />
15
15
<PackageReference Include =" MSTest.TestFramework" Version =" 2.1.0" />
16
16
</ItemGroup >
Original file line number Diff line number Diff line change @@ -28,8 +28,14 @@ steps:
28
28
- task : UseDotNet@2
29
29
inputs :
30
30
packageType : ' sdk'
31
- version : ' 3.1.101'
32
- displayName : Use .NET Core sdk
31
+ version : ' 2.1.202' # This SDK contains .Net Core 2.0.9, which we still need to run some of our .Net Core Tests
32
+ displayName : Use .NET Core sdk 2
33
+
34
+ - task : UseDotNet@2
35
+ inputs :
36
+ packageType : ' sdk'
37
+ version : ' 3.1.200'
38
+ displayName : Use .NET Core sdk 3
33
39
34
40
- task : DotNetCoreCLI@2
35
41
inputs :
50
56
- task : PublishTestResults@2
51
57
inputs :
52
58
testResultsFormat : ' VSTest'
53
- testResultsFiles : ' **/VsTestResults.xml '
59
+ testResultsFiles : ' **/VsTestResults*.trx '
54
60
displayName : Publish Test Results
55
61
condition : succeededOrFailed()
56
62
Original file line number Diff line number Diff line change @@ -265,22 +265,33 @@ public string getMSTestAdapterPath(){
265
265
Task( "Test" )
266
266
. Description ( "Runs all Tests" )
267
267
. IsDependentOn ( "Build" )
268
- . Does ( ( ) =>
268
+ . Does ( ( ) =>
269
269
{
270
270
var vswhere = VSWhereLatest ( new VSWhereLatestSettings
271
271
{
272
272
IncludePrerelease = false
273
273
} ) ;
274
-
274
+
275
275
var testSettings = new VSTestSettings
276
276
{
277
277
ToolPath = vswhere + "/Common7/IDE/CommonExtensions/Microsoft/TestWindow/vstest.console.exe" ,
278
278
TestAdapterPath = getMSTestAdapterPath ( ) ,
279
- ArgumentCustomization = arg => arg . Append ( "/logger:trx;LogFileName=VsTestResults.xml /framework:FrameworkUap10" ) ,
279
+ ArgumentCustomization = arg => arg . Append ( "/logger:trx;LogFileName=VsTestResultsUwp.trx /framework:FrameworkUap10" ) ,
280
280
} ;
281
281
282
- VSTest ( baseDir + "/**/UnitTests.*.appxrecipe" , testSettings ) ;
283
- } ) ;
282
+ VSTest ( baseDir + "/**/Release/**/UnitTests.*.appxrecipe" , testSettings ) ;
283
+ } ) . DoesForEach ( GetFiles ( baseDir + "/**/UnitTests.*.NetCore.csproj" ) , ( file ) =>
284
+ {
285
+ var testSettings = new DotNetCoreTestSettings
286
+ {
287
+ Configuration = "Release" ,
288
+ NoBuild = true ,
289
+ Logger = "trx;LogFilePrefix=VsTestResults" ,
290
+ Verbosity = DotNetCoreVerbosity . Normal ,
291
+ ArgumentCustomization = arg => arg . Append ( $ "-s { baseDir } /.runsettings") ,
292
+ } ;
293
+ DotNetCoreTest ( file . FullPath , testSettings ) ;
294
+ } ) . DeferOnError ( ) ;
284
295
285
296
286
297
You can’t perform that action at this time.
0 commit comments