Software-testing

Question 1

The following is the comment written for a C function

/* This function computes the roots of a quadratic equation a.x^2 + b.x + c = . The function stores two real roots in *root1 and *root2 and returns the status of validity of roots. It handles four different kinds of cases. (i) When coefficient a is zero irrespective of discriminant (ii) When discreminant is positive (iii) When discriminant is zero (iv) When discriminant is negative. Only in case (ii) and (iii) the stored roots are valid. Otherwise 0 is stored in roots. The function returns 0 when the roots are valid and -1 otherwise. The function also ensures root1 >= root2 int get_QuadRoots( float a, float b, float c, float *root1, float *root2); */

A software test engineer is assigned the job of doing black box testing. He comes up with the following test cases, many of which are redundant.

Which one of the following option provide the set of non-redundant tests using equivalence class partitioning approach from input perspective for black box testing?

A
T1, T2, T3, T6
B
T1, T3, T4, T5
C
T2, T4, T5, T6
D
T2, T3, T4, T5
       Software-Engineering       Software-testing       GATE 2011
Question 1 Explanation: 
Note: Out of syllabus.
T1 and T2 checking same condition a = 0 hence, any one of T1 and T2 is redundant.
T3, T4: in both case discriminant (D) = b2 – 4ac = 0. Hence any one of it is
T5 : D > 0
T6 : D < 0
Question 2
In unit testing of a module, it is found that for a set of test data, at the maximum 90% of the code alone were tested with the probability of success 0.9. The reliability of the module is
A
Greater than 0.9
B
Equal to 0.9
C
At most 0.81
D
At least 0.81
       Software-Engineering       Software-testing       ISRO-2018       Video-Explanation
Question 2 Explanation: 
Given data
Step-1: 90% of code were tested,
Testing with the probability=0.9
Step-2: We can write tested data into 0.9 because it is given in percentages.
Step-3: Reliability of the module = Tested data * probability
= 0.9 * 0.9
= 0.81(at most)
Question 3
To execute all loops at their boundaries and within their operational bounds is an example of
A
Black Box Testing
B
Alpha Testing
C
Recovery Testing
D
White Box Testing
       Software-Engineering       Software-testing       ISRO-2007
Question 3 Explanation: 
White box testing is a testing technique which evaluates the code and the internal structure of a program. It involves looking at the structure of the code, when a tester already know the internal structure of a product, tests can be conducted to ensure that the internal operations performed according to the specification and all internal components have been adequately exercised.
White Box Testing is coverage of the specification in the code:
1. Code coverage
2. Segment coverage: Ensure that each code statement is executed once.
3. Branch Coverage or Node Testing: Coverage of each code branch in from all possible was.
4. Compound Condition Coverage: For multiple conditions test each condition with multiple paths and combination of the different path to reach that condition.
5. Basis Path Testing: Each independent path in the code is taken for testing.
6. Data Flow Testing (DFT): It is defining the set of intermediate paths through the code.
7. Path Testing: Path testing is where all possible paths through the code are defined and covered.
8. Loop Testing: these strategies relate to testing single loops, concatenated loops, and nested loops.
Question 4
The extent to which the software can continue to operate correctly despite the introduction of invalid inputs is called as
A
Reliability
B
Robustness
C
Fault tolerance
D
Portability
       Software-Engineering       Software-testing       ISRO-2016       Video-Explanation
Question 4 Explanation: 
→ The extent to which the s/w can continue to operate correctly despite the introduction of invalid inputs is called as robustness
→ Robustness is the ability of a computer system to cope with errors during execution and cope with erroneous input
Question 5
Activities which ensure that the software that has been built, is traceable to customer requirement is covered as part of
A
Verification
B
Validation
C
Maintenance
D
Modeling
       Software-Engineering       Software-testing       ISRO CS 2009
Question 5 Explanation: 
Verification is the process of evaluating products of a development phase to find out whether they meet the specified requirements.
Validation is the process of evaluating software at the end of the development process to determine whether software meets the customer expectations and requirements.
Question 6
A testing method which is normally used as the acceptance test for a software system, is
A
Regression Testing
B
Integration Testing
C
Unit Testing
D
System Testing
       Software-Engineering       Software-testing       ISRO CS 2009
