Merge pull request #1872 from dotnet/run_individual_tests_documentation

Update developer-guide.md by adding instructions on running individual test projects
This commit is contained in:
Livar 2016-03-15 13:55:05 -07:00 committed by Livar Cunha
parent 711e9a8e53
commit c934d59492

View file

@ -36,6 +36,22 @@ In order to build .NET Command Line Interface, you need the following installed
2. `dotnet restore`
3. `dotnet run`
## Running tests
All the CLI tests are located under `test`. In order to run them, after doing a restore on the CLI repo just do the following:
1. Navigate to a test project, for instance: `cd test\dotnet-test.UnitTests`
2. `dotnet test`
For unit test projects (they have UnitTests at the name), that's all that you need to do, as they take a dependency on the product code directly, which gets rebuilt by dotnet when you run the tests.
For E2E and functional tests, they all depend on the binaries located under `artifacts\rid\stage2\bin`. So, after changing the code, you will need to re-build the product code and copy the new bits to the folder above. For instance, imagine you changed something in dotnet itself, you would have to do the following:
1. `cd src\dotnet\`
2. `dotnet build`
3. `cp bin\debug\netstandardapp1.5\dotnet.dll artifacts\rid\stage2\bin`
4. `cd ..\..\test\dotnet-build.Tests`
5. `dotnet test`
##Adding a Command