ado-sync 0.1.64 → 0.1.67

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 (63) hide show
  1. package/README.md +20 -15
  2. package/dist/__tests__/regressions.test.js +1011 -1
  3. package/dist/__tests__/regressions.test.js.map +1 -1
  4. package/dist/ai/generate-spec.d.ts +1 -1
  5. package/dist/ai/generate-spec.js +23 -0
  6. package/dist/ai/generate-spec.js.map +1 -1
  7. package/dist/ai/summarizer.d.ts +3 -2
  8. package/dist/ai/summarizer.js +50 -1
  9. package/dist/ai/summarizer.js.map +1 -1
  10. package/dist/azure/test-cases.d.ts +11 -1
  11. package/dist/azure/test-cases.js +286 -43
  12. package/dist/azure/test-cases.js.map +1 -1
  13. package/dist/cli.js +91 -14
  14. package/dist/cli.js.map +1 -1
  15. package/dist/config.js +74 -1
  16. package/dist/config.js.map +1 -1
  17. package/dist/id-markers.d.ts +1 -0
  18. package/dist/id-markers.js +13 -0
  19. package/dist/id-markers.js.map +1 -1
  20. package/dist/mcp-server.js +1 -1
  21. package/dist/mcp-server.js.map +1 -1
  22. package/dist/sync/cache.d.ts +2 -0
  23. package/dist/sync/cache.js.map +1 -1
  24. package/dist/sync/engine.d.ts +12 -1
  25. package/dist/sync/engine.js +210 -41
  26. package/dist/sync/engine.js.map +1 -1
  27. package/dist/types.d.ts +56 -4
  28. package/llms.txt +12 -11
  29. package/package.json +8 -1
  30. package/docs/advanced.md +0 -988
  31. package/docs/agent-setup.md +0 -204
  32. package/docs/capability-roadmap.md +0 -280
  33. package/docs/cli.md +0 -609
  34. package/docs/configuration.md +0 -322
  35. package/docs/examples/csharp-mstest-local-llm.yaml +0 -35
  36. package/docs/examples/csharp-mstest.yaml +0 -21
  37. package/docs/examples/csharp-nunit.yaml +0 -21
  38. package/docs/examples/csharp-specflow.yaml +0 -16
  39. package/docs/examples/cypress.yaml +0 -21
  40. package/docs/examples/detox-react-native.yaml +0 -21
  41. package/docs/examples/espresso-android.yaml +0 -21
  42. package/docs/examples/flutter-dart.yaml +0 -21
  43. package/docs/examples/java-junit.yaml +0 -21
  44. package/docs/examples/java-testng.yaml +0 -21
  45. package/docs/examples/js-jasmine-wdio.yaml +0 -21
  46. package/docs/examples/js-jest.yaml +0 -21
  47. package/docs/examples/playwright-js.yaml +0 -21
  48. package/docs/examples/playwright-ts.yaml +0 -21
  49. package/docs/examples/puppeteer.yaml +0 -21
  50. package/docs/examples/python-pytest.yaml +0 -21
  51. package/docs/examples/robot-framework.yaml +0 -19
  52. package/docs/examples/testcafe.yaml +0 -21
  53. package/docs/examples/xcuitest-ios.yaml +0 -21
  54. package/docs/mcp-server.md +0 -312
  55. package/docs/publish-test-results.md +0 -939
  56. package/docs/spec-formats.md +0 -1357
  57. package/docs/troubleshooting.md +0 -101
  58. package/docs/vscode-extension.md +0 -139
  59. package/docs/work-item-links.md +0 -115
  60. package/docs/workflows.md +0 -457
  61. package/mkdocs.yml +0 -40
  62. package/requirements-docs.txt +0 -4
  63. package/scripts/build_site.sh +0 -6
