52 questions
0
votes
0
answers
38
views
Jacoco Implementation in AWS
In my project, we need to generate the jacoco report for the external tests for the application/service deployed in AWS. In local system when making the service up by running the jar using java -jar ...
2
votes
0
answers
112
views
Control Flow Graph and Cyclomatic Complexity for this Python Code
1. def is_prime(n):
2. if n <= 1:
3. return False
4. if n == 2 or n == 3:
5. return True ...
0
votes
1
answer
92
views
Draw foreach with CFG (Control Flow Grap)
Hello everyone in the community, does anyone know about CFG (Control Flow Graph)? Can you please tell me how to represent the DFG for a foreach loop?
This is a sample code:
$array = [1, 2, 3, 4, 5];
...
0
votes
0
answers
427
views
Calculate minimum number of test cases for statement coverage and condition coverage respectively
Could someone draw a flow graph and explain how I get the answer to this question?
Question: Calculate the minimum number of test cases for statement coverage and minimum number of test cases for ...
0
votes
1
answer
194
views
Why is white box testing sometimes called glass box testing?
In some references, I have found that white box testing is sometimes called glass box testing. I would like to know what are the reasons behind that.
1
vote
1
answer
1k
views
Statement Coverage and Decision Coverage - I am not able conclude which is the correct answer.-Need help wrt flow chart
As per my knowledge of Statement coverage and branch coverage Answer should be (a) .But to be very frank still flow chart for this is not clear to me. Can someone pls help me with flow chat.
0
votes
0
answers
283
views
How to write test cases using Equivalence Class, Boundary value, and Basis Path Testing
I have a method isPerfect(x) (with 4<=x<=10000) below, how to write test cases based on Equivalence Class, Boundary Value, and Basis Path Testing:
public boolean checkPerfectNumber(int x) {
...
1
vote
1
answer
755
views
How is Symbolic Execution different from Whitebox Fuzzing?
I do not understand how symbolic execution is different from Whitebox fuzzing? From what I understand, Whitebox Fuzzers symbolically execute the code with some initial input format.
Additionally, it ...
0
votes
0
answers
43
views
I am trying to learn statement coverage analysis
I am trying to learn code coverage analysis; I am bit confused because the following code has loops.
Example if the code like this
read a;
read b;
i=0
if a>b
while(to i<a)
print(i)
i++;
end ...
1
vote
0
answers
39
views
Cyclomatic Complexity Calculation on Presenter Methods and Callbacks
everyone.
I need help in determining the cyclomatic complexity regarding this tested method.
@Override
public void renderData() {
mRepository.render(new TvShowsRepositoryCallback() {
@...
-1
votes
1
answer
49
views
Should I add white/black box rendundant Unit Tests?
I've written black-box unit tests for my project.
After a refactoring, I've adopted a strategy pattern in my code.
This code is covered by the black-box unit test, even after the refactoring.
...
0
votes
2
answers
2k
views
White-box test cases with 100% code coverage
I apologize ahead as I'm very new to software testing. But I have what looks like a simple code to create a White-box test cases with 100% code coverage:
01 public class ShapeAreas {
02
03 public ...
2
votes
0
answers
94
views
White Box Testing - Basis Coverage
What does it mean, when you do a white box test :
"cover the edges with a basis, if possible. Otherwise cover the paths with a set of arbitrary test cases".
What I usually do in this kind of ...
1
vote
1
answer
1k
views
PowerMockito - Whitebox Get Constructor of inner class with int[] parameter
As the title mentions, I'm using PowerMockito to test a class that contains an inner private class. The inner class has a constructor that has an 'int[]' parameter. Below is the code.
final Class ...
0
votes
2
answers
881
views
I have a few question about MC/DC and piarwise testing
Recently, I started working on software testing, and I had some questions.
Pairwise testing is the combination of all the values that this parameter can have, and is it also applicable to Boolean ...
0
votes
0
answers
49
views
Is unit testing always white box testing? [duplicate]
I've recently seen several references that indicate or mention off-hand in an article that unit testing is always white box testing.
Since black-box testing is simply looking at the specification or ...
2
votes
0
answers
6k
views
How to mock private methods using Whitebox(org.powermock.reflect)
I want to mock a private method which has been called inside another method.
Following is the sample code, I have written.
Java code:
package org.mockprivatemethods;
public class AccountDeposit ...
0
votes
1
answer
2k
views
Undoing Whitebox.setInternalState in a @AfterMethod without setting original state
I have a class which I cannot easily use a dependency injection to mock due to an obligatory implementation of an interface - in a nutshell, for that reason I will be using Whitebox and my concern ...
1
vote
0
answers
827
views
How to suppress parsing, preprocessing of code with the signature "__ASM volatile rbit(x)"
I am unit testing embedded code on a host environment (vectorcast).
The code is devloped using an arm-eabi compiler on the target hardware. We are testing it on desktop without any simulator or ...
-1
votes
1
answer
235
views
Whitebox testing with break
Can someone tell me if my whitebox testing is correct? Can I put 2 arrows entering for statement 8 ?
Code being tested:
Whitebox test:
0
votes
1
answer
414
views
Black box/White box testing contradictions
So I already know the difference between white box and black box testing, but I am looking for fairly straightforward examples of situations where White box says "everything is OK" and Black box ...
1
vote
2
answers
5k
views
Coverage: Branch and path coverage test case
I need to implement the Division by Zero operation in a method such that
(1) every test suite that achieves 100% path coverage reveals the fault and (2) it is possible to create a test suite that ...
3
votes
1
answer
1k
views
White-box and Black-box testing of recursive functions
I learned white-box and black-box testing in terms of iterative functions. Now i need to do white-box and black-box testing of several recursive functions (in F#). take the following recursive ...
0
votes
2
answers
523
views
purpose of white box testing
I have read about whitebox testing. Statement coverage, branch coverage, path coverage done at unit, integration levels. In this we derive test cases to obtain maximum coverage for statements, ...
2
votes
2
answers
4k
views
What is difference between Prime Path Testing and Path Testing?
I got following types of white box testing list:
Control flow testing
Data flow testing
Branch testing
Statement coverage
Decision coverage
Modified condition/decision coverage
Prime path ...
0
votes
2
answers
78
views
Drawing a program graph: What line is visited after a conditional or loop is not called?
Just wanted to check whether the way I am thinking is correct.
Here is an example method:
1 public static boolean isCircle (int M, int m) {
2 boolean result = false;
3 if (M == m & M > ...
0
votes
1
answer
2k
views
React Application Unit Testing
I am currently testing a React app using Selenium for Functional Testing. Selenium is used to launch the app on the browser, and simulate user actions and keep asserting/verifying at each step.
...
0
votes
0
answers
421
views
Which methods are to be considered in method coverage
I have a confusion regarding the method coverage calculation.
consider the code below.
function A (n1)
{
if (n>1)
C();
else
print n1;
}
Now, My test case calls A() as
A(1)
It means ...
0
votes
1
answer
866
views
how to manually calculate code coverage percentage for path coverage?
I am manually creating the white-box testing for our system and I have issues with automated coverage testing tools. This is a Java-based system.
Path coverage % = (Total paths exercised / total ...
0
votes
3
answers
135
views
How to test a java software?
We have been assigned an open source software to test!
The software has 3 packages and each package has 10 or more classes and each class might have dozens of methods.
My question is that before I ...
1
vote
2
answers
12k
views
statement and branch coverage
Hello everyone in these days i am preparing ISTQB exam and i am stuck with one of the questions.
mock exam QUESTION 16
Question is ( originally copy paste) here:
Given the following code, which is ...
1
vote
1
answer
1k
views
unit testing Coverage Issue
my ultimate goal is to cover the below code (making complete code green). I am using cantata tool.
#define CHECK1 ((a == 1) || (a == 4))
void check_fun(int a, int b)
{
if((!CHECK1)&...
0
votes
1
answer
3k
views
Why does PowerMock's example for use of Whitebox.invokeConstructor() throw a ConstructorNotFoundException?
When I then try to run the second example from PowerMock's Bypass Encapsulation docs, using PowerMock 1.5.2 (which we use at my company), I immediately get a ConstructorNotFoundException thrown. I ...
4
votes
1
answer
2k
views
Does statement coverage count false if statements?
When checking statement coverage for my code:
double programme(double x, double y)
{
double z
if(x>=5){
z = 15;
}
else if(x>=3){
z= 10;
}
else {
z=0;...
0
votes
1
answer
253
views
Code coverage of a daemon in Windows
I need to do code coverage on a daemon. The daemon application is written in c++. We test the daemon features with a client test program that has its own libraries. The libraries communicate with the ...
0
votes
1
answer
88
views
Which techniques for unit tests with poor functional requirements and no design specifications?
In my understanding, design specifications help to formulate unit test cases which make use of internal knowledge (white-box techniques), while if we only have functional requirements, the black-box ...
0
votes
1
answer
114
views
White-Box Testing
I was just wondering what is the difference between the statment coverage/decision coverage/condition coverage from the following code.
public static void main (String args [])
{
char letter=' '...
0
votes
2
answers
2k
views
JUnit blackbox/ whitebox to test Selection Sort?
I am attempting to understand and impliment blackbox / whitebox JUnit techniques on a SelectionSort class, but Im having trouble understanding what direction to take..
One of my failed attempts I ...
2
votes
1
answer
2k
views
Difference between control flow testing and basis path testing
We are studying various testing techniques in Software Quality Assurance course and i got confused when came across "basis path testing" and "control flow testing". Both these techniques apparently ...
2
votes
5
answers
14k
views
Whitebox and Blackbox testing
I ve been reading for the whitebox and blackbox testing.
If im not wrong:
Whitebox tests the implementation of a Software Program, but blackbox tests the inputs and outputs.
Can someone please ...
0
votes
1
answer
866
views
Test Javascript function which dont return a value in Qunit
Suppose I have a function
function f_createScriptElement(f_url) {
var script = d[CreateElement](Script);
script.type = "text/javascript";
script[Src] = f_url;
script....
0
votes
1
answer
2k
views
Android white box testing
I'm new android testing and for a while I'm using Android test framework to test my code(with the help of ProviderTestCase2, AndroidTestCase, activityinstrumentationtestcase2,etc) I want to know what ...
1
vote
2
answers
3k
views
Best Practice for Black Box testing [closed]
I have a couple of windows service applications that working with sql server. I would like to perform black box testing for my application. I don't want to use unit testing, because I haven't enough ...
2
votes
1
answer
880
views
Visual Studio 2010 Unit Test
I want to test a couple of functions in my source code with unit tests. Now If I run my test I don't get any test results.
Here is a simple Code Snippet what I try to do:
#include <iostream>
...
10
votes
1
answer
1k
views
What is an ON-unit?
The Art of Software Testing contains several references to "ON-units". Here is an example from the section on test-case design:
Decision coverage usually can satisfy statement coverage. Since every ...
4
votes
6
answers
21k
views
White-Box/ Black-Box Testing: static or dynamic?
Here is what I understand:
Dynamic testing is testing that is performed when the system is running.
Static testing is performed when the system is not running.
Black-Box testing focuses on ...
7
votes
2
answers
18k
views
Test cases for a Singly Linked list
What are some good testcases for a Linked list problem in general? for example test cases for a function which finds and eliminates duplicates and returns the pointer to the first node. Some core ...
1
vote
3
answers
4k
views
should unit tests be black box tests or white box tests?
Say I have three methods, all very similar but with different input types:
void printLargestNumber(int a, int b) { ... }
void printLargestNumber(double a, double b) { ... }
void printLargestNumber(...
1
vote
1
answer
519
views
Questions on WhiteBox testing, ON-Units, Condition-Coverage
I am reading a book where I am getting stuck at few white box testing concepts. The article in the below link is taken exactly from the book.
http://testdesigners.com/testingstyles/ControlFlowTesting....
0
votes
1
answer
562
views
Errors caught by WBT, but not BBT and vice versa
Can you think of one type of error that might be found using White-Box testing, and one type using Black-Box testing. i.e. an error that would be found by one and not the other.
For WBT there would ...