Class TptVersion

  • All Implemented Interfaces:
    java.io.Serializable

    public class TptVersion
    extends java.lang.Object
    implements java.io.Serializable
    TPT versions are named like "15" or "15u1" meaning release version 15, update release 1. For the initial release "15u0" the update suffix "u0" is ommited. Milestone and release candidates are named like 15M1b1234 or 15RC2b1234. This class encapsulates version and update number ignoring the fact that milestone and release candidates exist. These are interpreted as final releses with an update number of null.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int major
      The main TPT version
      int updateLevel
      The update level
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static TptVersion getVersion​(com.piketec.tpt.api.TptApi api)
      Read and parses the TPT version behind an TptApi object.
      boolean isAtLeast​(int major, int updateLevel)
      Checks if this version is greater or equals than the given version.
      boolean supportsTestCaseConditionAccess()
      To read and set test set conditions via API is available since 16u1.
      boolean supportsTestCaseConditions()
      Test set condtions can be configured in TPT file since TPT 9.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • major

        public final int major
        The main TPT version
      • updateLevel

        public final int updateLevel
        The update level
    • Method Detail

      • getVersion

        public static TptVersion getVersion​(com.piketec.tpt.api.TptApi api)
                                     throws java.rmi.RemoteException
        Read and parses the TPT version behind an TptApi object.
        Parameters:
        api - The TptApi object to which the version shall be determined.
        Returns:
        The parsed version string of the TptApi object.
        Throws:
        java.rmi.RemoteException - remote communication problem
      • isAtLeast

        public boolean isAtLeast​(int major,
                                 int updateLevel)
        Checks if this version is greater or equals than the given version.
        Parameters:
        major - The minimal required major version
        updateLevel - the minimal required update level
        Returns:
        if this version is greater or equals than the given version
      • supportsTestCaseConditionAccess

        public boolean supportsTestCaseConditionAccess()
        To read and set test set conditions via API is available since 16u1.
        Returns:
        true if this TPT version supports test case condtion API access, false otherwise.
      • supportsTestCaseConditions

        public boolean supportsTestCaseConditions()
        Test set condtions can be configured in TPT file since TPT 9. Requirement sets can be used for test set conditions since TPT 11. For availabality via API see supportsTestCaseConditionAccess().
        Returns:
        true if this TPT version supports test case condtion in the TPT file, false otherwise.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object