ParaBank Automation Testing
UI and API automation for an online banking demo - with four tests left failing on purpose
- Test cases
- 43
- Spec files
- 9
- Application bugs found
- 8
Overview
ParaBank is Parasoft's demo online banking application. It is a useful target precisely because it is imperfect: transfers, bill payments, loan requests, and account management all work well enough to automate, and several of them are broken in ways worth catching.
The suite covers nine modules across UI and REST API. Forty-three test cases run in just over three minutes: thirty-nine pass, four fail. The four failures are not flaky tests or unfinished work - they are ParaBank behaving incorrectly, and they are left red on purpose. The published report below is that run, not a cleaned-up version of it.
Objective
Build a suite that can be re-run any number of times without data collisions, verifies what the application actually sends rather than only what it displays, and reports application defects honestly instead of being tuned until it is green.
Testing scope
Login
- Valid login, logout, and session handling
- Rejection on unknown username, wrong password, and empty fields
- Password field masking, and access to internal pages without a session
Register
- Successful registration with complete data
- Duplicate username, empty required fields, mismatched password confirmation
Transfer Funds
- Transfer between own accounts, with balances verified afterwards
- Amount of zero, negative amount, and amount exceeding the source balance
Account, Bill Pay, Find Transactions, Loan, Update Profile
- Opening CHECKING and SAVINGS accounts and seeing them in the overview
- Bill payment with balance deduction verified
- Transaction search, loan request, and profile update
REST API
- Login, account, transaction, and transfer endpoints checked directly
Test strategy
- Selectors are read from the real markup rather than guessed: id, then name, then stable attributes, then text. Generated classes and nth-child are avoided. Register and Update Profile use ids containing a dot (customer.firstName), handled with an attribute selector instead of escaping.
- The suite is re-runnable by design. ParaBank's database is reset once per run through a Node-level memoised task, and every spec registers its own customer with a timestamped username. The shared john/demo account is deliberately not used: its balances shift constantly, and during development it disappeared entirely until the database was reset.
- Preconditions that are not the thing under test - a second account, an existing transaction - are created through the REST API, so a broken UI elsewhere cannot fail a test about transfers. The UI flow is still what gets tested, and balances are cross-checked through the API so assertions do not rest on rendered text alone.
- Intercept patterns are written as regular expressions, not globs. ParaBank injects ;jsessionid=... into form URLs, so a glob never matches and cy.wait() times out with "No request ever occurred" - which is exactly what happened before the patterns were changed.
- Empty-field expectations follow the application's real behaviour rather than one blanket rule: where validation is client-side, the assertion is that no request was sent at all; where it is server-side, the request is expected and what gets checked is the payload and the validation message that comes back.
- Uncaught exceptions are filtered by keyword, not switched off. ParaBank has JavaScript errors of its own; ignoring all of them would hide real defects, so only the known ones are allowed through and anything else still fails the test.
Architecture
- GitHub Actionspush & pull request, Node 22, Chrome
- Database resetonce per run, memoised
- Unique user per specregistered through the API
- Spec + Page Object9 specs, 8 page objects
- Mochawesome reportscreenshots & video on failure
Implementation
Cypress.Commands.add('registerUniqueUser', () => {
const username = `qa${Date.now()}`;
return cy.fixture('users').then((users) => {
const profile = users.profile;
const password = users.defaultPassword;
// ParaBank butuh JSESSIONID aktif sebelum form register diproses.
cy.request('/parabank/register.htm');
cy.request({
method: 'POST',
url: '/parabank/register.htm',
form: true,
body: {
'customer.firstName': profile.firstName,
'customer.username': username,
'customer.password': password,
repeatedPassword: password,
},
})
.its('body')
.should('include', 'created successfully');
});
});// KNOWN ISSUE (BUG-03): ParaBank menerima transfer dengan nominal negatif.
// Efeknya arah transfer terbalik tanpa validasi apa pun.
it('TC-TRF003 : transfer dengan nominal negatif ditolak', () => {
const amount = Number(users.transfer.negativeAmount);
cy.intercept('POST', /\/services_proxy\/bank\/transfer/).as('transferRequest');
cy.apiGetAccount(sourceAccountId).then((sourceBefore) => {
transferPage.transfer(amount, sourceAccountId, targetAccountId);
cy.wait('@transferRequest')
.its('response.statusCode')
.should('be.gte', 400);
cy.apiGetAccount(sourceAccountId).then((sourceAfter) => {
expect(sourceAfter.balance, 'saldo akun sumber tidak berubah').to.eq(
sourceBefore.balance
);
});
transferPage.assertTransferRejected();
});
});Results
43
Test cases
39
Passing
across 9 spec files
4
Failing on purpose
application defects, not flaky tests
8
Bugs documented
including a negative transfer that reverses direction
3m 11s
Full suite run time
43 tests, 9 spec files, one pass