Class TptApiHelper

java.lang.Object
com.piketec.jenkins.plugins.tpt.TptApiHelper

public class TptApiHelper extends Object
Provides some Methods to generalize access to the TPT API.
  • Constructor Details

    • TptApiHelper

      public TptApiHelper()
  • Method Details

    • getTestCasesFromTestSet

      public static Collection<com.piketec.tpt.api.Scenario> getTestCasesFromTestSet(TptVersion tptVersion, com.piketec.tpt.api.TestSet testSet) throws RemoteException
      Get the test cases that are part of the given test set. Test case groups are ignored but all underlaying test cases will be returned. For TPT versions less than 16 the test cases may be reduced by a test set condition evaluated with default values. This is the best we can do in that case.
      Parameters:
      tptVersion - The TPT version the test set was read from
      testSet - The test set to get the test cases from
      Returns:
      All test cases that are part of the given test set
      Throws:
      RemoteException - remote communication problem
    • addTestCase

      public static void addTestCase(TptVersion tptVersion, com.piketec.tpt.api.TestSet testSet, com.piketec.tpt.api.Scenario testCase) throws RemoteException
      Adds a test case to the test set. Will use the correct method for the given TPT version. The test set and the test case must be part of the same TPT model loaded in the same TPT instance.
      Parameters:
      tptVersion - The TPT version the test set was read from
      testSet - The test set to add the test case to
      testCase - The test case to add to the test set
      Throws:
      RemoteException - remote communication problem