trxa-tool 0.1.1 → 0.2.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.
Files changed (120) hide show
  1. package/MANUAL.md +376 -368
  2. package/README.md +75 -51
  3. package/SETUP.md +401 -0
  4. package/STUDIO.md +417 -309
  5. package/dist/fixture-schema.d.ts +45 -5
  6. package/dist/fixture-schema.js +97 -13
  7. package/dist/fixture-store.d.ts +37 -0
  8. package/dist/fixture-store.js +75 -0
  9. package/dist/index.js +76 -40
  10. package/dist/mapping.js +4 -1
  11. package/dist/mcp-bridge.d.ts +52 -0
  12. package/dist/mcp-bridge.js +290 -0
  13. package/dist/planrun-schema.d.ts +14 -6
  14. package/dist/planrun-schema.js +31 -7
  15. package/dist/planrun.d.ts +1 -1
  16. package/dist/planrun.js +2 -2
  17. package/dist/report-schema.d.ts +10 -1
  18. package/dist/report-schema.js +31 -5
  19. package/dist/report.d.ts +4 -1
  20. package/dist/report.js +9 -2
  21. package/dist/suite-runner.js +8 -2
  22. package/media/studio/fixtures-test-cases.png +0 -0
  23. package/media/studio/plans-editor.png +0 -0
  24. package/media/studio/recordings-create-test-case.png +0 -0
  25. package/media/studio/run-dialog.png +0 -0
  26. package/media/studio/settings-agent-runs.png +0 -0
  27. package/media/studio/settings-working-folder.png +0 -0
  28. package/media/studio/studio-recordings.png +0 -0
  29. package/media/studio/suites-canvas.png +0 -0
  30. package/media/studio/suites-inspector.png +0 -0
  31. package/media/studio/testcases-expectations.png +0 -0
  32. package/media/studio/testcases-outputs.png +0 -0
  33. package/media/studio/testrun-details.png +0 -0
  34. package/media/studio/testruns-list.png +0 -0
  35. package/package.json +6 -2
  36. package/studio/client-dist/assets/CreatePanel-C5bb5OIs.js +6 -0
  37. package/studio/client-dist/assets/FactTile-G1pURLys.js +1 -0
  38. package/studio/client-dist/assets/FieldLabel-DPmIEQ08.js +1 -0
  39. package/studio/client-dist/assets/FixtureNamePicker-137AAgwZ.js +1 -0
  40. package/studio/client-dist/assets/Fixtures-D0t-soph.js +1 -0
  41. package/studio/client-dist/assets/GeneralSection-CWkTeSX2.js +1 -0
  42. package/studio/client-dist/assets/ListPaneHeader-DXKqX36N.js +1 -0
  43. package/studio/client-dist/assets/Plans-C70evkGc.js +1 -0
  44. package/studio/client-dist/assets/Recordings-BT0dyVLs.js +1 -0
  45. package/studio/client-dist/assets/Settings-k-J3u5lH.js +1 -0
  46. package/studio/client-dist/assets/Suites-DLioOiRN.css +1 -0
  47. package/studio/client-dist/assets/Suites-DQhhMxjT.js +7 -0
  48. package/studio/client-dist/assets/TestCases-BdiopVGI.js +1 -0
  49. package/studio/client-dist/assets/TestRuns-CylAe-3t.js +9 -0
  50. package/studio/client-dist/assets/api-DJZ703_F.js +24 -0
  51. package/studio/client-dist/assets/bucket-18-viuwGcaj.js +1 -0
  52. package/studio/client-dist/assets/fixtureName-CTZT_jKu.js +1 -0
  53. package/studio/client-dist/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
  54. package/studio/client-dist/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
  55. package/studio/client-dist/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
  56. package/studio/client-dist/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
  57. package/studio/client-dist/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
  58. package/studio/client-dist/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
  59. package/studio/client-dist/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
  60. package/studio/client-dist/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
  61. package/studio/client-dist/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
  62. package/studio/client-dist/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
  63. package/studio/client-dist/assets/ibm-plex-sans-cyrillic-300-normal-LoaTnByX.woff +0 -0
  64. package/studio/client-dist/assets/ibm-plex-sans-cyrillic-300-normal-RhT0Ayi3.woff2 +0 -0
  65. package/studio/client-dist/assets/ibm-plex-sans-cyrillic-400-italic-Bf1n82Tb.woff +0 -0
  66. package/studio/client-dist/assets/ibm-plex-sans-cyrillic-400-italic-D9J6q4_O.woff2 +0 -0
  67. package/studio/client-dist/assets/ibm-plex-sans-cyrillic-400-normal-BTotfTJu.woff +0 -0
  68. package/studio/client-dist/assets/ibm-plex-sans-cyrillic-400-normal-DZqxrq2p.woff2 +0 -0
  69. package/studio/client-dist/assets/ibm-plex-sans-cyrillic-600-normal-71GNu3SW.woff2 +0 -0
  70. package/studio/client-dist/assets/ibm-plex-sans-cyrillic-600-normal-BGq0mW3O.woff +0 -0
  71. package/studio/client-dist/assets/ibm-plex-sans-cyrillic-ext-300-normal-Bbd5v1xK.woff +0 -0
  72. package/studio/client-dist/assets/ibm-plex-sans-cyrillic-ext-300-normal-DqmgDkIN.woff2 +0 -0
  73. package/studio/client-dist/assets/ibm-plex-sans-cyrillic-ext-400-italic-BELOEI8R.woff2 +0 -0
  74. package/studio/client-dist/assets/ibm-plex-sans-cyrillic-ext-400-italic-CfSXsIbO.woff +0 -0
  75. package/studio/client-dist/assets/ibm-plex-sans-cyrillic-ext-400-normal-Dsrv2Tcn.woff +0 -0
  76. package/studio/client-dist/assets/ibm-plex-sans-cyrillic-ext-400-normal-g30qAdWV.woff2 +0 -0
  77. package/studio/client-dist/assets/ibm-plex-sans-cyrillic-ext-600-normal-Bz0x94Yp.woff +0 -0
  78. package/studio/client-dist/assets/ibm-plex-sans-cyrillic-ext-600-normal-DUMzJB7m.woff2 +0 -0
  79. package/studio/client-dist/assets/ibm-plex-sans-greek-300-normal-J-CBqZoJ.woff2 +0 -0
  80. package/studio/client-dist/assets/ibm-plex-sans-greek-300-normal-STc8XiDr.woff +0 -0
  81. package/studio/client-dist/assets/ibm-plex-sans-greek-400-italic-BEZwmy7D.woff2 +0 -0
  82. package/studio/client-dist/assets/ibm-plex-sans-greek-400-italic-CTYLy0lX.woff +0 -0
  83. package/studio/client-dist/assets/ibm-plex-sans-greek-400-normal-D9ESIMu3.woff +0 -0
  84. package/studio/client-dist/assets/ibm-plex-sans-greek-400-normal-_efipK4i.woff2 +0 -0
  85. package/studio/client-dist/assets/ibm-plex-sans-greek-600-normal-D-CqTdkO.woff +0 -0
  86. package/studio/client-dist/assets/ibm-plex-sans-greek-600-normal-DzTrcv_p.woff2 +0 -0
  87. package/studio/client-dist/assets/ibm-plex-sans-latin-300-normal-C9Of02-5.woff +0 -0
  88. package/studio/client-dist/assets/ibm-plex-sans-latin-300-normal-b4i7YzLG.woff2 +0 -0
  89. package/studio/client-dist/assets/ibm-plex-sans-latin-400-italic-CZTNEAuW.woff2 +0 -0
  90. package/studio/client-dist/assets/ibm-plex-sans-latin-400-italic-CsGl1sm0.woff +0 -0
  91. package/studio/client-dist/assets/ibm-plex-sans-latin-400-normal-CDDApCn2.woff2 +0 -0
  92. package/studio/client-dist/assets/ibm-plex-sans-latin-400-normal-CYLoc0-x.woff +0 -0
  93. package/studio/client-dist/assets/ibm-plex-sans-latin-600-normal-Cu4Hd6ag.woff +0 -0
  94. package/studio/client-dist/assets/ibm-plex-sans-latin-600-normal-CuJfVYMP.woff2 +0 -0
  95. package/studio/client-dist/assets/ibm-plex-sans-latin-ext-300-normal-B8Zgwjh3.woff +0 -0
  96. package/studio/client-dist/assets/ibm-plex-sans-latin-ext-300-normal-BLFuR0P1.woff2 +0 -0
  97. package/studio/client-dist/assets/ibm-plex-sans-latin-ext-400-italic-Du9zzoL2.woff2 +0 -0
  98. package/studio/client-dist/assets/ibm-plex-sans-latin-ext-400-italic-V_9i1P_m.woff +0 -0
  99. package/studio/client-dist/assets/ibm-plex-sans-latin-ext-400-normal-C5H60-Va.woff2 +0 -0
  100. package/studio/client-dist/assets/ibm-plex-sans-latin-ext-400-normal-RBey6euL.woff +0 -0
  101. package/studio/client-dist/assets/ibm-plex-sans-latin-ext-600-normal-DIrixKbi.woff +0 -0
  102. package/studio/client-dist/assets/ibm-plex-sans-latin-ext-600-normal-DOrvGEcy.woff2 +0 -0
  103. package/studio/client-dist/assets/ibm-plex-sans-vietnamese-300-normal-CkYRZD2a.woff +0 -0
  104. package/studio/client-dist/assets/ibm-plex-sans-vietnamese-300-normal-SDfX6ktj.woff2 +0 -0
  105. package/studio/client-dist/assets/ibm-plex-sans-vietnamese-400-italic-78jqtfZH.woff +0 -0
  106. package/studio/client-dist/assets/ibm-plex-sans-vietnamese-400-italic-BbRnwouv.woff2 +0 -0
  107. package/studio/client-dist/assets/ibm-plex-sans-vietnamese-400-normal-DG4YqDda.woff2 +0 -0
  108. package/studio/client-dist/assets/ibm-plex-sans-vietnamese-400-normal-fK1oJ5dG.woff +0 -0
  109. package/studio/client-dist/assets/ibm-plex-sans-vietnamese-600-normal-DgdngZtN.woff +0 -0
  110. package/studio/client-dist/assets/ibm-plex-sans-vietnamese-600-normal-DpPYBSTl.woff2 +0 -0
  111. package/studio/client-dist/assets/index-cxBc2iRv.js +10 -0
  112. package/studio/client-dist/assets/index-wjWuVHXN.css +1 -0
  113. package/studio/client-dist/assets/status-DUGxC7G7.js +1 -0
  114. package/studio/client-dist/assets/testCaseTree-Cl1-bc5O.js +1 -0
  115. package/studio/client-dist/axtr-icon.svg +2 -5
  116. package/studio/client-dist/favicon.svg +2 -5
  117. package/studio/client-dist/index.html +5 -4
  118. package/studio/server/dist/index.js +1530 -292
  119. package/studio/client-dist/assets/index-CgWhGkEn.js +0 -24
  120. package/studio/client-dist/assets/index-CwAUMVCL.css +0 -1
