QA and Test Automation · Lab 2 of 35

Exploratory testing session: charter, heuristics, session notes and a debrief

Run a real 60-minute exploratory session on a shop with hidden bugs. Write a charter, test with four heuristics (boundaries, state changes, two users, CRUD), keep timed session notes, debrief, then switch the bugs off to see what you found and what you missed.

⏱ 75 minBeginner💸 Free8 steps

ShopRung (mystery mode)Chrome or Firefox DevToolsSQL consoleMarkdown worksheets

Overview video

1 / 6

0 of 8 steps done

What you will build

A complete session-based exploratory test on ShopRung, the way testing teams run them: a written charter, a strict time box, session notes with a timestamp and a tag on every line, and a debrief that says what you covered, what you found and what is still untested.

ShopRung runs in mystery mode: a hidden set of bugs is switched on and their names are hidden, so you test like you would at work, without knowing the answers. At the end you switch the bugs off and compare, so you know exactly what you found and what you missed.

You keep four worksheets you can reuse on any product: charter.md, session-notes.md, four tour sheets and debrief.md.

Before you start

Setup

S1Have ShopRung ready (lab 1)

Install Node.js and download ShopRung exactly as in lab 1, Setup. If ShopRung is running now, stop it with Ctrl+C: the next step starts it again in mystery mode. Open a terminal in the shoprung folder.

S2Start ShopRung in mystery mode

SHOPRUNG_BUGS=mystery switches on a hidden set of bugs. The names stay hidden in the terminal, in the shop and in the API. On Windows the setting stays on in that PowerShell window until you close it.

Already running and do not want to restart? On macOS or Linux send this instead (it prints 200):

curl -s -o /dev/null -w "%{http_code}\n" -X POST http://localhost:8080/api/test/bugs -H "Content-Type: application/json" -d '{"enabled":["mystery"]}'

Set this way, mystery mode lasts until ShopRung stops.

Run
SHOPRUNG_BUGS=mystery npm start
You should see
ShopRung is running at http://localhost:8080
  API: http://localhost:8080/api/products   SQL console: http://localhost:8080/sql
  Bug switch: mystery mode (names hidden)

S3Start from clean data

In a second terminal (leave ShopRung running in the first). Reset puts every product, order and account back to the seed data. It does not change the bug switch, so mystery mode stays on.

Run
curl -X POST http://localhost:8080/api/test/reset
You should see
{"status":"reset"}

S4Two browser windows, two customers

Open http://localhost:8080 in a normal window and log in as alice@shoprung.test / Alice123!. Then open a private window (Chrome and Edge: Ctrl+Shift+N, Mac Cmd+Shift+N; Firefox: Ctrl+Shift+P, Mac Cmd+Shift+P), open the shop there and log in as bob@shoprung.test / Bob12345!. A private window keeps its own login, so both customers stay logged in at once.

In both windows a yellow bar under the header says: Bug switch: mystery mode is on (some bugs are on, names hidden).

1

Write the charter

One page that says what you will explore, with what, to find out what, and for how long.

Exploratory testing is not random clicking. You design and run tests at the same time, but inside a charter: a short mission that keeps you on target. A useful pattern is Explore (the target) with (resources, tools, data, techniques) to discover (the information you want).

Create a folder called exploratory-session and save the charter below as charter.md. Change the tester name. Keep the time box: 45 minutes of testing is long enough to go deep and short enough to stay focused. Split it into four short tours, one per heuristic.

A heuristic is a rule of thumb that suggests where bugs hide. You will use four: boundaries (bugs live at the edges of every limit), state changes (bugs live in moves between statuses), two users (bugs live where one person's data meets another's) and CRUD (create, read, update, delete each thing the product stores).

Do not scroll past step 7 until your session is over: step 8 shows a filled-in example.

charter.md
# Charter: cart, coupons and orders

**Explore** the cart, coupon and order flow of ShopRung 1.0.0
**with** the requirements (CART, PRICE, ORD), two customer accounts,
the browser DevTools and the SQL console
**to discover** where the shop breaks its own rules at the edges:
limits, status changes, and one customer's data reaching another.