@@ -1,101 +0,0 @@
1
- # Troubleshooting
2
-
3
- ---
4
-
5
- ## Configuration & connectivity
6
-
7
- **`No config file found`**
8
- Run `ado-sync init` or pass `-c path/to/config.json`.
9
-
10
- **`Environment variable 'X' is not set`**
11
- Your config references `$X` in `auth.token` but the variable is not exported. Run `export X=...` or add it to a `.env` file.
12
-
13
- **`Test case #N not found in Azure DevOps`**
14
- The test case was deleted in Azure. Remove the ID tag from the local file to recreate it, or restore the test case in Azure.
15
-
16
- **`Failed to parse <file>`**
17
- Gherkin syntax error. Run `npx cucumber-js --dry-run` to identify the problem line.
18
-
19
- ---
20
-
21
- ## Push / sync
22
-
23
- **Test Case created but ID not written back**
24
- Check that the file is writable, or that `sync.disableLocalChanges` is not `true`.
25
-
26
- **Changes not detected on push**
27
- The comparison uses title + steps + description. Touch any step to force an update, or reset the cache by deleting `.ado-sync-state.json`.
28
-
29
- **Conflict detected unexpectedly**
30
- Delete `.ado-sync-state.json` to reset the cache. The next push re-populates it from Azure.
31
-
32
- **CSV/Excel IDs not written back**
33
- Ensure the file is not open in another application and that `sync.disableLocalChanges` is not `true`. If a TC was deleted from Azure and re-created on push, the old ID in column A is replaced with the new ID automatically.
34
-
35
- **Excel file not parsed / `No worksheet found`**
36
- ado-sync searches for the first worksheet by reading `xl/_rels/workbook.xml.rels` from the xlsx ZIP, falling back to common names (`sheet.xml`, `sheet1.xml`). Non-standard sheet names and multi-sheet workbooks are handled automatically. If parsing still fails, re-export from Azure DevOps.
37
-
38
- **Pull has no effect on CSV files**
39
- CSV pull is now supported — `ado-sync pull` updates the Title and step rows in CSV files to match the current Azure DevOps Test Case. Run `ado-sync pull --dry-run` first to preview changes.
40
-
41
- **Pull has no effect on Excel files**
42
- Excel (xlsx) pull is not yet supported — only push. Use CSV export instead if bidirectional sync is needed, or pull the changes manually and re-export.
43
-
44
- ---
45
-
46
- ## C# / .NET
47
-
48
- **C# categories show as constant names instead of values**
49
- ado-sync resolves `const string` declarations in the same file. Constants defined in a base class are not resolved — use string literals in `[TestCategory("...")]` for reliable tagging.
50
-
51
- **C# test methods not detected**
52
- Ensure the method has `[TestMethod]` on its own line. Nested classes or abstract base methods are not parsed. Add base class files to `local.exclude`.
53
-
54
- ---
55
-
56
- ## Java
57
-
58
- **Java test methods not detected**
59
- Ensure each test method has a `@Test` annotation. Abstract base methods and methods with only `@Before`/`@After` are not parsed. Add base class files to `local.exclude`.
60
-
61
- **Java ID not written back (JUnit 5)**
62
- ado-sync writes `@Tag("tc:ID")` above the `@Test` annotation. Ensure the file is writable. The `@Tag` import (`org.junit.jupiter.api.Tag`) must already be present or will be added automatically.
63
-
64
- ---
65
-
66
- ## Python
67
-
68
- **Python test functions not detected**
69
- ado-sync detects functions starting with `test_` at module level and inside classes. Ensure functions follow the `def test_*()` convention. Abstract base test methods should be excluded from `local.include`.
70
-
71
- **Python ID not written back**
72
- ado-sync writes `@pytest.mark.tc(ID)` directly above the `def test_*` line. Ensure `pytest` is in your test environment. The `pytest` import is not required in the file itself.
73
-
74
- ---
75
-
76
- ## JavaScript / TypeScript
77
-
78
- **JavaScript/TypeScript tests not detected**
79
- ado-sync detects `it()`, `test()`, `xit()`, `xtest()`, and `.only`/`.skip`/`.concurrent` variants. Tests with dynamic titles (template literals or computed values) are skipped — use string literals for the test title.
80
-
81
- **JavaScript ID not written back**
82
- ado-sync inserts `// @tc:ID` immediately above the `it()`/`test()` line. There must be no blank line between the comment and the test function call.
83
-
84
- ---
85
-
86
- ## Publishing test results
87
-
88
- **`publish-test-results` — "TestPointId, testCaseId must be specified for planned test results"**
89
- This error means the Test Run was created as a "planned" run (tied to a test plan), which requires test point IDs for each result. ado-sync creates standalone automated runs — do not pass `plan.id` in `runModel`. This is handled automatically; if you see this error, ensure you are on the latest version.
90
-
91
- **TRX results not linked to Test Cases**
92
- For MSTest, TC IDs are read directly from `[TestProperty("tc","ID")]` embedded in the TRX. For NUnit, use `--logger "nunit3;LogFileName=results.xml"` (native XML format) instead of TRX so `[Property("tc","ID")]` values are included. If neither is available, set `sync.markAutomated: true` and rely on `AutomatedTestName` FQMN matching.
93
-
94
- **TRX screenshots / `<ResultFiles>` not attached**
95
- In TRX format, `<ResultFiles>` is a child of `<Output>`, not a direct child of `<UnitTestResult>`. Make sure `TestContext.AddResultFile("path/to/screenshot.png")` is called in your test code.
96
-
97
- **Attachment paths resolve incorrectly**
98
- Attachment paths embedded in result files (TRX `<ResultFiles>`, NUnit `<filePath>`, JUnit `[[ATTACHMENT|path]]`, Playwright `attachments[].path`) are resolved **relative to the result file's directory**, not the working directory. Keep result files and screenshots in the same output folder hierarchy as your test runner produces them.
99
-
100
- **"Invalid AttachmentType specified" from Azure DevOps API**
101
- Azure DevOps only accepts `GeneralAttachment` and `ConsoleLog` as attachment types. Screenshot and video files are uploaded as `GeneralAttachment` automatically — no special type is needed.
@@ -1,139 +0,0 @@
1
- # VS Code Extension
2
-
3
- The **ado-sync VS Code Extension** brings the full `ado-sync` workflow into your editor — no terminal required for day-to-day tasks.
4
-
5
- - **Marketplace:** [PavanMudigonda.ado-sync-vscode](https://marketplace.visualstudio.com/items?itemName=PavanMudigonda.ado-sync-vscode)
6
- - **Source:** [github.com/PavanMudigonda/ado-sync-vscode](https://github.com/PavanMudigonda/ado-sync-vscode)
7
-
8
- ---
9
-
10
- ## Requirements
11
-
12
- - `ado-sync` npm package installed globally:
13
- ```bash
14
- npm install -g ado-sync
15
- ```
16
- Or as a dev dependency in your project (`npx ado-sync` is used automatically).
17
- - An `ado-sync.json` (or `ado-sync.yml`) config file in the workspace root.
18
-
19
- ---
20
-
21
- ## Installation
22
-
23
- **From VS Code:**
24
- 1. Open the Extensions panel (`Ctrl+Shift+X` / `Cmd+Shift+X`)
25
- 2. Search for `ado-sync`
26
- 3. Click **Install**
27
-
28
- **From the CLI:**
29
- ```bash
30
- code --install-extension PavanMudigonda.ado-sync-vscode
31
- ```
32
-
33
- **From the Marketplace:**
34
- Visit the [Marketplace page](https://marketplace.visualstudio.com/items?itemName=PavanMudigonda.ado-sync-vscode) and click **Install**.
35
-
36
- ---
37
-
38
- ## Features
39
-
40
- ### CodeLens
41
-
42
- Every `@tc:12345` tag in `.feature` and `.md` files gets inline action links directly above it:
43
-
44
- ```
45
- [ View in ADO ] [ Push ] [ Fetch ]
46
- @tc:12345
47
- Scenario: User can log in
48
- ```
49
-
50
- - **View in ADO** — opens the Test Case in your browser
51
- - **Push** — pushes only this test case to Azure DevOps
52
- - **Fetch** — retrieves the latest version of this test case from ADO
53
-
54
- Toggle CodeLens on/off with the `ado-sync.showCodeLens` setting.
55
-
56
- ### Hover Tooltips
57
-
58
- Hover over any `@tc:12345` tag to see a tooltip with a direct link to the Azure DevOps Test Case.
59
-
60
- ### Sidebar Tree View
61
-
62
- The **Testing** panel (`Ctrl+Shift+T`) includes an **ADO Test Cases** tree:
63
-
64
- - Lists all spec files in the workspace that contain `@tc:` tags
65
- - Each file expands to show its linked test cases with line numbers
66
- - Click an entry to jump to the line in the editor
67
-
68
- ### Status Bar
69
-
70
- The status bar item shows the current sync state of the workspace. Click it to run `ado-sync status` and refresh.
71
-
72
- ---
73
-
74
- ## Commands
75
-
76
- Open the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`) and type `ado-sync`:
77
-
78
- | Command | Description |
79
- |---|---|
80
- | `ado-sync: Push` | Push all local spec changes to Azure DevOps (creates new TCs, updates existing) |
81
- | `ado-sync: Push (Dry Run)` | Preview what push would do — no changes applied |
82
- | `ado-sync: Pull` | Pull Azure DevOps changes back into local spec files |
83
- | `ado-sync: Pull (Dry Run)` | Preview what pull would do — no changes applied |
84
- | `ado-sync: Status` | Show a diff of local vs. Azure DevOps state |
85
- | `ado-sync: Validate Config` | Verify the config file and test the Azure DevOps connection |
86
- | `ado-sync: Generate Spec from Story` | Prompt for a User Story ID and generate a `.feature` or `.md` spec file |
87
- | `ado-sync: Fetch Test Case` | Prompt for a Test Case ID and retrieve it from Azure DevOps |
88
- | `ado-sync: Publish Test Results` | Upload a result file (JUnit XML, TRX, NUnit, Playwright JSON, Cucumber JSON, CTRF) |
89
-
90
- All command output goes to the **ado-sync** Output Channel (View → Output → select `ado-sync` from the dropdown).
91
-
92
- ---
93
-
94
- ## Settings
95
-
96
- Configure via VS Code Settings (`Ctrl+,` → search `ado-sync`) or directly in `settings.json`:
97
-
98
- | Setting | Type | Default | Description |
99
- |---|---|---|---|
100
- | `ado-sync.configPath` | `string` | `""` | Path to the config file, relative to the workspace root. Empty = auto-detect (`ado-sync.json` / `ado-sync.yml`). |
101
- | `ado-sync.showCodeLens` | `boolean` | `true` | Show inline CodeLens links above `@tc:` tags. |
102
- | `ado-sync.autoStatus` | `boolean` | `false` | Automatically run `ado-sync status` when a spec file is saved. |
103
- | `ado-sync.outputLevel` | `string` | `"normal"` | Output verbosity: `"normal"`, `"verbose"`, or `"quiet"`. |
104
-
105
- Example `settings.json`:
106
- ```json
107
- {
108
- "ado-sync.configPath": "config/ado-sync.json",
109
- "ado-sync.showCodeLens": true,
110
- "ado-sync.autoStatus": true,
111
- "ado-sync.outputLevel": "verbose"
112
- }
113
- ```
114
-
115
- ---
116
-
117
- ## Quick Start
118
-
119
- 1. Install `ado-sync` globally: `npm install -g ado-sync`
120
- 2. In your project root, run `ado-sync init` to generate `ado-sync.json`
121
- 3. Fill in your `orgUrl`, `project`, `testPlan.id`, and auth token (see [configuration.md](configuration.md))
122
- 4. Install this extension
123
- 5. Open a `.feature` or `.md` spec file — CodeLens links appear automatically above each `@tc:` tag
124
- 6. Run `ado-sync: Validate Config` from the Command Palette to confirm connectivity
125
- 7. Run `ado-sync: Push (Dry Run)` to preview, then `ado-sync: Push` to sync
126
-
127
- ---
128
-
129
- ## Troubleshooting
130
-
131
- | Symptom | Fix |
132
- |---|---|
133
- | CodeLens not showing | Check `ado-sync.showCodeLens` is `true`; reload the window (`Ctrl+Shift+P` → Reload Window) |
134
- | Commands fail with "ado-sync not found" | Run `npm install -g ado-sync` or ensure it is in your project's `devDependencies` |
135
- | "Config file not found" | Run `ado-sync init` in the workspace root, or set `ado-sync.configPath` |
136
- | Auth errors | Verify `AZURE_DEVOPS_TOKEN` is set in your environment or `.env` file |
137
- | Output channel empty | Set `ado-sync.outputLevel` to `"verbose"` for more detail |
138
-
139
- For CLI-level issues see [troubleshooting.md](troubleshooting.md).
@@ -1,115 +0,0 @@
1
- # Work Item Links
2
-
3
- Link each Test Case to related Azure DevOps work items (User Stories, Bugs, etc.) automatically on every push.
4
-
5
- ---
6
-
7
- ## Configure `sync.links`
8
-
9
- ```json
10
- {
11
- "sync": {
12
- "links": [
13
- {
14
- "prefix": "story",
15
- "relationship": "Microsoft.VSTS.Common.TestedBy-Reverse",
16
- "workItemType": "User Story"
17
- },
18
- {
19
- "prefix": "bug",
20
- "relationship": "System.LinkTypes.Related",
21
- "workItemType": "Bug"
22
- }
23
- ]
24
- }
25
- }
26
- ```
27
-
28
- | Field | Description |
29
- |-------|-------------|
30
- | `prefix` | The tag prefix used in your spec files (e.g. `story` → `@story:555`) |
31
- | `relationship` | ADO relation type (see common values below) |
32
- | `workItemType` | Optional — used in log output only |
33
-
34
- **Common relationship values:**
35
-
36
- | Relationship | Meaning |
37
- |---|---|
38
- | `Microsoft.VSTS.Common.TestedBy-Reverse` | Test Case "Tested By" ↔ User Story |
39
- | `System.LinkTypes.Related` | Simple "Related" link |
40
- | `System.LinkTypes.Dependency-Forward` | "Successor" (this item depends on) |
41
- | `System.LinkTypes.Hierarchy-Reverse` | "Parent" link |
42
-
43
- ---
44
-
45
- ## Tag your tests
46
-
47
- **Gherkin (`.feature`):**
48
- ```gherkin
49
- # @story:555 @bug:789
50
- Scenario: User can log in
51
- Given I am on the login page
52
- ```
53
-
54
- **JavaScript / TypeScript (Jest, Playwright, Cypress, TestCafe, Puppeteer):**
55
- ```typescript
56
- // @story:555
57
- // @bug:789
58
- test('user can log in', async ({ page }) => { ... });
59
- ```
60
-
61
- **Markdown (`.md`):**
62
- ```markdown
63
- ### User can log in @story:555 @bug:789
64
-
65
- 1. Navigate to the login page
66
- 2. Check: Login form is visible
67
- ```
68
-
69
- **Python (pytest):**
70
- ```python
71
- # @story:555 @bug:789
72
- def test_user_can_log_in():
73
- ...
74
- ```
75
-
76
- **C# / Java / Espresso:** Add `// @story:555` in the comment block immediately above the `[TestMethod]` / `@Test` line.
77
-
78
- **Robot Framework (`.robot`):**
79
- ```robot
80
- *** Test Cases ***
81
- My Login Test
82
- [Tags] tc:12345 story:555 bug:789
83
- Open Browser ${URL}
84
- Login As user pass
85
- ```
86
-
87
- **Swift (XCUITest):**
88
- ```swift
89
- // @story:555
90
- // @bug:789
91
- func testUserCanLogin() { ... }
92
- ```
93
-
94
- **Dart (Flutter):**
95
- ```dart
96
- // @story:555
97
- // @bug:789
98
- testWidgets('user can log in', (WidgetTester tester) async { ... });
99
- ```
100
-
101
- **Detox / React Native:**
102
- ```typescript
103
- // @story:555
104
- // @bug:789
105
- it('user can log in', async () => { ... });
106
- ```
107
-
108
- ---
109
-
110
- ## How it works
111
-
112
- - On each `push`, ado-sync reads the `@story:N` / `@bug:N` tags from the spec file.
113
- - **New links** found in the file are added to the Test Case in Azure DevOps.
114
- - **Stale links** (present in Azure but no longer tagged locally) are removed automatically.
115
- - The sync is non-destructive for links not covered by a configured prefix — only the prefixes listed in `sync.links` are managed.