@testream/vitest-reporter 0.1.0 → 1.0.0
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 +5 -56
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
# @testream/vitest-reporter
|
|
2
2
|
|
|
3
|
-
Vitest
|
|
3
|
+
Bridges Vitest test runs from your codebase into Jira with Testream. Once configured, it uploads results automatically.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Quick Start
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
npm install --save-dev @testream/vitest-reporter
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
Add the reporter to your `vitest.config.ts`:
|
|
14
|
-
|
|
15
11
|
```ts
|
|
12
|
+
// vitest.config.ts
|
|
16
13
|
import { defineConfig } from 'vitest/config'
|
|
17
14
|
|
|
18
15
|
export default defineConfig({
|
|
@@ -21,59 +18,11 @@ export default defineConfig({
|
|
|
21
18
|
'default',
|
|
22
19
|
['@testream/vitest-reporter', {
|
|
23
20
|
apiKey: process.env.TESTREAM_API_KEY,
|
|
21
|
+
uploadEnabled: true,
|
|
24
22
|
}],
|
|
25
23
|
],
|
|
26
24
|
},
|
|
27
25
|
})
|
|
28
26
|
```
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
| Option | Type | Default | Description |
|
|
33
|
-
|--------|------|---------|-------------|
|
|
34
|
-
| `apiKey` | `string` | **required** | Testream API key |
|
|
35
|
-
| `uploadEnabled` | `boolean` | `true` | Enable/disable upload to Testream |
|
|
36
|
-
| `failOnUploadError` | `boolean` | `false` | Fail the test run if upload fails |
|
|
37
|
-
| `outputDir` | `string` | `'ctrf'` | Directory for the CTRF report |
|
|
38
|
-
| `outputFile` | `string` | `'ctrf-report.json'` | Filename for the CTRF report |
|
|
39
|
-
| `testType` | `string` | `'unit'` | Test type identifier |
|
|
40
|
-
| `branch` | `string` | auto-detected | Git branch name |
|
|
41
|
-
| `commitSha` | `string` | auto-detected | Git commit SHA |
|
|
42
|
-
| `repositoryUrl` | `string` | auto-detected | Git repository URL |
|
|
43
|
-
| `buildName` | `string` | — | Build name/identifier |
|
|
44
|
-
| `buildNumber` | `string` | auto-detected | Build number |
|
|
45
|
-
| `buildUrl` | `string` | auto-detected | CI pipeline URL |
|
|
46
|
-
| `testEnvironment` | `string` | — | Environment name (e.g., 'staging') |
|
|
47
|
-
| `appName` | `string` | — | Application name under test |
|
|
48
|
-
| `appVersion` | `string` | — | Application version under test |
|
|
49
|
-
|
|
50
|
-
## CI/CD Setup
|
|
51
|
-
|
|
52
|
-
Git context (branch, commit SHA, repository URL) and build metadata are auto-detected for:
|
|
53
|
-
|
|
54
|
-
- GitHub Actions
|
|
55
|
-
- GitLab CI
|
|
56
|
-
- Azure Pipelines
|
|
57
|
-
- CircleCI
|
|
58
|
-
- Jenkins
|
|
59
|
-
- Bitbucket Pipelines
|
|
60
|
-
|
|
61
|
-
## Local Development
|
|
62
|
-
|
|
63
|
-
Generate a CTRF report locally without uploading:
|
|
64
|
-
|
|
65
|
-
```ts
|
|
66
|
-
['@testream/vitest-reporter', {
|
|
67
|
-
apiKey: 'not-needed',
|
|
68
|
-
uploadEnabled: false,
|
|
69
|
-
}]
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## Requirements
|
|
73
|
-
|
|
74
|
-
- Vitest >= 3.0.0
|
|
75
|
-
- Node.js >= 18.0.0
|
|
76
|
-
|
|
77
|
-
## License
|
|
78
|
-
|
|
79
|
-
See [LICENSE](./LICENSE) for details.
|
|
28
|
+
Need more configuration options? See the full guide at https://testream.github.io/docs/reporters/vitest.
|