Search in sources :

Example 1 with TestCase

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

the class TestLinkService method syncTestPlanCases.

/* ** TestCase ** */
public void syncTestPlanCases(Integer planId, ExternalTJob externalTJob) {
    // Clean first TJob from all external TC (for unassigned TC)
    this.cleanExternalTJobFromExternalTestCases(externalTJob);
    TestCase[] casesList = this.getPlanTestCases(planId);
    if (casesList != null) {
        for (TestCase currentTestCase : casesList) {
            this.syncProjectTestCase(currentTestCase, externalTJob);
        }
    }
}
Also used : ExternalTestCase(io.elastest.etm.model.external.ExternalTestCase) TestCase(br.eti.kinoshita.testlinkjavaapi.model.TestCase)

Example 2 with TestCase

use of br.eti.kinoshita.testlinkjavaapi.model.TestCase 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 3 with TestCase

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

the class TestLinkService method getFullDetailedTestCases.

public TestCase[] getFullDetailedTestCases(TestCase[] testCases) {
    TestCase[] fullDetailedCases = null;
    try {
        for (TestCase currentCase : testCases) {
            currentCase = this.getFullDetailedTestCase(currentCase);
            fullDetailedCases = (TestCase[]) ArrayUtils.add(fullDetailedCases, currentCase);
        }
    } catch (TestLinkAPIException e) {
    // EMPTY
    }
    if (fullDetailedCases == null) {
        fullDetailedCases = testCases;
    }
    return fullDetailedCases;
}
Also used : ExternalTestCase(io.elastest.etm.model.external.ExternalTestCase) TestCase(br.eti.kinoshita.testlinkjavaapi.model.TestCase) TestLinkAPIException(br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException)

Example 4 with TestCase

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

the class TestLinkService method getTestCaseById.

/* *****************************************************************/
/* ************************** Test Cases ***************************/
/* *****************************************************************/
public TestCase getTestCaseById(Integer caseId) {
    TestCase testCase = this.api.getTestCase(caseId, null, null);
    testCase = this.getSuiteTestCaseById(testCase.getTestSuiteId(), caseId);
    return testCase;
}
Also used : ExternalTestCase(io.elastest.etm.model.external.ExternalTestCase) TestCase(br.eti.kinoshita.testlinkjavaapi.model.TestCase)

Example 5 with TestCase

use of br.eti.kinoshita.testlinkjavaapi.model.TestCase 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

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