@nbakka/mcp-appium 2.0.72 → 2.0.74

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/lib/server.js CHANGED
@@ -612,6 +612,68 @@ tool(
612
612
  }
613
613
  );
614
614
 
615
+ tool(
616
+ "fetch_testcases_from_tcms",
617
+ "Before generating ticket for a jira ticket, always fetch existing test cases from TCMS tool for a specific folder",
618
+ {
619
+ projectKey: zod_1.z.string().describe("The project key (e.g., SCRUM)"),
620
+ folderName: zod_1.z.string().describe("The folder name to filter test cases (e.g., PDP)")
621
+ },
622
+ async ({ projectKey, folderName }) => {
623
+ try {
624
+ // Load AIO token from Desktop/aio.json
625
+ const aioConfigPath = path.join(os.homedir(), "Desktop", "aio.json");
626
+ const configContent = await fs.readFile(aioConfigPath, "utf-8");
627
+ const { token } = JSON.parse(configContent);
628
+
629
+ if (!token) throw new Error("AIO token missing in aio.json");
630
+
631
+ // Make API request to TCMS
632
+ const response = await axios.get(
633
+ `https://tcms.aiojiraapps.com/aio-tcms/api/v1/project/${projectKey}/testcase`,
634
+ {
635
+ headers: {
636
+ "accept": "application/json;charset=utf-8",
637
+ "Authorization": `AioAuth ${token}`
638
+ }
639
+ }
640
+ );
641
+
642
+ const testCases = response.data.items || [];
643
+
644
+ // Filter test cases by folder name
645
+ const filteredTestCases = testCases.filter(testCase =>
646
+ testCase.folder && testCase.folder.name === folderName
647
+ );
648
+
649
+ if (filteredTestCases.length === 0) {
650
+ return `No test cases found in folder: ${folderName}`;
651
+ }
652
+
653
+ // Extract key, title, and folder name
654
+ const extractedTestCases = filteredTestCases.map(testCase => ({
655
+ key: testCase.key,
656
+ title: testCase.title,
657
+ folderName: testCase.folder.name
658
+ }));
659
+
660
+ // Format as string response
661
+ const result = `✅ Found ${extractedTestCases.length} test cases in folder: ${folderName}\n\n` +
662
+ extractedTestCases.map(tc =>
663
+ `Key: ${tc.key}\nTitle: ${tc.title}\nFolder: ${tc.folderName}\n---`
664
+ ).join('\n');
665
+
666
+ return result;
667
+
668
+ } catch (err) {
669
+ if (err.response) {
670
+ return `❌ TCMS API Error: ${err.response.status} - ${err.response.data?.message || err.response.statusText}`;
671
+ }
672
+ return `❌ Error fetching test cases: ${err.message}`;
673
+ }
674
+ }
675
+ );
676
+
615
677
  tool(
616
678
  "generate_testcases_from_ticket_data",
617
679
  "Generate manual test cases by analyzing PNG design with JIRA requirements",
@@ -1,5 +1,8 @@
1
1
  generate test cases using jira summary, description and figma image,
2
- don't take any extra user input,
2
+ don't wait for extra user input,
3
+ test cases scope should be only for the changes mentioned in jira summary and description,
4
+ don't create test cases for other features visible in figma design because the design will also
5
+ have other features which are not part of the jira ticket,
3
6
  final output should be test in following format
4
7
  "Verify pay on credit banner exits on PDP", "Existing"
5
8
  "Verify overview tab on PDP", "New"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nbakka/mcp-appium",
3
- "version": "2.0.72",
3
+ "version": "2.0.74",
4
4
  "description": "Appium MCP",
5
5
  "engines": {
6
6
  "node": ">=18"