Skip to content

Commit e2c8698

Browse files
authored
Updated README with running test section (#7)
* Updated README with running test section * Added test debugging instructions to the README
1 parent a7c69c0 commit e2c8698

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,40 @@ This [update](https://devblogs.microsoft.com/dotnet/net-core-is-the-future-of-ne
6262

6363
This project uses the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct) to define expected conduct in our community. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting a project maintainer at [email protected].
6464

65+
## Running tests locally
66+
67+
In order to run the tests on your local machine,
68+
69+
- Build the tests with `build.cmd` script. Use `/help` parameter to check the different arguments that can be passed along with the build command.
70+
- cd into `$(RepoRoot)\publish\test\$(Configuration)\$(Platform)\Test` and run `RunDrts.cmd` to run the tests. You can use `/Area` and `/Name` parameters to run tests from a specific area or with a certain name.
71+
72+
At the end of the run, you should see something like this:
73+
74+
```
75+
A total of 98 test Infos were processed, with the following results.
76+
Passed: 98
77+
Failed (need to analyze): 0
78+
Failed (with BugIDs): 0
79+
Ignore: 0
80+
81+
```
82+
83+
If there were any failures, run the tests manually with the `/debugtests` flag using the `RunDrts.cmd` script. Note that you do not run the `RunDrtsDebug` script, as this will debug the test infrastructure, `QualityVault`. When you pass the `/debugtests` flag, a cmd window will open where you can open the test executable in Visual Studio and debug it. When the cmd pops up, you will see instructions for debugging using a few different commands, however these commands will enable you to debug the `Simple Test Invocation` executable, `sti.exe`, which simply launches the test executable you are most likely interested in debugging. Using `DrtXaml.exe` as an example, this is how you can debug the test executable. Any MSBuild style properties should be replaced with actual values:
84+
85+
1. `$(RepoRoot)\artifacts\test\$(Configuration)\$(Platform)\Test\RunDrts.cmd /name=DrtXaml /debugtests`
86+
2. Enter following command into the cmd window that pops up:
87+
`"%ProgramFiles%\Microsoft Visual Studio\2019\Preview\Common7\IDE\devenv.exe" DrtXaml.exe`
88+
3. Once Visual Studio is open, go to `Debug-> DrtXaml Properties` and do the following:
89+
- Manually change the `Debugger Type` from `Auto` to `Mixed (CoreCLR)`.
90+
- Change the `Environment` from `Default` to a custom one that properly defines the `DOTNET_ROOT` variable so that the host is able to locate the install of `Microsoft.NETCore.App`.
91+
- x86 (Default): Name: `DOTNET_ROOT(x86)` Value: `$(RepoRoot).dotnet\x86`
92+
- x64 (/p:Platform=x64): Name: `DOTNET_ROOT` Value: `$(RepoRoot).dotnet`
93+
4. From there you can F5 and the test will execute.
94+
95+
*NOTE: Some tests require the screen resolution to be set to 1920 x 1080.*
96+
97+
*NOTE: This requires being run from an admin window at the moment.*
98+
6599
## Reporting security issues and security bugs
66100

67101
Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) <[email protected]>. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the [Security TechCenter](https://www.microsoft.com/msrc/faqs-report-an-issue).

0 commit comments

Comments
 (0)