Reputation: 3071
I have a small doubt about code coverage.
The tests of my application are divided into GUI Tests (simulates a user using the application) and Unit Tests (test each class/function independently).
Recently I started to use GCOV
and LCOV
tools to measure the code coverage of my code and figured out that the Unit Tests are covering about 55% of the code and the Unit Tests + GUI Tests are covering about 90% of the code.
Is it correct/common to measure the code coverage of the GUI Tests or should I only measure it for the Unit Tests?
Note 1: the tests are related to a desktop Qt application.
Note 2: keep in mind I'm a beginner in automated software testing.
Upvotes: 2
Views: 2406
Reputation: 337
I answer is Yes. Provided
Unit test coverage and UI test coverage actually adds up. Meaning if code has 100 lines, you actually cover 95 lines, 55 through unit test and 35 by UI test.
You actually execute both the test category each time before
releasing.
Upvotes: 2
Reputation: 55972
IMO if in total all your tests are exercising 90% of your code (lines?) I think that's an important insight to have. Most languages/frameworks have some sort of library to merge coverage reports, so that front should be pretty easy too.
Some things against the full report could might maybe possibly be:
Upvotes: 2