Skip to content
All projects

Automating tests of the purchase path and payments across multiple countries

Project write-up

The client is described by industry and scale, without a name. KPI figures are targets agreed with the client after a baseline measurement.

In brief

Problem
Every country has different payment methods, delivery options, currencies, and regulations.
Approach
We automate the purchase path across a country × payment method × delivery matrix, with tests on payment providers' sandbox environments.
Goal
Full regression time: from days to hours, target ≤ 8 h; Share of automated regression cases: ≥ 70% of critical paths.

Client context

Online retail runs on the rhythm of campaigns and seasonal peaks: Black Friday, the holidays, sales. An outage at the peak means lost revenue that cannot be recovered. The client is an interior furnishings online store selling in several EU countries, with different payment and delivery methods.

Challenge

Every country has different payment methods, delivery options, currencies, and regulations. Manual tests do not cover all combinations, and payment errors surface after release.

Requirements and constraints

  • PCI DSS v4.0 applies to anyone who processes payment card data. Version 4.0 tightens the requirements for multi-factor authentication, scripts on payment pages, and segmentation penetration tests. (source)
  • The Omnibus Directive and the Polish act on price information require showing the lowest price from the 30 days before a discount, and disclosing how reviews are verified and whether the seller is a business. The pricing engine and the catalog must store price history. (source)
  • The European Accessibility Act (Directive 2019/882) and the Polish act on ensuring compliance with accessibility requirements have covered, since June 28, 2025, consumer banking, e-commerce, and communications services, among others. Digital channels must meet accessibility requirements, and failing to do so risks fines and inspections by the market surveillance authority. (source)
  • Project constraints: work only on anonymized or synthetic data outside production, access to systems through the client's infrastructure, and every deliverable shipped with documentation that the client's team can take over.

Approach and architecture

We build automation following the test pyramid: the most tests at the unit and API level, fewer at the interface level, and end-to-end scenarios only for critical business paths. The framework is built as a product (with code reviews, versioning, and documentation) and runs in the CI pipeline from the first sprint, so that the development team gets feedback in minutes, not after a week.

We automate the purchase path across a country × payment method × delivery matrix, with tests on payment providers' sandbox environments. Smoke tests run every hour in production with test accounts.

Key elements of the solution:

  • A country × payment × delivery matrix
  • Tests on payment gateway sandboxes
  • Synthetic monitoring of the purchase path in production
  • A per-country report

Team and roles

RoleCountResponsibility
Test automation engineer2framework, scripts, CI integration
QA lead1organizing the testers' work, test case reviews, defect metrics
Product owner and domain experts (client side)as neededpriorities, business decisions, acceptance

Phased schedule

PhaseWeeksDeliverable
1. Regression audit and candidate selection1–2automation map, cost-benefit calculation
2. Building the framework and CI integration3–5framework, pipeline, test code standard
3. Automating critical paths6–11smoke and regression suites
4. Stabilization and reporting12–14quality dashboard, quarantine for flaky tests
5. Handover and team training15–16documentation, workshops, maintenance plan

Technology stack

Playwright, TypeScript, GitHub Actions, payment gateway sandboxes, Grafana.

Risks and how we mitigate them

RiskHow we mitigate it
Flaky automated teststest quarantine, root cause analysis, stable selectors, and independent data
Dependence on an external vendor and its deadlinesearly agreement on API contracts, a stub environment, a weekly dependency review
Unavailable or unstable test environmentsan environment booking schedule, virtualization of external services (mocks), a daily environment smoke test

Measurable goals and KPIs

The values below are targets that we agree with the client after a baseline measurement in the first phase.

KPITargetHow it is measured
Full regression timefrom days to hours, target ≤ 8 hsuite run time in CI
Share of automated regression cases≥ 70% of critical pathstest repository
Critical defects found after go-live0 critical defects in the first 30 daysproduction incident register

Lessons learned and good practices

Synthetic monitoring in production detects payment provider outages faster than customers do. The matrix of combinations has to be limited to those that actually occur in traffic. A flaky test is worse than no test, because it undermines trust in the whole suite.

Why B2B.net

B2B.net S.A. has operated since 2015 and has worked for more than 50 brands, mainly where audits are routine: in banks, insurers, and critical infrastructure. We are an accredited exam center, so a test methodology is not a declaration for us but a working standard. We give a first proposal of specialists within 24 hours, and a team can start within 5 business days.

Acceptance criteria

Each phase ends with a formal acceptance against criteria agreed at the start. In this implementation, acceptance covers: automation map, cost-benefit calculation; framework, pipeline, test code standard; smoke and regression suites; quality dashboard, quarantine for flaky tests; documentation, workshops, maintenance plan. Final acceptance requires a KPI measurement report against the baseline, complete documentation handed over to the client's team, and a list of recommendations for the next stage, with a cost and risk assessment for each.

Next step

Facing a similar challenge? Write to office@b2bnetwork.pl or call +48 577 317 312. You will get a first proposal of specialists or a plan for the first step within 24 hours.

What would this look like for you?

Book a 30-minute call. We will prepare a plan for the first weeks and a team matched to your system.

Let's talk

B2Bnetwork · B2B.net S.A. · accredited exam center. We describe clients by industry and scale, without names.

More projects: E-commerce