Interface TestManagementWebService

All Superinterfaces:
Remote

public interface TestManagementWebService extends Remote
  • Method Details

    • addAttachmentToTestRecord

      void addAttachmentToTestRecord(String testRunUri, int index, String fileName, String title, byte[] data) throws RemoteException
      Adds a new Attachment to the specified Test Record. The created attachment can have a different file name than the one given.
      Parameters:
      testRunUri - The testRunUri URI of the Test Run that contains the target Test Record.
      index - The index of the Test Record in the Test Run.
      fileName - The Attachment's file name.
      title - The Attachment's title.
      data - The Attachment's data.
      Throws:
      RemoteException
      Since:
      3.7.3
    • addAttachmentToTestRun

      void addAttachmentToTestRun(String testRunUri, String fileName, String title, byte[] data) throws RemoteException
      Adds a new Attachment to the given Test Run or Test Run Template.
      Parameters:
      testRunUri - The URI of the target Test Run or Test Run Template.
      fileName - The Attachment's file name.
      title - The Attachment's title.
      data - The Attachment's data.
      Throws:
      RemoteException
      Since:
      3.7.1
    • addAttachmentToTestStep

      void addAttachmentToTestStep(String testRunUri, int index, int testStepIndex, String fileName, String title, byte[] data) throws RemoteException
      Adds a new Attachment to the specified Test Step. The created Attachment can have a different file name from the given one.
      Parameters:
      testRunUri - The testRunUri URI of the Test Run that contains the target Test Step.
      index - The index of the Test Record in the Test Run that contains the target Test Step.
      testStepIndex - The index of the Test Step in the Test Record.
      fileName - The attachment's file name.
      title - The attachment's title.
      data - The attachment's data.
      Throws:
      RemoteException
      Since:
      3.7.3
    • addProjectToProjectSpan

      void addProjectToProjectSpan(String uri, String projectId) throws RemoteException
      Adds a specified Project to the Project Span of the Test Run.
      Parameters:
      uri - The URI of the Test Run. (Not null.)
      projectId - The Project Id of the Project to be added. (Not null.)
      Throws:
      RemoteException
      Since:
      3.10.1
    • addTestRecord

      void addTestRecord(String testRunUri, String testCaseUri, String testResultId, Text testComment, String executedByUri, Calendar executed, float duration, String defectUri) throws RemoteException
      Add a Test Record to a Test Run.
      Parameters:
      testRunUri - The URI of the Test Run that the Test Record will be added to.
      testCaseUri - The URI of the executed Test Case.
      testResultId - The Id of the Test Result. Can be null.
      testComment - The comment to be tracked with the Test Record. Can be null.
      executedByUri - The URI of the user to be used as the Author of the Test Record. Can be null.
      executed - date When the Test Case has been executed. Can be null.
      duration - The time it takes to execute the Test Case. A negative value is treated as null.
      defectUri - The URI of the Defect Work Item to be linked from created record. Can be null.
      Throws:
      RemoteException
      Since:
      3.6.0
    • addTestRecordToTestRun

      void addTestRecordToTestRun(String testRunUri, TestRecord testRecord) throws RemoteException
      Adds the Test Record to the Test Run. If the Test Record to add has a result but does not have the Test Case revision filled in, the added Test Record will automatically set the Test Case revision to the current revision of the Test Case.
      Parameters:
      testRunUri - The URI of the target Test Run.
      testRecord - The Test Record to add.
      Throws:
      RemoteException
      Since:
      3.7.0
    • createSummaryDefect

      String createSummaryDefect(String testRunUri, String defectTemplateUri) throws RemoteException
      Create or return an existing Summary Defect Work Item of a Test Run.
      Parameters:
      testRunUri - The URI of the Test Run to update the summary defect for.
      defectTemplateUri - The URI of the Defect Work Item template to be used. The configured template will be used if null.
      Returns:
      The URI of the created or existing Summary Defect Work Item.
      Throws:
      RemoteException
      Since:
      3.6.0
    • createTestRun

      String createTestRun(String project, String id, String template) throws RemoteException
      Create a new Test Run.
      Parameters:
      project - The Project the Test Run will be created in.
      id - The Id of the Test Run to be created.
      template - The template used to create the Test Run.
      Returns:
      The URI of the created Test Run.
      Throws:
      RemoteException
      Since:
      3.6.0
    • createTestRunWithTitle

      String createTestRunWithTitle(String project, String id, String title, String template) throws RemoteException
      Create a new Test Run.
      Parameters:
      project - The Project the Test Run will be created in.
      id - The Id of the Test Run to be created in.
      title - The title of the Test Run to be created. The template title is used when null.
      template - The template used to create the Test Run.
      Returns:
      The URI of the created Test Run.
      Throws:
      RemoteException
      Since:
      3.10.1
    • deleteAttachmentFromTestRecord

      void deleteAttachmentFromTestRecord(String testRunUri, int index, String fileName) throws RemoteException
      Deletes the Test Record Attachment given by the Test Run, the index of the Test Record and the Attachment's file name.
      Parameters:
      testRunUri - The testRunUri URI of the Test Run that contains the target Test Record.
      index - The index of the Test Record in the Test Run.
      fileName - The Attachment's file name.
      Throws:
      RemoteException
      Since:
      3.7.3
    • deleteAttachmentFromTestStep

      void deleteAttachmentFromTestStep(String testRunUri, int index, int testStepIndex, String fileName) throws RemoteException
      Deletes the Test Step Attachment given by the Test Run, the index of Test Records, the index of Test Steps and the Attachment's file name.
      Parameters:
      testRunUri - The testRunUri URI of the Test Run that contains the target Test Record.
      index - The index of the Test Record in the Test Run.
      testStepIndex - The index of the Test Step in the Test Record.
      fileName - The attachment's file name.
      Throws:
      RemoteException
      Since:
      3.7.3
    • deleteTestRunAttachment

      void deleteTestRunAttachment(String testRunUri, String fileName) throws RemoteException
      Deletes the Test Run Attachment matching the Test Run and Attachment's file name. This Method is applicable for Test Run Templates.
      Parameters:
      testRunUri - The URI of the Test Run or Test Run Template containing the target Attachment. (Not null.)
      fileName - The file name of Attachment to delete.
      Throws:
      RemoteException
      Since:
      3.7.1
    • executeTest

      void executeTest(String testRunUri, TestRecord[] testRecords) throws RemoteException
      Executes Test Cases given by the Test Records within a specified Test Run. This method differs from others within this web service because it can execute multiple Test Cases in a single call. It can also create a defect if a Test Case fails. (If configured to do so on the Polarion server.) It replaces having to call multiple web services like addTestRecord(...) or updateTestRecord(...) and the manual creation of a defect. Test parameters in the supplied Test Records override any parameters contained within the original planned test records and the Test Run itself. If a required parameter is supplied with an empty value, the Method will fail. It is not necessary to fill in all the parameters, only those that do not have a value set in the Test Run or planned Test Case, or those that should be changed.
      Parameters:
      testRunUri - The URI of the Test Run. (Not null.)
      testRecords - An array containing Test Records for executed Test Cases. Submitted Test Records are automatically updated. For example, when a Test Case is planned, paused or created. (Not null.)
      Throws:
      RemoteException
      Since:
      3.10.3
    • getDefinedTestRunCustomFieldKeys

      String[] getDefinedTestRunCustomFieldKeys(String projectID) throws RemoteException
      Gets all custom field keys defined for a Test Run.
      Parameters:
      projectID - The Id of the Project. (If null, the Global context is used.)
      Throws:
      RemoteException
      Since:
      3.10.3
    • getDefinedTestRunCustomFieldType

      CustomFieldType getDefinedTestRunCustomFieldType(String projectID, String key) throws RemoteException
      Gets a custom field definition for a Test Run.
      Parameters:
      projectID - The ID of the Project. (If null, the Global context is used.)
      key - The custom field's key. (Not null.)
      Throws:
      RemoteException
      Since:
      3.10.3
    • getDefinedTestRunCustomFieldTypes

      CustomFieldType[] getDefinedTestRunCustomFieldTypes(String projectID) throws RemoteException
      Gets all custom field definitions for a Test Run.
      Parameters:
      projectID - The Id of the Project. (If null, the Global context is used.)
      Throws:
      RemoteException
      Since:
      3.10.3
    • getTestCaseParameterNames

      String[] getTestCaseParameterNames(String testCaseUri) throws RemoteException
      Returns an array of test parameter names used in the Test Case.
      Parameters:
      testCaseUri - The URI of the Test Case. (Not null).
      Throws:
      RemoteException
      Since:
      3.17.0
    • getTestCaseRecords

      TestRecord[] getTestCaseRecords(String testRunUri, String testCaseUri) throws RemoteException
      Returns the Test Records of a particular Test Case in a Test Run.
      Parameters:
      testRunUri - The URI of the Test Run. (Not null).
      testCaseUri - The URI of the Test Case (Mot null).
      Throws:
      RemoteException
      Since:
      3.17.0
    • getTestParametersLibrary

      ParametersLibrary getTestParametersLibrary(String projectId) throws RemoteException
      Returns the Project level test parameter library.
      Parameters:
      projectId - The Id of the Project to get the test parameter library for. (Not null.)
      Throws:
      RemoteException
      Since:
      3.17.0
    • getTestRunAttachment

      TestRunAttachment getTestRunAttachment(String testRunUri, String filename) throws RemoteException
      Returns an Attachment of a given Test Run or Test Run Template.
      Parameters:
      testRunUri - The URI of the target Test Run or Test Run Template.
      Returns:
      the attachment
      Throws:
      RemoteException
      Since:
      3.7.1
    • getTestRunAttachments

      TestRunAttachment[] getTestRunAttachments(String testRunUri) throws RemoteException
      Returns the Attachments of a given Test Run or Test Run Template.
      Parameters:
      testRunUri - The URI of the target Test Run or Test Run Template.
      Returns:
      attachments
      Throws:
      RemoteException
      Since:
      3.7.1
    • getTestRunById

      TestRun getTestRunById(String project, String id) throws RemoteException
      Returns a specific Test Run.
      Parameters:
      project - The Id of the Project that contains the Test Run to load.
      id - The Id of the Test Run to load.
      Returns:
      the Test Run.
      Throws:
      RemoteException
      Since:
      3.6.0
    • getTestRunByIdWithFields

      TestRun getTestRunByIdWithFields(String project, String id, String[] keys) throws RemoteException
      Returns a specific Test Run that only contains values for the specified list of fields.
      Parameters:
      project - The Id of the Project that contains the Test Run to load. (Not null.)
      id - The Id of the Test Run to load. (Not null.)
      keys - The keys of Test Run properties that should be copied from the Test Run. (Not null.)
      Returns:
      The Test Run. (Not null.)
      Throws:
      RemoteException
      Since:
      3.17.0
    • getTestRunByUri

      TestRun getTestRunByUri(String uri) throws RemoteException
      Returns a specific Test Run.
      Parameters:
      uri - The URI of the Test Run to load.
      Returns:
      The Test Run.
      Throws:
      RemoteException
      Since:
      3.6.0
    • getTestRunByUriWithFields

      TestRun getTestRunByUriWithFields(String uri, String[] keys) throws RemoteException
      Returns a specific Test Run that only contains values for the specified list of fields.
      Parameters:
      uri - The URI of the Test Run to load. (Not null.)
      keys - The keys of the Test Run properties that should be copied from the Test Run. (Not null.)
      Returns:
      the Test Run. (not null)
      Throws:
      RemoteException
      Since:
      3.17.0
    • getTestRunCustomFieldType

      CustomFieldType getTestRunCustomFieldType(String testRunURI, String key) throws RemoteException
      Gets the custom field definitions for a specific Test Run.
      Parameters:
      testRunURI - The URI of the Test Run. (Not null.)
      key - The custom field's key. (Not null.)
      Throws:
      RemoteException
      Since:
      3.10.3
    • getTestRunCustomFieldTypes

      CustomFieldType[] getTestRunCustomFieldTypes(String testRunURI) throws RemoteException
      Gets all custom field definitions for a specific Test Run.
      Parameters:
      testRunURI - The URI of the Test Run. (Not null.)
      Throws:
      RemoteException
      Since:
      3.10.3
    • getTestSteps

      TestSteps getTestSteps(String uri) throws RemoteException
      Gets the Test Steps of the Work Item with the URI.
      Parameters:
      uri - The URI of the Work Item to get.
      Returns:
      The Test Steps of the Work Item with the given URI.
      Throws:
      RemoteException
      Since:
      3.7.0
    • getTestStepsConfiguration

      EnumOption[] getTestStepsConfiguration(String projectId) throws RemoteException
      Gets the default Test Steps custom field configuration.
      Parameters:
      projectId - The Id of the Project containing the Test Step configuration.
      Returns:
      An EnumOption array containing the configuration for each Test Step column.
      Throws:
      RemoteException
      Since:
      3.7.0
    • getTestStepsConfigurationByWorkItemType

      EnumOption[] getTestStepsConfigurationByWorkItemType(String projectId, String wiType) throws RemoteException
      Gets the Test Steps custom field configuration for a specific Work Item type.
      Parameters:
      projectId - The Id of the Project containing the Test Step configuration.
      wiType - The type of the Work Item.
      Returns:
      An EnumOption array containing the configuration for each Test Step column.
      Throws:
      RemoteException
      Since:
      3.23.10
    • getTestsConfiguration

      TestsConfiguration getTestsConfiguration(String projectId) throws RemoteException
      Get the test management configuration for a specific Project.
      Parameters:
      projectId - The Id of the Project to get the test configuration for.
      Returns:
      The configuration.
      Throws:
      RemoteException
      Since:
      3.6.0
    • getWikiContentForTestRun

      Text getWikiContentForTestRun(String testRunUri) throws RemoteException
      Returns the Wiki Page content of Test Run or Test Run Template.
      Parameters:
      testRunUri - The URI of the target Test Run or Test Run Template.
      Returns:
      The Wiki Page content of Test Run or Test Run Template.
      Throws:
      RemoteException
      Since:
      3.7.1
    • removeProjectFromProjectSpan

      void removeProjectFromProjectSpan(String uri, String projectId) throws RemoteException
      Removes the specified Project from the Project Span of the Test Run.
      Parameters:
      uri - The URI of the Test Run. (Not null.)
      projectId - The Project Id of the Project to be removed. (Not null).
      Throws:
      RemoteException
      Since:
      3.10.1
    • searchTestRecords

      TestRecord[] searchTestRecords(String query, String sort, int limit) throws RemoteException
      Deprecated.
      since 3.8.1 with no direct replacement.
      Search for Test Records.
      Parameters:
      query - The query used to find Test Records.
      sort - The sort field.
      limit - The maximum number of records to be returned. (-1 for unlimited.)
      Returns:
      the found test records.
      Throws:
      RemoteException
      Since:
      3.6.0
    • searchTestRunTemplates

      TestRun[] searchTestRunTemplates(String query, String sort) throws RemoteException
      Search Test Run templates.
      Parameters:
      query - The query used to find test run templates.
      sort - The field used to sort the result.
      Returns:
      The found Test Run templates.
      Throws:
      RemoteException
      Since:
      3.6.0
    • searchTestRunTemplatesLimited

      TestRun[] searchTestRunTemplatesLimited(String query, String sort, int resultsLimit) throws RemoteException
      Search Test Run templates.
      Parameters:
      query - The query used to find Test Run templates.
      sort - The field used to sort the result.
      resultsLimit - The maximum number of records to be returned. (-1 for unlimited.)
      Returns:
      The found Test Run templates.
      Throws:
      RemoteException
      Since:
      3.6.0
    • searchTestRunTemplatesWithFields

      TestRun[] searchTestRunTemplatesWithFields(String query, String sort, String[] fields) throws RemoteException
      Search Test Run templates.
      Parameters:
      query - The query used to find Test Run templates.
      sort - The field used to sort the result.
      fields - The Test Run fields that should be initialized. All other fields will be null.
      Returns:
      The found Test Run templates.
      Throws:
      RemoteException
      Since:
      3.6.0
    • searchTestRunTemplatesWithFieldsLimited

      TestRun[] searchTestRunTemplatesWithFieldsLimited(String query, String sort, String[] fields, int resultsLimit) throws RemoteException
      Search Test Run templates.
      Parameters:
      query - The query used to find Test Run templates.
      sort - The field used to sort the result.
      fields - The Test Run fields that should be initialized. All other fields will be null.
      resultsLimit - The maximum number of records to be returned. (-1 for unlimited.)
      Returns:
      The found Test Run templates.
      Throws:
      RemoteException
      Since:
      3.6.0
    • searchTestRuns

      TestRun[] searchTestRuns(String query, String sort) throws RemoteException
      Search Test Runs.
      Parameters:
      query - The query used to find Test Runs.
      sort - The field used to sort the result.
      Returns:
      The found Test Runs.
      Throws:
      RemoteException
      Since:
      3.6.0
    • searchTestRunsLimited

      TestRun[] searchTestRunsLimited(String query, String sort, int resultsLimit) throws RemoteException
      Search test runs.
      Parameters:
      query - The query used to find Test Runs.
      sort - The field used to sort the result.
      resultsLimit - The maximum number of records to be returned. (-1 for unlimited.)
      Returns:
      The found test runs.
      Throws:
      RemoteException
      Since:
      3.6.0
    • searchTestRunsWithFields

      TestRun[] searchTestRunsWithFields(String query, String sort, String[] fields) throws RemoteException
      Search Test Runs.
      Parameters:
      query - The query used to find Test Runs.
      sort - The field used to sort the result.
      fields - The Test Run fields that should be initialized. All other fields will be null.
      Returns:
      The found Test Runs.
      Throws:
      RemoteException
      Since:
      3.6.0
    • searchTestRunsWithFieldsLimited

      TestRun[] searchTestRunsWithFieldsLimited(String query, String sort, String[] fields, int resultsLimit) throws RemoteException
      Search Test Runs.
      Parameters:
      query - The query used to find Test Runs.
      sort - The field used to sort the result.
      fields - The Test Run fields that should be initialized. All other fields will be null.
      resultsLimit - The maximum number of records to be returned. (-1 for unlimited.)
      Returns:
      The found Test Runs.
      Throws:
      RemoteException
      Since:
      3.6.0
    • setTestSteps

      void setTestSteps(String workItemURI, TestStep[] testSteps) throws RemoteException
      Adds the Test Steps to the Work Item with the given URI. (The add operation). If the Work Item already has Test Steps, they will be completely replaced. (The update operation). If the testSteps parameter is null, the content of the Test Steps field will be emptied. (The delete operation).
      Parameters:
      workItemURI - The SubterraURI of the item to set the Work Item.
      testSteps - An array containing an entry for each step.
      Throws:
      RemoteException
      Since:
      3.7.0
    • updateSummaryDefect

      String updateSummaryDefect(String testRunUri, String source, int totalFailures, int totalErrors, int totalTests, String defectTemplateUri) throws RemoteException
      Create or update the Summary Defect Work Item of a Test Run.
      Parameters:
      testRunUri - The URI of the Test Run to update the Summary Defect for.
      source - The source of the Summary Defect, used to generate the Description content.
      totalFailures - The amount of total failures in the Test Run. (Used to generate the Description content.)
      totalErrors - The total number of errors in the Test Run. (Used to generate the Description content.)
      totalTests - The total number of tests in the Test Run. (Used to generate the Description content.)
      defectTemplateUri - The URI of the Defect Work Item template to be used. The configured template will be used if null.
      Returns:
      The URI of the created Summary Defect Work Item.
      Throws:
      RemoteException
      Since:
      3.6.0
    • updateTestRecord

      void updateTestRecord(String testRunUri, int index, String testResultId, Text testComment, String executedByUri, Calendar executed, float duration, String defectUri) throws RemoteException
      Update a Test Record.
      Parameters:
      testRunUri - The URI of the Test Run that the Test Record will be updated for.
      index - The index of the Test Record in the list of all executed Test Run Test Records.
      testResultId - The Id of the test result. Can be null.
      testComment - The comment to be tracked with the Test Record. Can be null.
      executedByUri - The URI of the user to be used as the Author of the Test Record. Can be null.
      executed - date When the Test Case was executed. Can be null.
      duration - The time it takes to execute the Test Case. A negative value is treated as null.
      defectUri - The URI of the Defect Work Item to be linked from the created record. Can be null.
      Throws:
      RemoteException
      Since:
      3.6.0
    • updateTestRecordAtIndex

      void updateTestRecordAtIndex(String testRunUri, int index, TestRecord testRecord) throws RemoteException
      Updates or removes the Test Record at a given index in the Test Run. Test parameters should not be entered in the supplied Test Record because they are ignored by this method. (This may change in the future.)
      Parameters:
      testRunUri - The URI of the target Test Run. (Not null).
      index - The index of the Test Record in the list of all Test Run Test Records.
      testRecord - The new Test Record content, or null to remove the Test Record.
      Throws:
      RemoteException
      Since:
      3.7.0
    • updateTestRun

      void updateTestRun(TestRun content) throws RemoteException
      Update a Test Run.
      Parameters:
      content - The new Test Run content. The URI of the content must be set, otherwise the call will fail.
      Throws:
      RemoteException
      Since:
      3.6.0
    • updateTestRunAttachment

      void updateTestRunAttachment(String testRunUri, String fileName, String title, byte[] data) throws RemoteException
      Updates the Test Run Attachment matching the Test Run and Attachment's file name. This Method is applicable for Test Run Templates.
      Parameters:
      testRunUri - The URI of the Test Run or Test Run Template containing the target Attachment.
      fileName - The file name of the Attachment to update.
      title - The new attachment's title. (If null, the attachment's title is not updated.)
      data - The new attachment's data. (If null, the attachment's data is not updated.)
      Throws:
      RemoteException
      Since:
      3.7.1
    • updateWikiContentForTestRun

      void updateWikiContentForTestRun(String testRunUri, Text content) throws RemoteException
      Updates the Wiki Page content of a given Test Run or Test Run Template.
      Parameters:
      testRunUri - The URI of the Test Run or Test Run Template.
      content - The new Wiki Page content of the Test Run or Test Run Template.
      Throws:
      RemoteException
      Since:
      3.7.1