CircleCI Integration

Share the article 

PractiTest supports the execution of both Manual and Automated Tests.

There are 3 main ways to integrate or run your automation with PractiTest.
You can read about them here

The CircleCI Integration uses the PractiTest FireCracker tool to automatically populate all your CirecleCi results into PractiTest. When configuring the integration you will be able to determine the fields’ names, mapping, and more.

Integration Configuration:

The integration configuration will be applied in CirclCI using the PractiTest FireCracker Orb as explained here In CircleCI, go to your .circleci/config.yml file and define the below items:

  1. At the top of your yml, define the version as 2.1 like this:version: 2.1
  2. Below the version, include the FireCracker orbs:orbs:

    firecracker: practitest/firecracker@1.0.0
  3. Under Steps, and before the step that runs the tests, insert the parameters below (If you don’t run your circleci as a machine user). This is to make sure that if a test fails, CircleCI will still execute FireCracker and upload the results to PractiTest:- setup_remote_docker:

    version: 19.03.13
  4. Add PractiTest and FireCracker parameters to define the basic integration:- firecracker/fire:

    api_token: PRACTITEST_API_TOKEN

    author_id: PRACTITEST_AUTHOR_ID

    email: YOU_EMAIL_ADRESS

    firecracker_version:

    LATEST_FIRECRACKER_JAR_FILE_VERSION

    project_id: PRACTITEST_PROJECT_ID

    test_folder: Use same parameters as used in store_test_results parameter
  5. You can add more parameters to customize the integration and define it better. All available options can be found in the CircleCI documentation, or here:

    additional_test_fields:

    default: |

    \"custom-fields\":{},\"system-fields\":{}

    description: add here test fields mapping

    type: string

    additional_testset_fields:

    default: |

    \"custom-fields\":{},\"system-fields\":{}

    description: add here testset field mapping

    type: string

    api_token:

    default: FIRE_API_TOKEN

    description: your PAT (personal api token) or your account's api token in PractiTest

    type: env_var_name

    api_uri:

    default: https://api.practitest.com

    description: in case you use eu server of practitest you will need to change it into https://eu1-prod.practitest.app

    type: string

    author_id:

    description: user id who will run firecracker (should depend on api toekn that you use)

    type: integer

    email:

    description: email of the user that will run firecracker

    type: string

    extra_params:

    default: ""

    description: in case you want to add extra params to json configuration

    type: string

    firecracker_version:

    description: firecracker version to use

    type: string

    json_extra_params:

    default: ""

    description: firecracker json_extra_params

    type: string

    multitestset:

    default: false

    description: decide if firecracker will create multiple testset or single testset

    type: boolean

    project_id:

    description: project id that firecracker will direct the results to

    type: integer

    test_case_as_pt_test_step:

    default: true

    description: decide if firecracker will use test-case as practitest steps or tests; true will group testcases into one test and each testcase will be a step

    type: boolean

    test_folder:

    description: folder that contains test results

    type: string

    testset_name:

    default: FirecrackerTestSet

    description: in case of single testset creation choose the name for this testset name

    type: string

Now you can save and run your CircleCI project as usual. All your runs’ fields, status, and results will be populated in PractiTest automatically as you defined in the parameters above.

Shift your testing Forward