$30
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 cases and view the output
○ To run: Open in Command Prompt or Terminal and enter “java -jar project1GUI.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, and Project1Script 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 24 Returning Silver Spring Electronics 5
■ Exit out of vim or the editor
■ If needed, open in Bash or Terminal and make Project1Script an executable by running “chmod u+x Project1Script”
■ In the Bash or Terminal, run “./Project1Script” and the output for each test case will be given
Requirements
The input requirements are:
1. 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 (_)
2. Age (Integer)
2.1. Must be 18 or over
3. User Status (do not test for invalids)
3.1. New or Returning
4. Rewards Member Status (do not test for invalids)
4.1. Bronze, Silver or Gold
5. Season Bought (do not test for invalids)
5.1. Winter, Spring, Summer or Fall
6. Product Category (do not test for invalids)
6.1. Unknown or Electronics
7. Rating of Product (Integer)
7.1. Rating must be between 1 – 10
The output requirements are:
8. Error messages for incorrect user name, age and rating.
9. Discounts Given based on:
9.1. New users cannot be given any discounts regardless of reward status, product, and season
9.2. If product category is unknown, user gets no discount
9.3. If bought in Summer:
9.3.1. Returning users who are gold members who bought Electronics get a 15% discount voucher
9.4. If bought in Spring:
9.4.1. Returning users who are bronze members who bought Electronics get a 10% discount voucher
9.5. If bought in Winter:
9.5.1. Returning users who are gold members who bought Electronics get a 25% discount voucher
9.6. If bought in Fall:
9.6.1. Returning users who are silver members who bought Electronics get a 15% discount voucher
9.7. 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