Skip to content
Tutorials Center
My learning

Topics

Lesson 21 of 60 Β· Test Design Techniques

Experience-Based Testing

Learn experience-based testing: error guessing, exploratory testing, checklists, fault attacks, test charters and session-based testing, with a nasty-input generator.

Every technique so far works from a document: a requirement, a model, a table, the code. But a seasoned tester also carries something no document holds: memory. They remember that date fields break on 29 February, that names contain apostrophes, that "Save" fails when the network drops half way, and that the feature written in a hurry before a holiday is usually the buggiest one.

Experience-based testing uses that knowledge, together with curiosity and judgment, to design and run tests. It does not replace the systematic techniques: it complements them, finding the defects that formal design misses because nobody thought to write them down. It is also the main tool when requirements are poor or time is short.

Four experience-based approaches

Error guessing Predict where bugs hide from past defects.
Exploratory Learn, design and test at the same time.
Checklist-based Work through a list of proven checks.
Fault attacks Try to break the system on purpose.

They share one idea, skilled people choose the next test based on what they just learned.

1 / 2

Error guessing

Error guessing means listing the mistakes developers and users are likely to make, then designing tests to expose them. The list comes from your own experience, from defect reports of earlier releases, and from the common failure patterns of the technology.

Typical guesses are the same across products, which is why they are so valuable:

  • Empty and missing data: blank fields, a missing file, no selection in a drop-down.
  • Boundaries and limits: 0, 1, -1, the maximum length, the largest number the field accepts.
  • Text oddities: leading and trailing spaces, apostrophes, quotes, accents, emoji, very long words, text pasted from another document.
  • Dates and times: 29 February, the end of a month, a daylight saving change, midnight, time zones.
  • Sequences: double click, back button, refreshing during a save, doing a step twice.
  • Environment: slow or lost connection, full disk, permission denied.

Error guessing is only as good as the guesser, so keep a defect taxonomy: a list of past bugs grouped by type ("off-by-one", "encoding", "race condition"). Each new project starts with a ready-made set of guesses.

A nasty-input generator

The stand-in below produces a reusable set of troublesome inputs for text fields and number fields. In real life you would keep such lists in a spreadsheet or a test tool; here they are in code so you can print and reuse them. Some characters are built with String.fromCodePoint so that the invisible ones are visible in the source.

JS A bank of nasty inputs

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Some of these entries look odd, and that is deliberate. max safe + 2 is a number JavaScript cannot tell apart from its neighbour; 0.1 + 0.2 is not exactly 0.3; the right-to-left override character reverses how the text is displayed and has been used in spoofing attacks.

Using the bank on real code

The next stand-in is a small function that builds a person's initials from a name. It looks fine for "Ann Lee". Feeding it the nasty inputs shows how quickly such a function breaks, and the fixed version shows the repair. The probe classifies each result as a crash, a broken output, an empty result or fine.

JS Nasty inputs against a function

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Three different defects show up. Empty text, only spaces and a double space crash the buggy function, because splitting on a single space produces empty words. The emoji case breaks because w[0] takes half of a character that JavaScript stores as two units, and the output is no longer valid text. The fixed version splits on any run of whitespace, drops empty words and takes the first full character. Empty input now returns an empty string, which the calling code must still handle: a good tester asks what the screen shows then.

Exploratory testing

Exploratory testing is simultaneous learning, test design and test execution. Instead of writing every case in advance, the tester starts with a goal, tries something, watches what the system does, and chooses the next test based on that. It is not random clicking: it is disciplined, and the notes make it reviewable.

It works best when the product is new to the team, when requirements are thin, when there is little time, and as a complement to scripted regression tests that check only what someone already thought of. A longer treatment with heuristics and a practice session is in Exploratory Testing in Practice.

Checklist-based testing

A checklist is a short list of things to verify, kept between a full test script and nothing at all. It captures the team's experience in a form that can be reused. A checklist is high-level on purpose: each line leaves the tester free to choose the exact data.

A short checklist for any form might read:

