forked from Azure/azure-powershell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AzurePowershell.Test.targets
465 lines (398 loc) · 28.4 KB
/
AzurePowershell.Test.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<TestSettings>.\src\Local.testsettings</TestSettings>
<TestSettings_x64>.\src\Local.x64.testsettings</TestSettings_x64>
<ScenarioTestDebug>.\src\ServiceManagement\Common\Commands.ScenarioTest\bin\Debug\Microsoft.WindowsAzure.Commands.ScenarioTest.dll</ScenarioTestDebug>
<BackupTestDebug>.\src\ResourceManager\AzureBackup\Commands.AzureBackup.Test\bin\Debug\Microsoft.Azure.Commands.AzureBackup.Test.dll</BackupTestDebug>
<RecoveryServicesBackupTestDebug>.\src\ResourceManager\RecoveryServices\Commands.RecoveryServices.Backup.Test\bin\Debug\Microsoft.Azure.Commands.RecoveryServices.Backup.Test.dll</RecoveryServicesBackupTestDebug>
<SqlTestDebug>.\src\ResourceManager\Sql\Commands.Sql.Test\bin\Debug\Microsoft.Azure.Commands.Sql.Test.dll</SqlTestDebug>
<ComputeDebug>.\src\ResourceManager\Compute\Commands.Compute.Test\bin\Debug\Microsoft.Azure.Commands.Compute.dll</ComputeDebug>
<ComputeTestDebug>.\src\ResourceManager\Compute\Commands.Compute.Test\bin\Debug\Microsoft.Azure.Commands.Compute.Test.dll</ComputeTestDebug>
<NetworkTestDebug>.\src\ResourceManager\Network\Commands.Network.Test\bin\Debug\Microsoft.Azure.Commands.Network.Test.dll</NetworkTestDebug>
<AzureRTTestSettings>.\src\AzureRT.testsettings</AzureRTTestSettings>
<AzureRTSeqTestSettings>.\src\AzureRTSeq.testsettings</AzureRTSeqTestSettings>
<AzureRTTestContainer>.\src\ServiceManagement\Compute\Commands.ServiceManagement.Test\bin\Debug\Microsoft.WindowsAzure.Commands.ServiceManagement.Test.dll</AzureRTTestContainer>
<StorageScenarioTestDebug>src\Storage\Commands.Storage.ScenarioTest\bin\Debug\CLITest.dll</StorageScenarioTestDebug>
<ManagementTestDebug>.\src\ServiceManagement\Services\Commands.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Test.dll</ManagementTestDebug>
<ResourceManagerTestDebug>.\src\ResourceManager\Resources\Commands.Resources.Test\bin\Debug\Microsoft.Azure.Commands.Resources.Test.dll</ResourceManagerTestDebug>
<DataFactoryManagerTestDebug>.\src\ResourceManager\DataFactories\Commands.DataFactories.Test\bin\Debug\Microsoft.Azure.Commands.DataFactories.Test.dll</DataFactoryManagerTestDebug>
<DataFactoryV2ManagerTestDebug>.\src\ResourceManager\DataFactories\Commands.DataFactoryV2.Test\bin\Debug\Microsoft.Azure.Commands.DataFactoryV2.Test.dll</DataFactoryV2ManagerTestDebug>
<StreamAnalyticsManagerTestDebug>.\src\ResourceManager\StreamAnalytics\Commands.StreamAnalytics.Test\bin\Debug\Microsoft.Azure.Commands.StreamAnalytics.Test.dll</StreamAnalyticsManagerTestDebug>
<OperationalInsightsTestDebug>.\src\ResourceManager\OperationalInsights\Commands.OperationalInsights.Test\bin\Debug\Microsoft.Azure.Commands.OperationalInsights.Test.dll</OperationalInsightsTestDebug>
<BatchTestDebug>.\src\ResourceManager\AzureBatch\Commands.Batch.Test\bin\Debug\Microsoft.Azure.Commands.Batch.Test.dll</BatchTestDebug>
<WebsitesTestDebug>.\src\ResourceManager\Websites\Commands.Websites.Test\bin\Debug\Microsoft.Azure.Commands.Websites.Test.dll</WebsitesTestDebug>
<LogicAppTestDebug>.\src\ResourceManager\LogicApp\Commands.LogicApp.Test\bin\Debug\Microsoft.Azure.Commands.LogicApp.Test.dll</LogicAppTestDebug>
<SchedulerTestDebug>.\src\ResourceManager\Scheduler\Commands.Scheduler.Test\bin\Debug\Microsoft.Azure.Commands.Scheduler.Test.dll</SchedulerTestDebug>
<ServiceManagementTestDebug>.\src\ServiceManagement\Compute\Commands.ServiceManagement.Test\bin\Debug\Microsoft.WindowsAzure.Commands.ServiceManagement.Test.dll</ServiceManagementTestDebug>
<SqlDatabaseTestDebug>.\src\ServiceManagement\Sql\Commands.SqlDatabase.Test\bin\Debug\Microsoft.WindowsAzure.Commands.SqlDatabase.Test.dll</SqlDatabaseTestDebug>
<HDInsightTestDebug>.\src\ServiceManagement\HDInsight\Commands.HDInsight.Test\bin\Debug\Microsoft.WindowsAzure.Commands.HDInsight.Test.dll</HDInsightTestDebug>
<InsightsTestDebug>.\src\ResourceManager\Insights\Commands.Insights.Test\bin\Debug\Microsoft.Azure.Commands.Insights.Test.dll</InsightsTestDebug>
<StorageTestDebug>.\src\Storage\Commands.Storage.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Storage.Test.dll</StorageTestDebug>
<KeyVaultTestDebug>.\src\ResourceManager\KeyVault\Commands.KeyVault.Test\bin\Debug\Microsoft.Azure.Commands.KeyVault.Test.dll</KeyVaultTestDebug>
<ServiceFabricTestDebug>.\src\ResourceManager\ServiceFabric\Commands.ServiceFabric.Test\bin\Debug\Microsoft.Azure.Commands.ServiceFabric.Test.dll</ServiceFabricTestDebug>
<DataLakeAnalyticsTestDebug>.\src\ResourceManager\DataLakeAnalytics\Commands.DataLakeAnalytics.Test\bin\Debug\Microsoft.Azure.Commands.DataLakeAnalytics.Test.dll</DataLakeAnalyticsTestDebug>
<DataLakeStoreTestDebug>.\src\ResourceManager\DataLakeStore\Commands.DataLakeStore.Test\bin\Debug\Microsoft.Azure.Commands.DataLakeStore.Test.dll</DataLakeStoreTestDebug>
<UsageAggregationTestDebug>.\src\ResourceManager\UsageAggregates\Commands.UsageAggregates.Test\bin\Debug\Microsoft.Azure.Commands.UsageAggregates.Test.dll</UsageAggregationTestDebug>
<PowerBIEmbeddedTestDebug>.\src\ResourceManager\PowerBIEmbedded\Commands.PowerBIEmbedded.Test\bin\Debug\Microsoft.Azure.Commands.PowerBIEmbedded.Test.dll</PowerBIEmbeddedTestDebug>
<TestFilter>"!Functional&!Scenario&!AzureRTScenario&!Sequential&!PIRTest&!Preview&!ADDomain&!Network&!AzureRTUpload&!AzureRTCleanUp"</TestFilter>
<ScenarioTestFilter>All</ScenarioTestFilter>
<OneSDKCITFilter>"OneSDK&CIT"</OneSDKCITFilter>
<AzureRTAllTestFilter>"Functional|AzureRTScenario|Sequential|AzureRTUpload|Network"</AzureRTAllTestFilter>
<AzureRTParAllFilter>"Functional|AzureRTScenario"</AzureRTParAllFilter>
<AzureRTAllPreviewFilter>"Functional|AzureRTScenario|Preview"</AzureRTAllPreviewFilter>
<AzureRTUploadSeqFilter>"AzureRTUpload|Sequential"</AzureRTUploadSeqFilter>
<AzureRTSeqAllFilter>"AzureRTUpload|Sequential|Network"</AzureRTSeqAllFilter>
<TestTimeout Condition=" '$(TestTimeout)' == '' ">100000000</TestTimeout>
</PropertyGroup>
<Target Name="InvokeMSTest">
<!--Remove existing test result; otherwise mstest will error-->
<Delete Files="$(_testResult)"/>
<Exec
Command="MSTest.exe /testcontainer:$(_testAssembly) /testsettings:$(_testSettings) /category:$(_testFilter) /resultsfile:$(_testResult)"
ContinueOnError="false" />
</Target>
<Target Name="InvokeXUnit">
<PropertyGroup> <!-- Create the file path for the test dll (src/TestResults/<dll name>.html -->
<TestName>$(XUnitTests.Split('\').Length)</TestName>
<TestNamePathLength>$([MSBuild]::Subtract($(TestName), 1))</TestNamePathLength>
<TestSubFileName>$(XUnitTests.Split('\')[$(TestNamePathLength)])</TestSubFileName>
<TestFileName>$(TestOutputDirectory)\$(TestSubFileName).html</TestFileName>
</PropertyGroup>
<Message Importance="high" Text="Running XUnit tests... $(TestFileName)" />
<xunit
Assemblies="$(XUnitTests)"
AppDomains="true"
ShadowCopy="false"
ParallelizeTestCollections="false"
ParallelizeAssemblies="false"
IncludeTraits="AcceptanceType=CheckIn"
Html="$(TestFileName)"
DiagnosticMessages="false"
ContinueOnError="true"
Condition=" $(XUnitTests) != '' ">
<Output TaskParameter="ExitCode" ItemName="XUnitExitCode"/>
</xunit>
<Exec Command=""$(PowerShellCommand)" -NonInteractive -NoLogo -NoProfile -Command ". Move-Item -Path $(TestOutputDirectory)/$(TestSubFileName).html -Destination $(TestOutputDirectory)/PassingTests/$(TestSubFileName).html "" Condition="%(XUnitExitCode.Identity) == 0"/>
<Exec Command=""$(PowerShellCommand)" -NonInteractive -NoLogo -NoProfile -Command ". Move-Item -Path $(TestOutputDirectory)/$(TestSubFileName).html -Destination $(TestOutputDirectory)/FailingTests/$(TestSubFileName).html "" Condition="%(XUnitExitCode.Identity) != 0"/>
</Target>
<Target Name="InvokeXUnitAll">
<Message Importance="high" Text="Running XUnit tests" />
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
<xunit
Assemblies="@(XUnitTests)"
AppDomains="true"
ShadowCopy="false"
ParallelizeTestCollections="false"
ParallelizeAssemblies="false"
ExcludeTraits="RunType=LiveOnly;AcceptanceType=CheckIn"
Html="$(TestOutputDirectory)\AzurePowershellAllTestResults.html"
DiagnosticMessages="false"
ContinueOnError="false"
Condition=" @(XUnitTests) != '' "/>
</Target>
<Target Name="TimeoutErrorHandler">
<Error Text="XUnit tests in assembly "%(XUnitTests.Filename).dll" failed or timed out. Ensure that all tests in a project pass and collectively take less than 1 minute to run."/>
</Target>
<Target Name="BeforeRunTests">
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
</Target>
<Target Name="TestManagement">
<Xunit.Runner.MSBuild.xunit Assemblies="$(ManagementTestDebug)" Html="$(TestOutputDirectory)\ManagementDebug.xunit.dll.html" Verbose="false"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>
<Target Name="TestResourceManager">
<Xunit.Runner.MSBuild.xunit Assemblies="$(ResourceManagerTestDebug)" Html="$(TestOutputDirectory)\ResourceManagerTestDebug.xunit.dll.html" Verbose="false"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>
<Target Name="TestCompute">
<Xunit.Runner.MSBuild.xunit Assemblies="$(ComputeTestDebug)" Html="$(TestOutputDirectory)\ComputeTestDebug.xunit.dll.html" Verbose="false"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>
<Target Name="NetworkTestDebug">
<Xunit.Runner.MSBuild.xunit Assemblies="$(NetworkTestDebug)" Html="$(TestOutputDirectory)\NetworkTestDebug.xunit.dll.html" Verbose="false"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>
<Target Name="TestBatch">
<Xunit.Runner.MSBuild.xunit Assemblies="$(BatchTestDebug)" Html="$(TestOutputDirectory)\BatchTestDebug.xunit.dll.html" Verbose="false"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>
<Target Name="TestWebsites">
<Xunit.Runner.MSBuild.xunit Assemblies="$(WebsitesTestDebug)" Html="$(TestOutputDirectory)\WebsitesTestDebug.xunit.dll.html" Verbose="false"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>
<Target Name="TestLogicApp">
<Xunit.Runner.MSBuild.xunit Assemblies="$(LogicAppTestDebug)" Html="$(TestOutputDirectory)\LogicAppTestDebug.xunit.dll.html" Verbose="false"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>
<Target Name="TestScheduler">
<Xunit.Runner.MSBuild.xunit Assemblies="$(SchedulerTestDebug)" Html="$(TestOutputDirectory)\SchedulerTestDebug.xunit.dll.html" Verbose="false"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>
<Target Name="TestDataFactoryManager">
<Xunit.Runner.MSBuild.xunit Assemblies="$(DataFactoryManagerTestDebug)" Html="$(TestOutputDirectory)\DataFactoryManagerTestDebug.xunit.dll.html" Verbose="false"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>
<Target Name="TestDataFactoryV2Manager">
<Xunit.Runner.MSBuild.xunit Assemblies="$(DataFactoryV2ManagerTestDebug)" Html="$(TestOutputDirectory)\DataFactoryV2ManagerTestDebug.xunit.dll.html" Verbose="false"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>
<Target Name="TestStreamAnalyticsManager">
<Xunit.Runner.MSBuild.xunit Assemblies="$(StreamAnalyticsManagerTestDebug)" Html="$(TestOutputDirectory)\StreamAnalyticsManagerTestDebug.xunit.dll.html" Verbose="false"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>
<Target Name="TestOperationalInsights">
<Xunit.Runner.MSBuild.xunit Assemblies="$(OperationalInsightsTestDebug)" Html="$(TestOutputDirectory)\OperationalInsightsTestDebug.xunit.dll.html" Verbose="false"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>
<Target Name="TestServiceManagement">
<MSBuild Targets="InvokeMSTest"
Properties="_testAssembly=$(ServiceManagementTestDebug);_testSettings=$(TestSettings);_testFilter=$(TestFilter);_testResult=$(TestOutputDirectory)\ServiceManagementDebug.trx"
Projects="build.proj"/>
</Target>
<Target Name="TestSqlDatabase">
<MSBuild Targets="InvokeMSTest"
Properties="_testAssembly=$(SqlDatabaseTestDebug);_testSettings=$(TestSettings);_testFilter=$(TestFilter);_testResult=$(TestOutputDirectory)\SqlDatabaseDebug.trx"
Projects="build.proj"/>
</Target>
<Target Name="TestHDInsight">
<MSBuild Targets="InvokeMSTest"
Properties="_testAssembly=$(HDInsightTestDebug);_testSettings=$(TestSettings);_testFilter=$(TestFilter);_testResult=$(TestOutputDirectory)\HDInsightDebug.trx"
Projects="build.proj"/>
</Target>
<Target Name="TestInsights">
<MSBuild Targets="InvokeMSTest"
Properties="_testAssembly=$(InsightsTestDebug);_testSettings=$(TestSettings);_testFilter=$(TestFilter);_testResult=$(TestOutputDirectory)\InsightsDebug.trx"
Projects="build.proj"/>
</Target>
<Target Name="TestStorage">
<MSBuild Targets="InvokeMSTest"
Properties="_testAssembly=$(StorageTestDebug);_testSettings=$(TestSettings);_testFilter=$(TestFilter);_testResult=$(TestOutputDirectory)\StorageDebug.trx"
Projects="build.proj"/>
</Target>
<Target Name="TestRecoveryServices">
<PropertyGroup>
<_RecoveryServicesTestAssembly>.\src\ServiceManagement\RecoveryServices\Commands.RecoveryServices.Test\bin\Debug\Microsoft.Azure.Commands.RecoveryServices.Test.dll</_RecoveryServicesTestAssembly>
</PropertyGroup>
<Xunit.Runner.MSBuild.xunit Assemblies="$(_RecoveryServicesTestAssembly)" Html="$(TestOutputDirectory)\RecoveryServices.xunit.dll.html" Verbose="false"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>
<Target Name="TestStorSimple">
<PropertyGroup>
<_StorSimpleTestAssembly>.\src\ServiceManagement\StorSimple\Commands.StorSimple.Test\bin\Debug\Microsoft.WindowsAzure.Commands.StorSimple.Test.dll</_StorSimpleTestAssembly>
</PropertyGroup>
<Xunit.Runner.MSBuild.xunit Assemblies="$(_StorSimpleTestAssembly)" Html="$(TestOutputDirectory)\StorSimple.xunit.dll.html" Verbose="false"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>
<!-- Run the scenario tests -->
<Target Name="ScenarioTest" DependsOnTargets="Clean;Build;BeforeRunTests">
<Message Importance="high" Text="Running scenario tests..." />
<MSBuild Targets="InvokeMSTest"
Properties="_testAssembly=$(ScenarioTestDebug);_testSettings=$(TestSettings);_testFilter=$(ScenarioTestFilter);_testResult=$(TestOutputDirectory)\ScenarioTestDebug.trx"
Projects="build.proj"/>
<MSBuild Targets="InvokeMSTest"
Properties="_testAssembly=$(StorageScenarioTestDebug);_testSettings=$(TestSettings);_testFilter=$(ScenarioTestFilter);_testResult=$(TestOutputDirectory)\StorageScenarioTestDebug.trx"
Projects="build.proj"/>
</Target>
<!-- Run the backup tests -->
<Target Name="BackupTests">
<Message Importance="high" Text="Running Backup tests" />
<Xunit.Runner.MSBuild.xunit Assemblies="$(BackupTestDebug)" Html="$(TestOutputDirectory)\BackupTests.xunit.dll.html" Verbose="false"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false"/>
</Target>
<!-- Run the Recovery Services backup tests -->
<Target Name="RecoveryServicesBackupTests">
<Message Importance="high" Text="Running Recovery Services Backup tests" />
<Xunit.Runner.MSBuild.xunit Assemblies="$(RecoveryServicesBackupTestDebug)" Html="$(TestOutputDirectory)\RecoveryServicesBackupTests.xunit.dll.html" Verbose="false"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false"/>
</Target>
<!-- Run the Compute tests -->
<Target Name="ComputeTests">
<Message Importance="high" Text="Running Compute tests" />
<Xunit.Runner.MSBuild.xunit Assemblies="$(ComputeTestDebug)" Html="$(TestOutputDirectory)\ComputeTests.xunit.dll.html" Verbose="false"
ExcludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>
<!-- Run the sql tests -->
<Target Name="SqlTests">
<Message Importance="high" Text="Running Sql tests" />
<Xunit.Runner.MSBuild.xunit Assemblies="$(SqlTestDebug)" Html="$(TestOutputDirectory)\SqlTests.xunit.dll.html" Verbose="false"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>
<!-- Run the KeyVault tests -->
<Target Name="KeyVaultTests">
<Message Importance="high" Text="Running KeyVault tests" />
<Xunit.Runner.MSBuild.xunit Assemblies="$(KeyVaultTestDebug)" Html="$(TestOutputDirectory)\KeyVaultTests.xunit.dll.html" Verbose="true"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false"/>
</Target>
<!-- Run the ServiceFabric tests -->
<Target Name="ServiceFabricTests">
<Message Importance="high" Text="Running ServiceFabric tests" />
<Xunit.Runner.MSBuild.xunit Assemblies="$(KeyVaultTestDebug)" Html="$(TestOutputDirectory)\ServiceFabricTests.xunit.dll.html" Verbose="true"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false"/>
</Target>
<!-- Run the DataLakeAnalytics tests -->
<Target Name="DataLakeAnalyticsTests">
<Message Importance="high" Text="Running DataLakeAnalytics tests" />
<Xunit.Runner.MSBuild.xunit Assemblies="$(DataLakeAnalyticsTestDebug)" Html="$(TestOutputDirectory)\DataLakeAnalyticsTests.xunit.dll.html" Verbose="true"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false"/>
</Target>
<!-- Run the DataLakeStore tests -->
<Target Name="DataLakeStoreTests">
<Message Importance="high" Text="Running DataLakeStore tests" />
<Xunit.Runner.MSBuild.xunit Assemblies="$(DataLakeStoreTestDebug)" Html="$(TestOutputDirectory)\DataLakeStoreTests.xunit.dll.html" Verbose="true"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false"/>
</Target>
<!-- Run the Power BI Embedded tests -->
<Target Name="PowerBIEmbeddedTests">
<Message Importance="high" Text="Running Power BI Embedded tests" />
<Xunit.Runner.MSBuild.xunit Assemblies="$(PowerBIEmbeddedTestDebug)" Html="$(TestOutputDirectory)\PowerBIEmbeddedTestDebug.xunit.dll.html" Verbose="true"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>
<!-- run the UsageAggregationTests -->
<Target Name="UsageAggregationTests">
<Message Importance="high" Text="Running UsageAggregates tests" />
<Xunit.Runner.MSBuild.xunit Assemblies="$(UsageAggregationTestDebug)" Html="$(TestOutputDirectory)\UsageAggregationTests.xunit.dll.html" Verbose="true"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false"/>
</Target>
<!-- Run the scenario tests with Mocks -->
<Target Name="MockedScenarioTests">
<Message Importance="high" Text="Running scenario tests with Mocks" />
<Xunit.Runner.MSBuild.xunit Assemblies="$(ScenarioTestDebug)" Html="$(TestOutputDirectory)\MockedScenarioTests.xunit.dll.html" Verbose="true"
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
</Target>
<Target Name="RunOneSDKCIT" DependsOnTargets="Clean;Build;BeforeRunTests">
<Message Importance="high" Text="Running CIT Scenario tests..." />
<Delete Files="$(TestOutputDirectory)\RunOneSDKCITDebug.trx" />
<Exec
Command="MSTest.exe /testcontainer:$(ScenarioTestDebug) /testsettings:$(TestSettings) /category:$(OneSDKCITFilter) /resultsfile:$(TestOutputDirectory)\RunOneSDKCITDebug.trx"
ContinueOnError="false" />
</Target>
<!-- Run the AzureRT tests -->
<Target Name="AzureRTBVTs" DependsOnTargets="Clean;Build;BeforeRunTests">
<Message Importance="high" Text="Running AzureRT BVT tests..." />
<Delete Files="$(TestOutputDirectory)\RTBVTDebug.trx" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:BVT /resultsfile:$(TestOutputDirectory)\RTBVTDebug.trx"
ContinueOnError="false" />
</Target>
<Target Name="AzureRTOne" DependsOnTargets="Clean;Build;BeforeRunTests">
<Message Importance="high" Text="Running a specific tests..." />
<Delete Files="$(TestOutputDirectory)\RTFunctionalDebug.trx" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTSeqTestSettings) /test:$(TestName) /resultsfile:$(TestOutputDirectory)\RTFunctionalDebug.trx"
ContinueOnError="false" />
</Target>
<Target Name="AzureRTRepeat" DependsOnTargets="Clean;Build;BeforeRunTests">
<Message Importance="high" Text="Running a specific tests..." />
<Delete Files="$(TestOutputDirectory)\RTFunctionalDebug.trx" />
<Exec
Command="for /l %%x in (1, 1, $(RepeatTimes)) do MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /test:$(TestName) /resultsfile:$(TestOutputDirectory)\RTFunctionalDebug%%x.trx"
ContinueOnError="false" />
</Target>
<Target Name="AzureRTMulti" DependsOnTargets="Clean;Build;BeforeRunTests">
<Message Importance="high" Text="Running tests:" />
<Delete Files="$(TestOutputDirectory)\RTFunctionalDebug.trx" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTSeqTestSettings) $(TestParams) /resultsfile:$(TestOutputDirectory)\RTFunctionalDebug.trx"
ContinueOnError="false" />
</Target>
<Target Name="AzureRTAll" DependsOnTargets="Clean;Build;BeforeRunTests">
<Message Importance="high" Text="Running AzureRT all tests..." />
<Delete Files="$(TestOutputDirectory)\RTDebug.trx" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTSeqTestSettings) /category:$(AzureRTAllTestFilter) /resultsfile:$(TestOutputDirectory)\RTDebug.trx"
ContinueOnError="false" />
</Target>
<Target Name="AzureRTAllFast" DependsOnTargets="Clean;Build;BeforeRunTests">
<Message Importance="high" Text="Running AzureRT all tests..." />
<Delete Files="$(TestOutputDirectory)\RTSequentialDebug.trx" />
<Delete Files="$(TestOutputDirectory)\RTDebug.trx" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTSeqTestSettings) /category:$(AzureRTSeqAllFilter) /resultsfile:$(TestOutputDirectory)\RTSequentialDebug.trx"
ContinueOnError="true" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:$(AzureRTParAllFilter) /resultsfile:$(TestOutputDirectory)\RTDebug.trx"
ContinueOnError="false" />
</Target>
<Target Name="AzureRTSeq" DependsOnTargets="Clean;Build;BeforeRunTests">
<Message Importance="high" Text="Running AzureRT all tests..." />
<Delete Files="$(TestOutputDirectory)\RTSequentialDebug.trx" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTSeqTestSettings) /category:$(AzureRTSeqAllFilter) /resultsfile:$(TestOutputDirectory)\RTSequentialDebug.trx"
ContinueOnError="true" />
</Target>
<Target Name="AzureRTNetwork" DependsOnTargets="Clean;Build;BeforeRunTests">
<Message Importance="high" Text="Running AzureRT all tests..." />
<Delete Files="$(TestOutputDirectory)\RTSequentialDebug.trx" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTSeqTestSettings) /category:Network /resultsfile:$(TestOutputDirectory)\RTSequentialDebug.trx"
ContinueOnError="false" />
</Target>
<Target Name="AzureRTUploadSeq" DependsOnTargets="Clean;Build;BeforeRunTests">
<Message Importance="high" Text="Running AzureRT all tests..." />
<Delete Files="$(TestOutputDirectory)\RTSequentialDebug.trx" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTSeqTestSettings) /category:$(AzureRTUploadSeqFilter) /resultsfile:$(TestOutputDirectory)\RTSequentialDebug.trx"
ContinueOnError="false" />
</Target>
<Target Name="AzureRTPar" DependsOnTargets="Clean;Build;BeforeRunTests">
<Message Importance="high" Text="Running AzureRT all tests..." />
<Delete Files="$(TestOutputDirectory)\RTDebug.trx" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:$(AzureRTAllTestFilter) /resultsfile:$(TestOutputDirectory)\RTDebug.trx"
ContinueOnError="false" />
</Target>
<Target Name="AzureRTFunctional" DependsOnTargets="Clean;Build;BeforeRunTests">
<Message Importance="high" Text="Running AzureRT Functional tests..." />
<Delete Files="$(TestOutputDirectory)\RTFunctionalDebug.trx" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:Functional /resultsfile:$(TestOutputDirectory)\RTFunctionalDebug.trx"
ContinueOnError="false" />
</Target>
<Target Name="AzureRTScenario" DependsOnTargets="Clean;Build;BeforeRunTests">
<Message Importance="high" Text="Running AzureRT Scenario tests..." />
<Delete Files="$(TestOutputDirectory)\RTScenarioDebug.trx" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:AzureRTScenario /resultsfile:$(TestOutputDirectory)\RTScenarioDebug.trx"
ContinueOnError="false" />
</Target>
<Target Name="AzureRTAllPreview" DependsOnTargets="Clean;Build;BeforeRunTests">
<Message Importance="high" Text="Running AzureRT all tests..." />
<Delete Files="$(TestOutputDirectory)\RTAddVhdDebug.trx" />
<Delete Files="$(TestOutputDirectory)\RTDebug.trx" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(TestSettings) /category:Sequential /resultsfile:$(TestOutputDirectory)\RTAddVhdDebug.trx"
ContinueOnError="true" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:$(AzureRTAllPreviewFilter) /resultsfile:$(TestOutputDirectory)\RTDebug.trx"
ContinueOnError="false" />
</Target>
<Target Name="AzureRTPreview" DependsOnTargets="Clean;Build;BeforeRunTests">
<Message Importance="high" Text="Running AzureRT all tests..." />
<Delete Files="$(TestOutputDirectory)\RTPreviewDebug.trx" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:Preview /resultsfile:$(TestOutputDirectory)\RTPreviewDebug.trx"
ContinueOnError="false" />
</Target>
<Target Name="AzureRTCleanUp" DependsOnTargets="Clean;Build;BeforeRunTests">
<Message Importance="high" Text="Running AzureRT clean up tests..." />
<Delete Files="$(TestOutputDirectory)\RTCleanUpDebug.trx" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:AzureRTCleanUp /resultsfile:$(TestOutputDirectory)\RTCleanUpDebug.trx"
ContinueOnError="false" />
</Target>
<Target Name="ComputeCodeCoverage" DependsOnTargets="RestoreNugetPackages;Clean;Build">
<Message Importance="high" Text="Gathering Code Coverage data from Compute tests..." />
<Delete Files="Project.covarage" />
<Exec
Command="C:\cc\ComputeCodeCoverage.cmd $(ComputeDebug) $(ComputeTestDebug)"
ContinueOnError="false" />
</Target>
<ItemGroup>
<LiveTestDlls Include="$(ResourceManagerTestDebug)" />
</ItemGroup>
<Target Name="LiveTests">
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
<Exec Command="packages\xunit.runner.console.2.1.0\tools\xunit.console.x86.exe @(LiveTestDlls) /trait "AcceptanceType=LiveBVT" /html "$(TestOutputDirectory)\Live.%(Filename).html"" />
</Target>
</Project>