package/README.md CHANGED
@@ -1,67 +1,91 @@
1
1
  # TRXA-TOOL
2
2
 
3
- Turn D365 Finance & Operations Task Recorder (`.axtr`) recordings into automated, data-driven
4
- regression tests that an AI agent replays against a live or sandbox environment.
3
+ TRXA-TOOL turns Dynamics 365 Finance and Supply Chain Management Task Recorder recordings (`.axtr`
4
+ files) into automated, data-driven regression tests that an AI agent replays against a test or
5
+ sandbox environment.
6
+
7
+ ## How it works
8
+
9
+ 1. **You record** a business process in Dynamics 365 with Task recorder, or export recordings from
10
+ a Business Process Modeler library in Lifecycle Services.
11
+ 1. **TRXA-TOOL prepares the test.** It translates each recording into steps that an agent can
12
+ perform. In TRXA Studio, you then decide which values are test data, what the test checks, and
13
+ how tests run in sequence.
14
+ 1. **An AI agent runs the test.** GitHub Copilot CLI, Claude Code, or another agent that can use
15
+ MCP tools works in Dynamics 365 through Microsoft's
16
+ [Dynamics 365 ERP MCP server](https://learn.microsoft.com/dynamics365/fin-ops-core/dev-itpro/copilot/copilot-mcp).
17
+ It performs each step, checks the results, and records whether each test passed or failed.
18
+ 1. **You review the results** in TRXA Studio, and share them as text, Markdown or PDF.
19
+
20
+ TRXA-TOOL does everything that has a fixed answer, such as reading recordings, working out the run
21
+ order and passing data between tests. The agent does only the work that needs a live Dynamics 365
22
+ session.
23
+
24
+ ![TRXA Studio, showing the steps of a recording.](media/studio/studio-recordings.png)
25
+
26
+ ## Get started
27
+
28
+ TRXA-TOOL comes in two forms. Both include TRXA Studio, and both can run tests with an AI agent.
29
+
30
+ | | Windows app | npm package |
31
+ |---|---|---|
32
+ | **Best for** | Consultants and testers who work in Studio | Developers and technical users who also want the command line |
33
+ | **Studio opens** | In its own window | In your browser |
34
+ | **`trxa` command in a terminal** | Through its full path | Yes |
35
+ | **Needs Node.js** | No | Yes, version 18.19 or later |
36
+ | **Platforms** | Windows | Windows, macOS, Linux |
37
+
38
+ - **Windows app**: download `TRXA-Studio-<version>-win-x64-portable.zip` (no installation) or
39
+ `TRXA-Studio-Setup-<version>.exe` from the [Releases](https://github.com/elcanelo/trxa-tool/releases)
40
+ page.
41
+ - **npm package**: run `npm install -g trxa-tool`, and then `trxa studio`.
42
+
43
+ For step-by-step instructions, including the agent and the Dynamics 365 connection, see
44
+ [Set up TRXA Studio for agent runs](SETUP.md).
45
+
46
+ > [!NOTE]
47
+ > The Windows app isn't code-signed yet. Windows SmartScreen might show **Windows protected your
48
+ > PC**, and a company-managed computer might block the app. [Step 1](SETUP.md#step-1-install-trxa-tool)
49
+ > of the setup article explains what to do.
5
50
 
6
- TRXA-TOOL does the deterministic work: it parses each recording into an ordered test script,
7
- lets you define test cases, test data, suites and plans around it, and works out what runs next.
8
- Your agent (Claude Code, Claude Cowork, Codex, or any agent that can drive MCP tools) does the
9
- live part: it drives D365FO through the `d365-erp-mcp` server, checks each test's expectations,
10
- and records pass/fail results you can review later.
11
-
12
- ## What you need
13
-
14
- - **Node.js** 18.19 or later
15
- - **An agent runtime that can call MCP tools**, such as [Claude Code](https://claude.com/claude-code),
16
- Claude Cowork, or [Codex](https://developers.openai.com/codex)
17
- - **The `d365-erp-mcp` MCP server**, connected to the D365FO environment you want to test
18
- - **One or more `.axtr` recordings**, recorded with D365FO's Task Recorder or exported from an LCS
19
- Business Process Modeler library
20
-
21
- ## Install
22
-
23
- ```sh
24
- npm install -g trxa-tool
25
- ```
26
-
27
- This installs the `trxa` command.
28
-
29
- ## Quick start
30
-
31
- Run these from your own project folder:
51
+ ## Documentation
32
52
 
33
- ```sh
34
- trxa init-skill # once per project: installs the replay skill for Claude Code and Codex
35
- trxa parse "recordings/My recording.axtr" -o testscripts/my-recording.testscript.json
36
- trxa studio # optional: the browser UI for building test cases, suites and plans
37
- ```
53
+ | Article | Read it to |
54
+ |---|---|
55
+ | [Set up TRXA Studio for agent runs](SETUP.md) | Install TRXA-TOOL and an agent, and connect the agent to Dynamics 365. |
56
+ | [Use TRXA Studio](STUDIO.md) | Create test cases, fixtures, suites and plans, run them, and review the results. |
57
+ | [TRXA-TOOL manual](MANUAL.md) | Use the `trxa` command line, and look up the file formats. |
38
58
 
39
- Then ask your agent to run a suite, for example: *"use the replay-trxa-testplan skill to run
40
- suites/my-suite.json"*.
59
+ The npm package includes these articles. To find them, run `npm root -g` and open the `trxa-tool`
60
+ folder.
41
61
 
42
- Run `trxa help` for the full command list.
62
+ ## Protect business data
43
63
 
44
- ## Documentation
64
+ A recording captures whatever was on the screen when it was made, including real account numbers,
65
+ amounts and names. Test scripts and suggested test inputs carry that data forward. Review anything
66
+ created from a real recording before you share it or commit it to source control. For guidance,
67
+ see [Data hygiene](MANUAL.md#data-hygiene) in the manual.
45
68
 
46
- These files ship with the package (find them with `npm root -g`, under `trxa-tool/`):
69
+ ## Report a problem
47
70
 
48
- - **[MANUAL.md](MANUAL.md)**: step-by-step setup and the full CLI workflow, from recording to
49
- test run.
50
- - **[STUDIO.md](STUDIO.md)**: the browser UI.
71
+ To report a bug, or a recording that TRXA-TOOL can't handle, open an issue at
72
+ [github.com/elcanelo/trxa-tool/issues](https://github.com/elcanelo/trxa-tool/issues). Don't attach
73
+ recordings or test files that contain real business data.
51
74
 
52
- ## A note on data
75
+ ## Source code
53
76
 
54
- A `.axtr` recording captures whatever was on screen when it was made, including real account
55
- numbers, amounts and names. Test scripts and drafted test inputs carry that data forward. Review
56
- anything derived from a real recording before sharing or committing it. See MANUAL.md's
57
- "Data hygiene" section.
77
+ TRXA-TOOL is closed source for now. The product is still evolving, and keeping the source
78
+ private while new features are planned lets the design change without breaking promises to
79
+ contributors. This repository holds the documentation and the issue tracker.
58
80
 
59
- ## Issues
81
+ Feedback is welcome. To report a problem or suggest a feature, open an
82
+ [issue](https://github.com/elcanelo/trxa-tool/issues).
60
83
 
61
- Found a bug or a recording the tool can't handle? Open an issue at
62
- https://github.com/elcanelo/trxa-tool/issues. Please don't attach recordings or test files that
63
- contain real business data.
84
+ To hear about new versions, go to the [trxa-tool repository](https://github.com/elcanelo/trxa-tool),
85
+ select **Watch** > **Custom**, select **Releases**, and then select **Apply**. GitHub emails you
86
+ each time a new version is published.
64
87
 
65
88
  ## License
66
89
 
67
- Proprietary. Use is governed by the end-user license agreement in [LICENSE](LICENSE).
90
+ TRXA-TOOL is proprietary software. Its use is governed by the end-user license agreement in
91
+ [LICENSE](LICENSE).
package/SETUP.md ADDED
@@ -0,0 +1,401 @@
1
+ # Set up TRXA Studio for agent runs
2
+
3
+ This article explains how to install and configure everything TRXA Studio needs to replay tests
4
+ against Dynamics 365 Finance and Supply Chain Management with an AI
5
+ agent. When you finish, **Settings** > **Agent runs** in Studio shows every item as ready, and the
6
+ **Run** button on test cases, suites and plans is available.
7
+
8
+ You can use Studio without completing every step. To build test cases, fixtures, suites and plans
9
+ from Task Recorder recordings, you only need [Step 1](#step-1-install-trxa-tool). Steps 2 through 7
10
+ are needed only to run tests with an AI agent.
11
+
12
+ ## How the pieces fit together
13
+
14
+ An agent run involves four components on your computer and one in Dynamics 365:
15
+
16
+ | Component | What it does | Where you set it up |
17
+ |---|---|---|
18
+ | **TRXA-TOOL** | Studio, plus the `trxa` command that the agent uses to track and record each run. | [Step 1](#step-1-install-trxa-tool) |
19
+ | **An AI agent** | GitHub Copilot CLI or Claude Code. The agent reads each test step and performs it in Dynamics 365. | [Step 2](#step-2-install-an-agent) and [Step 3](#step-3-sign-in-to-the-agent) |
20
+ | **The Dynamics 365 ERP MCP server** | A Microsoft service, built into finance and operations apps, that lets an agent open forms, set values and read data. | [Step 4](#step-4-prepare-the-dynamics-365-environment) |
21
+ | **The MCP connection** | A setting in your agent that tells it how to reach your environment's MCP server. TRXA-TOOL provides a connector for this, `trxa mcp-bridge`. | [Step 5](#step-5-connect-the-agent-to-dynamics-365) |
22
+ | **The replay skill** | Instructions that teach the agent how to replay a TRXA test step by step. | [Step 6](#step-6-install-the-replay-skill) |
23
+
24
+ ## Prerequisites
25
+
26
+ Before you begin, make sure that you have:
27
+
28
+ - A computer that runs Windows 10 or Windows 11. The npm package also runs on macOS and Linux, but
29
+ this article shows Windows commands.
30
+ - A finance and operations apps environment that is **Tier 2 or higher**, or a **Unified Developer
31
+ Environment**. The MCP server isn't supported on cloud-hosted environments (CHE).
32
+ - An environment version of **10.0.47** or later, **10.0.46 PQU-2**, or **10.0.45 PQU-7**.
33
+ - An account for one of the supported agents:
34
+ - **GitHub Copilot CLI**: a GitHub account with a Copilot subscription.
35
+ - **Claude Code**: a Claude subscription or an Anthropic API key.
36
+ - Help from a **Microsoft Entra ID administrator** and a **finance and operations system
37
+ administrator** for [Step 4](#step-4-prepare-the-dynamics-365-environment), if you aren't one.
38
+
39
+ > [!WARNING]
40
+ > Use a test or sandbox environment. A full run can save and post real records. Never connect an
41
+ > agent to a production environment for testing.
42
+
43
+ ## Step 1: Install TRXA-TOOL
44
+
45
+ TRXA-TOOL is available in two forms. Both include Studio and both can run tests with an agent.
46
+
47
+ | | Windows app | npm package |
48
+ |---|---|---|
49
+ | **Best for** | Consultants and testers who work in Studio | Developers and technical users who also want the command line |
50
+ | **Studio opens** | In its own window | In your browser |
51
+ | **`trxa` command in a terminal** | Through its full path (see the note after this table) | Yes |
52
+ | **Needs Node.js** | No | Yes, version 18.19 or later |
53
+
54
+ > [!NOTE]
55
+ > The Windows app includes its own copy of the `trxa` command, in the `resources\cli` folder of the
56
+ > app. Studio uses it automatically during agent runs, so you don't need to install anything else.
57
+ > To use it from a terminal, run it by its full path, for example
58
+ > `"%LOCALAPPDATA%\Programs\TRXA Studio\resources\cli\trxa.cmd" --version`.
59
+
60
+ ### Install the Windows app
61
+
62
+ 1. Go to the [Releases](https://github.com/elcanelo/trxa-tool/releases) page and download one of
63
+ these files from the latest release:
64
+ - **Portable**: `TRXA-Studio-<version>-win-x64-portable.zip`. Nothing is installed. To update,
65
+ replace the folder.
66
+ - **Installer**: `TRXA-Studio-Setup-<version>.exe`. Installs for your user only, with a
67
+ **Start** menu shortcut and an uninstaller. Administrator rights aren't needed. The default
68
+ folder is `%LOCALAPPDATA%\Programs\TRXA Studio`.
69
+ 1. If you downloaded the portable zip, right-click the file, select **Properties**, select
70
+ **Unblock**, and then select **OK**. Extract the zip to a folder of your choice.
71
+ 1. Start the app. For the portable version, run `TRXA Studio.exe` from the extracted folder.
72
+
73
+ The app isn't code-signed yet. If Windows SmartScreen shows **Windows protected your PC**, select
74
+ **More info**, and then select **Run anyway**. Unblocking the zip before you extract it usually
75
+ prevents this message.
76
+
77
+ > [!NOTE]
78
+ > On a company-managed computer, an IT policy might block unsigned apps. If Windows says **Access
79
+ > is denied**, or Microsoft Defender reports a blocked app, ask your IT team to allow TRXA Studio,
80
+ > or use the npm package instead.
81
+
82
+ ### Install the npm package
83
+
84
+ 1. Install [Node.js](https://nodejs.org) version 18.19 or later, if you don't have it.
85
+ 1. Open a terminal and run:
86
+
87
+ ```powershell
88
+ npm install -g trxa-tool
89
+ ```
90
+
91
+ 1. Check the installation:
92
+
93
+ ```powershell
94
+ trxa --version
95
+ ```
96
+
97
+ The command prints `trxa-tool` followed by the version number.
98
+
99
+ 1. Start Studio:
100
+
101
+ ```powershell
102
+ trxa studio
103
+ ```
104
+
105
+ Studio opens in your browser. To stop it, run `trxa studio stop`.
106
+
107
+ To update later, run `npm update -g trxa-tool`.
108
+
109
+ ## Step 2: Install an agent
110
+
111
+ Studio can run tests with **GitHub Copilot CLI** or **Claude Code**. You need at least one of them.
112
+ GitHub Copilot CLI is the default agent in the **Run** dialog.
113
+
114
+ ### Install GitHub Copilot CLI
115
+
116
+ GitHub Copilot CLI on Windows needs PowerShell 6 or later. Windows includes Windows PowerShell 5.1,
117
+ which isn't enough.
118
+
119
+ 1. If you don't have PowerShell 7, install it:
120
+
121
+ ```powershell
122
+ winget install Microsoft.PowerShell
123
+ ```
124
+
125
+ 1. Open **PowerShell 7** (`pwsh`) and install GitHub Copilot CLI:
126
+
127
+ ```powershell
128
+ winget install GitHub.Copilot
129
+ ```
130
+
131
+ 1. Close and reopen the terminal, and then check the installation:
132
+
133
+ ```powershell
134
+ copilot --version
135
+ ```
136
+
137
+ For other installation methods, see
138
+ [Installing GitHub Copilot CLI](https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli).
139
+
140
+ ### Install Claude Code
141
+
142
+ 1. Open PowerShell and run the Claude Code installer:
143
+
144
+ ```powershell
145
+ irm https://claude.ai/install.ps1 | iex
146
+ ```
147
+
148
+ 1. Close and reopen the terminal, and then check the installation:
149
+
150
+ ```powershell
151
+ claude --version
152
+ ```
153
+
154
+ For other installation methods, see
155
+ [Set up Claude Code](https://code.claude.com/docs/en/setup).
156
+
157
+ ## Step 3: Sign in to the agent
158
+
159
+ An agent run starts the agent in the background, where it can't ask you to sign in. Sign in once
160
+ from a terminal before you start a run.
161
+
162
+ ### Sign in to GitHub Copilot CLI
163
+
164
+ 1. In a terminal, run:
165
+
166
+ ```powershell
167
+ copilot login
168
+ ```
169
+
170
+ 1. Copy the code that's shown, open the web page it names, paste the code, and approve the
171
+ sign-in with your GitHub account.
172
+
173
+ ### Sign in to Claude Code
174
+
175
+ 1. In a terminal, run:
176
+
177
+ ```powershell
178
+ claude
179
+ ```
180
+
181
+ 1. Follow the prompts to sign in with your Claude account or an Anthropic API key.
182
+ 1. When the sign-in is complete, type `/exit` to close Claude Code.
183
+
184
+ ## Step 4: Prepare the Dynamics 365 environment
185
+
186
+ The agent works in Dynamics 365 through Microsoft's Dynamics 365 ERP MCP server. Your agent
187
+ connects with its own identity, a Microsoft Entra ID app registration, and Dynamics 365 runs every
188
+ request as the finance and operations user that you link to that identity.
189
+
190
+ > [!NOTE]
191
+ > These steps need administrator rights in Microsoft Entra ID and in finance and operations apps.
192
+ > If you aren't an administrator, send this section to the people who are.
193
+
194
+ ### Confirm that the MCP server is turned on
195
+
196
+ 1. In finance and operations apps, go to **System administration** > **Workspaces** > **Feature
197
+ management**.
198
+ 1. Find **Dynamics 365 ERP Model Context Protocol server** and confirm that it's enabled. It's
199
+ enabled by default.
200
+
201
+ ### Register an app in Microsoft Entra ID
202
+
203
+ 1. Sign in to the [Microsoft Entra admin center](https://entra.microsoft.com).
204
+ 1. Go to **Entra ID** > **App registrations**, and then select **New registration**.
205
+ 1. Enter a name, for example `TRXA agent runs`. Leave the other settings at their defaults, and
206
+ then select **Register**.
207
+ 1. On the app's **Overview** page, copy these two values. You need them in Step 5:
208
+ - **Application (client) ID**
209
+ - **Directory (tenant) ID**
210
+ 1. Go to **Certificates & secrets** > **Client secrets**, and then select **New client secret**.
211
+ 1. Enter a description, choose an expiry, and then select **Add**.
212
+ 1. Copy the secret's **Value** right away. Entra ID shows it only once.
213
+
214
+ For more information, see
215
+ [Register an application in Microsoft Entra ID](https://learn.microsoft.com/entra/identity-platform/quickstart-register-app).
216
+
217
+ ### Link the app to a finance and operations user
218
+
219
+ 1. In finance and operations apps, go to **System administration** > **Setup** > **Microsoft
220
+ Entra ID applications**.
221
+ 1. Select **New**.
222
+ 1. In **Client ID**, enter the **Application (client) ID** from the app registration.
223
+ 1. In **Name**, enter a name for the record.
224
+ 1. In **User ID**, select the user that the agent acts as.
225
+
226
+ Choose the user carefully. The agent can do only what this user can do, and every record the agent
227
+ creates or changes is attributed to this user. Use a dedicated test user with the security roles
228
+ that your tests need. To exempt the agent's identity from a finance and operations user license,
229
+ also assign the **System agent** role to that user. The role grants no permissions by itself.
230
+
231
+ ### Allow the app to use the MCP server
232
+
233
+ 1. In finance and operations apps, go to **System administration** > **Setup** > **Allowed MCP
234
+ clients**.
235
+ 1. Select **New**, and then enter these values:
236
+
237
+ | Field | Value |
238
+ |---|---|
239
+ | **Name** | A name for the connection, for example `TRXA agent runs` |
240
+ | **ClientId** | The **Application (client) ID** from the app registration |
241
+ | **Allowed** | Yes |
242
+
243
+ 1. Save the record. The change can take up to one minute to take effect.
244
+
245
+ > [!NOTE]
246
+ > Microsoft bills MCP tool calls from agents other than Microsoft Copilot Studio at 0.1 Copilot
247
+ > Credits per tool call. Users with Dynamics 365 Finance Premium or Supply Chain Management Premium
248
+ > licenses are exempt. A single test run can make many tool calls. For details, see
249
+ > [Licensing](https://learn.microsoft.com/dynamics365/fin-ops-core/dev-itpro/copilot/copilot-mcp#licensing).
250
+
251
+ For more information about the MCP server, see
252
+ [Use Model Context Protocol for finance and operations apps](https://learn.microsoft.com/dynamics365/fin-ops-core/dev-itpro/copilot/copilot-mcp)
253
+ and [Security for Dynamics 365 ERP MCP](https://learn.microsoft.com/dynamics365/fin-ops-core/dev-itpro/copilot/mcp/mcp-security).
254
+
255
+ ## Step 5: Connect the agent to Dynamics 365
256
+
257
+ Your agent reaches the MCP server through `trxa mcp-bridge`, a connector included in TRXA-TOOL. The
258
+ agent starts the connector when it needs Dynamics 365. The connector signs in with the app
259
+ registration from Step 4, and it recovers on its own from dropped sessions and short outages.
260
+
261
+ The connector reads four settings:
262
+
263
+ | Setting | Value |
264
+ |---|---|
265
+ | `D365_URL` | Your environment's address, for example `https://contoso.operations.dynamics.com` |
266
+ | `D365_TENANT_ID` | The **Directory (tenant) ID** from the app registration |
267
+ | `D365_CLIENT_ID` | The **Application (client) ID** from the app registration |
268
+ | `D365_CLIENT_SECRET` | The client secret **Value** from the app registration |
269
+
270
+ > [!WARNING]
271
+ > Name the server `d365-erp-mcp`, exactly as shown in the following examples. The replay skill and
272
+ > the Studio readiness check look for that name.
273
+
274
+ If you use the Windows app without the npm package, replace `trxa` in the following examples with
275
+ the full path to the app's `trxa.cmd`, for example
276
+ `C:\Users\<you>\AppData\Local\Programs\TRXA Studio\resources\cli\trxa.cmd`.
277
+
278
+ ### Connect GitHub Copilot CLI
279
+
280
+ 1. Open `%USERPROFILE%\.copilot\mcp-config.json` in a text editor. If the file doesn't exist,
281
+ create it.
282
+ 1. Add a `d365-erp-mcp` entry under `mcpServers`, with your own values in `env`:
283
+
284
+ ```json
285
+ {
286
+ "mcpServers": {
287
+ "d365-erp-mcp": {
288
+ "type": "local",
289
+ "command": "cmd",
290
+ "args": ["/c", "trxa", "mcp-bridge"],
291
+ "env": {
292
+ "D365_URL": "https://contoso.operations.dynamics.com",
293
+ "D365_TENANT_ID": "<directory-tenant-id>",
294
+ "D365_CLIENT_ID": "<application-client-id>",
295
+ "D365_CLIENT_SECRET": "<client-secret-value>"
296
+ },
297
+ "tools": ["*"]
298
+ }
299
+ }
300
+ }
301
+ ```
302
+
303
+ If the file already lists other servers, add only the `d365-erp-mcp` entry next to them.
304
+ For the Windows app's full path, use `"args": ["/c", "C:\\Users\\<you>\\AppData\\Local\\Programs\\TRXA Studio\\resources\\cli\\trxa.cmd", "mcp-bridge"]`.
305
+ In JSON, every backslash is written twice.
306
+
307
+ 1. Save the file.
308
+
309
+ ### Connect Claude Code
310
+
311
+ In a terminal, run the following command with your own values. Keep the options in this order: the
312
+ `-s user` option must come after the `-e` options.
313
+
314
+ ```powershell
315
+ claude mcp add d365-erp-mcp -e D365_URL=https://contoso.operations.dynamics.com -e D365_TENANT_ID=<directory-tenant-id> -e D365_CLIENT_ID=<application-client-id> -e D365_CLIENT_SECRET=<client-secret-value> -s user -- cmd /c trxa mcp-bridge
316
+ ```
317
+
318
+ Claude Code confirms with `Added stdio MCP server d365-erp-mcp`. The `-s user` option makes the
319
+ server available in every folder, including the working folder that Studio runs the agent in.
320
+
321
+ > [!WARNING]
322
+ > These settings store the client secret as plain text in your user profile
323
+ > (`.copilot\mcp-config.json` or `.claude.json`). Don't share these files or commit them to source
324
+ > control. When the secret expires, create a new one in Entra ID and update the setting.
325
+
326
+ ### Check the connection
327
+
328
+ Before you start a run from Studio, confirm that the agent can reach Dynamics 365:
329
+
330
+ 1. Start the agent in a terminal (`copilot` or `claude`).
331
+ 1. Ask: *"Use the d365-erp-mcp server to tell me which user and company I'm connected as."*
332
+ 1. Confirm that the answer names the user from Step 4 and the environment you expect.
333
+
334
+ If the agent reports an error, see [Troubleshoot](#troubleshoot).
335
+
336
+ ## Step 6: Install the replay skill
337
+
338
+ The replay skill, `replay-trxa-testplan`, teaches the agent how to replay a TRXA test: how to
339
+ perform each step, check expectations and record results. Install it in Studio's working folder.
340
+
341
+ To install it from Studio:
342
+
343
+ 1. Select **Settings** (the gear icon in the upper-right corner).
344
+ 1. In **Agent runs**, find the **Replay skill** row, and then select **Install skill**.
345
+
346
+ To install it from a terminal instead, go to your working folder and run:
347
+
348
+ ```powershell
349
+ trxa init-skill
350
+ ```
351
+
352
+ Both methods copy the skill into the working folder's `.claude\skills` folder, where GitHub Copilot
353
+ CLI and Claude Code find it, and into `.agents\skills` for other agents such as Codex.
354
+
355
+ ## Step 7: Check that Studio is ready
356
+
357
+ 1. In Studio, select **Settings**, and then go to **Agent runs**.
358
+ 1. Select **Check again** to refresh the list.
359
+ 1. Confirm that each item shows a green check mark. Under the list, Studio says which agent is
360
+ ready, for example **Ready to run with GitHub Copilot.**
361
+
362
+ ![The Agent runs section of Studio Settings, with every check passed for GitHub Copilot.](media/studio/settings-agent-runs.png)
363
+
364
+ A yellow warning on **Claude Code CLI** is fine if you use GitHub Copilot, because Claude Code is
365
+ optional. Each item that isn't ready shows what to do next and a **Setup guide** link to the
366
+ matching step in this article.
367
+
368
+ You're ready to run a test. To learn how, see
369
+ [Run a test with an AI agent](STUDIO.md#run-a-test-with-an-ai-agent).
370
+
371
+ ## Troubleshoot
372
+
373
+ Each row in **Settings** > **Agent runs** matches one part of this setup.
374
+
375
+ | Row | If it isn't ready |
376
+ |---|---|
377
+ | **TRXA CLI** | Studio can't find the `trxa` command. If you use the npm package, run `npm install -g trxa-tool`, and then restart Studio. The Windows app includes its own copy, so this row is ready there. See [Step 1](#step-1-install-trxa-tool). |
378
+ | **GitHub Copilot CLI** | Install it from PowerShell 7 with `winget install GitHub.Copilot`, and then restart Studio so that it finds the new command. See [Step 2](#step-2-install-an-agent). |
379
+ | **Copilot sign-in** | Run `copilot login` in a terminal. See [Step 3](#step-3-sign-in-to-the-agent). |
380
+ | **D365 ERP MCP server** | No server named `d365-erp-mcp` is configured for either agent. Check the name and the file location in [Step 5](#step-5-connect-the-agent-to-dynamics-365). The row also says which agents have it. An agent can run only if it has its own `d365-erp-mcp` entry. |
381
+ | **Replay skill** | Select **Install skill**, or run `trxa init-skill` in the working folder. If you changed the working folder, install the skill in the new folder too. See [Step 6](#step-6-install-the-replay-skill). |
382
+ | **Claude Code CLI** | Optional. To use Claude Code, install it and sign in. See [Step 2](#step-2-install-an-agent) and [Step 3](#step-3-sign-in-to-the-agent). |
383
+
384
+ ### The agent can't connect to Dynamics 365
385
+
386
+ The connector writes its messages to the agent's MCP log. The most common causes are:
387
+
388
+ | Message or symptom | Cause and fix |
389
+ |---|---|
390
+ | `trxa mcp-bridge: set D365_URL, ... in the MCP server's "env" settings` | One or more settings are missing from the `env` section. Add all four. |
391
+ | `trxa mcp-bridge: D365_URL must start with https://` | Use the environment's full `https://` address. |
392
+ | Sign-in errors that mention `AADSTS` | The tenant ID, client ID or secret is wrong, or the secret expired. Check the values in Entra ID. |
393
+ | HTTP 401 or 403 from the environment | The app isn't linked to a user in **Microsoft Entra ID applications**, or its client ID isn't in **Allowed MCP clients** with **Allowed** set to **Yes**. Changes to **Allowed MCP clients** can take a minute. |
394
+ | The agent connects but can't open a form | The linked user lacks the security role for that form. Some administration forms are never available through the MCP server, such as **Feature management** and **Users**. |
395
+ | `'trxa' is not recognized` | The agent can't find the `trxa` command. Use the full path to `trxa.cmd`, as described in [Step 5](#step-5-connect-the-agent-to-dynamics-365). |
396
+
397
+ ## Next steps
398
+
399
+ - [Use TRXA Studio](STUDIO.md): create test cases from recordings, build suites and plans, run them
400
+ and review the results.
401
+ - [TRXA-TOOL manual](MANUAL.md): the full command-line reference.