Skip to content

Understanding Playbooks

Playbooks are a way to communicate with BaseRock AI via English prompts. These playbook text areas are available at various stages and for different uses. Let’s understand the hierarchy of playbooks and how to use them.

Precedence level (high to low): Test Case Level Playbook > Endpoint Level Playbook > Service Level Playbook

Coverage level (high to low): Service Level Playbook > Endpoint Level Playbook > Test Case Level Playbook

1. Service Level Playbook:

Service-level playbooks have the highest coverage—they apply to the entire service. Any data or instruction that needs to be reused across multiple endpoints or test cases can be defined here; it then automatically cascades, thereby reducing repetition.

Image 17

2. Endpoint Level Playbook:

These playbooks take precedence over the service level. If there are instructions that need to override the service level but apply to all test cases of that endpoint, they can be added here.

For example:

In the service playbook, let’s say you define a variable in the “Runtime Execution Context Variables” section as: user_name: johndoe123 The service-level playbook can then refer to it as ${user_name} for some instruction. However, if there is an endpoint /login that specifies: POST /login with user_name: "johnwick321" then the endpoint-level value (johnwick321) will override the service-level variable.

Additionally, if the username (or any variable) is dynamically generated (ex: random email address) at runtime within the endpoint definition, that generated value will also take precedence over the service-level variable.

3. Test Case Level Playbook:

When there are specific test-case-level validations that depend on the domain, these can be added here by the product or domain expert.

Check section: Playbook Usage to understand the best practices and some examples.