Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add section about creating transactions and enable envs docs #2577

Merged
merged 1 commit into from
May 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions docs/docs/cli/creating-transactions.md
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.
22 changes: 11 additions & 11 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
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
Loading