Package com.piketec.jenkins.plugins.tpt
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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description int
major
The main TPT versionint
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 anTptApi
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.String
toString()
-
-
-
Method Detail
-
getVersion
public static TptVersion getVersion(com.piketec.tpt.api.TptApi api) throws RemoteException
Read and parses the TPT version behind anTptApi
object.- Parameters:
api
- TheTptApi
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 versionupdateLevel
- 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 seesupportsTestCaseConditionAccess()
.- Returns:
true
if this TPT version supports test case condtion in the TPT file,false
otherwise.
-
-