scenario
library documentation.
scenario
library in your project. Choose your language below.
bash uv add langwatch-scenario
.env
file in the root of your project to manage your environment variables.
LANGWATCH_API_KEY
in your LangWatch project settings.
id
: A unique and stable identifier for your scenario. If not provided, it’s often generated from the name
, which can be brittle if you rename the test.setId
: Groups related scenarios into a test suite. This corresponds to the “Simulation Set” in the UI.batchId
: Groups all scenarios that were run together in a single execution (e.g., a single CI job). You can use a CI environment variable like process.env.GITHUB_RUN_ID
for this.