org.unitils.testlink
Class TestLinkConnector

java.lang.Object
  extended by org.unitils.testlink.TestLinkConnector

public class TestLinkConnector
extends Object

Since:
3.3.1
Author:
Jeroen Horemans, Thomas De Rycke

Constructor Summary
TestLinkConnector(br.eti.kinoshita.testlinkjavaapi.TestLinkAPI api, String projectName, String username, String testPlan, Boolean overwrite, String buildName)
           
TestLinkConnector(br.eti.kinoshita.testlinkjavaapi.TestLinkAPI api, String projectName, String username, String testPlanId, Boolean overwrite, String buildName, Boolean createPlanIfNeeded, Boolean createTestIfNeeded, Boolean assignTestToPlan)
           
 
Method Summary
protected  void addTestCaseToTestPlan(br.eti.kinoshita.testlinkjavaapi.model.TestCase testCase, br.eti.kinoshita.testlinkjavaapi.model.TestPlan testPlan)
          If the property assingTestIfNeeded in the unitils-jenkins.properties is set to true; than the test is added to the test plan.
protected  br.eti.kinoshita.testlinkjavaapi.model.TestCase createTestCase(String externalId, Integer suiteId)
          A test case is created with the externalId.
protected  br.eti.kinoshita.testlinkjavaapi.model.Build getBuild(Integer testPlanId, String buildName1)
          Retrieves the build with a given buildname from a given test plan.
protected  String getNotes(Throwable ex)
          If the ex isn't null, the method will give you the message of the throwable.
protected  br.eti.kinoshita.testlinkjavaapi.constants.ExecutionStatus getStatus(Throwable ex)
          If the param ex is null, it will return passed, otherwise failed will be returned.
protected  br.eti.kinoshita.testlinkjavaapi.model.TestCase getTestCase(String externalId, String suite)
          It searches the testcase.
protected  br.eti.kinoshita.testlinkjavaapi.model.TestPlan getTestPlan(String testPlanName2, String projectName1)
          It retrieves the test plan from Testlink
protected  br.eti.kinoshita.testlinkjavaapi.model.TestSuite getTestSuite(String suiteName, Integer projectId, Integer testPlanId)
          This method looks if there is a suite with this name -YES: returns the TestSuite -NO: creates a TestSuite with this name and returns it.
 br.eti.kinoshita.testlinkjavaapi.model.TestCase updateTestCase(String externalId, String suite, String msg, Throwable ex)
          The method searches the testcase with that specific externalId and the testcase is added to the testplan.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestLinkConnector

public TestLinkConnector(br.eti.kinoshita.testlinkjavaapi.TestLinkAPI api,
                         String projectName,
                         String username,
                         String testPlan,
                         Boolean overwrite,
                         String buildName)

TestLinkConnector

public TestLinkConnector(br.eti.kinoshita.testlinkjavaapi.TestLinkAPI api,
                         String projectName,
                         String username,
                         String testPlanId,
                         Boolean overwrite,
                         String buildName,
                         Boolean createPlanIfNeeded,
                         Boolean createTestIfNeeded,
                         Boolean assignTestToPlan)
Method Detail

updateTestCase

public br.eti.kinoshita.testlinkjavaapi.model.TestCase updateTestCase(String externalId,
                                                                      String suite,
                                                                      String msg,
                                                                      Throwable ex)
The method searches the testcase with that specific externalId and the testcase is added to the testplan.

Parameters:
externalId -
msg -
suite -
ex -
Returns:
TestCase

getTestCase

protected br.eti.kinoshita.testlinkjavaapi.model.TestCase getTestCase(String externalId,
                                                                      String suite)
It searches the testcase. First the method will try to find the testcase by it's externalID If it was't found the testcase is searched on projectName.

Parameters:
externalId -
suite -
Returns:
TestCase

createTestCase

protected br.eti.kinoshita.testlinkjavaapi.model.TestCase createTestCase(String externalId,
                                                                         Integer suiteId)
A test case is created with the externalId.

Parameters:
externalId -
suite -
Returns:
TestCase

getTestSuite

protected br.eti.kinoshita.testlinkjavaapi.model.TestSuite getTestSuite(String suiteName,
                                                                        Integer projectId,
                                                                        Integer testPlanId)
This method looks if there is a suite with this name -YES: returns the TestSuite -NO: creates a TestSuite with this name and returns it.

Parameters:
suiteId -
suiteName -
projectId -
testPlanId -
Returns:
TestSuite

addTestCaseToTestPlan

protected void addTestCaseToTestPlan(br.eti.kinoshita.testlinkjavaapi.model.TestCase testCase,
                                     br.eti.kinoshita.testlinkjavaapi.model.TestPlan testPlan)
If the property assingTestIfNeeded in the unitils-jenkins.properties is set to true; than the test is added to the test plan.

Parameters:
testCase -
testPlan -

getTestPlan

protected br.eti.kinoshita.testlinkjavaapi.model.TestPlan getTestPlan(String testPlanName2,
                                                                      String projectName1)
It retrieves the test plan from Testlink

Parameters:
testPlanName2 -
projectName1 -
Returns:
TestPlan

getBuild

protected br.eti.kinoshita.testlinkjavaapi.model.Build getBuild(Integer testPlanId,
                                                                String buildName1)
Retrieves the build with a given buildname from a given test plan. If there isn't a build with that name, than a build with that name is created.

Parameters:
testPlanId -
buildName1 -
Returns:
Build

getNotes

protected String getNotes(Throwable ex)
If the ex isn't null, the method will give you the message of the throwable. Otherwise the method returns 'ok'.

Parameters:
ex -
Returns:
String

getStatus

protected br.eti.kinoshita.testlinkjavaapi.constants.ExecutionStatus getStatus(Throwable ex)
If the param ex is null, it will return passed, otherwise failed will be returned.

Parameters:
ex -
Returns:
ExecutionStatus


Copyright © 2012-2013. All Rights Reserved.