Question 6 Explanation: 
System testing is the type of testing to check the behaviour of a complete and fully where to buy generic modafinil integrated software product based on the software requirements specification (SRS) document. The main focus of this testing is to evaluate Business / Functional / End-user requirements.
Regression testing is type of testing carried out to ensure that changes made in the fixes or any enhancement changes are not impacting the previously working functionality. It is executed after enhancement or defect fixes in the software or its environment.
A Unit testing is a Level of Testing where smallest part of individual unit / component (called unit) is tested to determine if they are fit for use
Question 7
Black Box Software Testing method focuses on the
A
Boundary condition of the software
B
Control structure of the software
C
Functional requirement of the software
D
Independent paths of the software
       Software-Engineering       Software-testing       ISRO CS 2011
Question 7 Explanation: 
Black box testing, which is also known as behavioral, opaque-box, closed-box, specification-based or eye-to-eye testing, is a Software Testing method that analyses the functionality of a software/application without knowing much about the internal structure/design of the item that is being tested and compares the input value with the output value
Question 8
If a program P calls two subprograms P1 and P2 and P1 can fail 50% of the time and P2 can fail 40% of the time, what is the failure rate of program P
A
50%
B
60%
C
70%
D
10%
       Software-Engineering       Software-testing       ISRO CS 2013
Question 8 Explanation: 
Method-1:
Based upon the success rate, we can find the solution.
Success rate=(1-failure rate)
Given failure rates are P1=50% P2=40%
P1 success rate= (1-failure rate)
= (1-0.5)
= 0.5
P2 success rate= (1-failure rate)
= (1-0.4)
= 0.6
Success rate of both P1 and P2 = 0.5 *0.6
= 0.3
Failure rate of both P1 and P2
= 1 - success rate
= 1 - 0.3
= 0.7 (or) 70%
Method-2:
Based upon the failure rate we can find the solution.
Program P is divided into two subprograms.
We can calculate total failure rate by considering the two subprograms
P(P1 U P2)= P1+P2-(P1*P2) /*Check note point */
= (50/100)+(40/100)-(50*40)/100
=90-20
=70%
Note: Failure of P1 + Failure of P2 - (Failure of P1 ∩ Failure of P2)
Question 9
Which of the following testing methods uses fault simulation technique?
A
unit testing
B
beta testing
C
stress testing
D
mutation testing
       Software-Engineering       Software-testing       ISRO CS 2013
Question 9 Explanation: 
Mutation testing is used to design new software tests and evaluate the quality of existing software tests.
The purpose of mutation testing is to evaluate the effectiveness of the test cases to detect errors in the event of modification or changes in the program code
Question 10
The test suite (set of test input) used to perform unit testing on module could cover 70% of the code. What is the reliability of the module if the probability of success is 0.95 during testing?
A
0.665 to 0.95
B
At the most 0.665
C
At the most 0.95
D
At least 0.665
       Software-Engineering       Software-testing       ISRO CS 2014       Video-Explanation
Question 10 Explanation: 
Software Reliability is the probability of failure-free software operation for a specified period of time in a specified environment.
From the given question the module code covers 70% of the entire code, so we need to check with reliability for that module only.
Reliability = percentage of code coverage * probability of success = 0.7 * 0.95 = 0.665.
Probability of success is at most 0.665 %
Question 11
The advantage of better testing in software development is in
A
Waterfall model
B
Prototyping
C
Iterative
D
All of these
       Software-Engineering       Software-testing       Nielit Scientist-C 2016 march
