Class TptVersion

java.lang.Object
com.piketec.jenkins.plugins.tpt.TptVersion
All Implemented Interfaces:
Serializable

public class TptVersion extends Object implements 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:
  • Field Details

    • major

      public final int major
      The main TPT version
    • updateLevel

      public final int updateLevel
      The update level
  • Method Details

    • getVersion

      public static TptVersion getVersion(com.piketec.tpt.api.TptApi api) throws 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:
      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 String toString()
      Overrides:
      toString in class Object