Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add section about creating transactions and enable envs docs (#2577)
- Loading branch information
1 parent
c1a0779
commit 530bb42
Showing
2 changed files
with
36 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Creating Transactions | ||
|
||
Just like other structures of Tracetest, you can also manager your transactions using the CLI and definition files. | ||
|
||
A definition file for a transaction looks like the following: | ||
|
||
```yaml | ||
type: Transaction | ||
spec: | ||
name: Test purchase flow | ||
description: Test a flow of purchasing an item | ||
steps: | ||
- ./tests/create-product.yaml | ||
- ./tests/add-product-to-cart.yaml | ||
- ./tests/complete-purschase.yaml | ||
- testID # you can also reference tests by their ids instead of referencing the definition file | ||
``` | ||
|
||
In order to apply this transaction to your Tracetest instance, make sure to have your [CLI configured](./configuring-your-cli.md) and run: | ||
|
||
``` | ||
tracetest apply transaction -f <transaction.yaml> | ||
``` | ||
|
||
> If the file contains the property `spec.id`, the operation will be considered a transaction udpate. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters