-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #134 from jakubch1/main
C++ static code coverage examples
- Loading branch information
Showing
10 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Scenario Description | ||
|
||
Static C++ code coverage for [google test adapter](https://github.com/microsoft/TestAdapterForGoogleTest) samples tests in Visual Studio. | ||
|
||
## Collect C++ code coverage | ||
|
||
1. Clone [google test adapter](https://github.com/microsoft/TestAdapterForGoogleTest) repository | ||
|
||
```shell | ||
git clone https://github.com/microsoft/TestAdapterForGoogleTest.git | ||
``` | ||
|
||
2. Open solution in Visual Studio Enterprise | ||
|
||
```shell | ||
cd TestAdapterForGoogleTest/SampleTests | ||
start SampleTests.sln | ||
``` | ||
|
||
3. Enable **Profile** (Configuration Properties->Linker->Advanced) flag for all projects in solution | ||
|
||
![alt text](profile_flag.png "Profile linker flag.") | ||
|
||
4. Collect code coverage using **Analyze Code Coverage for All Tests** in the **Test** menu | ||
|
||
![alt text](analyze.png "Test menu with Analyze Code Coverage for All Tests command.") | ||
|
||
5. View code coverage results | ||
|
||
![alt text](results.png "Code coverage results.") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Scenario Description | ||
|
||
Static C++ code coverage for new Native Unit Test project in Visual Studio ARM64. | ||
|
||
## Collect C++ code coverage on ARM64 system | ||
|
||
1. Open Visual Studio Enterprise | ||
|
||
2. Create new Native Unit Test project. | ||
|
||
![alt text](create.png "Create Native Unit Test Project.") | ||
|
||
3. Enable **Profile** (Configuration Properties->Linker->Advanced) flag for all projects in solution | ||
|
||
![alt text](profile-flag.png "Profile linker flag.") | ||
|
||
4. Collect code coverage using **Analyze Code Coverage for All Tests** in the **Test** menu | ||
|
||
![alt text](analyze.png "Test menu with Analyze Code Coverage for All Tests command.") | ||
|
||
5. View code coverage results | ||
|
||
![alt text](results.png "Code coverage results.") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.