norn-cli 1.1.4 → 1.2.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/CHANGELOG.md CHANGED
@@ -2,6 +2,43 @@
2
2
 
3
3
  All notable changes to the "Norn" extension will be documented in this file.
4
4
 
5
+ ## [1.2.2] - 2026-02-05
6
+
7
+ ### Added
8
+ - **Coverage for sub-sequences**: Coverage now follows `run SequenceName` calls to track API calls in nested sequences
9
+ - **Coverage for named request blocks**: Named request blocks (`[RequestName]`) with hardcoded URLs are now matched to swagger endpoints by URL path
10
+ - **Auto-refresh coverage on save**: Coverage panel updates automatically when `.norn` or `.nornapi` files are saved
11
+
12
+ ### Improved
13
+ - **IntelliSense for .nornapi files**: Content-Type header completions now work in `.nornapi` files (previously only worked in `.norn`)
14
+
15
+ ## [1.2.1] - 2026-02-03
16
+
17
+ ### Added
18
+ - **Inline headers for API endpoints**: Stack custom headers below endpoint calls from `.nornapi` files
19
+ - Example: `GET Login` followed by `x-api-key: "my-key"` on the next line
20
+ - Mix inline headers with header groups (e.g., `Common`)
21
+ - Inline headers take precedence over header group values
22
+ - Syntax highlighting for inline headers after API endpoint calls
23
+
24
+ ### Improved
25
+ - **IntelliSense for header values**: After selecting `Content-Type`, IntelliSense automatically triggers to show content type options (`application/json`, etc.)
26
+ - **Removed snippet tab stops**: Header completions no longer leave you in snippet mode requiring Tab to exit
27
+ - **Better trigger characters**: Added `:` as trigger character for immediate header value suggestions
28
+
29
+ ## [1.2.0] - 2026-02-02
30
+
31
+ ### Added
32
+ - **Swagger API Coverage**: See percentage coverage of your OpenAPI/Swagger endpoints
33
+ - Status bar indicator shows coverage percentage when swagger specs are detected
34
+ - Click to open detailed coverage panel with per-endpoint breakdown
35
+ - Coverage tracks asserted status codes (200, 400, 404, etc.) per endpoint
36
+ - Supports wildcard matching (2xx, 4xx, 5xx)
37
+ - Only counts `test sequence` blocks toward coverage
38
+ - CodeLens on swagger lines shows coverage at a glance
39
+ - Automatic recalculation after test execution
40
+ - Caches swagger specs for performance
41
+
5
42
  ## [1.1.4] - 2026-02-02
6
43
 
7
44
  ### Fixed
package/README.md CHANGED
@@ -14,6 +14,7 @@ A powerful REST client extension for VS Code with sequences, assertions, environ
14
14
  - **Sequences**: Chain multiple requests with response capture using `$N.path`
15
15
  - **Test Sequences**: Mark sequences as tests with `test sequence` for CLI execution
16
16
  - **Test Explorer**: Run tests from VS Code's Testing sidebar with colorful output
17
+ - **Swagger Coverage**: Track API coverage with status bar indicator and detailed panel
17
18
  - **Parameterized Tests**: Data-driven testing with `@data` and `@theory` annotations
18
19
  - **Sequence Tags**: Tag sequences with `@smoke`, `@team(CustomerExp)` for filtering in CI/CD
19
20
  - **Secret Variables**: Mark sensitive environment variables with `secret` for automatic redaction
@@ -841,6 +842,41 @@ jobs:
841
842
 
842
843
  ## Syntax Reference
843
844
 
845
+ ### Swagger API Coverage
846
+
847
+ Track how much of your OpenAPI/Swagger spec is covered by tests:
848
+
849
+ - **Status Bar**: Shows coverage percentage when a `.nornapi` file has a `swagger` URL
850
+ - **Coverage Panel**: Click the status bar to see detailed per-endpoint coverage
851
+ - **Per Status Code**: Each response code (200, 400, 404) counts separately toward 100%
852
+ - **Wildcard Support**: Assert `2xx` to match 200, 201, 204, etc.
853
+ - **Test Sequences Only**: Only `test sequence` blocks count toward coverage
854
+ - **CodeLens**: Coverage shown on swagger import lines
855
+
856
+ Coverage is calculated by analyzing your test sequences for:
857
+ 1. API calls by endpoint name (e.g., `GET GetPetById`)
858
+ 2. Status assertions (e.g., `assert $1.status == 200`)
859
+
860
+ ```bash
861
+ # In your .nornapi file:
862
+ swagger https://petstore.swagger.io/v2/swagger.json
863
+
864
+ GetOrderById: GET https://petstore.swagger.io/v2/store/order/{orderId}
865
+ ```
866
+
867
+ ```bash
868
+ # In your .norn test file:
869
+ test sequence OrderTests
870
+ # This covers GET /store/order/{orderId} with 200
871
+ var order = GET GetOrderById(1)
872
+ assert order.status == 200
873
+
874
+ # This covers GET /store/order/{orderId} with 404
875
+ var notFound = GET GetOrderById(999999)
876
+ assert notFound.status == 404
877
+ end sequence
878
+ ```
879
+
844
880
  | Syntax | Description |
845
881
  |--------|-------------|
846
882
  | `var name = value` | Declare a variable (literal) |