0% found this document useful (0 votes)
10 views7 pages

Cse3019 5 2012 2

The document describes a software testing and quality assurance exam from the University of Mauritius in May 2012. It provides instructions to candidates answering 4 questions related to topics like static testing, the V-model, equivalence partitioning, boundary value analysis, control flow graphs, and quality standards. The questions include writing test cases, checklists, and comparing processes like technical reviews and inspections. Diagrams and code snippets are also included to aid in answering questions about concepts like the V-model and a Java method to generate prime numbers.

Uploaded by

Yashna Byloll
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views7 pages

Cse3019 5 2012 2

The document describes a software testing and quality assurance exam from the University of Mauritius in May 2012. It provides instructions to candidates answering 4 questions related to topics like static testing, the V-model, equivalence partitioning, boundary value analysis, control flow graphs, and quality standards. The questions include writing test cases, checklists, and comparing processes like technical reviews and inspections. Diagrams and code snippets are also included to aid in answering questions about concepts like the V-model and a Java method to generate prime numbers.

Uploaded by

Yashna Byloll
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

UNIVERSITY OF MAURITIUS

FACULTY OF ENGINEERING

SECOND SEMESTER EXAMINATIONS

MAY 2012

PROGRAMME BSc (Hons) Computer Applications (Full-Time)


BSc (Hons) Computer Science
BSc (Hons) Information Systems

MODULE NAME Software Testing and Quality Assurance

DATE Wednesday MODULE CODE CSE 3019(5)


16 May 2012

TIME 13:30 – 15:30 Hrs DURATION 2 hours

NO. OF 5 NO. OF QUESTIONS 4


QUESTIONS SET TO BE ATTEMPTED

INSTRUCTIONS TO CANDIDATES

Answer Any Four (4) questions.

All questions carry equal marks.


SOFTWARE TESTING AND QUALITY ASSURANCE – CSE 3019(5)

Answer Any Four (4) questions.


All questions carry equal marks.
Question 1

(a) (i) Briefly explain what is meant by static testing. [2 marks]

(ii) Give three benefits of static testing. [3 marks]

(b) Compare and contrast the technical review process and inspection process using
the following template.

Technical Review Inspection


Objective
Role
Inputs
Output
Meeting
[5marks]

