End-to-End Integration Testing: Pay in Instalments
Smoke testing, new feature testing, retesting, system end-to-end testing, and regression testing on connecting a real external instalment payment service.
Your first day on the team
Hi! What’s your name?
Hi! Welcome aboard!
A new task from the product manager
Hi everyone! Klarna is already in production, but it still runs through a mock — the real Klarna takes no part in the payment. It’s time to connect the real integration.
How it will work
- The customer chooses Klarna and clicks “Pay”.
- An instalment form opens: the term (3, 6, or 12 months) and monthly income, which Klarna needs for its credit check.
- The customer clicks “Submit application”, and Klarna itself makes the decision.
What the customer sees
- Approved“Order paid”, and in “My orders” the status “Paid” with the instalment terms.
- Declined“Payment failed” and a chance to try again.
Test environment
The test environment is connected to Klarna’s test environment: applications go to the real Klarna service, but no money is charged.
- Income of €1,000 a month or more
- approved
- Income below €1,000
- declined
Hi Mari! Could you please draw the instalment form based on Krista’s requirements?
Mari is working on the design
Hi! Attaching the instalment form mockup in three states: the empty form, the form with the data filled in — the monthly payment is shown under the term — and Klarna’s answer.
Three screens: an empty form with an instalment term selector, income field, submit button, and a button to return to payment; the filled form with a term and €1500 income; an approved application with payment confirmation and a My orders button. Arrows lead from the empty form to filled data, then from submission to approval.
Thanks, Mari! {name}, before Mark starts, please review the mockup: does it match the requirements?
Mari, the mockup has no decline state. According to the requirements, if Klarna declines, we show “Payment failed” and a “Retry” button. Could you please add it?
Mari is updating the mockup
Thanks, I missed that! I’ve added the decline state — here is the updated mockup.
Three screens: an empty form with an instalment term selector, income field, submit button, and a button to return to payment; the filled form with a term and €1500 income; an approved application with payment confirmation and a My orders button. Arrows lead from the empty form to filled data, then from submission to approval. After submission, a second arrow leads to a declined application with a payment error and a retry button.
I’ve looked at the requirements and the mockup. Shall I start on the integration?
Yes, go ahead
Mark is connecting Klarna
Done! The Klarna integration is in build 1.6 — it’s already on the test environment and connected to Klarna’s test environment. You can start testing!
Run the smoke test
Quickly check whether build 1.6 is ready for further testing. You can tick a check only after you have run it in the form.
- Run this check in the form first
- Run this check in the form first
A smoke test does not check features in depth — only that the essentials open and are available. We will check submitting the application in detail in the next step.
Test the new feature — the instalment form
Check the instalment form against the PM’s requirements. You can tick a check only after you have run it in the form.
- Run this check in the form first
- Run this check in the form first
- Run this check in the form first
- Run this check in the form first
Were you able to test the Klarna integration?
Check the fix
Mark, the new feature in build 1.6 failed testing: the instalment application does not reach Klarna. After submitting, “Integration error” is shown, and there is no decision from Klarna. I’ve filed bug report and attached a screenshot.
Thanks, found it! We were passing the income to Klarna in the wrong format, so Klarna rejected the application. The mock accepted any data, so this was not visible before. I’ve fixed it and deployed build 1.6.1 — please check.
Repeat the steps from the bug report: choose Klarna, fill in the term and income, and submit the application.
Submit the application in the form to check the fix.
Look at the form again: there is no integration error any more, and Klarna returned a decision on the application. The defect is fixed.
This is a retest: you repeated the steps from the bug report and made sure the defect is gone. But a retest covers a single scenario — now let’s go through the whole chain.
System end-to-end testing
Go through the customer’s journey from start to finish: form → our service → Klarna → decision → order status. Klarna test data: income of €1,000 or more is approved, less is declined.
- Run this check in the form first
- Run this check in the form first
- Run this check in the form first
- Run this check in the form first
Run regression testing
The integration changed the shared payment form. Check that the existing payment methods still work.
- Run this check in the form first
- Run this check in the form first
- Run this check in the form first
Make the release decision
All checks are done. Is build 1.6.1 ready for release?
Krista, testing of build 1.6.1 is complete. The integration defect is fixed, and E2E with Klarna’s test environment has passed: approval, decline, and the order status all work. Regression has passed, and there are no open defects — the build is ready for release.
Great, thank you! Let’s release.
Krista gave the go-ahead. Shall I deploy build 1.6.1 to production?
Yes, deploy it
Mark is deploying the release
Done! Build 1.6.1 is in production.
Hi everyone! Paying in instalments with Klarna now works for real — with a choice of instalment term.
Testing complete!
- Smoke — checked that the build was ready for testing.
- New feature testing — found an integration defect when submitting the application.
- Retest — confirmed the fix in build 1.6.1.
- System / E2E testing — went from the form to Klarna’s decision and the order status with the real service.
- Regression — checked that the existing payment methods still work.
- Release — decided that the build was ready for release.
Amount due: €49.90
Integration error
No response was received from the payment service. Please try again later.
Bank payment page · test mode
My orders
Quick reference
Smoke testing
A short check of the most important functions of a new build: does the application open, do the key elements work. If the smoke test fails, the build goes back to the developer — further testing makes no sense.
Retesting
Checking a specific defect again after it has been fixed: you repeat the steps that reproduced it and make sure the defect is gone.
New feature testing
Checking that a new feature works according to the requirements: the main scenario, alternative scenarios, and error handling.
Regression testing
Checking that the changes have not broken what already worked. It helps to define the regression set in advance — before work on the new feature starts.
System end-to-end (E2E) testing
Checking the user’s whole journey through all connected systems: the interface, our server, external services (for example, a payment service), and back to the result the user sees. Such checks find defects at the joints between systems that are invisible when each part is tested on its own.
Mocks and test environments
A mock stands in for an external service and answers the way the developer intended, so it accepts wrong data too. An external service’s test environment is the real service with test data: it checks requests for real, but no real money is charged. E2E needs exactly that.
Business outcome or technical failure
Klarna declining instalments is an expected business outcome described in the requirements. An integration error is a technical failure: the request was not processed. On a decline the customer sees “Payment failed”; on an integration error there is no decision from Klarna at all.