Starting with a good prompt
Before diving in, we want to point out some prompt best practices that reduce the amount of future debugging required. If the Agent failed to implement the steps for a test case, it’s likely the prompt could use some refinement. The more detailed the instructions in your prompt, the more likely it is that the Agent will be successful in its design. For example, if creating a checkout flow test case. An example of a not-great prompt might be:Check AI agent comments for feedback
You might have noticed another issue with the above prompts: A checkout test will likely fail unless a product has been added to the cart. Luckily, our Agent has your back, giving you precise feedback when it detects a test cannot successfully be implemented.
Agent explaining the reason for checkout test failure, 12/2024
Split flows into smaller, sequential tests
While one solution would be to add the steps for adding a product to the cart to the start of the prompt, this isn’t great from a testing perspective as now both the add to cart and checkout flow are being tested. A good test only tests one feature. The right solution is to create an add product to cart test case, then set that test as adependency
for the checkout test.

Test dependency hierarchy of a checkout flow, 12/2024
Prompt quality check
The quality of the steps produced by the Agent is usually the best indication of whether the prompt needs further refinement. If the prompt seems fine but the steps are all over the place, tryregenerating steps
(while keeping the good ones) as a first option or simply help out the agent by clicking the questionable step where it got wrong.

test step regeneration, 12/2024

An example of a detailed prompt for a currency change test, 12/2024