Questions tagged [test-coverage]

"Test coverage" is used both as a synonym for [code-coverage] and to mean all measures of the extent of testing of a program including both [code-coverage] and [function-coverage].

"Test coverage" is used both as a synonym for and to mean all measures of the extent of testing of a program including both and .

In the latter sense, test coverage measures the amount of testing performed by a set of tests. Wherever we can count things and can tell whether or not each of those things has been tested by some test, then we can measure coverage, known as test coverage.

More Info

Both of the above articles discuss code coverage, not test coverage in the broader sense.

377 questions
0
votes
0 answers

Django coverage report builder .xls export test

Im using coverage to test a view that exports a xls file using report builder code. This is the view code : from report_builder.models import Report from report_utils.mixins import DataExportMixin, generate_filename import re from rest_framework…
jsanchezs
  • 1,992
  • 3
  • 25
  • 51
0
votes
1 answer

Django coverage testing login and logout views is not working

I got this login and logout views on my views.py : class Login(View): template_name = ['cost_control_app/login.html', 'cost_control_app/home.html'] def get(self, request, *args, **kwargs): form = UsersForm() return…
jsanchezs
  • 1,992
  • 3
  • 25
  • 51
0
votes
3 answers

How can I monitor the quality of my .NET code?

I am currently developing a Ruby project and I often use code climate to see the quality of my code. The thing is, we will rewrite the code in .NET, so my boss wants to be able to monitor the quality of code by uploading the code into tool just like…
Toolbox
  • 21
  • 8
0
votes
0 answers

How to get Coverage Report of Unit Test in Android Studio using command line?

In referring to the answer in How to get code coverage using Android Studio?, we could generate Junit Test coverage on Android Studio. I could even dump out the Coverage Report in HTML format using menu Analyze->GenerateCoverageReport... I'm…
Elye
  • 53,639
  • 54
  • 212
  • 474
0
votes
1 answer

Code coverage measurement on real hardware target

Could you please share your idea about the measurement code coverage that is run on actual hardware target? It's mean how to do instrument for that test and the method how to get the coverage information after testing code is executed on real…
0
votes
1 answer

How to check http status code in python version agnostic way?

I'm writing python code that should run both with python 2.7 and 3.3+ I'm trying to figure out a way to properly check for http status codes and don't reduce my test coverage %. if I write something like: try: import http.client as…
Giovanni Di Milia
  • 13,480
  • 13
  • 55
  • 67
0
votes
1 answer

Merge test code coverage in Teamcity

We are running unit tests and acceptance tests in Teamcity, both for Java for the same project. Both generate a test coverage report using JaCoCo. Is there a way to merge the test coverage reports, so that we can see what code is not covered by…
Mattias
  • 1,110
  • 1
  • 11
  • 26
0
votes
0 answers

Grails: Cobertura XML report missing on Sonar

I'm working on a web application using Grails 2.1.1 and it was requested me to make evidence about the test code coverage. The project is using: Maven 3.0.5 code-coverage 1.2.7 (grails plugin for Cobertura) sonar-maven-plugin 2.5 SonarQube 3.7.4…
0
votes
2 answers

How do I write a test class for Messaging.SingleEmailMessage apex class?

I have written the below Apex class that processes incoming email that are sent to an email service address and creates a new task from the incoming mail and then associates this new task with a matching record in salesforce. The match is done on…
Graham
  • 71
  • 1
  • 2
  • 8
0
votes
2 answers

code-coverage of the getter through the assert

While unit-testing, is there a way to enable code-coverage analysis only during some steps? I wish to measure the code-coverage of the assert part of a test. The tools that I currently use don't make the difference if the line is executed during the…
sab
  • 4,352
  • 7
  • 36
  • 60
0
votes
1 answer

Why is my branch coverage rate and line coverage rate failing?

Consider the following code: @Test public final void testIsUnitInvalidSadCase() { boolean expectedResult = false; boolean actualResult = false; double invalidUnit = 0.0; testFuelUnitValidator = new FuelUnitValidator( …
0
votes
0 answers

No Unit Test Statistics Displayed in Sonar even when Test Coverage is displayed

We are using ant for our build process. We wanted to get the test coverage for our project. So we integrated jacoco with sonar to perform the test coverage. The test Coverage is displayed correctly but the Unit Test Statistics are not displayed at…
0
votes
1 answer

Test coverage of protobuff messages

I've got a .proto file with a few messages which looks something like this, Message messageA{ required double value =1; //more fields } Message messageB{ required int32 value =1; //more fields } I'd like to verify that each message…
0
votes
1 answer

karma coverage does not show any data

I have included the source files in the files & preprocessors section of my karma conf file. The tests run fine and the junit xml report shows the data. The html coverage just show 100% without any data. I have the similar structure for another…
Priyabrat Nanda
  • 1,095
  • 3
  • 18
  • 34
0
votes
1 answer

How to remove dependencies form being included in the Karma test coverage

Karma allows you see the test coverage using karma conf file reporters Type: Array Default: ['progress'] CLI: --reporters progress,growl Possible Values: dots progress junit growl coverage Description: A list of reporters to use. The issue I am…
Encore PTL
  • 8,084
  • 10
  • 43
  • 78