Drupal Solution
Test cases for adding coupon code in a Drupal project
Suppose your drupal projects contains products to sell. And you can use coupon code while purchasing products. For using coupon code in your druapl site, Ubercart Coupon code module may be installed. Please check the below cases which contains the test cases of checking coupon code functionality.
- Ensure that Admin is able to add coupon code.
- Ensure that users other than Admin doesnot have the permission to add coupon codes.
- Ensure that Admin can add coupon code through
Store Administration-->Coupons--->Add new Coupon - Ensure that Admin is able to add coupon code by directly open the node id
eg: sitename/Admin/store/coupons/add - Ensure that error message will be displayed if mandatory fields leaves empty.
- Ensure that Admin is able to add Coupon Name.
- Ensure that Admin is able to add Coupon Code.
- Ensure that Admin is able to select Payment information required field.
- Ensure that if Payment information required field is selected, error message will be displayed if we apply applying coupon code for products which doesn't contain payment information.
- Ensure that Admin is able to generate bulk coupon codes.
- Ensure that Admin is able to select number of coupon codes to be generated.
- Ensure that Admin is able to select the code length.
- Ensure that Admin is able to select coupon code as active/inactive.
- Ensure that Admin is able to add discount as Fixed price discount.
eg: enter "15" for $15.00 off. - Ensure that Admin is able to add discount as Percentage discount.
Eg: enter "15%" for 15% off. - Ensure that Admin is able to add discount as Set product price.
For eg: enter "=15" to make all matching products $15.00 after discount. - Ensure that Admin is able to add Apply discount to:
Order subtotal
Total of matching product(s)
All matching product(s)
The cheapest matching product(s)
The most expensive matching product(s) - Ensure that Admin is able to select 'Restrict coupon by date'.
- Ensure that error message will be displayed for invalid /expired dates.
- Ensure that Admin is able to select Maximum number of redemptions (per code).
- Ensure that error message will be displayed after the maximum redemptions per code.
- Ensure that Admin is able to select Maximum number of redemptions (per user).
- Ensure that error message will be displayed after the maximum redemptions per user.
- Ensure that Admin is able to select the Minimum Order limit [minimum amount for discount to apply].
- Ensure that error message will be displayed after the maximum redemptions per user.
- Ensure that Admin is able to select the Minimum order quantity [Minimum order quantity for discount to apply].
- Ensure that error message will be displayed after the Minimum order quantity.
- Ensure that Admin is able to select the Applicable product classes.
- Ensure that error message will be displayed for other than the Applicable product classes.
- Ensure that Admin is able to select the Applicable products.
- Ensure that error message will be displayed for other than the Applicable products.
- Ensure that Admin is able to select the Applicable SKUs.
- Ensure that error message will be displayed for other than the Applicable SKUs.
- Ensure that Admin is able to select the Applicable taxonomy terms.
- Ensure that error message will be displayed for other than the Applicable taxonomy terms.
- Ensure that Admin is able to apply User restrictions.
- Ensure that error message will be displayed for other than the specified users.
- Ensure that Admin is able to apply Role restrictions.
- Ensure that error message will be displayed for other than the specified user roles.
- Ensure that Admin is able to see active/inactive coupon codes.
- Ensure that Admin is able to delete copons.
Thus we can ensure that all the cases should be checked by going through the above steps. Please be note that cases to be tested may vary depending on the requirement.