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
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
Consider the method mcq ( ):
int mcq(boolean a, boolean b, boolean c, boolean d)
{
   int ans=1;
   if(a) { ans = 2; }
   else if (b) { ans = 3; }
   else if (c) {
                      if (d) { ans = 4; }
   return ans;
}
if
M1 = Number of tests to exhaustively test mcq( );
M2 = Minimum number of tests to achieve full statement coverage for mcq( ); and
M3 = Minimum number of tests to achieve full branch coverage for mcq( );
then (M1, M2, M3) = __________.
A
(16, 3, 5)
B
(8, 5, 3)
C
(8, 3, 5)
D
(16, 4, 4)
Question 2 Explanation: 


Question 3
Which of the following statements is/are FALSE with respect to software testing ?
S1 : White-box tests are based on specifications; better at telling whether program meets specification, better at finding errors of omission.
S2 : Black- box tests are based on code; better for finding crashes, out of bounds errors, file not closed errors.
S3 : Alpha testing is conducted at the developer’s site by a team of highly skilled testers for software that is developed as a product to be used by many customers.
A
Only S1 and S2 are FALSE.
B
Only S1 and S3 are FALSE.
C
Only S2 and S3 are FALSE.
D
All of S1, S2, and S3 are FALSE.
Question 3 Explanation: 
FALSE: Black box tests are based on specifications; better at telling whether program meets specification, better at finding errors of omission.
FALSE: White box tests are based on code; better for finding crashes, out of bounds errors, file not closed errors.
TRUE: Alpha testing is conducted at the developer’s site by a team of highly skilled testers for software that is developed as a product to be used by many customers.
Question 4
What is the availability of the software with following reliability figures
Mean Time Between Failures (MTBF) is 20 days
Mean Time To Repair (MTTR) is 20 hours
A
90%
B
96%
C
24%
D
50%
Question 4 Explanation: 
Mean time between failures is not the average time something works then fail.
It’s the average time between failures Mean time between failure(MTBF)s= total uptime / number of breakdowns Mean time to repair is the average time taken to repair something. Mean time to repair(MTTR)= total time down/number of breakdowns
Availability = Total uptime/(total uptime+total downtime)
= MTBF/(MTBF+MTTR)*100
= 20*24/(20*24 + 20) * 100
= 96 %
Question 5
Regression testing is primarily related to
A
Functional testing
B
Development testing
C
Data flow testing
D
Maintenance testing
Question 5 Explanation: 
→ Regression testing is re-running functional and non-functional tests to ensure that previously developed and tested software still performs after a change. If not, that would be called a regression.
→ Changes that may require regression testing include bug fixes, software enhancements, configuration changes, and even substitution of electronic components.
→ As regression test suites tend to grow with each found defect, test automation is frequently involved.
→ Regression testing is primarily related to Maintenance testing.
Question 6
Which of the following techniques are used for selection of test cases during structural testing?
A
Data flow based testing
B
Equivalence class partitioning
C
Cause-effect graphing
D
Boundary value analysis
Question 7

Regression testing is primarily related to

A
function testing
B
data flow testing
C
development testing
D
maintenance testing
Question 8

Acceptance testing is done by

A
developers
B
customers
C
testers
D
None of the given options
Question 9

Beta testing is carried out by

A
users
B
developers
C
managers
D
None of the given options
Question 10

The approach to software testing is to design test cases to

A
break the software
B
understand the software
C
analyze the design of sub processes in the software
D
analyze the output of the software
Question 11
Match List I with List II
List I List II
A Scenario testing I To verify the I/O behaviour of text object
B Regression testing II user acceptance methodology
C Component testing III No new bugs after changes in the program
D Beta testing IV The documentation of a use case

Choose the correct answer from the options given below:
A
A-IV B-III C-II D-I
B
A-II B-I C-III D-IV
C
A-IV B-III C-I D-II
D
A-III B-I C-IV D-II
Question 12
Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason R
Assertion A: Validity checks real need of system users
Reason R: Completeness checks system user defined requirements
In the light of the above statements, choose the correct answer from the options given below
A
Both A and R are correct and R is the correct explanation of A
B
Both A and R are correct and R is the NOT correct explanation of A
C
A is true but R is false
D
A is false but R is true
Question 12 Explanation: 
Both A and R are correct, but R is not the correct explanation of A. Assertion A: This statement is correct. Validity checks are essential to ensure that the system meets the real needs and requirements of the system users. Reason R: Completeness checks are indeed about verifying that the system user-defined requirements are fully captured, but this doesn't directly explain the concept of validity checks. Both A and R are independently valid statements, but Reason R doesn't directly provide an explanation for Assertion A. So, the correct answer is: Both A and R are correct, but R is not the correct explanation of A.
Question 13
For a function of two variables, boundary value analysis yields,
A
4n+3 test cases
B
4n+1 test cases
C
n+4 test cases
D
2n+4 test cases
Question 14
Fault base testing technique is
A
Unit testing
B
Beta testing
C
Stress testing
D
Mutation testing
Question 14 Explanation: 
Mutation testing is a software testing type that is based on changes or mutations.
Changes are introduced into the source code to check whether the defined test cases can detect errors in the code.
Question 15
Alpha and Beta testing are forms of
A
White- Box Testing
B
Black- Box Testing
C
Acceptance Testing
D
System Testing
Question 15 Explanation: 
Black-box testing is a method of software testing that examines the functionality of an application without peering into its internal structures or workings.
Alpha testing uses both black and white box testing while Beta testing uses only black box testing.
Alpha testing is performed by testers who are usually internal employees of the organization
Question 16
Black Box Software Testing method focuses on the:
A
Boundary condition of the software
B
Control structure of the software
C
Testing of User Interface only
D
Cyclomatic Complexity
Question 16 Explanation: 
Black Box Software testing method focuses on the functional requirement of the software. Note: The question is ambiguous. We marked the answer according to official key.
Question 17
Which of the following is not a part of the Test Implementation and Execution Phase?
A
Creating test suites from the test cases
B
Executing test cases either manually or by using test execution tools
C
Comparing actual results
D
Designing the tests
Question 17 Explanation: 
TRUE: Creating test suites from the test cases
TRUE: Executing test cases either manually or by using test execution tools
TRUE: Comparing actual results
FALSE: Designing the tests
There are 17 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