# Integration test case template

Integration tests check that parts of a system work together: your app and a payment provider, an email service, a database or another team's API. Each row names the systems it crosses. Examples are for an example online shop; replace them with your own app's.

## INT-01: A test card payment is recorded

Systems: Shop to Payments

Preconditions: Payments in test mode

Steps:

1. Pay for an order with the test card
2. Open the payment provider's dashboard

Expected result: The payment shows there with the same amount and order number.

Test data: Test card 4242 4242 4242 4242

Status: Passed

## INT-02: A declined card shows a message

Systems: Shop to Payments

Preconditions: Payments in test mode

Steps:

1. Pay with a test card set to decline

Expected result: The shop says the card was declined, and no order is created.

Test data: Test decline card

Status: Passed

## INT-03: An order confirmation email is sent

Systems: Orders to Email

Preconditions: Email service in test mode

Steps:

1. Place an order
2. Check the test inbox

Expected result: One confirmation email arrives with the order number and items.

Test data: Test inbox orders@example.com

Status: Passed

## INT-04: Stock goes down after an order

Systems: Shop to Stock

Preconditions: A product with 5 in stock

Steps:

1. Order 2 of the product
2. Open the product in the stock system

Expected result: The stock shows 3.

Test data: Product SKU TEST-001

Status: Failed

## INT-05: Sign in with a work account

Systems: Sign in to Identity provider

Preconditions: A test account with the identity provider

Steps:

1. Select Sign in with work account
2. Complete the provider's sign in

Expected result: The shop opens signed in, with the account's name and email.

Test data: Test identity account

Status: Not run