Check Example prompt
Required fields Submit with each required field empty in turn
Length limits Minimum, maximum and one beyond the maximum
Special characters Quotes, accents, emoji, markup
Error messages Are they clear, specific and next to the field?
Keyboard Can I complete and submit the form with Tab and Enter?
Double submit What happens on two quick clicks on Submit?
Persistence After saving and reopening, is everything as entered?

Because the list is generic, it is easy to maintain, and it improves each time a bug escapes: add the missing check. The weakness is that testers may follow it mechanically, so refresh it regularly.

Fault attacks

A fault attack (the term is associated with the testing practitioner James Whittaker's work on "software attacks") is a deliberate attempt to trigger a known class of failure, not just to check a requirement. Instead of asking "does it do what it should?", you ask "can I make it fail the way software like this often fails?". Examples:

  • Input attacks: over-long strings, wrong types, special characters, huge files, a file with the wrong extension.
  • State attacks: use the back button, resume an old session, open the same record in two tabs and save in both.
  • Resource attacks: low memory, low disk, offline mode, slow network.
  • Error attacks: force every error message to appear and check that the app recovers.
  • Interruption attacks: change screen orientation, lock the phone, receive a call mid-transaction.

Attacks pair naturally with the nasty-input bank above: the bank supplies the data, and the attack list supplies the situations.

Test charters and session-based testing

Freedom needs a frame, or exploration turns into wandering. Session-based test management provides one. Work is split into sessions: uninterrupted blocks, typically 60 to 120 minutes, each with a charter that states the mission in one or two sentences. A common template is:

Explore [area or feature] with [resources, data, tools] to discover [information or risks].

For example: "Explore the signup form with unusual names and addresses to discover validation and encoding problems."

During the session the tester takes notes and logs bugs, questions and ideas. After it comes a short debrief with a lead or teammate. Sessions also record how time was spent, usually in three buckets: test design and execution (actual testing), bug investigation and reporting, and setup (preparing data and environments). A session that spent most of its time on setup tells you something about the environment.

JS A session sheet and its metrics

Press Run (or Ctrl + Enter) to see the console output here.

No output.

The numbers are not a performance review. They are a conversation starter: a low testing share suggests poor setup, a high bug count suggests the area is risky and deserves another session, and a session that finds nothing can still be useful if it shows the area is solid.

Strengths and weaknesses

Experience-based testing is fast to start, needs little documentation and finds surprising defects, particularly in the gaps between requirements. Its weaknesses are the other side of the same coin: results depend on the tester's skill, coverage is hard to measure, and it is difficult to repeat exactly. The usual remedy is to combine it with systematic techniques such as equivalence partitioning and boundary value analysis, and to keep notes so that findings turn into permanent test cases and checklist items.

When an exploratory session finds a bug, ask two questions: "which scripted test should have caught this?" and "what similar places might have the same problem?" The first improves the regression pack; the second becomes the charter for the next session.

Check your understanding

Quick check Β· 5 questions

of 5 answered You scored / 5 Β· perfect!

  1. 1. What is error guessing?

    Error guessing uses knowledge of common and past defects to target the places where bugs most likely hide.
  2. 2. Which statement best describes exploratory testing?

    Exploratory testing combines learning, design and execution; it is disciplined, with a charter and notes, not random clicking.
  3. 3. Which is a well-formed charter?

    A charter names an area, the resources or data to use and the information sought, so the session has a mission without prescribing steps.
  4. 4. Why does the initials function crash on the input 'Ann Lee' (two spaces)?

    'Ann Lee'.split(' ') yields an empty string between the spaces; its first character is undefined, so toUpperCase fails.
  5. 5. What is the main weakness of experience-based testing?

    Because the tests are chosen by people on the fly, quality varies and coverage is difficult to prove, so teams combine it with systematic techniques.

Summary

  • Experience-based techniques use the tester's knowledge to find defects that documents and models miss.
  • Error guessing targets likely mistakes (empty data, limits, odd text, dates, sequences); keep a defect taxonomy and a bank of nasty inputs.
  • Exploratory testing blends learning, design and execution, kept disciplined by charters, time boxes, notes and a debrief.
  • Checklists capture experience in a reusable list; fault attacks try to trigger known classes of failure.
  • Combine these approaches with systematic design techniques, and turn findings into permanent checks.

Continue with Test Strategy and Test Plan.