org.aludratest.hpalm.infrastructure
Class HpAlmUtil
java.lang.Object
org.aludratest.hpalm.infrastructure.HpAlmUtil
public final class HpAlmUtil
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DF_ID
public static final DecimalFormat DF_ID
createTestSetFolderPath
public static Entity createTestSetFolderPath(HpAlmSession session,
String path)
throws IOException,
HpAlmException
- Ensures that there exists a given path in the HP ALM test set folder structure. If there are folders missing for this path,
these folders are created.
- Parameters:
session - HP ALM session to use for object queries and creation.path - Path to create or to check for existence, e.g. Root/AludraTest/UITest.
- Returns:
- The created or already existing folder at the path. This is an HP ALM "test-set-folder" entity.
- Throws:
IOException - If any I/O exception occurs during REST communication.
HpAlmException - If HP ALM reports any error.
IllegalArgumentException - If path is empty or invalid.
createOrGetTestSet
public static Entity createOrGetTestSet(HpAlmSession session,
long testSetFolderId,
String testSetName)
throws IOException,
HpAlmException
- Checks if there already is a test set with the given name in the given test set folder, and returns it if such a test set
is found. Otherwise, a new test set with the given name is created and returned.
- Parameters:
session - HP ALM session to use for object queries and creation.testSetFolderId - ID of the test set folder containing the test set.testSetName - Name of the test set to retrieve or create.
- Returns:
- The already existing or newly created test set.
- Throws:
IOException - If any I/O error occurs.
HpAlmException - If HP ALM reports any error.
createOrGetTestInstance
public static Entity createOrGetTestInstance(HpAlmSession session,
long testSetId,
long testId,
Long testConfigId)
throws IOException,
HpAlmException
- Checks if there already is a test instance referencing the given test in the given test set, and returns it if such a test
instance is found. Otherwise, a new test instance for the given test is created and returned. The newly created test
instance is sorted last in the given test set.
- Parameters:
session - HP ALM session to use for object queries and creation.testSetId - ID of the test set containing the test instance.testId - ID of the referenced test.testConfigId - ID of the references test configuration. If null, config attribute will not be used.
- Returns:
- The already existing or newly created test instance.
- Throws:
IOException - If any I/O error occurs.
HpAlmException - If HP ALM reports any error.
Copyright © 2015 aludratest.org. All rights reserved.