Docsity

Software Testing Assignment: Equivalence Partitioning and Boundary Value Analysis, Exercises of Data Structures and Algorithms

Toggle sidebar
bg1
Assignment 3
Submission Date: 17 January 2020
Note:
a) This is an individual assignment.
b) Late submission would not be accepted.
c) This assignment will be evaluated on the basis of your performance in quiz that will be
taken in class. You will be able to attempt the quiz if
1. You have submitted your assignment before deadline
2. Your assignment is plagiarism free.
3. You have attempted all the questions of the assignment.
Question 1: (20 Marks)
Perform ECP and BVA for the following scenario:
Write appropriate classes for ECP.
Write test cases to perform ECP.
Write appropriate classes for BVA.
Write test cases to perform BVA.
GPA Calculator: You know, before writing the test cases, the in depth understanding of the business logic
is utmost important. Grade points may range from 0.0 to 4.0. Here are the details:
A = 4.00 grade points
B+ = 3.33 grade points
B- = 2.70 grade points
C+ = 2.30 grade points
C = 2.00 grade points
D+ = 1.30 grade points
D = 1.00 grade points
F = 0 grade points
For each course, multiply the grade points with credit hours to get total grade points for that course. Then
finally, we divide the total grade points (of all the courses) by total credit hours (of all the courses) to get
GPA. Valid values for credit hours are 3 and 4.
Question 2: (15 Marks)
a. Consider ‘Order Type’ field on Trade page of a website. This field is a radio button field with two
options ‘buy’ and ‘Sell’. Valid inputs in case of Text Field based design could have been {Buy, Sell}.
Give examples of invalid inputs.
b. Consider a Quantity field on Trade page of a website. The Quantity field can have values between
one and four numeric characters (0, 1… 8, 9). Minimum valid value in this field is 1. Design
equivalence classes for valid and invalid values of the Quantity field. Note that the Quantity field
cannot accept special characters and as well as non-numeric characters. Design equivalence classes
for length attribute of the field.
c. Provide input data for value of the field mentioned in Q1b based on Boundary Value Analysis.
pf2

Partial preview of the text

Download Software Testing Assignment: Equivalence Partitioning and Boundary Value Analysis and more Exercises Data Structures and Algorithms in PDF only on Docsity!

Assignment 3

Submission Date: 17 January 2020 Note: a) This is an individual assignment. b) Late submission would not be accepted. c) This assignment will be evaluated on the basis of your performance in quiz that will be taken in class. You will be able to attempt the quiz if

**1. You have submitted your assignment before deadline

  1. Your assignment is plagiarism free.
  2. You have attempted all the questions of the assignment. Question 1: (20 Marks)** Perform ECP and BVA for the following scenario:  Write appropriate classes for ECP.  Write test cases to perform ECP.  Write appropriate classes for BVA.  Write test cases to perform BVA. GPA Calculator: You know, before writing the test cases, the in depth understanding of the business logic is utmost important. Grade points may range from 0.0 to 4.0. Here are the details: A = 4.00 grade points B+ = 3.33 grade points B- = 2.70 grade points C+ = 2.30 grade points C = 2.00 grade points D+ = 1.30 grade points D = 1.00 grade points F = 0 grade points For each course, multiply the grade points with credit hours to get total grade points for that course. Then finally, we divide the total grade points (of all the courses) by total credit hours (of all the courses) to get GPA. Valid values for credit hours are 3 and 4. Question 2: (15 Marks) a. Consider ‘Order Type’ field on Trade page of a website. This field is a radio button field with two options ‘buy’ and ‘Sell’. Valid inputs in case of Text Field based design could have been {Buy, Sell}. Give examples of invalid inputs. b. Consider a Quantity field on Trade page of a website. The Quantity field can have values between one and four numeric characters (0, 1… 8, 9). Minimum valid value in this field is 1. Design equivalence classes for valid and invalid values of the Quantity field. Note that the Quantity field cannot accept special characters and as well as non-numeric characters. Design equivalence classes for length attribute of the field. c. Provide input data for value of the field mentioned in Q1b based on Boundary Value Analysis.

d. Provide input data for the length of field mentioned in Q1b based on Boundary Value Analysis. e. Design test cases for all the above parts. (a, b, c, d and e) Question 3: (40 Marks) Perform ECP and BVA for the following scenario:  Write appropriate classes for ECP.  Write test cases to perform ECP.  Write appropriate classes for BVA.  Write test cases to perform BVA.

  1. A switch is switched on once the temperature falls below 18 degrees and then it is turned off when the temperature is more than 21.
  2. In an examination a candidate has to score minimum of 24 marks in order to clear the exam. The maximum that he can score is 40 marks.
  3. One of the fields on a form contains a text box which accepts numeric values in the range of 18 to 25.
  4. A program validates a numeric field as follows: Values less than 10 are rejected, values between 10 and 21 are accepted, values greater than or equal to 22 are rejected.
  5. In a system designed to work out the tax to be paid: An employee has £4000 of salary tax free. The next £1500 is taxed at 10%. The next £28000 is taxed at 22%. Any further amount is taxed at 40%.