Module 25 · Advanced · 9 min read

Writing test scripts and scenarios

You will be able to: Write a script with preconditions, steps and expected results; Include ledger checks, negative tests and role tests; Design a scenario list for a distributor.

  • Read not done yet
  • Self-check: not taken not done yet
  • Lesson complete not done yet

A good test script can be run by someone who was not in the workshop. It names the data, tells the tester exactly what to do, and says what they must see. 'Check it works' is not an expected result.

Script template

FieldContent
ID and titleTS-OTC-01, Cash-on-credit sale with VAT
Requirement IDR-02
PreconditionsCustomer C001 credit limit AED 20,000; item I-100 price AED 100, cost AED 60, stock 50; user with Sales role
StepsNumbered, one action each
Expected resultSpecific figures and screens
Ledger checkWhat Posting Trail and reports must show
Result and testerPass or Fail, name, date, defect ID
TS-OTC-01 in fullSteps: 1) Open Sales Invoice, press New. 2) Pick customer C001. 3) Add item I-100, quantity 10 at AED 100. 4) Submit. Expected: net AED 1,000, VAT at 5% AED 50, total AED 1,050; the document gets a number from the invoice series. Ledger check in Reports, Posting Trail: receivable debit 1,050, sales credit 1,000, VAT output credit 50, cost of goods sold debit 600 (10 x 60) against inventory. Stock of I-100 falls from 50 to 40. Aged receivables for C001 shows 1,050.

Beyond the happy path

  • Negative tests: invoice over the credit limit (blocked or warned as configured), a document dated in a closed year, a duplicate customer LPO, missing TRN where required.
  • Corrections: amend a submitted invoice (the number gets /A1), cancel one, issue a credit note.
  • Role tests: log in as each role and try an action it should not have. A screen outside the role or licence shows Access Restricted, and a button the role may not use is refused with the missing permission named.
  • Approval tests: an invoice above the approval threshold waits for the approver; the approver, not the raiser, approves it.
  • Output tests: print on every real printer and paper size, and export to PDF.
  • Month-end tests: bank reconciliation, VAT Return Worksheet, trial balance equals zero difference.
ProcessScenarioPriority
SalesQuotation to order to delivery note to invoice to receiptMust
SalesCredit limit exceededMust
SalesReturn with credit noteMust
PurchasePO to GRN to purchase invoice to paymentMust
StockTransfer between warehouses and an adjustmentShould
POSCash sale, card sale, shift closeMust for retail
FinanceReceipt allocation to oldest invoices; PDC deposit and clearanceMust
VATReturn Worksheet equals reportsMust
RolesEach role's allowed and refused actionsMust
TipWrite the expected figures before the tester runs the script. If the system and the script disagree, one of them is wrong, and you want to know which.

Practise in the demo

  1. Write a script for a purchase of 20 units at AED 50 plus 5% VAT with the expected receivable-side and stock results.
  2. In the demo, run a small sale and look at Reports, Posting Trail to confirm the entries.
  3. Open https://demo.zeyto.app/demo-app/ and sign in with the demo login. This is a public demo with sample data, so nothing you do there affects a real business.
Open the live demo

Public demo company, sign in as admin / demoAdmin123. Data refreshes nightly.

Key takeaways
  • A script has preconditions, numbered steps, specific expected results and a ledger check.
  • Test negative cases, corrections and roles, not only the happy path.
  • Write the expected figures first.

Check yourself

3 questions on this lesson. Not timed, not the exam, and you can try again. Score 60% or more, and read the lesson, to complete it.

1. A test script should state a specific expected result, not just 'check it works'.

2. In script TS-OTC-01 a sale is 10 units at AED 100 with 5% VAT. What is the invoice total?

3. In a role test a storekeeper opens an Accounting screen they should not have. What is the expected result?

Practice questions for this module · Printable study sheet