-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathTest.ps1
34 lines (28 loc) · 933 Bytes
/
Test.ps1
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
param([String]$tests="Functional", [switch]$parallel, [switch]$build, [switch]$release);
[xml]$properties = Get-Content Directory.Build.props;
$framework = $properties.Project.PropertyGroup.TargetFramework;
$configuration = "Debug";
if ($release)
{
$configuration = "Release";
}
if ($build)
{
dotnet build --configuration $($configuration) --nologo --verbosity minimal;
}
$filter = "";
if ($tests -eq "functional" -or $tests -eq "f")
{
$filter = "--TestCaseFilter:Category=Functional|TestCategory=Functional";
}
elseif ($tests -eq "performance" -or $tests -eq "p")
{
$filter = "--TestCaseFilter:Category=Performance|TestCategory=Performance";
}
$execute = "";
if ($parallel)
{
$execute = "--Parallel";
}
$paths = Get-ChildItem Tests -Directory | % { Join-Path $_.FullName -ChildPath ("bin/$($configuration)/$($framework)/$($_.Name).dll") };
dotnet test $paths $filter $execute --nologo --verbosity minimal;