@testream/dotnet-reporter 0.5.0 → 0.5.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.
package/README.md CHANGED
@@ -3,12 +3,11 @@
3
3
  Run .NET tests and send the results from your codebase to Jira via Testream.
4
4
 
5
5
  - **Docs:** https://testream.github.io/docs/reporters/dotnet
6
- - **Docs repository:** https://github.com/testream/docs
7
6
 
8
7
  ## Quick Start
9
8
 
10
9
  ```bash
11
- npx @testream/dotnet-reporter -p PROJ -k $TESTREAM_API_KEY
10
+ npx @testream/dotnet-reporter -k $TESTREAM_API_KEY
12
11
  ```
13
12
 
14
13
  This command runs your tests and uploads the results so they show up in Jira.
package/dist/index.js CHANGED
@@ -2514,10 +2514,9 @@ function printUsage() {
2514
2514
  @testream/dotnet-reporter - Run .NET tests and upload results to Testream
2515
2515
 
2516
2516
  Usage:
2517
- npx @testream/dotnet-reporter --project-key <key> --api-key <key> [options]
2517
+ npx @testream/dotnet-reporter --api-key <key> [options]
2518
2518
 
2519
2519
  Required arguments:
2520
- --project-key, -p Project key
2521
2520
  --api-key, -k API key for authentication
2522
2521
 
2523
2522
  Optional arguments:
@@ -2550,25 +2549,25 @@ Other:
2550
2549
 
2551
2550
  Examples:
2552
2551
  # Run tests and upload (simplest usage)
2553
- npx @testream/dotnet-reporter -p MYPROJ -k your-api-key
2552
+ npx @testream/dotnet-reporter -k your-api-key
2554
2553
 
2555
2554
  # Run tests for a specific project
2556
- npx @testream/dotnet-reporter -p MYPROJ -k your-api-key --project ./MyTests
2555
+ npx @testream/dotnet-reporter -k your-api-key --project ./MyTests
2557
2556
 
2558
2557
  # With environment metadata
2559
- npx @testream/dotnet-reporter -p MYPROJ -k your-api-key \\
2558
+ npx @testream/dotnet-reporter -k your-api-key \\
2560
2559
  --test-environment staging --app-name MyApp --app-version 1.0.0
2561
2560
 
2562
2561
  # Pass additional arguments to dotnet test
2563
- npx @testream/dotnet-reporter -p MYPROJ -k your-api-key -- --filter "Category=Unit"
2562
+ npx @testream/dotnet-reporter -k your-api-key -- --filter "Category=Unit"
2564
2563
 
2565
2564
  # Use existing TRX file (skip running tests)
2566
- npx @testream/dotnet-reporter -p MYPROJ -k your-api-key --trx-path TestResults/*.trx
2565
+ npx @testream/dotnet-reporter -k your-api-key --trx-path TestResults/*.trx
2567
2566
 
2568
2567
  How it works:
2569
2568
  1. Runs 'dotnet test' with TRX logging enabled
2570
2569
  2. Parses the TRX output and converts to CTRF format
2571
- 3. Uploads to Testream
2570
+ 3. Uploads to Testream (project key inferred from API key)
2572
2571
 
2573
2572
  No manual steps required - just run and upload!
2574
2573
  `);
@@ -2598,11 +2597,6 @@ function parseArgs(args) {
2598
2597
  printUsage();
2599
2598
  process.exit(0);
2600
2599
  break;
2601
- case '--project-key':
2602
- case '-p':
2603
- options.projectKey = nextArg;
2604
- i++;
2605
- break;
2606
2600
  case '--api-key':
2607
2601
  case '-k':
2608
2602
  options.apiKey = nextArg;
@@ -2672,13 +2666,8 @@ function parseArgs(args) {
2672
2666
  options.dotnetArgs = dotnetArgs;
2673
2667
  }
2674
2668
  // Validate required options
2675
- const missing = [];
2676
- if (!options.projectKey)
2677
- missing.push('--project-key');
2678
- if (!options.apiKey && options.uploadEnabled)
2679
- missing.push('--api-key');
2680
- if (missing.length > 0) {
2681
- console.error(`Error: Missing required arguments: ${missing.join(', ')}`);
2669
+ if (!options.apiKey && options.uploadEnabled) {
2670
+ console.error('Error: Missing required argument: --api-key');
2682
2671
  console.error('Run with --help for usage information.');
2683
2672
  return null;
2684
2673
  }