Class TptApiHelper


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

      Constructors 
      Constructor Description
      TptApiHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addTestCase​(TptVersion tptVersion, com.piketec.tpt.api.TestSet testSet, com.piketec.tpt.api.Scenario testCase)
      Adds a test case to the test set.
      static java.util.Collection<com.piketec.tpt.api.Scenario> getTestCasesFromTestSet​(TptVersion tptVersion, com.piketec.tpt.api.TestSet testSet)
      Get the test cases that are part of the given test set.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TptApiHelper

        public TptApiHelper()
    • Method Detail

      • getTestCasesFromTestSet

        public static java.util.Collection<com.piketec.tpt.api.Scenario> getTestCasesFromTestSet​(TptVersion tptVersion,
                                                                                                 com.piketec.tpt.api.TestSet testSet)
                                                                                          throws java.rmi.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:
        java.rmi.RemoteException - remote communication problem
      • addTestCase

        public static void addTestCase​(TptVersion tptVersion,
                                       com.piketec.tpt.api.TestSet testSet,
                                       com.piketec.tpt.api.Scenario testCase)
                                throws java.rmi.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:
        java.rmi.RemoteException - remote communication problem