@nbakka/mcp-appium 2.0.72 → 2.0.73
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,66 @@ tool(
|
|
|
612
612
|
}
|
|
613
613
|
);
|
|
614
614
|
|
|
615
|
+
tool(
|
|
616
|
+
"fetch_testcases_from_tcms",
|
|
617
|
+
"Fetch 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
|
+
return {
|
|
661
|
+
folderName: folderName,
|
|
662
|
+
totalCount: extractedTestCases.length,
|
|
663
|
+
testCases: extractedTestCases
|
|
664
|
+
};
|
|
665
|
+
|
|
666
|
+
} catch (err) {
|
|
667
|
+
if (err.response) {
|
|
668
|
+
return `❌ TCMS API Error: ${err.response.status} - ${err.response.data?.message || err.response.statusText}`;
|
|
669
|
+
}
|
|
670
|
+
return `❌ Error fetching test cases: ${err.message}`;
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
);
|
|
674
|
+
|
|
615
675
|
tool(
|
|
616
676
|
"generate_testcases_from_ticket_data",
|
|
617
677
|
"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
|
|
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"
|