Command: /generate

Description

The /generate command is an experimental feature that instructs TestDriver to create its own exploratory prompts. This command is used in the “Generate a Test Suite” demo and is designed to help automate the creation of exploratory test cases.

Usage

/generate

Behavior

  • The /generate command analyzes the display and generates exploratory prompts for testing.
  • Each exploratory test is saved as a simple Markdown file containing a list of steps.
  • TestDriver generates 10 Markdown files every time the /generate command is called.
  • The generated files are stored in the ./testdriver/generate/*.md directory.

Example output

Here’s an example of a generated test file (test-search-function.md):

1. Click on the search icon.
2. Type "real-time chat" into the search bar.
3. Assert that search results are relevant and displayed.

Protips

  • Use /generate to quickly create exploratory tests for regression testing or feature validation.
  • Combine /generate with the GitHub Action to generate and run regression tests in parallel.
  • Review the generated Markdown files and convert them into YAML test scripts for reuse.

Gotchas

  • The /generate command is experimental and may not always produce perfect test cases. Review and refine the generated tests as needed.
  • Ensure the ./testdriver/generate/ directory exists and has write permissions.

Notes

  • The /generate command is ideal for automating the creation of exploratory test cases and generating regression tests.
  • Generated tests can be merged into a regression test suite for continuous testing and validation.