-
Notifications
You must be signed in to change notification settings - Fork 459
code coverage
Code Coverage runs work on top of unit tests to ensure we have adequate coverage for key areas.
To run inside VSCode, go to the Debug view, and choose Launch Code Coverage
. This will execute all tests:
- Results View tests, which run from the commandline.
- Extension tests, which require launching a VSCode instance to run in
After running, we need to combine the coverage reports to be useful: run gulp cover:combine
to product a report located at coverage/lcov-report/index.html
Run gulp cover:jenkins
to do a full code coverage run. This requires all VSCode instances be closed due to test framework limitations.
Code Coverage is particularly good when writing new code. Please consider using it to ensure that your tests actually hit the important code paths you've added and that there aren't major gaps. Not all areas are testable, but a large number are and this will help keep us honest about how much of our code is tested.
After running coverage, opening the coverage/lcov-report/index.html
file will allow you to see results in the browser. This helps give a
baseline before you make changes, especially the raw coverage #s.
- Install the
VSCode LCOV
extension to view- Relaunch VSCode
- Hit F1 and choose LCOV Menu -> Enable Decorations
- Navigate to the file you've added to and you should see uncovered lines in red. Very often the happy path is covered, but no other path has been covered
- Add tests to fill in the gap areas, and re-run coverage so you can verify that you've hit all important branches and code sections
At present, coverage numbers are not required when making checkins (to ensure we don't regress the number) but this may become a requirement in the future.
- Getting started tutorial
- Enable Integrated Authentication on macOS and Linux using Kerberos
- Manage connection profiles
- Customize keyboard shortcuts
- Customize extension options
- Contributing
- Usage reporting
- OpenSSL configuration (Mac Only)
- Pre-Windows 10 pre-requisite
- Troubleshooting
- Operating Systems
- Releases