Questions tagged [test-coverage]
The test-coverage tag has no summary.
77 questions
2votes
3answers
454views
Covering a NO-OP Condition
I have a Java project where a coverage analysis tool is being used (SonarQube). It rightly declared that code similar to this was a potential performance issue (Encode.forJava would still be called ...
-1votes
3answers
446views
Connection between code coverage and defects per KLOC
Most of the articles I read state that the average number of defects per KLOC is 10-15 (most of the data seems to come from Microsoft). How does that number correlate with code coverage? If my project ...
-1votes
3answers
119views
Code Coverage and Unit Tests nomenclature [closed]
About tests: I have the following view on nomenclature: Unit tests are the kind of testes where you have a function ExtractBacon, where there is a function with an entry parameter Pig and a return of ...
0votes
3answers
263views
Test driven reduction of technical debt
Suppose you have been put in charge of an already existing project. As you are starting to familiarize yourself with the repository, you notice a few technical debt issues (insufficient test coverage, ...
2votes
1answer
258views
Test coverage for various code logic permutations... Metadata/Artifacts in algorithm results to describe which case?
I'm sorry if the title is confusing, I don't know if what I am describing has a proper name so let me describe... I have an algorithm which contains quite a bit of nested if/else if/else logic for ...
0votes
0answers
79views
Unit test coverage and abundant glue code [duplicate]
How do I solve this riddle of contradicting "good practices" to properly cover my app with unit-tests? These are principles I found about writing unit-tests: Pyramid of testing says unit-...
0votes
1answer
65views
The correct relationship between unit and end to end tests
I am writing tests for an algorithm that is built up of several consecutive stages. Each such stage has its own set of unit tests. I want to check that the whole algorithm performs as expected, but am ...
2votes
1answer
418views
How to evaluate the impact of change for a single line of code or a variable?
During unit testing it is possible to estimate the code coverage to see which share of the code base is covered by the tests. For one part (the simple calculatable one) of a risk estimation we need to ...
1vote
5answers
331views
Hypothetically if every scenario were covered by an end-to-end tests, would unit tests still have any value?
Note: I'm asking about the strategy behind unit / integration / end-to-end tests, not about classifying tests as one or the other. More so in the past than present, it was expensive to write and run ...
-4votes
1answer
1kviews
Is it possible to derive a test suite to achieve 100% path coverage? [closed]
Here is an example with the function: Examining this I believe that it is possible to achieve 100% path coverage. My understanding of path coverage is that you need to design test cases such that ...
1vote
2answers
116views
How important is the data to assess code coverage?
per the title how important is the data in assessing code coverage? As background, let's say that you're given 20% of the entire dataset to help trace the different pathways each row of data goes ...
4votes
4answers
605views
How to comprehensively test software that doesn't play well with testing?
I'm currently working in a project that aims to implement automatic testing of a software package. You can imagine this software is a bit like Excel in that it has a workspace that contains all the ...
38votes
11answers
13kviews
Unexpected Code Coverage Reduction
I am adding unit tests to some existing code which initially was not tested at all. I have set up my CI system to fail builds where the code coverage percentage is reduced compared to previous build -...
8votes
7answers
3kviews
Rerun unit tests affected by change [closed]
Let's say we have a code base covered with big enough amount of unit tests. We make small change to the code and want to check if tests are still passing. Wouldn't it be great to be able to rerun just ...
5votes
5answers
8kviews
If 100% test coverage is possible
In thinking about formal verification techniques, you also need to have test coverage. But as that article shows, you can easily say you have "100% test coverage", but every test doesn't have any ...