|
10 | 10 |
|
11 | 11 | 1. Build Tests |
12 | 12 |
|
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. |
14 | 14 |
|
15 | 15 | 2. Device Tests |
16 | 16 |
|
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 |
18 | 18 | "Integration" tests which check to make sure a final app will function as expected on an Emulator or Device. Our CI system will |
19 | 19 | test against an Emulator. However the system will pick up the first attached device, so developers can test one physical hardware |
20 | 20 | if needed. |
@@ -48,15 +48,30 @@ To run ALL the supported Device Integraton tests runs. |
48 | 48 | NOTE: Not all tests work under .NET Android yet. So we need to filter |
49 | 49 | them on the `DotNetIgnore` category. |
50 | 50 |
|
| 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` |
51 | 58 |
|
52 | 59 | ### Windows |
53 | 60 |
|
54 | 61 | On Windows we can use the same `dotnet-local` script to run the tests |
55 | 62 | just like we do on other platforms. |
56 | 63 |
|
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 |
58 | 73 |
|
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` |
60 | 75 |
|
61 | 76 | ## Writing Tests |
62 | 77 |
|
|
0 commit comments