Search in sources :

Example 1 with Build

use of br.eti.kinoshita.testlinkjavaapi.model.Build in project elastest-torm by elastest.

the class TestLinkService method getBuildTestCaseById.

public TestCase getBuildTestCaseById(Integer buildId, Integer caseId) {
    Build build = this.getBuildById(buildId);
    TestCase[] testCases = this.getBuildTestCases(build);
    TestCase tCase = null;
    for (TestCase currentCase : testCases) {
        if (currentCase.getId().equals(caseId)) {
            return currentCase;
        }
    }
    return tCase;
}
Also used : ExternalTestCase(io.elastest.etm.model.external.ExternalTestCase) TestCase(br.eti.kinoshita.testlinkjavaapi.model.TestCase) Build(br.eti.kinoshita.testlinkjavaapi.model.Build)

Example 2 with Build

use of br.eti.kinoshita.testlinkjavaapi.model.Build in project elastest-torm by elastest.

the class TestLinkService method getPlanBuildTestCases.

public TestCase[] getPlanBuildTestCases(Integer planId) {
    TestCase[] cases = null;
    Build[] builds = this.getPlanBuilds(planId);
    if (builds != null) {
        for (Build currentBuild : builds) {
            try {
                cases = (TestCase[]) ArrayUtils.addAll(cases, this.api.getTestCasesForTestPlan(planId, null, currentBuild.getId(), null, null, null, null, null, null, null, TestCaseDetails.FULL));
            } catch (TestLinkAPIException e) {
            // EMPTY
            }
        }
    }
    return cases;
}
Also used : ExternalTestCase(io.elastest.etm.model.external.ExternalTestCase) TestCase(br.eti.kinoshita.testlinkjavaapi.model.TestCase) Build(br.eti.kinoshita.testlinkjavaapi.model.Build) TestLinkAPIException(br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException)

Aggregations

Build (br.eti.kinoshita.testlinkjavaapi.model.Build)2 TestCase (br.eti.kinoshita.testlinkjavaapi.model.TestCase)2 ExternalTestCase (io.elastest.etm.model.external.ExternalTestCase)2 TestLinkAPIException (br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException)1