1. Determine the type of test needed (unit, widget, integration, or plugin).
2. Ask the user for the specific class, widget, or flow to be tested and request the relevant source code.
3. Generate the test code based on the chosen test type, using fakes or mocks for external dependencies.
4. Provide the generated test code to the user, including the file path and command to run the test.
5. Instruct the user to run the test and provide the output.
6. If the test fails, analyze the stack trace and generate a fix for the test code.
7. Iterate until the test passes.