CoolInterview.com - World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Our Services
Get 9,000 Interview Questions & Answers in an eBook.




Get it now !!
Send your Resume to 6000 Companies
White Box Testing Interview Questions & Answers - Learning Mode
COOLINTERVIEW.COM TESTING GLOSSARY INTERVIEW QUESTIONS WHITE BOX TESTING INTERVIEW QUESTIONS QUESTIONS & ANSWERS - LEARNING MODE

White Box Testing Interview Questions & Answers - Learning Mode

White box testing (a.k.a. clear box testing, glass box testing or structural testing) uses an internal perspective of the system to design test cases based on internal structure. It requires programming skills to identify all paths through the software.

Try White Box Testing Interview Questions & Answers - Exam Mode

1 2 Next

Sort By : Latest First | Oldest First | By Rating

White Box Testing Interview Questions & Answers - Learning Mode
Try White Box Testing Interview Questions & Answers - Exam Mode
Question: What is cyclomatic complexity in a software program?

Answer: Cyclomatic complexity is the number of linearly independent paths through a program's source code. Cyclomatic complexity is computed using the control flow graph of the program: the nodes of the graph correspond to the commands of a program, and a directed edge connects two nodes if the second command might be executed immediately after the first command.

CC = E − N + P
Where
CC= cyclomatic complexity
E = the number of edges of the graph
N = the number of nodes of th Source: CoolInterview.com
Question: Why is white box testing called as glass box testing?

Answer: Everything is visible inside a glass box. When you perform white box testing , you can see the code and test it. But in black box testing the tester does not know what is happening inside the code when he is giving a particular input. He only sees the output, but does not get to know how that output has come. In white box testing the tester can know what exactly is happening inside the code and why a particular out put is coming for a particular input. That's why it is called Glass box testi Source: CoolInterview.com
Question: What is path coverage? How path coverage testing done in white box testing?

Answer: Path coverage measures whether each of the possible paths in each function have been covered for testing. A path is a unique sequence of branches from the function entry to the exit. A very through testing is possible by Path Coverage.

Path coverage is measures by an entity called cyclomatic complexity. The cyclomatic complexity of a software program is calculated from a connected graph of the module (that shows the topology of control flow within the program):

Cyclomatic complexit Source: CoolInterview.com
Question: Explain relation between white box testing and equivalence partitioning ?

Answer: White box testing is a type of testing used basically for checking the code of an application, where as equivalence partitioning is a strategy used for both white box and black box testing to decide the input values for the testing. In equivalence partitioning we will have to come up with multiple inputs in which each one represents a set of inputs of similar behavior. Source: CoolInterview.com
Question: Given specification:
if (a>4)
then b= a-1;
else b= a+1,

where a and b are integer variables. List all possible test cases that can detect the bug in the following implementation

if (a >=8) b = a-1;
else b=a+1;


Answer: Test with following Data
1. a=0 Then Result Should Be b=1
2. a=-1 Then Result Should Be b=0
3. a=2 Then Result Should Be b=3
4. a=4 Then Result Should Be b=5
5. a=5 Then Result Should Be b=4

Test Case Number 5 will fail while testing

if (a >=8) b = a-1;
else b=a+1;

Here 5 >=8 is false and Result Displayed will be b=6, which is wrong. Source: CoolInterview.com
Question: What are the limitations of white box testing?

Answer: It is not possible for testing each and every path of the loops in program. This means exhaustive testing is impossible for large systems. This does not mean that white box testing is not effective. By selecting important logical paths and data structure for testing is practically possible and effective. Source: CoolInterview.com
Question: who will do white box testing only developers /testers also ?

Answer: White Box testing is done by both developers and tester. In case of projects (eg: Railways , aeronautics) there are standards (eg CENELAC)to be which demands testing to be done by a tester in such cases the white box testing is done by tester and not developer. The tester will have a knowledge of the coding language only then is he called a white box tester The tester does the white box testing using rational tools like Rational Test Real Time (RTRT) . Source: CoolInterview.com
Question: What are Dirty Test Cases?

Answer: Dirty test cases are those that check the functionalities for the negative scenarios. In dirty test cases we provide negative / invalid inputs and verify if the application is behaving correctly. Here the application is tested for maximum amount of invalid inputs.<br><br>Example: For a banking application which allows fund transfer of maximum $10000 US per day. A dirty test case would be to try to transfer more than that values, i.e. say $10001 US. Here the application should sanely Source: CoolInterview.com
Question: What is merits and demerits of white box and black box testing?



