Answered step by step
Verified Expert Solution
Question
1 Approved Answer
We need a module that will act as a checkout system that handles pricing schemes such as apples cost 50 cents, three apples cost $1.30.
- We need a module that will act as a checkout system that handles pricing schemes such as "apples cost 50 cents, three apples cost $1.30."
- In a normal supermarket, things are identified using Stock Keeping Units, or SKUs.
- In our store, we'll use individual letters of the alphabet (A, B, C, and so on).
- Our goods are priced individually.
- Some items are multi-priced: buy n of them, and they'll cost you y cents. For example, item 'A' might cost 50 cents individually, but this week we have a special offer: buy three 'A's and they'll cost you $1.30.
- Our checkout accepts items in any order, so that if we scan a B, an A, and another B, we'll recognize the two B's and price them at 45 (for a total price so far of 95).
- Because the pricing changes frequently, we need to be able to pass in a set of pricing rules each time we start handling a checkout transaction.
- Here are this week's rule
- Next week's rules will be different
Objective
Write Acceptance tests using Gherkin for the above requirements.
Following the process from this week's lecture to define each feature and its scenarios.
Save everything in a file called "LASTNAME_FIRSTNAME_checkout.feature".
Use a data table if you see an opportunity
Submit the file to the dropbox.
Marks Available | What Are the Marks Awarded For? | Marks Awarded |
5 | Correct use of the Gherkin notation | |
5 | Valid and appropriate tests | |
5 | Good coverage of the requirements | |
5 | Follow all instructions to the letter | |
___ 20 | TOTAL MARKS |
Step by Step Solution
★★★★★
3.50 Rating (157 Votes )
There are 3 Steps involved in it
Step: 1
Answer Heres an example of how you could write acceptance tests using Gherkin for the described chec...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started