Skip to content

Commit

Permalink
add section about creating transactions and enable envs docs (#2577)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathnogueira committed May 25, 2023
1 parent c1a0779 commit 530bb42
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 11 deletions.
25 changes: 25 additions & 0 deletions docs/docs/cli/creating-transactions.md
@@ -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.
22 changes: 11 additions & 11 deletions docs/sidebars.js
Expand Up @@ -241,11 +241,11 @@ const sidebars = {
type: "category",
label: "Web UI",
items: [
// {
// type: "doc",
// id: "web-ui/creating-environments",
// label: "Creating environments",
// },
{
type: "doc",
id: "web-ui/creating-environments",
label: "Creating environments",
},
{
type: "doc",
id: "web-ui/creating-tests",
Expand All @@ -266,11 +266,11 @@ const sidebars = {
id: "web-ui/test-results",
label: "Test Results",
},
// {
// type: "doc",
// id: "web-ui/creating-transactions",
// label: "Creating transactions",
// },
{
type: "doc",
id: "web-ui/creating-transactions",
label: "Creating transactions",
},
{
type: "doc",
id: "web-ui/exporting-tests",
Expand Down Expand Up @@ -311,7 +311,7 @@ const sidebars = {
type: "doc",
id: "cli/running-tests",
label: "Running Tests",
},
},
// {
// type: "doc",
// id: "cli/creating-transactions",
Expand Down

0 comments on commit 530bb42

Please sign in to comment.