PractiTest Discussion Forum

-- FAQ section --

Here you can find most common questions and answers regarding our API.:tada:

Where can I find API key and secret key?

PractiTest uses API tokens that grant access to update data in all the projects of your account. To get them, go to the Account Settings - General - API Tokens. Find more information about tokens here.

How can I get my user-id?

There are two ways to get user-id: either by sending GET request that retrieves all users in your account or via UI by going to Settings - Users & Groups - press the ‘pencil’ icon near a relevant user and see its id in URL after https://prod.practitest.com/users/

What do test_ids and set_ids stand for? Are they IDs that I see in PractiTest?

test_ids and set_ids are system ids of tests and Test Sets that you can see in PractiTest URL going after PractiTest and PractiTest. The IDs you see in PractiTest are called display_ids in our API version.

How can I update run status of instance to failed via API?

To do that, you need to use POST request that creates a new RUN via API, see more information here.

  • A common mistake is to update an instance instead of creating a new run. It is very important to differentiate between Updating an Instance which updates instance’s fields and Creating a New Run that may eventually update instance run status, last run, run duration, automated execution output, run custom fields, steps and file attachments.

Can I update an instance with BLOCKED status via API?

Yes, you can update an instance with BLOCKED status by sending steps where at least one step is blocked. See additional information here - refer to data/steps/data and the third cURL example.

I’m trying to create a new test via API and got this error: “errors”:[{“status”:422,“title”:“Browser test can’t be blank”}]. Please advise.

Please verify that you have no mandatory fields for tests since in most cases such errors occur when customers have mandatory fields for ‘Test’ entity, and that’s why need to fill out values to mandatory custom fields as well while sending requests via API.

Is there an option to clone Test Sets via your REST API?

Sure and in addition to that you can change parameters while cloning Test Sets if needed. See this resource for the additional information.

How can I get requirements, tests and Test Sets residing in a particular filter?

You can easily do that by sending GET request for requirements, tests and Test Sets with filter-id as parameter. The filter-id is a system filter ID that you can get by going to Settings - Filters - press the ‘pencil’ icon near a relevant filter and see its ID after The page you were looking for doesn't exist (404)