Writing effective instructions
This guide provides some helpful tips and tricks to get the most from Carbonate
Be specific
If you are ambiguous about what you want Carbonate to do, Carbonate will occasionally take liberties and perform more actions than you intended.
Bad: Fill in the email
Good: Fill in the email field with X
Bad: Click the menu
Good: Click the hamburger menu in the header
Bad: Sort by Name
Good: Sort the table by the Name column
Write in 1st person
It's common in cucumber/gherkin style tests to write actions in the context of a specific user. This can sometimes confuse Carbonate and it might fill in fields with the name of that person. To be safe, always write actions as either commands or in the first person.
Bad: user fills in the email field
Good: Fill in the email field with X
Bad: They click on the menu
Good: Click the hamburger menu in the header
Bad: Bob sorts by Name
Good: I sort the table by the Name column
Only perform one action at a time
Carbonate supports multiple actions but it's difficult to specify multiple actions without being ambiguous. It's safer and more predictable to perform one action at a time.
Bad: Fill in the login form
Good: Fill in the email field with X
Good: Fill in the password field with X
Bad: Click on the login button in the hamburger menu
Good: Open the hamburger menu
Good: Click on the login button
Bad: Sort the table by Name and Address
Good: Sort the table by the Name column
Good: Sort the table by the Address column