Go from never having used a coding agent to working productively and safely with one. The learner should understand what an agent is and how it differs from a chat assistant. They should choose a tool, set up a protected first project, describe tasks the agent can do well, and follow and verify its work. They should recover from bad changes, manage context, and plan bigger changes. They should also use tests as the definition of done and run everyday workflows (bug fixes, features, writing tests, codebase exploration, scripts, small tools, refactors). Throughout, they should keep secrets and systems safe and keep their own understanding growing instead of outsourcing it.
What automated tests are and how to run them card 2 of 6

Code that checks other code

builds on: Command output and exit codes, How a code project is laid out
A **test** is a small piece of code. It calls your code with an input whose right answer you already know, then checks the result. For a function `apply_discount(price, percent)`, a test might say `assert apply_discount(100, 10) == 90`. `assert` means *this must be true*. If it is true, the test passes. If not, it fails and shows what it got. A test only checks the code it calls, with the inputs it uses. Because tests are code, a machine reruns hundreds in seconds. That's the **automated** part.
Terms on this card
test
A small piece of code that runs part of your program with a known input and checks that the output is what it should be.
automated
Done by the computer without a person checking by hand, so it can be repeated quickly and often.
assert
A statement in a test meaning 'this must be true'. If it is false, the test fails and shows the values involved.
function
A named piece of code that takes inputs, does some work, and gives back a result, e.g. `apply_discount(100, 10)`.
tests
Small pieces of code that run your program's code and check it gives the expected results.
Learn this step by step on Bytewise
Lesson goal: Explain a test as code that runs your code with known inputs and checks the output. Run a project's test suite with one command and read which tests passed and which failed. · the whole lesson