本文整理汇总了Java中br.eti.kinoshita.testlinkjavaapi.TestLinkAPI类的典型用法代码示例。如果您正苦于以下问题:Java TestLinkAPI类的具体用法?Java TestLinkAPI怎么用?Java TestLinkAPI使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TestLinkAPI类属于br.eti.kinoshita.testlinkjavaapi包,在下文中一共展示了TestLinkAPI类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import br.eti.kinoshita.testlinkjavaapi.TestLinkAPI; //导入依赖的package包/类
public void execute() throws MojoExecutionException{
try {
api = new TestLinkAPI(new URL(url), devKey);
} catch (MalformedURLException e) {
e.printStackTrace();
}
// Get all testcases in testlink that has custom and automated
testProject = api.getTestProjectByName(projectName);
tp = api.getTestPlanByName(testPlan,testProject.getName());
List<TestCase> tcs;
getLog().info("TestProject: " + testProject.getName());
getLog().info("TestPlan: " + tp.getName());
if(platform != null){
tcs = getTestcasesByPlatform(tp,platform);
} else {
TestCase[] testCases = this.api.getTestCasesForTestPlan(tp.getId(), null, null, null, null, null, null, null,
ExecutionType.AUTOMATED, null, TestCaseDetails.FULL);
tcs = Arrays.asList(testCases);
}
Map<String, List<TestCase>> testcasesPerCustomfields = sortTestcasesByCustomFields(tcs);
// Parse xml junit result
reportJunitResultsToTestlink(testcasesPerCustomfields);
}
示例2: connect
import br.eti.kinoshita.testlinkjavaapi.TestLinkAPI; //导入依赖的package包/类
public void connect()
{
LOG.info("Started connect to testLink...");
try
{
api = new TestLinkAPI(testLinkURL, testLinkProp.getDevKey());
}
catch (TestLinkAPIException e)
{
processError(e);
}
LOG.info("TestLink say:" + api.ping());
}