@alternative-path/x-mcp 1.0.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.
- package/LICENSE +23 -0
- package/README.md +364 -0
- package/dist/agents/test-planner-context.d.ts +7 -0
- package/dist/agents/test-planner-context.d.ts.map +1 -0
- package/dist/agents/test-planner-context.js +283 -0
- package/dist/agents/test-planner-context.js.map +1 -0
- package/dist/agents/test-planner-prompt.d.ts +34 -0
- package/dist/agents/test-planner-prompt.d.ts.map +1 -0
- package/dist/agents/test-planner-prompt.js +82 -0
- package/dist/agents/test-planner-prompt.js.map +1 -0
- package/dist/api-client.d.ts +52 -0
- package/dist/api-client.d.ts.map +1 -0
- package/dist/api-client.js +240 -0
- package/dist/api-client.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +159 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/auth-tools.d.ts +17 -0
- package/dist/tools/auth-tools.d.ts.map +1 -0
- package/dist/tools/auth-tools.js +154 -0
- package/dist/tools/auth-tools.js.map +1 -0
- package/dist/tools/automation-tools.d.ts +25 -0
- package/dist/tools/automation-tools.d.ts.map +1 -0
- package/dist/tools/automation-tools.js +399 -0
- package/dist/tools/automation-tools.js.map +1 -0
- package/dist/tools/export-import-tools.d.ts +16 -0
- package/dist/tools/export-import-tools.d.ts.map +1 -0
- package/dist/tools/export-import-tools.js +62 -0
- package/dist/tools/export-import-tools.js.map +1 -0
- package/dist/tools/module-tools.d.ts +42 -0
- package/dist/tools/module-tools.d.ts.map +1 -0
- package/dist/tools/module-tools.js +302 -0
- package/dist/tools/module-tools.js.map +1 -0
- package/dist/tools/project-tools.d.ts +44 -0
- package/dist/tools/project-tools.d.ts.map +1 -0
- package/dist/tools/project-tools.js +67 -0
- package/dist/tools/project-tools.js.map +1 -0
- package/dist/tools/testcase-tools.d.ts +129 -0
- package/dist/tools/testcase-tools.d.ts.map +1 -0
- package/dist/tools/testcase-tools.js +762 -0
- package/dist/tools/testcase-tools.js.map +1 -0
- package/dist/tools/testgroup-launch-tools.d.ts +28 -0
- package/dist/tools/testgroup-launch-tools.d.ts.map +1 -0
- package/dist/tools/testgroup-launch-tools.js +332 -0
- package/dist/tools/testgroup-launch-tools.js.map +1 -0
- package/package.json +56 -0
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Embedded test planning context for the x-test-planner agent.
|
|
3
|
+
* This content is the same as CURSOR_CONTEXT_TEST_PLANNING.md but is bundled
|
|
4
|
+
* in the MCP server so the agent always uses a consistent, non-editable context.
|
|
5
|
+
*/
|
|
6
|
+
export const TEST_PLANNER_CONTEXT = `# Cursor Context for Test Planning
|
|
7
|
+
|
|
8
|
+
This file provides a comprehensive, reusable context for test planning, test case/scenario creation, and automation workflow design. Use this as a template for any new project or feature to ensure consistency, completeness, and efficiency in your QA process.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 1. Test Plan Structure
|
|
13
|
+
|
|
14
|
+
A standard test plan should include the following sections:
|
|
15
|
+
|
|
16
|
+
- **Reference Template:**
|
|
17
|
+
- [Test Plan Template (Revamped) - Confluence](https://reorg-research.atlassian.net/wiki/spaces/qe/pages/892338177/Test+Plan+Template+Revamped)
|
|
18
|
+
|
|
19
|
+
- **Project & Stakeholder Details**
|
|
20
|
+
- QA start dates, stakeholders, design/epic/BDD links, QA owner
|
|
21
|
+
- **Objective**
|
|
22
|
+
- Short summary of the project/feature and underlying changes
|
|
23
|
+
- **Test Scope**
|
|
24
|
+
- In Scope: Features, platforms, workflows to be tested
|
|
25
|
+
- Out of Scope: Exclusions, legacy flows, non-impacted areas
|
|
26
|
+
- In Scope - Automation: What will be automated
|
|
27
|
+
- Out of Scope - Automation: What will not be automated and why
|
|
28
|
+
- **Data Validation Coverage**
|
|
29
|
+
- Types of data, edge cases, negative data, and how data coverage is ensured
|
|
30
|
+
- **Assumptions and Dependencies**
|
|
31
|
+
- Environment, APIs, roles, external systems, etc.
|
|
32
|
+
- **Objectives**
|
|
33
|
+
- Functional, performance, security, UI/UX, data validation
|
|
34
|
+
- **Test Strategy**
|
|
35
|
+
- Types of testing (unit, functional, UI, API, DB, performance, UAT, etc.)
|
|
36
|
+
- Approach: Happy path, edge/negative, integration, data, exploratory
|
|
37
|
+
- **Phase Plan**
|
|
38
|
+
- Phased approach to testing (happy path, integration, edge, regression, etc.)
|
|
39
|
+
- **Manual & Automated Testing**
|
|
40
|
+
- What will be covered manually vs. automated
|
|
41
|
+
- **Migration/Backfilling**
|
|
42
|
+
- Data migration/validation if applicable
|
|
43
|
+
- **Regression**
|
|
44
|
+
- Impacted areas, regression suite, integration points
|
|
45
|
+
- **Functional Testing Considerations**
|
|
46
|
+
- Business rules, UI/UX, data, error handling, new/changed workflows
|
|
47
|
+
- **Integration & Dependencies**
|
|
48
|
+
- APIs, external systems, user management, logging
|
|
49
|
+
- **Non-Functional Testing**
|
|
50
|
+
- Performance, security, compatibility, scalability
|
|
51
|
+
- **Automation & Test Coverage**
|
|
52
|
+
- Reuse, prioritization, data, coverage goals
|
|
53
|
+
- **Operational & Monitoring**
|
|
54
|
+
- Audit logs, error monitoring, post-release validation
|
|
55
|
+
- **User Scenarios & Test Cases**
|
|
56
|
+
- Table of detailed test cases and scenarios
|
|
57
|
+
- **Automation Workflows**
|
|
58
|
+
- Table of automation flows covering multiple test cases
|
|
59
|
+
- **Release and Revert Plan**
|
|
60
|
+
- **Post Release Production Validation**
|
|
61
|
+
- **Approval Table**
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 2. Test Case & Scenario Writing
|
|
66
|
+
|
|
67
|
+
- **Test Case Table Columns:**
|
|
68
|
+
- Test Case ID
|
|
69
|
+
- Title
|
|
70
|
+
- Objective
|
|
71
|
+
- Steps (detailed, step-by-step)
|
|
72
|
+
- Expected Result
|
|
73
|
+
- Test Data (if applicable)
|
|
74
|
+
|
|
75
|
+
- **Best Practices:**
|
|
76
|
+
- Be specific and unambiguous
|
|
77
|
+
- Cover both positive and negative scenarios
|
|
78
|
+
- Include cases that are most likely to result into bugs
|
|
79
|
+
- Include edge cases and data variations
|
|
80
|
+
- Link to requirements/user stories where possible
|
|
81
|
+
- Use clear, actionable language
|
|
82
|
+
- Be as detailed as possible
|
|
83
|
+
- Define the test steps with granularity and details
|
|
84
|
+
- Include places to look out for in the expected results and be very specific.
|
|
85
|
+
- If there are multiple places where an outcome can be or should be validated, include all those places as part of the expected result or create new test case for that.
|
|
86
|
+
- While creating test cases add test steps as well keeping in mind that the person executing these testacses and steps can only access the application using the front-end. So, add steps that can be followed from the applicaiton/navigation. Try to be as accurate with the test steps as you can.
|
|
87
|
+
|
|
88
|
+
- **Example Test Case Table (Markdown):**
|
|
89
|
+
|
|
90
|
+
| Test Case ID | Title | Objective | Steps | Expected Result | Test Data |
|
|
91
|
+
|--------------|-------|-----------|-------|----------------|-----------|
|
|
92
|
+
| TC-01 | Upload Supported Document | Verify upload and queueing of supported document types | 1. Login as user<br>2. Upload Termsheet.pdf<br>3. Queue for extraction | Document appears in dashboard with correct status and metadata | Termsheet.pdf |
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 3. Automation Workflow Design
|
|
97
|
+
|
|
98
|
+
- **Workflow Table Columns:**
|
|
99
|
+
- Workflow Name
|
|
100
|
+
- Test Cases Covered (from the list of test cases generated in above sections)
|
|
101
|
+
- Workflow Steps (should cover multiple test cases per flow)
|
|
102
|
+
|
|
103
|
+
- **Best Practices:**
|
|
104
|
+
- Design workflows to maximize coverage with minimal complexity
|
|
105
|
+
- Avoid overly complex flows; keep steps maintainable
|
|
106
|
+
- Reuse login, navigation, and setup steps
|
|
107
|
+
- Validate both UI and backend (API, DB) where possible
|
|
108
|
+
|
|
109
|
+
- **Example Automation Workflow Table (Markdown):**
|
|
110
|
+
|
|
111
|
+
| Workflow Name | Test Cases Covered | Workflow Steps |
|
|
112
|
+
|--------------|--------------------|----------------|
|
|
113
|
+
| Document Upload, Extraction, and Review | TC-01, TC-03, TC-04, ... | 1. Login<br>2. Upload document<br>3. Queue for extraction<br>... |
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## 4. Test Data Management
|
|
118
|
+
|
|
119
|
+
- Use a variety of data: valid, invalid, edge, corrupted, large/small, etc.
|
|
120
|
+
- Document test data in the test case table or as a separate section
|
|
121
|
+
- For automation, use data-driven approaches where possible
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## 5. General Best Practices
|
|
126
|
+
|
|
127
|
+
- Always link test cases to requirements/user stories/epics
|
|
128
|
+
- Keep test cases atomic and independent
|
|
129
|
+
- Regularly review and update test cases and workflows
|
|
130
|
+
- Prioritize automation for repetitive, high-value, and regression scenarios
|
|
131
|
+
- Ensure auditability and traceability (who tested what, when, and why)
|
|
132
|
+
- Include negative, boundary, and exploratory tests
|
|
133
|
+
- Validate error handling, security, and access control
|
|
134
|
+
- Document assumptions, dependencies, and environment details
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## 6. Example Section Templates
|
|
139
|
+
|
|
140
|
+
### Test Case Table
|
|
141
|
+
|
|
142
|
+
| Test Case ID | Title | Objective | Steps | Expected Result | Test Data |
|
|
143
|
+
|--------------|-------|-----------|-------|----------------|-----------|
|
|
144
|
+
| TC-01 | ... | ... | ... | ... | ... |
|
|
145
|
+
|
|
146
|
+
### Automation Workflow Table
|
|
147
|
+
|
|
148
|
+
| Workflow Name | Test Cases Covered | Workflow Steps |
|
|
149
|
+
|---------------|-------------------|----------------|
|
|
150
|
+
| ... | ... | ... |
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## 7. Section for Abbreviations
|
|
155
|
+
|
|
156
|
+
### Abbreviations
|
|
157
|
+
- Include a section towards the end to have abbreviations and their full forms listed
|
|
158
|
+
- List the abbreviations as bullet points
|
|
159
|
+
- If you are you not able to find a full form for any abbreviation, the use the confluence or the internet to search for that term
|
|
160
|
+
|
|
161
|
+
- **Example Abbreviation Section:**
|
|
162
|
+
PCDO - Private Credit and Deal Orientation
|
|
163
|
+
CLO - Collateralized Loan Obligation
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## 8. How to Use This Context
|
|
168
|
+
|
|
169
|
+
- When starting a new test planning effort, use this as your base context
|
|
170
|
+
- Fill in project-specific details, requirements, and data as needed
|
|
171
|
+
- Use the tables and best practices to guide your test plan, test case, and automation workflow creation
|
|
172
|
+
- Make use of the details provided with the prompt
|
|
173
|
+
- **If additional information is provided with the prompt (such as BDD links, TDD links, JIRA story/task links, or Confluence links), ensure you utilize this information by thoroughly reviewing all referenced artifacts. This includes:**
|
|
174
|
+
- Visiting all provided BDD, TDD, JIRA, and Confluence links.
|
|
175
|
+
- For Confluence pages, review all child pages and any referenced or linked Confluence pages.
|
|
176
|
+
- For JIRA artifacts, review all linked JIRA issues and any referenced Confluence pages.
|
|
177
|
+
- Read all comments on both Confluence and JIRA items.
|
|
178
|
+
- Follow all references recursively to ensure complete context is gathered for the test plan.
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## 8A. Test Planning Deep-Dive Checklist
|
|
183
|
+
|
|
184
|
+
**When preparing the Test Plan, Test Cases, Testing Strategy, or any other relevant section, use the following checklist to guide your analysis. Answer as many of these as are applicable, and use the answers to enrich the relevant sections of your test plan.**
|
|
185
|
+
|
|
186
|
+
### Functional Testing
|
|
187
|
+
1. Does the design/change affect the current workflow that it is being developed for?
|
|
188
|
+
2. Does the design/change affect any other transaction?
|
|
189
|
+
- List of affected transactions
|
|
190
|
+
3. Does the design/change affect any existing report/calculation?
|
|
191
|
+
4. List of affected reports/calculations
|
|
192
|
+
5. Is there a need to create separate reporting for the design/change?
|
|
193
|
+
6. Is there any existing data point that could be affected?
|
|
194
|
+
7. Does it affect any other functionality?
|
|
195
|
+
- List of affected functionalities
|
|
196
|
+
8. Are there any new business rules or validations introduced?
|
|
197
|
+
9. How should the system behave in case of missing/invalid data?
|
|
198
|
+
10. Are there any UI/UX changes? If yes, how do they impact usability?
|
|
199
|
+
11. What are the expected inputs and outputs for each function or transaction?
|
|
200
|
+
|
|
201
|
+
### Integration & Dependencies
|
|
202
|
+
1. Any integration area affected?
|
|
203
|
+
2. List of affected integration areas
|
|
204
|
+
3. Does the change introduce any dependencies on third-party services or external systems?
|
|
205
|
+
4. Are there any upstream or downstream data dependencies?
|
|
206
|
+
5. Do any existing integrations require modification or additional validation?
|
|
207
|
+
6. Are there any database schema changes? If yes, how will backward compatibility be handled?
|
|
208
|
+
|
|
209
|
+
### Non-Functional Testing
|
|
210
|
+
1. What are the performance benchmarks/considerations?
|
|
211
|
+
2. How much time is allowed during processing?
|
|
212
|
+
3. What are the payload size considerations?
|
|
213
|
+
4. Are there security considerations (authentication, authorization, data encryption)?
|
|
214
|
+
5. What are the scalability and concurrency requirements?
|
|
215
|
+
6. Does the system handle expected and unexpected failures gracefully?
|
|
216
|
+
7. Is failover or disaster recovery testing required?
|
|
217
|
+
8. Are there any regulatory or compliance requirements?
|
|
218
|
+
9. Are there browser/device compatibility considerations (for web or mobile applications)?
|
|
219
|
+
|
|
220
|
+
### Automation & Test Coverage
|
|
221
|
+
1. Are there reusable test cases from previous releases that apply to this change?
|
|
222
|
+
2. Are there specific scenarios that should be prioritized for automation?
|
|
223
|
+
3. What test data is required, and how will it be managed?
|
|
224
|
+
4. Will exploratory testing be needed in addition to scripted test cases?
|
|
225
|
+
5. Are API endpoints available for testing/automation?
|
|
226
|
+
|
|
227
|
+
### Operational & Monitoring
|
|
228
|
+
1. Are debug/audit logs available?
|
|
229
|
+
2. How will errors be logged and monitored in production?
|
|
230
|
+
3. Are there any alerting mechanisms in place for failures?
|
|
231
|
+
4. What are the rollback procedures if the deployment fails?
|
|
232
|
+
5. How will post-production validation be performed?
|
|
233
|
+
6. What is the frequency of jobs run?
|
|
234
|
+
7. What access/rights are required for QA teams?
|
|
235
|
+
8. Is there a need for specific capabilities/entitlements for testing?
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
- **Test Strategy**
|
|
240
|
+
- Types of testing (unit, functional, UI, API, DB, performance, UAT, etc.)
|
|
241
|
+
- Approach: Happy path, edge/negative, integration, data, exploratory
|
|
242
|
+
- **Sample Test Strategy (for inspiration):**
|
|
243
|
+
|
|
244
|
+
We will start with the happy flow scenarios for the Transaction management. Here we plan to cover 65-70% of our functional requirements. Then we will move on to test the migrated data testing that will be performed at the Database layer. As migration is a major event in the functionality to be available to the users. This is critical to do as existing transaction need to be present in the system. Then, we will test integration areas such that the consumers of the transactional data are in sync with the changing transactions, for this API testing approach will be used as the integration will be done using APIs. This strategy ensures that the we have confidence in the end-to end functional, data and integration areas.
|
|
245
|
+
|
|
246
|
+
Then, we will move on to covering the edge case scenarios around the transaction management, which are more prone to break the workflow. This phase is to make sure the system is resilient to failures and error.
|
|
247
|
+
|
|
248
|
+
Finally, we will perform exploratory testing to uncover issues or perform validations to ensure completeness.
|
|
249
|
+
|
|
250
|
+
**Phase 1: Happy Flow Validation (Foundation Testing)**
|
|
251
|
+
We will begin by validating the happy flow scenarios for Transaction Management, covering approximately 65-70% of the functional requirements. This phase ensures that the fundamental workflows behave as expected under standard conditions.
|
|
252
|
+
*Why this first?*
|
|
253
|
+
- Establishes baseline functional correctness.
|
|
254
|
+
- Allows early defect detection and reduces rework in later stages.
|
|
255
|
+
- Enables smoother collaboration with development teams in case of issues.
|
|
256
|
+
|
|
257
|
+
**Phase 2: Migrated Data Validation (Data Integrity Testing)**
|
|
258
|
+
Once core functionality is validated, we will focus on migrated data testing at the database layer. Since data migration is a key event enabling this functionality, it is critical to verify that existing transactions are accurately present and available in the system post-migration.
|
|
259
|
+
*Why now?*
|
|
260
|
+
- Ensures historical transactions remain intact post-migration.
|
|
261
|
+
- Prevents discrepancies before proceeding to further functional and integration tests.
|
|
262
|
+
|
|
263
|
+
**Phase 3: Integration Testing (System Connectivity & Data Flow Testing)**
|
|
264
|
+
Next, we will validate integration areas, ensuring that consumers of transactional data are in sync with the changing transactions. This will be performed through API testing, as integration is API-driven.
|
|
265
|
+
*Why at this stage?*
|
|
266
|
+
- By now, we have confidence in functional correctness and data integrity.
|
|
267
|
+
- Ensures seamless interaction between the transaction system and external consumers.
|
|
268
|
+
- Helps detect system-wide inconsistencies before moving to deeper validation.
|
|
269
|
+
|
|
270
|
+
**Phase 4: Edge Case & Negative Scenario Testing (Resilience & Failure Handling)**
|
|
271
|
+
At this stage, we will cover edge case scenarios, which are more prone to breaking the workflow. This includes boundary conditions, invalid inputs, concurrency issues, and error handling.
|
|
272
|
+
*Why now?*
|
|
273
|
+
- Functional and integration correctness is already established, allowing us to focus on resilience.
|
|
274
|
+
- Helps assess the system's robustness in handling unexpected inputs and failures.
|
|
275
|
+
|
|
276
|
+
**Phase 5: Exploratory Testing (Final Validations & Completeness Check)**
|
|
277
|
+
Finally, we will perform exploratory testing to uncover issues that may not have been covered in structured test cases. This includes usability assessments, performance bottlenecks, and overlooked functional gaps.
|
|
278
|
+
*Why at the end?*
|
|
279
|
+
- Ensures real-world scenarios and human intuition-driven testing before deployment.
|
|
280
|
+
- Helps identify potential last-minute gaps or overlooked issues.
|
|
281
|
+
|
|
282
|
+
**This context is designed to make your test planning fast, consistent, and high quality.**`;
|
|
283
|
+
//# sourceMappingURL=test-planner-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-planner-context.js","sourceRoot":"","sources":["../../src/agents/test-planner-context.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4FAoRwD,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* x-test-planner agent: MCP prompt that delivers the standard test-planning context
|
|
3
|
+
* so test plans are consistent and repeatable without relying on a user-editable context file.
|
|
4
|
+
*/
|
|
5
|
+
import type { Prompt, GetPromptResult } from "@modelcontextprotocol/sdk/types.js";
|
|
6
|
+
export declare const X_TEST_PLANNER_NAME = "x-test-planner";
|
|
7
|
+
/**
|
|
8
|
+
* Arguments the user can supply when invoking the prompt.
|
|
9
|
+
* All are optional so the prompt can be used with minimal or rich input.
|
|
10
|
+
*/
|
|
11
|
+
export declare const X_TEST_PLANNER_ARGUMENTS: readonly [{
|
|
12
|
+
readonly name: "project_summary";
|
|
13
|
+
readonly description: "Short description of the project/feature to plan tests for (e.g. epic summary, user story, or change description).";
|
|
14
|
+
readonly required: false;
|
|
15
|
+
}, {
|
|
16
|
+
readonly name: "links";
|
|
17
|
+
readonly description: "Optional BDD, TDD, JIRA, or Confluence links. The agent will use these to gather context for the test plan.";
|
|
18
|
+
readonly required: false;
|
|
19
|
+
}, {
|
|
20
|
+
readonly name: "scope";
|
|
21
|
+
readonly description: "Optional test scope (in scope / out of scope, platforms, or specific areas to focus on).";
|
|
22
|
+
readonly required: false;
|
|
23
|
+
}];
|
|
24
|
+
/**
|
|
25
|
+
* Prompt definition for prompts/list.
|
|
26
|
+
*/
|
|
27
|
+
export declare function getTestPlannerPromptDefinition(): Prompt;
|
|
28
|
+
/**
|
|
29
|
+
* Builds the prompt messages for prompts/get.
|
|
30
|
+
* Message 1: embedded context + agent instruction.
|
|
31
|
+
* Message 2: user's request (templated with project_summary, links, scope).
|
|
32
|
+
*/
|
|
33
|
+
export declare function getTestPlannerMessages(args?: Record<string, string>): GetPromptResult;
|
|
34
|
+
//# sourceMappingURL=test-planner-prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-planner-prompt.d.ts","sourceRoot":"","sources":["../../src/agents/test-planner-prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,eAAe,EAAiB,MAAM,oCAAoC,CAAC;AAGjG,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AAOpD;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;EAmB3B,CAAC;AAEX;;GAEG;AACH,wBAAgB,8BAA8B,IAAI,MAAM,CAOvD;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,eAAe,CAoCrF"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* x-test-planner agent: MCP prompt that delivers the standard test-planning context
|
|
3
|
+
* so test plans are consistent and repeatable without relying on a user-editable context file.
|
|
4
|
+
*/
|
|
5
|
+
import { TEST_PLANNER_CONTEXT } from "./test-planner-context.js";
|
|
6
|
+
export const X_TEST_PLANNER_NAME = "x-test-planner";
|
|
7
|
+
const PROMPT_DESCRIPTION = "Standard test plan agent. Uses embedded test-planning context to produce consistent, repeatable test plans, test cases, and automation workflows without manual context files.";
|
|
8
|
+
const PROMPT_TITLE = "x-test-planner";
|
|
9
|
+
/**
|
|
10
|
+
* Arguments the user can supply when invoking the prompt.
|
|
11
|
+
* All are optional so the prompt can be used with minimal or rich input.
|
|
12
|
+
*/
|
|
13
|
+
export const X_TEST_PLANNER_ARGUMENTS = [
|
|
14
|
+
{
|
|
15
|
+
name: "project_summary",
|
|
16
|
+
description: "Short description of the project/feature to plan tests for (e.g. epic summary, user story, or change description).",
|
|
17
|
+
required: false,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "links",
|
|
21
|
+
description: "Optional BDD, TDD, JIRA, or Confluence links. The agent will use these to gather context for the test plan.",
|
|
22
|
+
required: false,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "scope",
|
|
26
|
+
description: "Optional test scope (in scope / out of scope, platforms, or specific areas to focus on).",
|
|
27
|
+
required: false,
|
|
28
|
+
},
|
|
29
|
+
];
|
|
30
|
+
/**
|
|
31
|
+
* Prompt definition for prompts/list.
|
|
32
|
+
*/
|
|
33
|
+
export function getTestPlannerPromptDefinition() {
|
|
34
|
+
return {
|
|
35
|
+
name: X_TEST_PLANNER_NAME,
|
|
36
|
+
title: PROMPT_TITLE,
|
|
37
|
+
description: PROMPT_DESCRIPTION,
|
|
38
|
+
arguments: [...X_TEST_PLANNER_ARGUMENTS],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Builds the prompt messages for prompts/get.
|
|
43
|
+
* Message 1: embedded context + agent instruction.
|
|
44
|
+
* Message 2: user's request (templated with project_summary, links, scope).
|
|
45
|
+
*/
|
|
46
|
+
export function getTestPlannerMessages(args) {
|
|
47
|
+
const projectSummary = args?.project_summary?.trim() ?? "";
|
|
48
|
+
const links = args?.links?.trim() ?? "";
|
|
49
|
+
const scope = args?.scope?.trim() ?? "";
|
|
50
|
+
const contextMessage = {
|
|
51
|
+
role: "user",
|
|
52
|
+
content: {
|
|
53
|
+
type: "text",
|
|
54
|
+
text: `${TEST_PLANNER_CONTEXT}
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
**You are the x-test-planner agent.** Use the above context for every response. Do not ask the user to provide or attach this context—it is already applied. Produce test plans, test cases, and automation workflows that follow the structure, best practices, and checklists above.`,
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
const parts = ["Create a test plan (and test cases / automation workflows as appropriate) for the following."];
|
|
61
|
+
if (projectSummary)
|
|
62
|
+
parts.push(`\n**Project/feature:**\n${projectSummary}`);
|
|
63
|
+
if (links)
|
|
64
|
+
parts.push(`\n**Links (BDD/JIRA/Confluence):**\n${links}`);
|
|
65
|
+
if (scope)
|
|
66
|
+
parts.push(`\n**Scope:**\n${scope}`);
|
|
67
|
+
if (!projectSummary && !links && !scope) {
|
|
68
|
+
parts.push("\nNo specific project or links were provided. Ask the user for a brief project/feature description and any BDD, JIRA, or Confluence links, or produce a generic test plan template they can fill in.");
|
|
69
|
+
}
|
|
70
|
+
const requestMessage = {
|
|
71
|
+
role: "user",
|
|
72
|
+
content: {
|
|
73
|
+
type: "text",
|
|
74
|
+
text: parts.join(""),
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
return {
|
|
78
|
+
description: PROMPT_DESCRIPTION,
|
|
79
|
+
messages: [contextMessage, requestMessage],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=test-planner-prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-planner-prompt.js","sourceRoot":"","sources":["../../src/agents/test-planner-prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAEpD,MAAM,kBAAkB,GACtB,gLAAgL,CAAC;AAEnL,MAAM,YAAY,GAAG,gBAAgB,CAAC;AAEtC;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC;QACE,IAAI,EAAE,iBAAiB;QACvB,WAAW,EACT,oHAAoH;QACtH,QAAQ,EAAE,KAAK;KAChB;IACD;QACE,IAAI,EAAE,OAAO;QACb,WAAW,EACT,6GAA6G;QAC/G,QAAQ,EAAE,KAAK;KAChB;IACD;QACE,IAAI,EAAE,OAAO;QACb,WAAW,EACT,0FAA0F;QAC5F,QAAQ,EAAE,KAAK;KAChB;CACO,CAAC;AAEX;;GAEG;AACH,MAAM,UAAU,8BAA8B;IAC5C,OAAO;QACL,IAAI,EAAE,mBAAmB;QACzB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AC3C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export interface ApiClientConfig {
|
|
2
|
+
baseUrl: string;
|
|
3
|
+
apiKey?: string;
|
|
4
|
+
sessionToken?: string;
|
|
5
|
+
projectId?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface LoginResponse {
|
|
8
|
+
success: boolean;
|
|
9
|
+
message: string;
|
|
10
|
+
data: {
|
|
11
|
+
user: {
|
|
12
|
+
id: string;
|
|
13
|
+
username: string;
|
|
14
|
+
user_email: string;
|
|
15
|
+
roles: string[];
|
|
16
|
+
permissions: string[];
|
|
17
|
+
project_roles_permissions: {
|
|
18
|
+
projectRoles: Record<string, any>;
|
|
19
|
+
consolidatedPermissions: Record<string, any>;
|
|
20
|
+
};
|
|
21
|
+
token: string;
|
|
22
|
+
org_id?: string;
|
|
23
|
+
authority_level: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export declare class ApiClient {
|
|
28
|
+
private client;
|
|
29
|
+
private loginClient;
|
|
30
|
+
private projectId?;
|
|
31
|
+
private cookieJar;
|
|
32
|
+
private isAuthenticated;
|
|
33
|
+
private userId?;
|
|
34
|
+
constructor(baseUrl: string, apiKey?: string, sessionToken?: string, projectId?: string);
|
|
35
|
+
setProjectId(projectId: string): void;
|
|
36
|
+
setSessionToken(token: string): void;
|
|
37
|
+
login(email: string, password: string): Promise<LoginResponse>;
|
|
38
|
+
getIsAuthenticated(): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Get cookie header string for a given URL (and optionally the API base URL).
|
|
41
|
+
* Used to forward session cookies to the automation agent WebSocket.
|
|
42
|
+
*/
|
|
43
|
+
getCookieStringForUrl(url: string): Promise<string>;
|
|
44
|
+
getUserId(): string | undefined;
|
|
45
|
+
get<T = any>(url: string, config?: any): Promise<T>;
|
|
46
|
+
post<T = any>(url: string, data?: any, config?: any): Promise<T>;
|
|
47
|
+
put<T = any>(url: string, data?: any, config?: any): Promise<T>;
|
|
48
|
+
patch<T = any>(url: string, data?: any, config?: any): Promise<T>;
|
|
49
|
+
delete<T = any>(url: string, config?: any): Promise<T>;
|
|
50
|
+
postFormData<T = any>(url: string, formData: FormData, config?: any): Promise<T>;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=api-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,EAAE,EAAE,MAAM,CAAC;YACX,QAAQ,EAAE,MAAM,CAAC;YACjB,UAAU,EAAE,MAAM,CAAC;YACnB,KAAK,EAAE,MAAM,EAAE,CAAC;YAChB,WAAW,EAAE,MAAM,EAAE,CAAC;YACtB,yBAAyB,EAAE;gBACzB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;gBAClC,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;aAC9C,CAAC;YACF,KAAK,EAAE,MAAM,CAAC;YACd,MAAM,CAAC,EAAE,MAAM,CAAC;YAChB,eAAe,EAAE,MAAM,CAAC;SACzB,CAAC;KACH,CAAC;CACH;AAED,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,WAAW,CAAgB;IACnC,OAAO,CAAC,SAAS,CAAC,CAAS;IAC3B,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO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