Submitted by: Submitted by uzii09
Views: 278
Words: 703
Pages: 3
Category: Science and Technology
Date Submitted: 06/20/2012 01:36 AM
CS 426 – Software Testing
Assignment 5
Deadline: February 08, 2012 Total Marks: 100 Group Name: ________
Group Members: ________ , ___ _______ , __________
Q1. Give a brief description of your final project at GIFT. List all features of the project and provide a functional decomposition of your project. 10 Marks
Q2. At which levels of abstraction should your project be tested? Explain your planned strategy.
10 Marks
The project should be tested at all the level of abstraction, i.e unit testing, integration testing, system testing, acceptance testing.
We are following agile model. As soon as a unit is developed it will be tested side by side, so we are using test driven development. After a component is unit tested it is integrated with the previous build. Now integration will be performed. Regression testing is also done to test the new build is compatible with the previous one.
When all the components will be developed and integrated we’ll perform system testing. And at the end acceptance testing will be done to test the system against the client needs.
Q5. Consider the following class: 10 Marks
public class Math {
static public int add(int a, int b) {
return a + b;
}
}
Write and execute the following test cases using JUnit and present the results (also provide the code with the assignment):
1. Sum of 5 and 5 should be 10
2. Sum of -10 and 5 should be -5
3. Sum of -5 and -5 should be -10
package com.gift.swtesting;
import static org.junit.Assert.*;
import org.junit.*;
public class TestMath {
@Test
public void testAdd1() {
int num1 = 5;
int num2 = 5;
int total = 10;
int sum = 0;
System.out.println("Testing the method add 2 +ve integers correctly...") ;
sum = Math.add(num1, num2);
assertEquals(sum, total);
}
@Test
public void testAdd2() {
int num1 = -10;...