Software Testing Practical Questions
Software Testing Practical Questions
Q2. Consider an automated banking application. The user can dial the bank from a
personal computer, provide a six-digit password, and follow with a series of keyword
commands that activate the banking function. The software for the application accepts
data in the following form:
Design the test cases to test the system using following Black Box testing
technique: BVA, Worst BVA, Robust BVA, Robust Worst BVA and Equivalence
Class Testing all variants (Input/Output domain)
Q3. Consider an application that is required to validate a number according to the following
simple rules:
Generate test cases to test valid and invalid numbers using Decision Table Testing
and Cause-Effect Graphing Technique to generate test cases.
Q5. Source code of simple insertion sort implementation using array in ascending order in c
programming language
1. int main()
2. {
3. int i,j,s,temp,a[20];
4. printf (Enter total elements: );
5. Scanf (%d,&s);
6. printf(Enter %d elements: ,s);
7. for(i=0;i<s;i++) scanf(%d,&a[i]);
8. for(i=1;i<s;i++)
9. {
10. temp=a[i]; j=i-1;
11. while((temp<a[j])&&(j>=0)){ a[j+1]=a[j];
12. j=j-1;
13. }
14. a[j+1]=temp;
15. }
16. printf(After sorting: );
17. for(i=0;i<s;i++)
18. printf( %d,a[i]);
19. return 0; }
Draw the program graph for given program segment. Determine the DD path graph.
Determine the independent paths and generate test cases for each independent path.
Q6. Consider a program to input two numbers and print them in ascending order given
below. Find all du paths and identify those du-paths that are not feasible or definition
clear. Also find all dc paths and generate the test cases for all paths (dc paths and non dc
paths).
1. void main ()
2. {
3 int a, b, t;
4. clrscr ();
5. printf (Enter first number);
6. scanf (%d,&a);
7. printf(Enter second number);
8. scanf(%d,&b);
9. if (a<b){
10. t=a;
11a=b;
12 b=t;
13}
14. printf (%d %d, a, b);
15 getch (); }
Q7. Consider the above program in question number 6 and generate possible program slices
for all variables. Design at least one test case from every slice.
Q8. Check the adequacy of the test cases generated in question no. 4 and 6 through mutation
testing and also computes the mutation score for each.
Q9. Consider graph generated in question number 5 and perform Graph Matrix Testing. Also
generate 2 connected paths by squaring the graphs.
Q10. Consider a simple tax calculator, in which user will enter the annual salary, gender of
the tax payer. System will calculate the tax and show the tax need to pay by selecting
tax slab programmatically (Assume tax slab, based on annual income and gender of tax
payer).
System also provides Help, Clear, Quit option(s) for the user. On selection of help
system must display assume tax slab(s).
Design screen layout for the system and demonstrate each step of OO System test
case(s) generation.