Step by step guide for working with automation API

PractiTest supports the execution of both Manual and Automated Tests, allowing customers to run tests from any commercial or home-grown tools.

There are a few ways to run automation with PractiTest.
You can read about them here.

PractiTest’s API lets you integrate your automated tool with PractiTest.

PractiTest’s API documentation

To integrate Selenium C# to PractiTest, please use the workflow described here.

The Automation API enables you to notify PractiTest automatically with your automated testing results.

You can run your automation using any automated solution (such as Selenium, Ranorex, etc.; or CI platforms like Jenkins, CirlcleCI, etc.) and update PractiTest directly using the Automation API.

This way, you get a clear picture of the testing (manual and automated) within PractiTest.

 

Make use of Practitest’s API in order to generate the automation you need.

  • Integrate all the test runs (manual and automatic) in your project under one roof.
  • Flexible – define the functions you want.
  • Can be run automatically -> whether via a cron task or when you commit, depending on your needs and configuration.
  • Integrates with your existing framework.
  • Define the results you want for your report - Generate reports and dashboards for all your testing types in one place.
  • Initialize your automated tests (via framework) and update PractiTest with your results.
  • Support all different test statuses: PASSED, FAILED, BLOCKED, NOT COMPLETED, NO RUN.
  • Supports steps inside runs
  • Works everywhere in every language, just update us with a simple POST command.
  • CONS: your code needs to update PractiTest in your code.

 

Step by step guide for working with automation:

Download the full step-by-step guide for integrating PractiTest with automation frameforks here.

Before we start, please make sure the project admin has enabled API test creation in the account settings.
In order to work with API, you will need to generate an API token. There are two types of API tokens - Personal API Token (PAT) and Account API token. Account API token gives access to all areas of your PractiTest account. Personal API tokens are unique to each user and give access according to the user’s permissions (only to areas and actions the user is permitted to perform). We recommend users use PAT in order to ensure security and for better enforcement of user permissions. Read More about Personal and Account API Tokens here

The main API method to choose is: “create_a_run”

  1. Create equivalents of your automated tests in PractiTest. Under test type choose automation - API. You can use this POST request for this process.
  2. Group the equivalent test cases into Test Sets, this request allows to do that. Please make sure to use the 'data/instances/test-ids' parameter hence Test Sets will be created with relevant tests inside.
  3. Once an automated test is executed, you will need to send this POST request that uploads its result into PractiTest.
  4. the POST request above has a mandatory parameter called 'data/attributes/instance-id' and the instance-id can be retrieved by using this GET request where you can use the 'name_exact' and the 'set-ids' parameters. That's why we recommend using the same name convention for your equivalents.

    Note: Only system IDs can be used when using the REST API

  5. Once you have a new version of your product, you can clone the original Test Set by using this request and send the results there.

See a full example of how to send the results of your automated test in Selenium to PractiTest here.