You have been asked to supply the list of keywords for a keyword-driven test automation script that will be used to test the following story:
As a customer, I want to be able to add and delete items from my shopping cart, so that I can buy the right number of items and still get free shipping on some of the items.
The automation will add and delete items from a customer’s shopping cart and will then verify that the total shipping cost is correct. The test automation library has a large set of keywords that have been coded to support this e-commerce site.
Which of the following is the smallest set of keywords that contains the ones needed to support testing this story?
A. Add Item, View Cart, Compute Shipping
B. Login, Add Item, Delete Item, Checkout, Compute Cart Total, Compute Shipping, Complete Order
C. Login, Add Item, Checkout, Compute Cart Total, Compute Shipping, Complete Order
D. Login, Add Item, Delete Item, View Cart, Compute Shipping
Explanation:
Keyword-Driven Testing:
This approach requires a focused set of keywords tailored to the actions described in the user story.
Story Actions:
The ability to add and delete items from the cart.
Viewing the cart to confirm changes.
Calculating shipping costs.
Smallest Set of Keywords:
Login: To simulate a user session.
Add Item and Delete Item: For cart modifications.
View Cart: To verify cart contents.
Compute Shipping: To check shipping costs.
Conclusion:
Option D includes the minimum keywords required to meet the story’s needs.