This assignment helps you to reinforce the topics discussed in the class including
a) Categoriesoftesting,includingequivalencepartitioning,boundaryvalueandcauseand
effect testing.
Assignment
In this project, we have developed a database to gather information and provide discounts about a product and its users depending on a variety of factors given. The jar file with the program is given to you, but contains at least 10 seeded defects. Using equivalence partitioning, boundary value, and cause/effect analysis techniques discussed in lecture, please develop a set of test cases for this program and execute the tests following the instructions below:
Running Jar Files
There are three options to run your test cases for black box testing. Please make sure to have java installed on your computer to run the jar file.
●
●
Using the GUI:
- ○ project1GUI.jar opens up the GUI where you can manually input your test casesand view the output
- ○ To run: Open in Command Prompt or Terminal and enter “java -jarproject1GUI.jar” and the GUI will open up Using Terminal or Command Prompt:
- ○ CSE565P1.jar contains the program that runs your test cases
- ○ The jar file takes in arguments corresponding to <name> <age> <user status><reward member status> <season bought> <product category> <rating of the product>
■ i.e.: java -jar <PATH to jar file> Peter 24 Returning Silver Spring Electronics 5
■ The only values that will be accepted for User Status, Rewards Member Status, Season Bought, Product Category are below.
● User Status
○ New or Returning
● Rewards Member Status
○ Bronze, Silver or Gold
● Season Bought
○ Winter, Spring, Summer or Fall
● Product Category
○ Unknown or Electronics
○ To run: Open in Command Prompt or Terminal and enter “java -jar CSE565P1.jar Peter 24 Returning Silver Spring Electronics 5” and the output will be given
● Running tests automatically (Linux/ Bash for Windows/Mac):
- ○ CSE565P1.jar contains the program that runs your test cases
- ○ Project1Script is a bash script where you can input your test cases, andProject1Script will automatically run them
- ○ To add a test case and run:
- Open Project1Script in vim or an editor
- Add in a test case by doing: java -jar <PATH to jar file> Peter 24Returning Silver Spring Electronics 5
- Exit out of vim or the editor
- If needed, open in Bash or Terminal and make Project1Script anexecutable by running “chmod u+x Project1Script”
- In the Bash or Terminal, run “./Project1Script” and the output for each testcase will be givenRequirementsThe input requirements are:
1.
2. 3.
User Name (string)
- 1.1. Can be 5-10 characters long
- 1.2. Only contain letters (no numbers)
- 1.3. Cannot contain a hyphen (-) or underscore (_)
Age (Integer)
2.1. Must be 18 or over
User Status (do not test for invalids)
4. 5. 6. 7.
3.1. New or Returning
Rewards Member Status (do not test for invalids)
4.1. Bronze, Silver or Gold
Season Bought (do not test for invalids)
5.1. Winter, Spring, Summer or Fall Product Category (do not test for invalids)
6.1. Unknown or Electronics Rating of Product (Integer)
7.1. Rating must be between 1 – 10 The output requirements are:
8. 9.
Error messages for incorrect user name, age and rating. Discounts Given based on:
9.1.
9.2. 9.3.
9.4. 9.5. 9.6. 9.7.
New users cannot be given any discounts regardless of reward status, product, and season
If product category is unknown, user gets no discount
If bought in Summer:
9.3.1. Returning users who are gold members who bought Electronics get a 15% discount voucher
If bought in Spring:
9.4.1. Returning users who are bronze members who bought Electronics get a
10% discount voucher If bought in Winter:
9.5.1. Returning users who are gold members who bought Electronics get a 25% discount voucher
If bought in Fall:
9.6.1. Returning users who are silver members who bought Electronics get a 15%
discount voucher
Any other combination of returning user, reward status, product, and season does not get a discount.
Remember in equivalence partitioning, you can only test 1 invalid partition AT A TIME
Submission
Steps to Complete the Assignment:
1. Completetestcasematrix(Tab1atthebottomofthespreadsheet)fromTestCase
Excel Spreadsheet
- Executetestcasesfollowingoneofthethree options detailed above
- Reportresultsintestcasematrixtab(Pass/Fail)
- Completethedefecttrackingsheet(Tab2atthebottomofthespreadsheet)containing the defect number, a brief description of each defect, and the requirement that the defect maps to.i.e.: If a user was able to input a rating > 10, the defect tracking spreadsheet entry would look like this:
Defect Number 1
Defect Description User allowed to input rating > 10
Requirement Mapping
7
Submit the Test Case Excel Spreadsheet online to Coursera. You will find this Excel spreadsheet in the project description within the course.
Assessment
Your assignment will be scored based on the following criterion:
1. SetofCompleteTestCases
2. Defectsfound
3. Requirementsmappedtodefects 4. Defectdescription
This project is worth 40 points.