Question 11 Explanation: 
● ​ Iterative development was created as a response to inefficiencies and problems found in the waterfall model. A simplified version of a typical iteration cycle in agile project management.
● The basic idea behind this method is to develop a system through repeated cycles (iterative) and in smaller portions at a time (incremental), allowing software developers to take advantage of what was learned during development of earlier parts or versions of the system. Learning comes from both the development and use of the system, where possible key steps in the process start with a simple implementation of a subset of the software requirements and iteratively enhance the evolving versions until the full system is implemented. At each iteration, design modifications are made and new functional capabilities are added.
Question 12
The graph theoretic concept will be useful in software testing is
A
Cyclomatic number
B
Hamiltonian Circuit
C
Eulerian cycle
D
None of these
       Software-Engineering       Software-testing       Nielit Scientist-C 2016 march
Question 12 Explanation: 
● Cyclomatic complexity is a software metric used to indicate the complexity of a program.
● It is a quantitative measure of 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 indivisible groups of commands of a program, and a directed edge connects two nodes if the second command might be executed immediately after the first command.
● Cyclomatic complexity may also be applied to individual functions, modules, methods or classes within a program
Question 13
In testing phase, the effort distribution is upto
A
10%
B
20%
C
40%
D
50%
       Software-Engineering       Software-testing       Nielit Scientist-C 2016 march
Question 13 Explanation: 
● Effort estimation is the process of predicting the most realistic amount of effort (expressed in terms of person-hours or money) required to develop or maintain software based on incomplete, uncertain and noisy input.
● Effort estimates may be used as input to project plans, iteration plans, budgets, investment analyses, pricing processes and bidding rounds.
● The strong overconfidence in the accuracy of the effort estimates is illustrated by the finding that, on average, if a software professional is 90% confident or “almost sure” to include the actual effort in a minimum-maximum interval, the observed frequency of including the actual effort is only 60-70%.
● Currently the term “effort estimate” is used to denote as different concepts such as most likely use of effort (modal value), the effort that corresponds to a probability of 50% of not exceeding (median), the planned effort, the budgeted effort or the effort used to propose a bid or price to the client
Question 14
Consider the following :

Matching A, B, C, D in the same order gives.
A
r, p, s, q
B
p, r, q, s
C
s, r, q, p
D
q, r, s, p
       Software-Engineering       Software-testing       ISRO DEC 2017 22- Soon       Video-Explanation
Question 14 Explanation: 
White box testing→ Condition Coverage
Black box testing→ Equivalence Class partitioning
Volume Testing→ Performance testing
Beta Testing→ System testing
Question 15
What is the testing to ensure the WebApp property interfaces with other applications or databases?
A
Compatibility
B
Interoperability
C
Performance
D
Security
       Software-Engineering       Software-testing       Nielit Scientist-B CS 4-12-2016
Question 15 Explanation: 
● Compatibility Testing is a type of Software testing to check whether your software is capable of running on different hardware, operating systems, applications, network environments or Mobile devices.
● Interoperability testing is defined as a software testing type, that checks whether software can interoperate with other software component, software or systems.
● In other words, interoperability testing means to prove that end-to-end functionality between two communicating systems is as required by the standard on which those systems are based.
● Performance testing is in general, a testing practice performed to determine how a system performs in terms of responsiveness and stability under a particular workload.
Question 16
The following program is to be tested for statement coverage:
begin
if(a==b)
{
S1;
exit;
}
else if (c==d)
{
S2;
}
else
{
S3;
Exit;
}
S4;
end
The test cases T1,T2,T3 and T4 given below are expressed in terms of the properties satisfied by the values of variables a,b,c and d. The exact values are not given
T1:a,b,c and d are all equal
T1:a,b,c and d are all distinct
T3:a=b and c!=d
T4:a!b and c=d
Which of the test suites given below ensures coverage of statements S1,S2,S3 and S4?
A
T1,T2,T3
B
T2,T4
C
T3,T4
D
T1,T2,T4
       Software-Engineering       Software-testing       Nielit Scientist-B IT 22-07-2017
Question 16 Explanation: 
The test cases T1 covers S1 ,T2 covers S3 and T4 covers S2, S4.
There are 16 questions to complete.

Access quiz wise question and answers by becoming as a solutions adda PRO SUBSCRIBER with Ad-Free content

Register Now

If you have registered and made your payment please contact solutionsadda.in@gmail.com to get access