| Field        | Value                                                   |
| ------------ | ------------------------------------------------------- |
| Tester       | (your name)                                             |
| Build        | ShopRung 1.0.0, mystery mode on                         |
| Time box     | 60 min: 5 setup, 45 testing, 10 debrief                 |
| Heuristics   | Boundaries, state changes, two users, CRUD              |
| Accounts     | alice@shoprung.test, bob@shoprung.test                  |
| Out of scope | Look and feel, speed (SRCH-5), password rules (ACC-5)   |

## Areas and time
1. Boundaries: quantity, stock, coupons, shipping (12 min)
2. State changes: place, pay, cancel, and the stock (12 min)
3. Two users: Alice and Bob at the same time (11 min)
4. CRUD: create, read, update, delete on cart and account (10 min)

## Stop when
- the 45 minutes are up, or
- something blocks the rest of the charter (log it as ISSUE and stop).
  1. Explore ... with ... to discover: the target, the resources, and the information you want. One sentence your lead can read in ten seconds.line 3
  2. The mission is about information, not "find bugs". Knowing a flow works at its edges is a result too.line 6
  3. The time box. Setup and debrief are inside the hour, so the session ends on time.line 13
  4. The four heuristics become the four tours of the session.line 14
  5. Saying what you will not test is part of the charter. It stops a 45-minute session turning into three hours.line 16
  6. A stop rule. If checkout is completely broken, you report it and stop: the rest of the charter cannot be tested.line 24
Why this way? Without a charter a session drifts to whatever looks interesting, and nobody can tell what was covered. With one, an hour of exploring is as reportable as a test case run.
2

Prepare the session notes, then start the timer

A notes sheet where every line has a time and a tag, ready before the clock starts.

Save the template below as session-notes.md and fill in the header. Then start a 45-minute timer and write the first line at 00:00.

Write a line every time you try something, not only when something breaks. Times are minutes from the start (00:12). Each line gets one tag: TEST (what you tried and what happened), BUG (a broken rule, with its requirement id), Q (a question for the team), IDEA (a test for later, outside this charter) or ISSUE (something that slowed you down).

Keep the requirements open in a tab: http://localhost:8080/#/requirements. When you see something odd, find the rule first. No rule broken? It is a Q, not a BUG.

session-notes.md
# Session notes

Charter: charter.md
Tester:
Date and start time:
Build: ShopRung 1.0.0 (GET /api/health), mystery mode on
Data: reset with POST /api/test/reset at the start

## Tags
TEST   what I tried and what happened
BUG    the shop broke a rule (write the requirement id)
Q      a question for the team: unclear rule or odd behaviour
IDEA   a test for later, outside this charter
ISSUE  something that slowed me down or blocked me

## Log
| Time  | Tag  | Note |
| ----- | ---- | ---- |
| 00:00 | TEST |      |

## Time split (fill in at the end)
Setup: __ min | Testing: __ min | Bugs (investigate + write up): __ min
  1. Write the build. A bug note is useless if nobody knows which version it was found on. http://localhost:8080/api/health shows "version":"1.0.0".line 6
  2. TEST lines are your coverage. In the debrief they prove what you tried, even where nothing broke.line 10
  3. Q is for "is this right?". Unclear rules are worth reporting too, and they are often where the next bug hides.line 12
  4. At the end you split the time three ways. If most of the session went to setup or to bug write-ups, the next charter needs to be smaller.line 21
Stuck on this step?
Writing notes slows me down
Keep each line short: what you did, what happened. "4 x notebook $50.00, SAVE10 refused" is enough. You add detail later, only for BUG lines.
3

Tour 1: boundaries (12 minutes)

Test every limit in the cart and pricing rules at, just below and just above the edge.

Rules with numbers (1 to 10, $50.00 or more, stock 3) break most often at the edge: a developer types > where the rule says >=. Test the value on the boundary and the values on each side.

