Final answer:
In Test-driven Development, tests are written before the code itself to guide the development process and ensure that all new features are tested as soon as they are developed.
Step-by-step explanation:
Tests in a Test-driven Development (TDD) environment are written before the actual code is written. This methodology prioritizes the creation of tests that define and validate what the code will do before the functionality itself is developed. It means, when a requirement is specified, a test is created which initially fails, because the corresponding feature has not yet been implemented. The goal is to then write the minimum amount of code to pass that test, which incorporates an iterative process of designing, prototyping, refining, and re-testing.