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
2 answers

gcov can't open source file while using it in Android AOSP

I have following AOSP project setup 1) I have test.cpp in (AOSP root directory)/vendor/myProject/test.cpp 2) In Android.mk i have used LOCAL_CFLAGS += -g -fprofile-arcs -ftest-coverage LOCAL_LDFLAGS += -lgcov 3) When I compile the code i get…
Akshay
  • 1,137
  • 1
  • 10
  • 12
-1
votes
1 answer

Typescript optional chaining testing branch count

I'm having some trouble understanding branch coverage when it comes to optional chaining with typescript. Here is my code type testingType = { b?: { a?: number }; }; export function example(input: testingType) { return input.b?.a; } Here is…
tpszhao
  • 1
  • 2
-1
votes
1 answer

React jest Testing for Ternary operator to render components conditionally

` it('Should render ComB when parameter value=A', () => { const {container} = render(); expect(container).toBeInTheDocument() }); `I want write a jest test case for following code as it show branch coverage 50% and point out…
-1
votes
1 answer

How to do linkage between automated integration tests (C#) and features/scenarios in Azure DevOps?

We have automated integration tests and we are using VSTest to execute them in our pipeline in Azure DevOps. We have also features/scenarios stored in Azure DevOps. Is there any way how to create linkage between automated test and feature/scenario…
Olin
  • 1
-1
votes
1 answer

What is the best way to test cover a method that just call another method?

What is the best way to test or ignore coverage of the following method? Notice that the update method just calls the service and I must cover 80% of the class/code.
Marcos Vidolin
  • 186
  • 4
  • 21
-1
votes
1 answer

How to write unit test cases like JUnit for a bean shell script

I have a Bean Shell script and I want to know how can I write test cases like JUnit?
Zaka
  • 1
-1
votes
1 answer

Functional Coverage for Verilog based TB

I am currently developing a Verilog based Testbench model for a DUT, I have experience with System Verilog TB and Verification IPs and this is my first time developing a pure verilog TB. I have completed the basic blocks for running the simulation…
Sreejin TJ
  • 177
  • 12
-1
votes
1 answer

Testing of private methods in typescript

Let's say I have the following typescript class: class MyComponent { private something: number; constructor () { this.something = 0 this.incrementSomething() } private incrementSomething () : number { return this.something++ …
Morpheus
  • 8,829
  • 13
  • 51
  • 77
-1
votes
1 answer

Please help me in writing test class for my triggerclass

I have written a trigger to send email to particular email groups whenever a "Idea" record is created. I have to send emails to groups on the basis of combination of two multi-select picklist fields so I have added those combinations in "Custom…
-1
votes
1 answer

Test coverage of an application

I want to design a framework which will run on top of existing selenium webdriver automation framework and my idea is to find the test coverage of application. Initially I'm just looking for a Proof of Concept. I am thinking to do it in following…
Priyanshu
  • 3,040
  • 3
  • 27
  • 34
-2
votes
1 answer

MEASURING MANUAL/AUTOMATED FUNCTIONAL TESTS CODE COVERAGE

We are trying to generate code coverage on performing manual tests for application hosted in Azure app services. I have a trail account in portal.azure.com with 'user' privilege. Tried the below options: A. Use VS tools in Azure console and…
DHP
  • 1
-2
votes
3 answers

can anyone explain the output of this program

Given the following fragment of code, how many tests are required for 100% decision coverage? if width > length then biggest_dimension = width if height > width then biggest_dimension = height end_if else …
-2
votes
2 answers

Pod linking error raised when do Swift unit test on XCode7 if enable "Gather coverage data"

I do a simple swift project using XCode7.3. Everything is ok, UI & Unit test run properly too. However, when I wanna see coverage data, I can not run unit test anymore ld: framework not found Pods_MapView clang: error: linker command failed with…
Ricky
  • 569
  • 4
  • 16
-2
votes
1 answer

how can I test a method for greater code coverge in Java?

I seek a method written in Java that tests a method with as greater code coverage as possible. Meaning, I want to know how can I count a number of instructions executed by this method in Java. How do I do it? Please provide your practical inputs.
-2
votes
1 answer

Should I write different test case for different branch of same service?

@Override public User editDescription(User user, String description) throws UserNotFoundException { user.setAboutMe(description); User returnedUser = userRepository.save(user); if (returnedUser == null) { throw new…
Giridhar Kumar
  • 619
  • 1
  • 7
  • 12
1 2 3
25
26