Work through the sheet below as Alice. To add a quantity, click a product name to open its page, type the number in Quantity and click Add to cart. The Cart link in the header shows the totals and has the Coupon code box. Remove every line between ideas so one test does not affect the next.

The last column is what the rule says, not what ShopRung does. Watch the toast message at the bottom of the screen and the totals, and write a line in session-notes.md for every idea. If something breaks a rule, try the value next to it too: it shows you where the edge really is.

tours/1-boundaries.md
# Tour 1: boundaries (12 minutes)

Empty the cart between ideas (Remove), so one test does not change the next.
Write what you saw in your session notes, with the time and a tag.

| #  | Try this                                                 | Rule    | The rule says |
| -- | -------------------------------------------------------- | ------- | ------------- |
| 1  | Green Build Mug page, quantity 10, Add to cart           | CART-2  | added |
| 2  | Same product, empty cart, quantity 11                    | CART-2  | refused |
| 3  | Same product, quantity 0                                 | CART-2  | refused |
| 4  | Bug Hunter's Diary (3 in stock): quantity 3, then 4      | CART-3  | 3 added, 4 refused with how many are left |
| 5  | Red Build Mug (stock 0)                                  | CART-4  | "Out of stock", cannot be added |
| 6  | 2 x Testing Field Guide ($49.98), coupon SAVE10          | PRICE-3 | refused |
| 7  | 4 x Clean Code Notebook ($50.00), coupon SAVE10          | PRICE-3 | applied, $5.00 off |
| 8  | Ship It T-Shirt ($20.00), coupon flat5 (lower case)      | PRICE-2, PRICE-4 | applied, $5.00 off |
| 9  | Keyboard ($75.00); then 3 x Testing Field Guide ($74.97) | PRICE-9 | Free; then $4.99 |
| 10 | Search for "m", then "mu"                                | SRCH-3  | refused; then results |
  1. 10 is the last allowed value, 11 the first refused one. Testing both is classic boundary value analysis.line 8
  2. Stock is a boundary too, and it changes every time someone orders.line 11
  3. $49.98: one step below the coupon limit. No pair of products adds up to exactly $49.99, so this is as close as the catalogue allows.line 13
  4. Exactly on the edge. "$50.00 or more" means $50.00 itself must work.line 14
  5. Two rules in one try: the coupon minimum, and codes not being case-sensitive.line 15
Stuck on this step?
The cart says "Quantity must be between 1 and 10" when I add 1
The line already has 10, and adding goes on top of what is there (CART-2). Remove the line first.
"Log in to add items to your cart"
You are logged out in this window. Click Log in and use alice@shoprung.test / Alice123!.
4

Tour 2: state changes (12 minutes)

Move orders through every status, including the moves the rules forbid, and check the stock at each step.

An order has statuses (ORD-4). Bugs hide in the moves: a move the rules forbid that still works, or a move that forgets a side effect like the stock. Check the stock in two places: the product list ("3 in stock") and the SQL console.

Open http://localhost:8080/sql in a new tab, paste this query and click Run query: SELECT id, sku, name, stock FROM products WHERE sku = 'BK-103'. Run it again after every order or cancel.

To order, add items, open Cart and click Place order. The order page has Pay now and Cancel order buttons when those moves are allowed. Orders in the header lists Alice's orders: #1 is DELIVERED and #2 is SHIPPED.

The UI hides buttons for forbidden moves, but the server must refuse them too: anyone can send a request without the UI. Open DevTools (F12, or Cmd+Option+I on a Mac), click the Console tab and run this, which sends the cancel request with Alice's login:

await fetch("/api/orders/2/cancel", {
  method: "POST",
  headers: { Authorization: "Bearer " + localStorage.getItem("shoprung.token") },
}).then((r) => r.json())

Change 2 to another order number, and cancel to pay, to try other moves. The answer is the order (move allowed) or {error, message} (refused). Then reload the page to see the new status.

tours/2-state-changes.md
# Tour 2: state changes (12 minutes)

ORD-4:  PLACED --pay--> PAID --ship--> SHIPPED --deliver--> DELIVERED
        PLACED or PAID --cancel--> CANCELLED. Anything else is refused.

| # | Try this                                                       | Rule         | The rule says |
| - | -------------------------------------------------------------- | ------------ | ------------- |
| 1 | Note the stock of Bug Hunter's Diary (product list and SQL)    | -            | 3 |
| 2 | Alice orders 2 of it. Check the stock again in both places     | ORD-1, ORD-2 | order PLACED, cart empty, stock 1 |
| 3 | Pay the new order. Then pay it again (Console)                 | ORD-4        | PAID; second pay refused |
| 4 | Cancel the PAID order. Check the stock                         | ORD-4, ORD-6 | CANCELLED, the 2 copies go back |
| 5 | Cancel SHIPPED order #2 (no button: use the Console)           | ORD-4        | refused |
| 6 | Cancel DELIVERED order #1 (Console)                            | ORD-4        | refused |
| 7 | Place an order with an empty cart (Console)                    | ORD-3        | refused |
  1. Draw this on paper. Every arrow is a test, and every missing arrow is a test too.line 3
  2. Check the stock in the UI and the database. A screen can be wrong while the data is right, or the other way round.line 9
  3. A side effect: cancelling must put the items back (ORD-6). Compare the number with the one from idea 1.line 11
  4. The forbidden move. The UI shows no button, so only a direct request tells you what the server does.line 12
  5. In the Console: fetch("/api/orders", {method: "POST", headers: {...}}) with the same headers as above.line 14
Stuck on this step?
Chrome will not let me paste into the Console
Chrome asks you to type allow pasting and press Enter the first time you paste code (Firefox has the same check). That protects people from pasting code from strangers. You wrote this code, so type it and paste again.
The Console says {error: "unauthorized", ...}
You are logged out in this window, so there is no token in localStorage. Log in as Alice and run it again.
The SQL console says "The console runs one SELECT query at a time"
It runs one SELECT only. Remove the second query, or anything after the first ;.
5

Tour 3: two users at once (11 minutes)

Check that one customer cannot see or change another customer's orders, and what happens when both want the last items.

Many serious bugs only show with two users: one person reaching another person's data, or two people racing for the same item. Use Alice in the normal window and Bob in the private window.

For idea 2, click into Bob's address bar, type http://localhost:8080/#/order/1 and press Enter. Order #1 is Alice's. For idea 3, place an order as Alice, note its number from the page title (Order #3 after a reset, the next number after that), and open that number in Bob's window.

For ideas 4 and 5, reset the data first (setup step 3) and reload both windows. Alice and Bob stay logged in: the reset rebuilds them with the same accounts. Add 3 x Bug Hunter's Diary in Alice's window and 1 in Bob's, then place Alice's order first and Bob's second.

tours/3-two-users.md
# Tour 3: two users (11 minutes)

Alice in a normal window, Bob in a private window. Note every order number you create.

| # | Try this                                                          | Rule         | The rule says |
| - | ----------------------------------------------------------------- | ------------ | ------------- |
| 1 | Bob opens Orders                                                  | ORD-7        | only his own orders (none yet) |
| 2 | Bob types http://localhost:8080/#/order/1 (Alice's order)         | ORD-7        | "Order not found" |
| 3 | Alice places an order. Bob opens it by number and clicks Cancel   | ORD-5, ORD-7 | not found, nothing cancelled |
| 4 | Reset. Alice puts 3 x Bug Hunter's Diary in her cart, Bob puts 1  | CART-3       | both allowed (stock is 3) |
| 5 | Alice places her order, then Bob places his                       | ORD-3        | Bob refused: no stock left |
  1. Order numbers are 1, 2, 3 ... so anyone can guess them. Guessable ids make this one of the first things to try.line 8
  2. Seeing is bad; changing is worse. Check both.line 9
  3. The race for the last items. The rules say the second order must be refused, because the first one used up the stock.line 11
Stuck on this step?
Both windows show the same person
The second window is not private. A normal second window shares the login with the first. Open a private window (Ctrl+Shift+N in Chrome).
After a reset I am suddenly logged out
You were logged in as an account you created during the session (like Carol). A reset deletes it, so the shop logs you out. Log in as Alice or Bob, who are always there.
6

Tour 4: create, read, update, delete (10 minutes)

Do all four things to each kind of data the shop stores: accounts, cart lines and coupons.

CRUD is a checklist for data: can you create it, read it back, update it and delete it, and is every rule checked on each of the four? A rule checked when you add an item but not when you edit it is a common bug.

To sign up, log out, click Log in, then Create an account. For the 50- and 51-character names, type 50 letters (count them, or copy aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, which is 50) and add one more for 51. Use a new email each time: name50@shoprung.test, name51@shoprung.test.

For idea 5, change the number in a cart line's quantity box and click outside the box (or press Tab): the cart saves the new quantity right away. For idea 6, look for the message next to the coupon box.

When the 45-minute timer rings, stop, even in the middle of an idea. Write a last line saying where you stopped.

tours/4-crud.md
# Tour 4: create, read, update, delete (10 minutes)

| # | Try this                                                              | Rule         | The rule says |
| - | --------------------------------------------------------------------- | ------------ | ------------- |
| 1 | Create: sign up Carol, carol@shoprung.test, password Carol123         | ACC-1        | account created, logged in |
| 2 | Create again with CAROL@ShopRung.test                                  | ACC-3, ACC-4 | refused: same email |
| 3 | Sign up with a name of 50 characters, then 51                         | ACC-2        | 50 accepted, 51 refused |
| 4 | Read: add 2 items, log out, log in again, open the cart               | CART-6       | items still there |
| 5 | Update: type 10, then 11, then 0 in the cart's quantity box           | CART-2, CART-5 | 10 ok; 11 and 0 refused |
| 6 | Update: 5 notebooks + SAVE10, then change to 3 notebooks              | PRICE-8      | coupon shown as not applied, with why |
| 7 | Delete: Remove coupon, Remove a line                                  | CART-5       | gone, totals updated |
  1. Create the same thing twice, with different capital letters. ACC-3 says emails are not case-sensitive.line 6
  2. Read: the data must survive a logout. Saved in the browser or on the server? This tells you.line 8
  3. Update checks the same limits as create. Compare with what tour 1 showed for adding.line 9
  4. PRICE-8: change the cart so a saved coupon no longer applies. The cart must say why.line 10
Stuck on this step?
Sign-up says "An account with this email already exists"
You used that email earlier in the session. Pick a new one, or reset the data.
7

Write the bug notes up properly

Turn each BUG line into a short note a developer can reproduce in two minutes.

Session notes are for you. Before the debrief, take each BUG line and add what someone else needs: the exact steps from a reset, what you expected (with the requirement id) and what happened. Redo each one once from a reset to be sure it reproduces.

Add these under a new heading ## Bug details at the end of session-notes.md, one block per bug, like the example below. Full bug reports with evidence are the next lab: here three lines per bug are enough.

Put the time you spend here in the Bugs part of the time split.

bug-note-example.md
## Bug details

### BUG at 00:11: SAVE10 refused at exactly $50.00 (PRICE-3)
Steps: reset, log in as Alice, add 4 x Clean Code Notebook ($50.00), apply SAVE10.
Expected: coupon applied, $5.00 off (PRICE-3: "$50.00 or more").
Actual: "This coupon needs a subtotal of at least $50.00". With 5 notebooks ($62.50) it works.
Reproduced: 2 of 2 tries, mystery mode on.
  1. The title says what is wrong and where, with the rule id. A developer should understand it without opening the note.line 3
  2. Steps start from a reset, so anyone gets the same data you had.line 4
  3. The "it works at $62.50" part narrows the bug to the edge. That saves the developer time.line 6
Why this way? A bug that cannot be reproduced gets closed as "cannot reproduce". Ten minutes here saves days of back-and-forth.
8

Debrief, then switch the bugs off and compare

Report what you covered and found, then learn exactly which hidden bugs you caught and which you missed.

A debrief is a 10-minute talk with your lead (or a friend, or yourself in writing) after every session. Fill in debrief.md: what you covered, what you did not, the bugs ordered by how serious they are, the questions, what got in your way, and which charters should come next.

Below is a filled-in example of both sheets, from a real run on ShopRung in mystery mode. Compare it with yours after you finish your own.

Now the reveal. Switch every bug off (this keeps ShopRung running):

curl -X POST http://localhost:8080/api/test/bugs -H "Content-Type: application/json" -d '{"enabled":[]}'

On Windows the simplest way is to stop ShopRung with Ctrl+C, run Remove-Item Env:SHOPRUNG_BUGS, and npm start again. Reload the shop: the yellow bar is gone. Reset the data, then repeat every BUG line from your notes. Each one that now follows its rule was a hidden bug, and you found it. Anything still broken is either a misunderstanding of the rule or a real bug to report.

Then check what you missed: src/bugs.js in the ShopRung folder lists every bug the switch knows, and the MYSTERY line names the ones mystery mode switches on. Any of those that is not in your notes is a gap: which heuristic would have found it?

session-notes.md
# Session notes

Charter: charter.md
Tester: (your name)
Date and start time: (today) 10:00
Build: ShopRung 1.0.0 (GET /api/health), mystery mode on
Data: reset with POST /api/test/reset at the start

## Tags
TEST   what I tried and what happened
BUG    the shop broke a rule (write the requirement id)
Q      a question for the team: unclear rule or odd behaviour
IDEA   a test for later, outside this charter
ISSUE  something that slowed me down or blocked me

## Log
| Time  | Tag   | Note |
| ----- | ----- | ---- |
| 00:00 | TEST  | Reset. Yellow bar says mystery mode is on. Alice in normal window, Bob in private window. |
| 00:04 | TEST  | Green Build Mug, quantity 10: added. Quantity 0: refused "Quantity must be between 1 and 10". |
| 00:06 | BUG   | CART-2: quantity 11 of Green Build Mug is accepted ("Added to cart", cart shows 11, $165.00). |
| 00:08 | TEST  | Bug Hunter's Diary (3 in stock): 4 refused "Only 3 left of The Bug Hunter's Diary". Red Build Mug: Out of stock, button disabled. |
| 00:10 | TEST  | 2 x Testing Field Guide = $49.98, SAVE10 refused. Correct. |
| 00:11 | BUG   | PRICE-3: 4 x Clean Code Notebook = $50.00 exactly, SAVE10 refused with "This coupon needs a subtotal of at least $50.00". 5 notebooks ($62.50): applied, $6.25 off. |
| 00:13 | TEST  | FLAT5 at $20.00 (T-shirt): $5.00 off. Keyboard $75.00: shipping Free. 3 x Field Guide $74.97: $4.99. All correct. |
| 00:16 | BUG   | ORD-2: Alice ordered 2 x Bug Hunter's Diary (order #3). Product list still says 3 in stock. SQL console: stock = 3. Expected 1. |
| 00:19 | TEST  | Paid #3: PAID. Paid it again: 409 "Cannot pay an order that is PAID". Correct. |
| 00:20 | Q     | Cancelled #3: stock went from 3 to 5, more than we ever had. Follows from the ORD-2 bug (cancel adds back what was never taken). |
| 00:23 | BUG   | ORD-4: no cancel button on SHIPPED order #2, but POST /api/orders/2/cancel from the Console returned 200 and status CANCELLED. Keyboard stock went 8 to 9. |
| 00:25 | TEST  | Cancel DELIVERED order #1: 409 "Cannot cancel an order that is DELIVERED". Correct. |
| 00:27 | TEST  | Bob's Orders page: "No orders yet." Correct. |
| 00:28 | BUG   | ORD-7: Bob opened #/order/1 and sees Alice's order (Green Build Mug x2, $34.99). Expected "Order not found". |
| 00:31 | BUG   | ORD-5/ORD-7: Alice placed order #4. Bob opened #/order/4 and clicked Cancel order: Alice's order is CANCELLED. |
| 00:35 | TEST  | Two users, last copies: Alice ordered 3 x Bug Hunter's Diary, then Bob's order of 1 also went through: 4 sold, 3 in stock. Same root cause as the ORD-2 bug (ORD-3). |
| 00:37 | Q     | Out-of-stock message at checkout says "Only 0 left of ..." while CART-4 says "Out of stock". Which wording is right? |
| 00:39 | TEST  | Sign-up Carol, then CAROL@ShopRung.test: 409 "An account with this email already exists". Name of 50 chars ok, 51 refused. |
| 00:41 | TEST  | Cart kept after log out and log in (CART-6). Remove line and Remove coupon work. |
| 00:43 | TEST  | Cart quantity box: typed 11, accepted again (same CART-2 bug through PATCH). |
| 00:44 | Q     | Order page shows "Discount -$0.00" and the Price column is the unit price, not the line total. Intended? |
| 00:45 | IDEA  | ORD-8 (price kept after a price change) and ACC-7 (2-hour login): need a way to change a price or the clock. |

## Time split
Setup: 5 min | Testing: 30 min | Bugs (investigate + write up): 15 min
  1. A TEST line where everything worked still counts: it is coverage you can show.line 25
  2. The BUG tag, the rule id, and what happened in numbers. Precise enough to repeat.line 21
  3. A Q, not a BUG: the stock going above 3 follows from the ORD-2 bug, so it is noted, and linked to it.line 28
  4. The worst bug of the session came from the two-users heuristic: one customer can cancel another customer's order.line 33
  5. Not a broken rule, so a question. The team decides whether it is a bug.line 35
  6. IDEAs become the next charters.line 40
debrief.md
# Debrief (10 minutes, with a lead or a teammate)

## What I covered
- Boundaries: quantity (0, 10, 11), stock (3 and 4 of a 3-stock item, stock 0),
  SAVE10 ($49.98, $50.00, $62.50), FLAT5 ($20.00), shipping ($74.97, $75.00), search length.
- State changes: place, pay, pay twice, cancel PAID, SHIPPED and DELIVERED orders.
- Two users: order visibility, cancelling someone else's order, last items in stock.
- CRUD: sign-up (duplicate email, name length), cart kept after login, update, remove.

## What I did not cover
- ORD-8 (old price kept) and ACC-7 (login expiry): no way to change a price or the time.
- Admin actions (ship, deliver), search beyond length, look and feel.

## Bugs (5), most serious first
1. ORD-7 + ORD-5: another customer can open and cancel my order.
2. ORD-2: placing an order does not reduce stock (so the shop oversells, ORD-3).
3. ORD-4: a SHIPPED order can be cancelled through the API.
4. PRICE-3: SAVE10 refused at exactly $50.00.
5. CART-2: quantity 11 accepted.

## Questions for the team
- "Only 0 left" vs "Out of stock" wording at checkout.
- "Discount -$0.00" and the unit price column on the order page.

## Obstacles
- The UI hides the cancel button on shipped orders: I needed the Console to send the request.

## Next sessions (new charters)
- Admin flows: ship, deliver, see all orders.
- The same bugs through the REST API only, to see which are server-side.

## Time split
Setup 5 | Testing 30 | Bugs 15  (testing is under two thirds: the bugs took time)
  1. Saying what you did not test is the most useful line for your lead: it shows the risk that is left.line 10
  2. Ordered by impact, not by the time you found them. Data leaking between customers comes first.line 14
  3. Obstacles turn into fixes: here, a tester needs the Console or an API client to test server rules.line 25
Run
curl http://localhost:8080/api/test/bugs
You should see
{"mystery":false,"active":[],"known":{...}}
Stuck on this step?
I want the answer key now
Mystery mode switches on five bugs: coupon-boundary, quantity-limit, cancel-shipped, stock-not-reduced and order-leak (the MYSTERY line in src/bugs.js). Each one breaks one rule: PRICE-3, CART-2, ORD-4, ORD-2 and ORD-7.
After switching off, quantity 11 is still in my cart
Switching a bug off does not change data that is already saved. Reset the data, then repeat the test.

Check it works

Your session worked if you can tick every line:

  • charter.md has a mission (explore, with, to discover), a time box and what is out of scope.

  • session-notes.md has a line with a time and a tag at least every few minutes, for all four tours, not only for bugs.

  • Every BUG line names a requirement id and has short steps from a reset.

  • debrief.md lists what you covered, what you did not, the bugs by impact, and the questions.

  • After switching the bugs off, you know which of your BUG lines were the hidden bugs, and which hidden bugs you missed and why.

Five out of five is great. Three is a normal first session: the misses tell you which heuristic to use earlier next time.

Troubleshooting

There is no yellow bar in the shop

Mystery mode is off. Stop ShopRung (Ctrl+C) and start it with SHOPRUNG_BUGS=mystery npm start (Windows: $env:SHOPRUNG_BUGS="mystery"; npm start), or send the {"enabled":["mystery"]} request from setup step 2.

The yellow bar went away in the middle of the session

ShopRung was restarted without the setting. Mystery mode set through the API lasts only until ShopRung stops. Start it with the environment variable so it survives restarts.

curl: (7) Failed to connect to localhost port 8080

ShopRung is not running, or runs on another port. Look at the first terminal: it prints the address. If you started it with PORT=8081, use 8081 everywhere.

Windows: curl -X POST asks for a "Uri" or prints an error about parameters

In Windows PowerShell 5, curl is a different command. Type curl.exe instead of curl.

Results do not match the filled-in example

Order numbers and stock depend on what you did before. Reset the data before each tour that counts on starting numbers, and note the order number the shop gives you.

What changes in production

  • Sessions are planned work. Teams run session-based testing with a backlog of charters, one session per charter, usually 60 to 120 minutes, and track sessions per area like any other task.
  • Exploring comes first, automation second. A new feature gets explored by a person; the bugs found and the checks worth repeating become automated tests, so the next session can go somewhere new.
  • The debrief turns notes into decisions: new bug tickets, questions for the product owner, and the next charters. Notes are attached to the ticket or the test management tool, so the coverage is visible.
  • Two users, roles and direct API calls are standard tours, because data leaking between customers and missing server-side checks are among the most serious bugs a shop can ship.

Interview angle

“How do you do exploratory testing, and how do you report what you covered?”

I run time-boxed sessions, each with a charter: what to explore, with which resources, to find out what. Inside the session I use heuristics to choose tests, like boundaries, state changes, two users at once and CRUD on each kind of data, and I check rules on the server too, not only through the UI. I keep timestamped notes tagged as test, bug, question or idea, so the notes show coverage and not just bugs. At the end I debrief: what I covered, what I did not and why, the bugs by impact with steps to reproduce, and the follow-up charters. In ShopRung that approach found a customer cancelling another customer's order, which no scripted checkout test had covered.

Clean up

Stop ShopRung with Ctrl+C. The next time you run plain npm start (in a new terminal on Windows), mystery mode is off. Keep your worksheets: the next lab turns one of these bugs into a full bug report with evidence.

Practice

These run in your browser and check your answer.

Where did the session time go?

Session notes end with a time split. Write time_split(entries) where entries is a list of (minutes, kind) and kind is "setup", "test" or "bug". Return a dict with the percentage of the total for each of the three kinds, rounded to whole numbers. Kinds that never appear are 0. An empty list returns all zeros.

Exercise
def time_split(entries):
    totals = {"setup": 0, "test": 0, "bug": 0}
    # your code here
    return totals


print(time_split([(5, "setup"), (30, "test"), (15, "bug")]))
Hint

Add up the minutes per kind, then divide each by the grand total and multiply by 100. Check for a total of 0 first.

The full project

Every worksheet from this lab, filled in as an example. Do your own first, then compare.

Download the worksheets (.zip)