UNPKG

azure-devops-test-helper

Version:

Import JSON result with attachments into Azure Test Plan

10 lines (9 loc) 539 B
import { createAxiosClient } from "./client.js"; import { getTestCasesByPlanID } from "./plan.js"; import { getAutomatedTestCaseIds } from "./case.js"; export async function getTestCaseIdsByPlanId(planInfo) { const axiosClient = await createAxiosClient(planInfo.pat, planInfo.organizationUrl, planInfo.project); const testCases = await getTestCasesByPlanID(axiosClient, planInfo.planId, planInfo.suiteId); const testCaseIds = getAutomatedTestCaseIds(testCases, planInfo.automatedStatus ?? "Planned"); return testCaseIds; }