Get the comments for my manual tests

This flow demonstrates how to get a list of the comments for manual tests assigned to me. I do not want to see comments for Gherkin tests.

Note: tests are a technical preview. Until made public, send an HPECLIENTTYPE header with the value: HPE_REST_API_TECH_PREVIEW in your requests.

Areas: My work, Manual tests, Comments

Entity relationship diagram

We need to access the following entities for this flow, and understand the relationships between these entities.

Entity Relationships in this flow Description of relationship Reference / relationship fields
Test   The test entity represents various types of tests, including manual, Gherkin, and automated. subtype
Manual Test Test The manual test is a subtype of the entity. type
User A manual test can be assigned an owner. owner
Comment A manual test can have 0 or more comments. comments

Back to top


Let's create the REST API call step-by-step.

  1. We can start by listing all the manual tests in the workspace. When using the manual_tests resource, no Gherkin tests are returned.

    GET .../api/shared_spaces/<shared_space_id>/workspaces/1002/manual_tests

  2. Let's build our query_clause. We are only interested in manual tests that are assigned to me, and my ID is 1001.

    GET .../api/shared_spaces/<shared_space_id>/workspaces/1002/manual_tests?query="owner EQ {id EQ 1001}"

  3. Now let's build our fields clause. Some fields are not returned by default unless specifically requested, such as comments. This is for performance optimization. So to see comments, we must explicitly specify this field for it to appear in the response.

    GET .../api/shared_spaces/<shared_space_id>/workspaces/1002/manual_tests?query="owner EQ {id EQ 1001}"&fields=comments

The complete REST API call for this flow is: 

GET .../api/shared_spaces/<shared_space_id>/workspaces/1002/manual_tests?query="owner EQ {id EQ 1001}"&fields=comments

Back to top

See also: