Write a test. Then prove it works.
Your test has to pass on the working app and fail on a copy where the behaviour is broken on purpose. If it passes both, it was not testing that behaviour.
Free-play · any app, nothing gradedNext up · Level 1
Prove the login really checks the password
Nimbus · Forms & validation · 2 behaviours to catch
Level 1Start hereCheck a sign-in result, a form error or a cart count.
- Prove the login really checks the passwordNext upNimbus · Forms & validation · 2 behaviours to catchNimbus · 2 behavioursNext up
- Prove the empty form is validatedNimbus · Forms & validation · 2 behaviours to catchNimbus · 2 behaviours
- Assert the cart badge updatesTerra Supply · State across pages · 1 behaviour to catchTerra Supply · 1 behaviour
- Assert the wrong-password errorNimbus · Forms & validation · 1 behaviour to catchNimbus · 1 behaviour
Level 2Check the result, not the pageA search or a cart update changes what you see. Check what it changed to.
- The cart badge liesTerra Supply · State across pages · 2 behaviours to catchTerra Supply · 2 behaviours
- Prove the search actually filtersPipelineHQ · Tables & lists · 1 behaviour to catchPipelineHQ · 1 behaviour
- Prove the search hides the restTerra Supply · Locators · 1 behaviour to catchTerra Supply · 1 behaviour
- Removing an item has to remove itTerra Supply · State across pages · 1 behaviour to catchTerra Supply · 1 behaviour
- The cart makes four promisesTerra Supply · State across pages · 4 behaviours to catchTerra Supply · 4 behaviours
- Prove the status filter filtersPipelineHQ · Tables & lists · 1 behaviour to catchPipelineHQ · 1 behaviour
- Assert the search result countPipelineHQ · Tables & lists · 1 behaviour to catchPipelineHQ · 1 behaviour
- Prove the contacts API really filtersPipelineHQ · Tables & lists · 1 behaviour to catchPipelineHQ · 1 behaviourAPI · Playwright and Cypress
Levels 3 to 5The obvious test is not enoughIt passes on the broken copy too.
- Prove a contact was actually savedPipelineHQ · Waiting & flakiness · 2 behaviours to catch · Level 3PipelineHQ · 2 behaviours · Level 3
- The subtotal forgets the quantityTerra Supply · State across pages · 1 behaviour to catch · Level 3Terra Supply · 1 behaviour · Level 3
- Checkout must reject a bad cardTerra Supply · Forms & validation · 1 behaviour to catch · Level 3Terra Supply · 1 behaviour · Level 3
- Prove log out really logs you outNimbus · State across pages · 1 behaviour to catch · Level 3Nimbus · 1 behaviour · Level 3
- Delete the right rowPipelineHQ · Tables & lists · 2 behaviours to catch · Level 4PipelineHQ · 2 behaviours · Level 4
JavaScript and TypeScript exercises
Practice for the language lectures. Each exercise is free. It runs your code and compares the result with the expected one. These are separate from the problems above, where your test runs against a broken app.
JavaScript
- Keep the count from beforeKeep the first reading available for a later comparison.
- Add to a number read as textA seat count read from a page arrives as text.
- Compare the badge strictlyCheck whether the badge actually shows the expected count.
- Report on every pathA missing banner needs a test result of its own.
- Return the priceA caller needs the value a helper calculates.
- Pass the function itselfA callback is a function that another function calls.
- Read the booking fieldsRead each property from the object that contains it.
- Take the desk from the argumentA function parameter can select a property from an incoming object.
- First and last bookingFind the first and last items in an array of any nonzero length.
- Check every priceA price check must report when there are no prices to check.
- An empty list: pass or failDecide what an empty result means for each check.
- The guest who is not thereA guest lookup can finish without finding a booking.
- Keep zero, replace an empty labelChoose a default according to what each setting allows.
- Import from the right fileAn import must match the name and kind of export a file provides.
- Wait for the bookingStarting a save and finishing a save happen at different times.
- Wait for the save, not the clockA save can finish before or after a fixed pause.
- The booking total prints as a promiseFollow a promised value through a price helper and its caller.
- Let the runner report a failed saveThe runner needs the original save error to report a failure.
- Collect every failed lookupA report needs a result for every lookup, including failed ones.
- The loop that does not waitDependent steps must finish in order. Independent cancellations can start together.
- Each test gets its own listEach test needs its own starting data.
- Same object or same contentA copied booking can have the same details as the original.
- Read the body before you check itCheck the requested booking details once the response body is available.
- Match the whole seat labelA pattern can match part of a line even when the full label is wrong.
- A test that finishes before its workA check can read the old note while a save is still running.
- Where execution resumes after awaitA wait can finish before the timer that writes the note.
- What a Playwright click actually waits forFinishing a click does not guarantee the save has finished.
- Check the note after reopening itA reopened note shows whether the editor kept an edit.
Showing 6 of 28
TypeScript
- Read the status from a save receiptA promise and the receipt it supplies have different types.
- Import what the module sharesA file can import only the names another file exports.
- The seat count runs but fails the type checkCode can print the right number while TypeScript reports an error.
- The annotation or the valueUse the caller to decide whether a declared type or a value is wrong.
- Type a helper from its callsUse existing calls to determine a helper’s types.
- One shape for every bookingA booking’s type must describe the data its callers need.
- Find the last line of the errorA type error at a function call can identify a field in the original data.
- A note that may be missingA missing note and an empty note are different inputs.
- Rows of room and seatsThe position of a value can determine its type in a table row.
- Only three statusesApply the same allowed statuses to bookings and status changes.
- Read status text from a page or a locatorA status helper can read from a whole page or a locator within it.
- Do not trust the parsed valueParsing JSON does not establish that the result is a number.
- A price cell with three shapesDistinguish a missing price from a price of zero.
- One base for three usersUser types can share the fields that every guest needs.
- Keep the type through the helperA search result should keep the type of the items being searched.
- A builder that takes overridesTest data types must describe the objects the helpers actually create.
- What a test can do with BookingPageA page object controls which operations a test can perform.
- Write the type from two responsesResponse examples show which fields may be missing or have different values.
- Check the booking before you use itValidate incoming booking data before reading its fields.
- One list of rolesOne list can define which role names the program accepts.
- A table of cases that checks itselfA row type can expose mistakes in test data before a test runs.
Showing 6 of 21