Interface ITestSession

All Superinterfaces:
IItem

public interface ITestSession extends IItem
Representation of a test session item that acts as a container for the test case items that should be executed during the test session run.
  • Method Details

    • getTestCases

      ITestCaseIterator getTestCases(Set<String> fetchFieldNames, Set<String> fetchRichFieldNames, boolean showXHTML, String queryDefinition, boolean substituteParams) throws TMAPIException
      Resolve the test session item to an iterator of test case items that should be executed in order.

      This method invokes the 'tm testcases' command via the underlying API session back into the server. The API session user must have ACL permission to Login as well as sufficient workflow permissions to view the test session item as well as the test suites and test cases contained in the test session.

      Parameters:
      fetchFieldNames - The names of the fields on the test case items that should be fetched initially.
      fetchRichFieldNames - The names of the fields on the test case items that should be fetched that should be viewed as rich content.
      showXHTML - Determine if rich content (if shown) should be presented as XHTML or not.
      queryDefinition - An optional query definition that is applied to filter down the test case items that are relevant to the adapter implementation.
      substituteParams - Determine if parameter substitution should be performed for the field values or not.
      Returns:
      The iterator over the test cases in the order they should be executed.
      Throws:
      TMAPIException - If the test cases could not be fetched from the server.
    • createTestResultsZip

      void createTestResultsZip(Collection<ITestResultDelta> testResultDeltas, File zipFile, boolean overwriteExisting) throws TMAPIException
      Create the XML file used to set test results the provided test results.
      Parameters:
      testResultDeltas - The changes to the test results that should be made.
      zipFile - The zip file that should be created.
      overwriteExisting - If true then creation of the zip file is permitted to overwrite an existing file, otherwise it will be considered an error to create a zip file over an existing file.
      Throws:
      TMAPIException - If the zip file could not be created.
    • setTestResults

      void setTestResults(File zipFile) throws TMAPIException
      Set the provided test results in the repository.

      This method invokes the 'tm setresults' command via the underlying API session back into the server. The API session user must have ACL permission to Login as well as sufficient workflow permissions to set the test results.

      Parameters:
      zipFile - The zip file which captures all the test result action XML file and added attachment content.
      Throws:
      TMAPIException - If the test results couldn't be stored into the repository.