Skip to content

Commit 7d385d2

Browse files
committed
Update the docs
1 parent 5e1184f commit 7d385d2

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

Documentation/workflow/UnitTests.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111
1. Build Tests
1212

13-
There are a number of `Build` related tests which test various aspects of the `.NET Android` build system. This includes not only MSBuild Task tests but build integration tests. Since the SDK is consumed from MSBuild, almost all of the unit tests are MSBuild related.
13+
There are a number of `Build` related tests which test various aspects of the .NET Android build system. This includes not only MSBuild Task tests but build integration tests. Since the SDK is consumed from MSBuild, almost all of the unit tests are MSBuild related.
1414

1515
2. Device Tests
1616

17-
Because `.NET Android` has to work on devices, we have a number of
17+
Because .NET Android has to work on devices, we have a number of
1818
"Integration" tests which check to make sure a final app will function as expected on an Emulator or Device. Our CI system will
1919
test against an Emulator. However the system will pick up the first attached device, so developers can test one physical hardware
2020
if needed.
@@ -48,15 +48,30 @@ To run ALL the supported Device Integraton tests runs.
4848
NOTE: Not all tests work under .NET Android yet. So we need to filter
4949
them on the `DotNetIgnore` category.
5050

51+
To run a specific test you can use the `Name` argument for the `--filter`,
52+
53+
`dotnet-local.sh test bin/TestDebug/net7.0/Xamarin.Android.Build.Tests.dll --filter=Name=BuildBasicApplication`
54+
55+
To list all the available tests use the `-lt` argument
56+
57+
`dotnet-local.sh test bin/TestDebug/net7.0/Xamarin.Android.Build.Tests.dll -lt`
5158

5259
### Windows
5360

5461
On Windows we can use the same `dotnet-local` script to run the tests
5562
just like we do on other platforms.
5663

57-
`dotnet-local.cmd test bin/TestDebug/net7.0/Xamarin.Android.Build.Tests.dll --filter=Category!=DotNetIgnore`
64+
`dotnet-local.cmd test bin\TestDebug\net7.0\Xamarin.Android.Build.Tests.dll --filter=Category!=DotNetIgnore`
65+
66+
`dotnet-local.cmd test bin\TestDebug\MSBuildDeviceIntegration\net7.0\MSBuildDeviceIntegration.dll --filter=Category!=DotNetIgnore`
67+
68+
To run a specific test you can use the `Name` argument for the `--filter`,
69+
70+
`dotnet-local.cmd test bin\TestDebug\net7.0\Xamarin.Android.Build.Tests.dll --filter=Name=BuildBasicApplication`
71+
72+
To list all the available tests use the `-lt` argument
5873

59-
`dotnet-local.cmd test bin/TestDebug/MSBuildDeviceIntegration/net7.0/MSBuildDeviceIntegration.dll --filter=Category!=DotNetIgnore`
74+
`dotnet-local.cmd test bin\TestDebug\net7.0\Xamarin.Android.Build.Tests.dll -lt`
6075

6176
## Writing Tests
6277

0 commit comments

Comments
 (0)