Creating Tasks

How you describe a task directly affects the quality of the results. These guidelines help you write effective task descriptions.

Writing effective descriptions

The task description is the primary input the AI uses to understand what you want. A good description is specific enough to guide the AI but leaves room for it to handle the details of browser interaction.

Be specific about what to test

Instead of broad instructions like "test the settings page," describe what aspects of the settings page matter. For example: "Test the profile settings page, including updating the display name, changing the email address, and uploading a profile picture. Verify that changes are saved and a confirmation message appears."

Provide context about the feature

The AI works better when it understands the purpose of what it is testing. A sentence or two of context helps it make better decisions. For example: "The discount code feature allows users to enter promotional codes at checkout. Valid codes should reduce the total, expired codes should show an error, and the field should accept codes in any case (upper or lower)."

Mention edge cases you care about

If there are specific scenarios you want covered, call them out. The AI will generate tests for common paths on its own, but edge cases that are important to your business should be mentioned explicitly. For example: "Make sure to test what happens when the cart is empty, when a user is not logged in, and when the payment method is declined."

Keep it natural

You do not need to use technical language or follow a specific format. Write as if you were explaining the task to a colleague. The AI understands natural language and can interpret intent from conversational descriptions.

Choosing the right task type

Picking the right task type saves time and produces better results. Here is a quick guide:

  • Use "Generate test cases" when you want to build up your test suite. This is the right choice when you are covering a new feature, expanding test coverage for an existing area, or starting fresh with a project.
  • Use "Execute instructions" when you need a quick, one-time check. This is great for verifying a bug fix, checking a deployment, or doing a spot check on something specific.
  • Use "Explore" when you want the AI to learn about your application before generating tests. This is especially useful for new projects or after major application changes.

Environment selection

Match the environment to the purpose of the task:

  • Development or test environments are good for initial test generation and exploration, where you want the AI to interact freely without affecting real data.
  • Staging is ideal for validating tests before a release, since it mirrors production closely.
  • Production should be used for smoke tests and monitoring, where you want to verify that the live application is working correctly after a deployment.

Make sure your environment variables and secrets are configured for the environment you select. The AI uses these during execution, so missing configuration can cause tasks to fail. See Projects for more on environment configuration.

Iterating on results

The first set of generated tests may not be perfect, and that is expected. Review the results, note what worked well and what was missing, and create follow-up tasks with more refined descriptions.

Over time, as Memory builds up and you learn what descriptions work best for your application, the quality of generated tests will improve. Think of it as a collaborative process between you and the AI.