Skip to content

Commit

Permalink
use a .runsettings file
Browse files Browse the repository at this point in the history
  • Loading branch information
jamaa committed Jul 15, 2023
1 parent 069cd00 commit 8eab24c
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ jobs:
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
- name: Add vstest to PATH
uses: darenm/Setup-VSTest@v1
uses: darenm/Setup-VSTest@v1.2
- name: Create empty TeeChart license file
run: copy /Y nul > "BlueM.Wave\source\My Project\TeeChart.licenses"
shell: cmd
- name: Build Wave.Tests
run: msbuild BlueM.Wave\tests\Wave.Tests.vbproj -restore -property:Platform=x64 -property:Configuration=Debug
- name: Run Tests
run: |
vstest.console.exe BlueM.Wave\tests\bin\x64\Debug\Wave.Tests.dll /Platform:x64 /ResultsDirectory:TestResults /Logger:html
vstest.console.exe BlueM.Wave\tests\bin\x64\Debug\Wave.Tests.dll /Settings:BlueM.Wave\tests\tests.runsettings
- name: Upload test results
uses: actions/upload-artifact@v3
with:
Expand Down
1 change: 1 addition & 0 deletions tests/Wave.Tests.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="tests.runsettings" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MSTest.TestAdapter">
Expand Down
52 changes: 52 additions & 0 deletions tests/tests.runsettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<!-- Configurations that affect the Test Framework -->
<RunConfiguration>
<!-- Use 0 for maximum process-level parallelization. This does not force parallelization within the test DLL (on the thread-level). You can also change it from the Test menu; choose "Run tests in parallel". Unchecked = 1 (only 1), checked = 0 (max). -->
<MaxCpuCount>1</MaxCpuCount>
<!-- Path relative to directory that contains .runsettings file-->
<ResultsDirectory>.\TestResults</ResultsDirectory>

<!-- Omit the whole tag for auto-detection. -->
<!-- [x86] or x64, ARM, ARM64, s390x -->
<!-- You can also change it from the Test menu; choose "Processor Architecture for AnyCPU Projects" -->
<TargetPlatform>x64</TargetPlatform>

<!-- Any TargetFramework moniker or omit the whole tag for auto-detection. -->
<!-- net48, [net40], net6.0, net5.0, netcoreapp3.1, uap10.0 etc. -->
<TargetFrameworkVersion>net48</TargetFrameworkVersion>

</RunConfiguration>

<!-- Configuration for loggers -->
<LoggerRunSettings>
<Loggers>
<Logger friendlyName="console" enabled="True" />
<Logger friendlyName="trx" enabled="True">
<Configuration>
<LogFileName>test-results.trx</LogFileName>
</Configuration>
</Logger>
<Logger friendlyName="html" enabled="True">
<Configuration>
<LogFileName>test-results.html</LogFileName>
</Configuration>
</Logger>
<Logger friendlyName="blame" enabled="True" />
</Loggers>
</LoggerRunSettings>

<!-- Adapter Specific sections -->

<!-- MSTest adapter -->
<MSTest>
<MapInconclusiveToFailed>True</MapInconclusiveToFailed>
<CaptureTraceOutput>false</CaptureTraceOutput>
<DeleteDeploymentDirectoryAfterTestRunIsComplete>False</DeleteDeploymentDirectoryAfterTestRunIsComplete>
<DeploymentEnabled>False</DeploymentEnabled>
<AssemblyResolution>
<Directory path="bin\Debug\x64" includeSubDirectories="false"/>
</AssemblyResolution>
</MSTest>

</RunSettings>

0 comments on commit 8eab24c

Please sign in to comment.