Selenium Test Result Sync

Selenium Test Result Sync

You can sync your test automation result in QA Touch directly with the API end points.

Setup and configure the values API token, domain, project,test_run, and run_result like the sample files. There are two files available. They are:

  1. AddResultNew.java
  2. GoogleTest.java

File path : (QATouchJAVAAPI/src/main/java/com/qatouch/apitestsync)

In this file, AddResultNew.java, configure the values for API Token, domain. This file, GoogleTest.java, is a Selenium TestNG sample test file. Configure and pass the values for project, test_run, and run_result in the function addResultForTestCase.

Please see the Selenium TestNG Github Repository URL

Git Repository URL https://github.com/gitdckap/QATouchJAVAAPI


Git Command
    git clone git@github.com:gitdckap/QATouchJAVAAPI.git

        Cloning into 'QATouchJAVAAPI'...
    cd QATouchJAVAAPI/

QA Touch API

Before you start using our API, your first step is to obtain an api-token from your QA Touch site. Once you obtain the token, then you are ready to go.

To Obtain api-token follow the steps below Go to User->Edit profile Under General settings, Click 'Generate API Key' to generate the API key.

(Note: QA Touch API is a Professional and Enterprise Plan feature)

QA Touch API documentation

The sample code snippet to update the QA Touch project’s test run result of the test case in

Variables

$domain = '*****'; // Domain name

$apiToken = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; // API Key Token generated in your domain (Go to User->Edit profile Under General settings, Click 'Generate API Key')

$url = 'https://api.qatouch.com/api/v1/'; // QA Touch API URL

Information

All the API endpoints require a couple of headers so that we can authenticate you before processing the request.

Required Headers

domain api-token

image