param([String]$Tests="Functional", [switch]$Parallel, [switch]$Build);

$paths = Get-ChildItem Tests -Directory | % { Join-Path $_.FullName -ChildPath ("bin/Debug/netcoreapp2.2/$($_.Name).dll") };
$filter = "";
$execute = "";

if ($Tests -eq "functional" -or $Tests -eq "f")
{
    $filter = "--TestCaseFilter:Category=Functional";
}
elseif ($Tests -eq "performance" -or $Tests -eq "p")
{
    $filter = "--TestCaseFilter:Category=Performance";
}

if ($Parallel)
{
    $execute = "--Parallel";
}

if ($Build)
{
    dotnet build AppBrix.sln;
}

dotnet vstest $paths $filter $execute;

param([String]$Tests="Functional", [switch]$Parallel, [switch]$Build, [switch]$Release);

$version = "netcoreapp2.2"

$configuration = "Debug";
if ($Release)
{
    $configuration = "Release";
}

if ($Build)
{
    dotnet build AppBrix.sln --configuration $($configuration);
}

$filter = "";
if ($Tests -eq "functional" -or $Tests -eq "f")
{
    $filter = "--TestCaseFilter:Category=Functional";
}
elseif ($Tests -eq "performance" -or $Tests -eq "p")
{
    $filter = "--TestCaseFilter:Category=Performance";
}

$execute = "";
if ($Parallel)
{
    $execute = "--Parallel";
}

$paths = Get-ChildItem Tests -Directory | % { Join-Path $_.FullName -ChildPath ("bin/$($configuration)/$($version)/$($_.Name).dll") };
dotnet vstest $paths $filter $execute;

Add flag for running tests in Release
Add flag for running tests in Release
