In brief
Test automation in a bank starts with one business process that runs through several systems and changes in every release, not with a tool and not with the screens of one application. The API and message layer pays off most, because it is more stable than the user interface. Before you write the hundredth test, settle three things: where test data comes from, which environment runs the tests every night, and who fixes a test when a vendor's system changes.
Why a bank is harder than a single product
In a company with one application, automation is usually a test suite in that application's repository. In a bank, a single transfer passes through online banking, the API layer, the payment system, the core banking system, the AML module and the data warehouse. Each of these systems has a different owner, a different vendor and a different release cycle. Some run on a mainframe or IBM i, others in containers.
This creates three obstacles that automation textbooks rarely mention:
- A test result depends on several systems at once. The online banking transfer test fails because the core system in the test environment has a closed business day, not because the application has a bug.
- Data is shared and gets used up. After a hundred transfers, a test account has no daily limit left, and yesterday's run left a test customer with a blocked card.
- Nobody owns the whole process. The mobile app team is responsible for its screens, not for whether the transfer was posted in the core system.
So a bank's automation plan is first a plan for working with processes and dependencies, and only then a tool choice. General rules for choosing tests are covered in Test automation: where to start in a project.
A map: processes, systems and layers
Spend the first week on a map. List the 10–15 processes the bank regression tests with every release and, for each, the systems it passes through. Then rate each process on three things: how often one of its systems changes, how much a production defect costs, and how many hours manual regression takes today.
| Process | Systems on the way | Best test layer | Notes |
|---|---|---|---|
| Domestic transfer from online banking | front end, API, payments, core | channel API and messages to the payment system | check the posting in the core with a query |
| Opening an account online | front end, identity verification, CRM, core | process API, a few screen tests | replace identity verification with a stub |
| Personal loan application | front end, decision engine, credit bureau, core | decision engine API and decision tables | test rules separately, the process via API |
| Blocking a card | mobile app, card system | API, one test on a device | card messages through a simulator |
| Month-end interest accrual | core, data warehouse | batch jobs and result comparison | run after shifting the business date |
Such a table usually shows that two or three processes account for half of the manual regression work. Start with those. Risk-based selection is covered in more depth in Risk-based testing.
The API layer instead of screens
In a bank, UI tests are the most expensive to maintain: screens change often, and one test goes through login, strong customer authentication and several redirects. A test of the same transfer through the channel API takes seconds and fails only when the contract changes.
A practical split looks like this:
- Contract tests between teams: they check that the consumer's and provider's APIs match, without a full environment.
- Process API tests: transfer, account opening, application. They call each step and check the effect in the systems along the way, for example the balance and history in the core.
- Message and batch tests: files for the clearing house, payment messages, reports from the core. They compare the result with the expected pattern field by field.
- A few screen tests for the key customer journeys in online and mobile banking, run less often.
Systems you cannot call in the test environment are replaced with simulators. When this makes sense and when it distorts the result is described in Service virtualization in testing.
Data, environments and vendors
Most failed automation programs in banks do not fail on the tool. They fail on data and environments. Three rules save months:
- Each test creates its own data or takes it from a pool reserved for automation. The customer and the account are created via API at the start of the test, so yesterday's run does not break today's.
- Tests have a fixed environment and a time slot. The nightly regression needs an environment where nobody deploys a version at the same time. Bookings and version consistency are covered in Test environments in a bank.
- Personal data stays out of tests. An unmasked copy of production is a legal and operational risk. The delegated regulation under DORA (the EU Digital Operational Resilience Act) on the ICT risk management framework allows non-production environments to hold only anonymized, pseudonymized or randomized data, and exceptions need approval and a time limit.
Vendors are a separate matter. When an external company develops the payment system, it is worth writing into the contract that each release comes with a list of API changes and updated contract tests. Otherwise the bank's automation team learns about the change from a red report.
A plan for the first 90 days
| Period | What the team does | Result |
|---|---|---|
| weeks 1–2 | process map, choice of two processes, decision on layers and tools | a list of tests to write, owners |
| weeks 3–6 | the skeleton: data creation via API, running in CI, reporting | the first tests of process A run every night |
| weeks 7–10 | process B, simulators of dependent systems, contract tests with one team | two processes without manual regression |
| weeks 11–13 | measurement: regression time, share of flaky tests, defects caught before UAT | a decision on the next processes |
The measure of success is not the number of tests. What counts is shorter manual regression before a release and the share of tests the team trusts. A test that fails once a week for no reason is worse than no test, because it teaches people to ignore a red report.
B2Bnetwork engineers have been testing bank systems since 2015 and build this kind of automation on the API layer, in CI, with data created by the tests themselves. The scope of work is described on the Test automation page, and an example from a microservices program is the API and contract testing case study.
Questions and answers
How long does it take to automate regression testing in a bank?
The first process can usually be automated in 4–6 weeks, including the skeleton for creating data and running in CI. The next ones go faster because they reuse the same building blocks. Full regression of a dozen or so processes takes several quarters, but the effect is visible after the first process: fewer hours of manual regression before each release.
Should you automate tests of a system that a vendor develops?
Yes, but at the level of the interface the bank receives from the vendor: APIs, messages, files. The vendor tests the inside of the system. The bank checks whether a new version breaks the processes that run through it. It is worth putting the exchange of contract tests and a notice period for interface changes into the contract.
Can you run automated tests on a copy of production data?
It is not worth it. Customer data in a test environment must be anonymized or pseudonymized, and exceptions need approval and a time limit. Automated tests need data in a known state anyway, so it is better to create it via API at the start of the test than to look for a matching customer in a production copy.
Which tool should you start with?
The one that fits the layer and the team's skills. For APIs, a framework in the team's language (Java, Python, TypeScript) is enough; for browser screens, Playwright or Selenium; for contracts, Pact. Shared libraries for creating data and a report that the release manager actually reads matter more than the tool choice.