@testream/dotnet-reporter 0.4.0 → 0.4.2

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.
Files changed (2) hide show
  1. package/README.md +6 -148
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,158 +1,16 @@
1
1
  # @testream/dotnet-reporter
2
2
 
3
- Run .NET tests and upload results to Testream with a **single command**.
3
+ Run .NET tests and send the results from your codebase to Jira via Testream.
4
4
 
5
- ## Features
6
-
7
- - **Zero Configuration** - Just run and upload, no TRX path needed
8
- - **All .NET Frameworks** - Works with xUnit, NUnit, and MSTest
9
- - **Auto-Detection** - Detects test framework and git context automatically
10
- - **CI/CD Ready** - Works in GitHub Actions, GitLab CI, Azure Pipelines, and more
5
+ - **Docs:** https://testream.github.io/docs/reporters/dotnet
6
+ - **Docs repository:** https://github.com/testream/docs
11
7
 
12
8
  ## Quick Start
13
9
 
14
10
  ```bash
15
- # One command does everything!
16
- npx @testream/dotnet-reporter -p MYPROJ -k your-api-key
17
- ```
18
-
19
- That's it! The CLI will:
20
- 1. Run `dotnet test`
21
- 2. Generate a test report
22
- 3. Upload to Testream
23
-
24
- ## Installation
25
-
26
- ```bash
27
- # Use directly with npx (recommended)
28
- npx @testream/dotnet-reporter ...
29
-
30
- # Or install globally
31
- npm install -g @testream/dotnet-reporter
32
- testream-dotnet ...
33
- ```
34
-
35
- ## Usage
36
-
37
- ### Basic Usage
38
-
39
- ```bash
40
- # Run tests in current directory and upload
41
- npx @testream/dotnet-reporter -p MYPROJ -k $API_KEY
42
-
43
- # Run tests for a specific project
44
- npx @testream/dotnet-reporter -p MYPROJ -k $API_KEY --project ./MyTests
45
-
46
- # Run tests for a solution
47
- npx @testream/dotnet-reporter -p MYPROJ -k $API_KEY --project ./MySolution.sln
48
- ```
49
-
50
- ### Pass Arguments to dotnet test
51
-
52
- ```bash
53
- # Filter tests
54
- npx @testream/dotnet-reporter -p MYPROJ -k $API_KEY -- --filter "Category=Unit"
55
-
56
- # Set configuration
57
- npx @testream/dotnet-reporter -p MYPROJ -k $API_KEY -- --configuration Release
58
-
59
- # Multiple arguments
60
- npx @testream/dotnet-reporter -p MYPROJ -k $API_KEY -- --filter "Category=Unit" --no-build
61
- ```
62
-
63
- ### Use Existing TRX File
64
-
65
- If you've already run tests and have TRX file(s):
66
-
67
- ```bash
68
- npx @testream/dotnet-reporter -p MYPROJ -k $API_KEY --trx-path TestResults/*.trx
69
- ```
70
-
71
- ## CLI Options
72
-
73
- | Option | Description |
74
- |--------|-------------|
75
- | `-p, --project-key` | **(Required)** Jira project key |
76
- | `-k, --api-key` | **(Required)** API key for authentication |
77
- | `--project <path>` | Path to .NET project/solution (defaults to current directory) |
78
- | `--trx-path <path>` | Use existing TRX file(s) instead of running tests |
79
- | `--test-tool` | Test framework name (auto-detected) |
80
- | `--branch` | Git branch (auto-detected in CI) |
81
- | `--commit-sha` | Git commit SHA (auto-detected in CI) |
82
- | `-- <args>` | Additional arguments to pass to `dotnet test` |
83
-
84
- ## GitHub Actions Example
85
-
86
- ```yaml
87
- name: Tests
88
-
89
- on: [push, pull_request]
90
-
91
- jobs:
92
- test:
93
- runs-on: ubuntu-latest
94
- steps:
95
- - uses: actions/checkout@v4
96
-
97
- - name: Setup .NET
98
- uses: actions/setup-dotnet@v4
99
- with:
100
- dotnet-version: '8.0.x'
101
-
102
- - name: Run tests and upload
103
- run: |
104
- npx @testream/dotnet-reporter \
105
- -p ${{ secrets.PROJECT_KEY }} \
106
- -k ${{ secrets.API_KEY }} \
107
- --project ./MySolution.sln \
108
- --test-tool xunit \
109
- --branch ${{ github.ref_name }} \
110
- --commit-sha ${{ github.sha }} \
111
- --repository-url ${{ github.server_url }}/${{ github.repository }} \
112
- --build-name ${{ github.workflow }} \
113
- --build-number ${{ github.run_number }} \
114
- --build-url ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \
115
- --test-environment ci \
116
- --app-name MyApp \
117
- --app-version 1.0.0 \
118
- --test-type unit \
119
- --fail-on-error \
120
- -- --configuration Release
121
- ```
122
-
123
- ## How It Works
124
-
125
- ```
126
- ┌──────────────────────────────────────────┐
127
- │ @testream/dotnet-reporter │
128
- ├──────────────────────────────────────────┤
129
- │ 1. Run dotnet test │
130
- │ 2. Generate report │
131
- │ 3. Upload to Testream │
132
- └──────────────────────────────────────────┘
11
+ npx @testream/dotnet-reporter -p PROJ -k $TESTREAM_API_KEY
133
12
  ```
134
13
 
135
- It all happens automatically - just provide your project key and API key!
136
-
137
- ## Supported Frameworks
138
-
139
- | Framework | Version | Status |
140
- |-----------|---------|--------|
141
- | xUnit | 2.x+ | ✅ Tested |
142
- | NUnit | 4.x+ | ✅ Tested |
143
- | MSTest | 3.x+ | ✅ Tested |
144
-
145
- ## Supported CI Platforms
146
-
147
- Git context (branch, commit, repository) is auto-detected in:
148
-
149
- - GitHub Actions
150
- - GitLab CI
151
- - Azure Pipelines
152
- - CircleCI
153
- - Jenkins
154
- - Bitbucket Pipelines
155
-
156
- ## License
14
+ This command runs your tests and uploads the results so they show up in Jira.
157
15
 
158
- See [LICENSE](./LICENSE) file.
16
+ For CLI options and CI examples, see https://testream.github.io/docs/reporters/dotnet.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testream/dotnet-reporter",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "CLI to upload .NET test results (xUnit, NUnit, MSTest) to Testream",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "repository": {
16
16
  "type": "git",
17
- "url": "git+https://github.com/your-org/jira-test-manager.git"
17
+ "url": "git+https://github.com/testream/docs.git"
18
18
  },
19
19
  "keywords": [
20
20
  "testing",