Answer: Testing a function with knowing the internal structure it also call as white box testing it takes place in the developers area.
Source: CoolInterview.com
Question: What is meant by API Testing? Explain the API Testing process.

Answer: API testing is done to make sure that the basic units of the software application function properly as desired. Reason why we perform API testing right from the initial stages of the product cycle to the final phase, ensuring that the product release in the market is error-free and worth every penny you invested. API testing process involves testing the methods of NET, JAVA, J2EE APIs for valid and invalid inputs, plus testing the APIs on Application servers.

API-testing targets the cod Source: CoolInterview.com
Question: What are the basic stuff you require to begin creating test cases?




Answer: Basic stuff require for Test cases is full fledge knowledge of Functional design and STLC. Scenario plays a vital role for having Test Cases. Let me know if I missing something. Source: CoolInterview.com
Question: How do you do path testing? This is related to whitebox testing.


Answer: 1.Draw the flowgraph corresponding to the procedural design or code

2.Determine the cyclomatic complexity of the flow graph.

V(G) = E-N+2

where, E=No. of edges, N=No. of nodes

3. Determine the basis set of independent paths.(The cyclomatic complexity indicates the no. of paths required.)

4.Prepare test cases the will force execution of each path.

Source: CoolInterview.com
Question: What are prerequisites for white box testing?

Answer: In general prerequisites for white box testing are the same as for black box testing. The only difference is the access to the application source code. The white box tester should ask for detailed requirement, functional specifications, high-level design documents, detailed design documents and source code. The white box QA Engineer would analyze the source code and prepare test cases for testing the functionality to ensure that the code is behaving according with the requirements and specifica Source: CoolInterview.com
Question: What are the basic stuff you require to begin creating test cases.

Answer: the basic stuff required for writing the test cases varies from one organization to another and from project to project. basically the used case will be referred to write the test cases and in case if their is no elaborated SRS instead application is itself is ready then we go for the explorating the application and with the help of the business analyst test cases will be started writing. Source: CoolInterview.com
Question: What are the tables in testplans and testcases?

This concept is related to Whitebox testing in SQL.





Answer:

Test plan is a document that contains the scope, approach, test design and test strategies. It includes the following:-
1. Test case identifier
2. Scope
3.Features to be tested
4. Features not to be tested.
5. Test strategy.
6. Test Approach
7. Test Deliverables
8. Responsibilities.
9 Staffing and Training
10.Risk and Contingencies
11. Approval

While A test case is a noted/documented set of steps/activities that are carried out or ex Source: CoolInterview.com
Question: What knowledge is essential to be able to perform white box testing?

Answer: The following are the knowledge essential for white box testing:

1. Good understanding of the code/programming language.
2. Good analytical/logical ability to able to give the necessary inputs and to cover the required paths/branches.
3. Good understanding of testing concepts and methodologies. Source: CoolInterview.com
Question: What are the different techniques used in white box testing?

Answer: ode coverage: Ensure that each code statement is executed once.

Branch Coverage or Node Testing:
Coverage of each code branch in from all possible was.

Compound Condition Coverage:
For multiple condition test each condition with multiple paths and combination of different path to reach that condition.

Basis Path Testing:
Each independent path in the code is taken for testing.

Data Flow Testing:
In this approach you track the specific variables through each Source: CoolInterview.com
Question: Who performs white box testing? The developer or the tester?

Answer: White box testing can be performed by anybody who has a good understanding of the code and the program logic. Generally developers perform white box testing during unit testing for their own components. API tester also perform white box testing. Source: CoolInterview.com
Question: What is cyclomatic complexity?



Answer: The cyclomatic complexity is a software metric that provides a

quantitative measure of the logical complexity of a program.
Source: CoolInterview.com
Question: Give one example where you did not find the bug in black box testing but you found the bug in white box testing?

Answer: Let's say you have an entity that is stored across multiple tables and the test case is to delete the entity. In black-box testing, once the entity disappears from the GUI after deletion, your black-box test case is considered passed. But with white-box testing, you'd check if all related rows are deleted from the tables. If the deletion happens to delete only the parent record and leave behind orphan rows, the test case is considered failed. Source: CoolInterview.com

1 2 Next



India News Network
Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal
Cache = 0.03125 Seconds