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
1 answer

Testing wxPython widget without a display

I have this test case: class MyNiftyPanelTest(unittest.TestCase): def setUp(self): self.app = wx.App() self.frame = wx.Frame(None) self.sut = SUT(self.frame, -1) […] def tearDown(self): …
Sardathrion - against SE abuse
  • 17,269
  • 27
  • 101
  • 156
0
votes
1 answer

How to generate jacoco.exec file on a remote server

I am running a tomcat server and in it's catalina.sh I have exported JAVA_OPTS as follows. JAVA_OPTS="$JAVA_OPTS -javaagent:/opt/jacoco/lib/jacocoagent.jar=destfile=/tmp/jacoco.exec,append=true,includes=*" This generates the jacoco.exec file in the…
station
  • 6,715
  • 14
  • 55
  • 89
0
votes
0 answers

gradle jacoco report - configure code coverage calculation

sorry, the screenshot upload is broken and I could not manage to properly format the table Element Instructions Branches Cxty Lines Methods getEnv() 212 8% n/a 0 1 1 1 0 1 getBranch() 1840 …
moin moin
  • 2,263
  • 5
  • 32
  • 51
0
votes
1 answer

Track test coverage history(trend)

Goal - track unit/functional/integration tests coverage history on some regular basis (weekly, every release, etc) for relatively long period (6 months). JUnit plugin in Jenkins out of the box does that per every build and problem here that it does…
alex_bondar
  • 422
  • 2
  • 5
  • 18
0
votes
1 answer

How to trace running instructions/taken branches on physical Android smartphone?

This is the situation: I have my own smartphone and I want to trace every time I make a service call with adb shell service call ... which instructions are covered or which branches are taken in the service code (both java and c). I tried to give a…
0
votes
0 answers

Why does android Instrumentation test report fail when coverage is enabled?

I am trying to generate jacoco reports, but I keep getting an error when I set the testCoverageEnabled property to true. java.lang.NoSuchMethodError: No static method $jacocoInit()[Z in class L... Removing the testCoverageEnabled property I can run…
abs
  • 640
  • 2
  • 8
  • 19
0
votes
4 answers

Coverage test django admin custom functions

I created a custom functions in django admin.py and im trying to test the using coverage : class Responsible(admin.ModelAdmin): """ Inherits of admin class """ list_display = ('user', 'Name', 'last_name', 'process',) search_fields =…
jsanchezs
  • 1,992
  • 3
  • 25
  • 51
0
votes
1 answer

How do I integrate clover current db file and history files , and get the coverage result together?

In my case, I have to get code coverage in server.For that I use clover. I have executed test cases for some scenarios through client side manually That means logging to the web application and manually test some scenarios ). Then I want to get…
dul codes
  • 23
  • 4
0
votes
1 answer

Unable to cover or conditioned line in test case

I am one function where I am returning values like this... GetData(){ let parsedData= JSON.parse(data.data.json); return { x: parsedData.x|| [], y: parsedData.y|| [] }; } I wrote 4 test case to cover this…
Arun Tyagi
  • 2,206
  • 5
  • 24
  • 37
0
votes
0 answers

Why can't I get JMockit coverage report with static method?

I need to get a report from my unit test. I found and used JMockit plugin to mock different environments which were required for tests. But I found that I can't get the coverage report when I mock static methods. The mock tests all ran successfully.…
elkan1788
  • 97
  • 1
  • 2
  • 11
0
votes
1 answer

how to ensure good test-coverage with void methods

public interface MessageProducer { public void produce(String message); public Map> getMessagesMapped(); } public MessageProducerImpl { @Override public void produce(String message) { //code logic here…
M06H
  • 1,675
  • 3
  • 36
  • 76
0
votes
1 answer

What are inputs to decisions (in relation to conditions and condition coverage)?

In the context of DO-178B, the number of conditions and inputs might differ: (A && B) or (A && C) has three inputs but four conditions because each occurence of A is considered a unique condition. Multiple condition coverage requires 2^n test cases,…
0
votes
1 answer

How to apply "for each" loop coverage testing?

I was wondering if "for" loop coverage can be applied to "for each" loops as well.. If so, how can it be done on the following code sample? 1. public static void foreachDisplay(int[] data){ 2. System.out.println("Display an array using for 3.…
0
votes
1 answer

Bringing in Unit testing code when existing code is quite Inflexible

Here is the information about my development environment: MongoDB 3.0.0 MongoDB C# Driver Version 1.7.0.4714 Microsoft Visual Studio Professional 2013 .NET Framework 4.0 We are about to do our first production release. We developed the application…
CS Lewis
  • 489
  • 8
  • 30
0
votes
1 answer

squish failed when open popsup menu

I use squish-4.2.2 for testing GUI of our tool and use purecov.i386_linux2.7.3 for covering them. Our tools are based on qt-4.7.4_qsci version of QT. After building our tools in Purecov mode, when we run our tests, they fail if tests contain…
Arto
  • 1
  • 2