(c) The following code has been written by a programmer to generate the Fibonacci
series, but the programmer has left a number of mistakes. Prepare an inspection
checklist consisting of ten checks that can help you identify the mistakes made by
the programmer in the code.
public class JAVAFibonacciSeriesExample {

public static main(String[] args) {

//number of elements to generate in a series


int limit=20;
long[] series = new long[limit];

//create first 2 series elements


series[0] = 0
series[1] = 1;

//create the Fibonacci series and store it in an array


for(i=2; i < limit; i++){
series[i] = series[i-1] + series[i-2];
}

//print the Fibonacci series numbers


System.out.println("Fibonacci Series upto ");
for(int i=0; i<= limit; i++){
System.out.print(series[i] + " ");
}
}
[10 marks]

(d) With the help of a diagram, explain the v-model and the different levels of testing
that are performed. [5 marks]

Page 1 of 5
SOFTWARE TESTING AND QUALITY ASSURANCE – CSE 3019(5)

Question 2

(a) The mylogin function takes as inputs two arguments of type string and returns a
result of type boolean.

boolean mylogin (String userid, String password)

Userid must be alphanumeric string of length between 1 and 32 chars inclusive.


Password must be string between 8 and 64 characters inclusive without blanks. It
must be different from userid.

(i) How does Boundary Value Analysis(BVA) differ from Equivalence


Partitioning.
[3 marks]

(ii) Identify ten different equivalent classes (both valid and invalid classes).
[5 marks]

(iii) Derive a set of eight black box test cases using Equivalence Partitioning
(EP). Your answer should include test data for user ID and password,
expected result and classes being covered.
[8 marks]

(b) Derive three additional test cases based on Boundary Value Analysis (BVA). Give
a justification for the choice of your test cases.
[4 marks]

(c) The appearances tab of the IE dialog box has the following basic options:

2 toolbars (pictures, text)


1 choice for startup page (valid home page)
2 choices for expiration of links (never expire, expire after 30 days)

Choose an appropriate array and write down the test cases that must be executed.

23 32
1 2 3 1 2
1 1 1 1 1 1 1
2 1 2 2 2 1 2
3 2 1 2 3 1 3
4 2 2 1 4 2 3

[5 marks]

Page 2 of 5
SOFTWARE TESTING AND QUALITY ASSURANCE – CSE 3019(5)

Question 3

(a) You are to generate a set of white box test cases for the primes method. The actual
code is outlined below.

1 Static public void primes(int limit) {


2 int scale, num, prime, root, i;
3 int primes[limit];
4 primes[0] = 2; /* The first prime is 2 */
5 primes[1] = 3; /* The next prime is 3 */
6 num = 1;
7 scale = 0;
8
9 for ( prime = 5; prime <= limit; prime = prime + 2) {
10 root = sqrt(prime);
11 isprime = 1;
12 for ( i = 1; i < num && primes[i] <= root; i++ ) {
13 if ( p % primes[i] == 0 ) {
14 isprime = 0;
15 break;
16 }
17 }
18 if (isprime) {
19 num = num;
20 primes[num] = prime;
21 }
22 }
23 for (i =0; i < num; i++)
24 printf("%d ", primes[i]);
25 }

(i) Draw the control flow graph for the primes method.
[6.5 marks]

(ii) Identify the independent paths.


[2.5 marks]

(iii) Derive a set of five test cases for covering any five independent paths
indentified in (a)(i)
[5 marks]

(b) With respect to the primes method:


i. Which lines are definition occurrences of variable num.
ii. Which lines are use occurrences of variable num.
iii. For variable num, identify feasible def-use pairs using their line numbers.
[6 marks]

(c) With the help of a diagram, explain the distributed automated framework.

Page 3 of 5
SOFTWARE TESTING AND QUALITY ASSURANCE – CSE 3019(5)
[5 marks]

Question 4

A large software company, Pelican, who employs around 100 programmers that
develops complex software for large organization would like to use quality standards to
improve the reliability of software and implement a quality culture within the company.
The quality standards that they have to choose from is CMM/CMMI & ISO.

(i) List five characteristics of quality culture.


[5 marks]
(ii) Describe briefly the CMM/CMMI standards.
[5 marks]
(iii) Compare and contrast the CMM/CMMI against ISO quality standards.
[5 marks]

(b) (i) With the help of a diagram, describe the five key characteristics of
Cleanroom development.
[7 marks]
(ii) Explain why Cleanroom is not widely used in software development.
[3 marks]
Question 5
(a) Consider the following java code that adds up a string based on the ASCII values
of its characters and then returns the binary representation of the sum.

public class BinString {


public BinString() {}
public String convert(String s) {
return binarise(sum(s));
}
public int sum(String s) {
if(s=="") return 0;
if(s.length()==1) return ((int)(s.charAt(0)));
return ((int)(s.charAt(0)))+sum(s.substring(1));
}
public String binarise(int x) {
if(x==0) return "";
if(x%2==1) return "1"+binarise(x/2);
return "0"+binarise(x/2);
}
}

Page 4 of 5
SOFTWARE TESTING AND QUALITY ASSURANCE – CSE 3019(5)
…/Cont’d next page

Question 5 [Cont’d]

(i) Write a Junit test to check whether the sum method returns the correct
result, if the parameter passed is “Add”and the expected result is 265.
[3 marks]

(ii) Write a Junit test to check whether binarise method returns the correct
result.
[5 marks]

(iii) Write a junit test to check whether the convert method returns the correct
result, if the parameter passed is “A” and the expected result is "1000001".
[2 marks]

(b) GUI Testing can refer to just ensuring that the look-and feel of the application is
acceptable to the user, or it can refer to testing the functionality of each and every
component involved. Briefly explain how you will check any five components
found on the Smartware Mortgage window below.

[5*2 marks]

(c) With the help of either a diagram or an example briefly explain the term
regression testing.
[5 marks]

Page 5 of 5
SOFTWARE TESTING AND QUALITY ASSURANCE – CSE 3019(5)
END OF QUESTION PAPER
/ph

Page 6 of 5

You might also like