terratest 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -0
- package/dist/action/136.index.js +990 -0
- package/dist/action/360.index.js +92 -0
- package/dist/action/443.index.js +724 -0
- package/dist/action/449.index.js +13 -0
- package/dist/action/566.index.js +385 -0
- package/dist/action/605.index.js +241 -0
- package/dist/action/762.index.js +583 -0
- package/dist/action/869.index.js +529 -0
- package/dist/action/956.index.js +117 -0
- package/dist/action/998.index.js +894 -0
- package/dist/action/index.js +18 -0
- package/dist/cli/136.index.js +990 -0
- package/dist/cli/360.index.js +92 -0
- package/dist/cli/443.index.js +724 -0
- package/dist/cli/449.index.js +13 -0
- package/dist/cli/566.index.js +385 -0
- package/dist/cli/605.index.js +241 -0
- package/dist/cli/762.index.js +583 -0
- package/dist/cli/869.index.js +529 -0
- package/dist/cli/956.index.js +117 -0
- package/dist/cli/998.index.js +894 -0
- package/dist/cli/index.js +17 -0
- package/package.json +36 -0
package/README.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# TerraTest
|
|
2
|
+
|
|
3
|
+
TerraTest is an Infrastructure-as-Code (IaC) CLI tool that bridges the gap between your local Behavior-Driven Development (BDD) `.feature` files and GitHub. It applies principles heavily inspired by HashiCorp's Terraform to your test management workflow.
|
|
4
|
+
|
|
5
|
+
With TerraTest, your `.feature` files are the single source of truth. You use `plan` and `apply` to dynamically create, link, and manage test cases, test runs, and test plans directly in GitHub Issues and GitHub Projects V2.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 📚 Documentation
|
|
10
|
+
|
|
11
|
+
We have completely overhauled our documentation to be as intuitive and comprehensive as possible.
|
|
12
|
+
|
|
13
|
+
**Start here:** 👉 **[TerraTest Documentation Portal (docs/index.md)](docs/index.md)** 👈
|
|
14
|
+
|
|
15
|
+
### Quick Links
|
|
16
|
+
- **[Getting Started](docs/getting-started.md)**: Installation, authentication, and your first `apply`.
|
|
17
|
+
- **[Writing Tests (The DSL)](docs/writing-tests-dsl.md)**: Master the Gherkin syntax, tags, and custom fields (like `assignees` and `milestone`).
|
|
18
|
+
- **[Configuration Guide](docs/configuration.md)**: Deep dive into the `terratest.json` rules.
|
|
19
|
+
- **[CLI Reference](docs/cli-reference.md)**: Cheat sheet for all commands (`plan`, `apply`, `import`, etc.).
|
|
20
|
+
- **[Reporting & Analytics](docs/reporting-and-analytics.md)**: Generate execution matrices and coverage reports locally.
|
|
21
|
+
- **[Architecture](docs/architecture.md)**: How the AST parser, state management, and GraphQL adapters work.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
You can install TerraTest directly onto your system using npm. It is distributed as a global Node.js package:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install -g terratest
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
> **Note:** TerraTest requires Node.js v16 or higher to be installed on your system.
|
|
34
|
+
|
|
35
|
+
## Quickstart (TL;DR)
|
|
36
|
+
|
|
37
|
+
1. Create a `terratest.json` configuration file at the root of your project:
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"github": {
|
|
41
|
+
"owner": "MyOrg",
|
|
42
|
+
"repository": "MyRepo",
|
|
43
|
+
"tokenEnv": "GITHUB_TOKEN"
|
|
44
|
+
},
|
|
45
|
+
"scope": {
|
|
46
|
+
"testcase": {
|
|
47
|
+
"fields": [
|
|
48
|
+
{ "name": "assignees", "type": "keywords" },
|
|
49
|
+
{ "name": "priority", "type": "tags", "values": ["@high", "@medium", "@low"] }
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
2. Initialize your workspace:
|
|
57
|
+
```bash
|
|
58
|
+
terratest init
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
3. Write a Gherkin file (e.g., `login.case.feature`):
|
|
62
|
+
```gherkin
|
|
63
|
+
@testcase
|
|
64
|
+
Feature: User Login
|
|
65
|
+
|
|
66
|
+
@high
|
|
67
|
+
Scenario: Valid Login
|
|
68
|
+
* field assignees = @octocat
|
|
69
|
+
Given the user is on the login page
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
4. Preview the changes and apply them to GitHub:
|
|
73
|
+
```bash
|
|
74
|
+
terratest plan
|
|
75
|
+
terratest apply
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
For full details, please visit our **[Documentation Portal](docs/index.md)**.
|