Follow

API - RUN

RUN

When using this API you can run your test programmatically.
All you need is to create a new test or use an existing test with the DiveCloud application:
https://divecloud.nouvola.com

You can then add it the API call to your scripts and/or to your development lifecycle. Or you can use the DiveCloud API to run tests from the command line or within a cronjob.

WHAT DO YOU NEED

In order to run a test, the test has to exist in your DiveCloud account. Once the test is created, the API needs the following information:

- Plan ID: this is the unique identifier associated to each test.
You can find it in the Test plan page, in parenthesis (xxx), next to the test Name.

- API KEY: This is the Key to use this API and any future API's.
You can find it in your ACCOUNT page, under the API tab.

HOW TO USE IT (NO CREDENTIALS)

For this example we assume:

- Plan ID: 123
- API KEY: abc

The call will look like:

 

curl -X POST -H 'Content-Type: application/json' -H 'x-api: abc' https://divecloud.nouvola.com/api/v1/plans/123/run

 

If the test execution started, you will see the following message from your command line:

 

{"msg":"Test Plan is enqueued.","test_id":456}

 

The JSON response will indicate either a successful test creation or identify the problem. For example: lack of minutes, invalid authentication, etc.

If the test was created successfully, the test instance id test_id is returned in the JSON response. This can be used in further API.

Once the test is running, upon completion, you will receive an email (similarly to what  happens when you run the test from the web application).

Or you can check the progress and results using the dedicated API (see C

 

HOW TO USE IT (WITH CREDENTIALS)

In order to run a test with credentials, you need also the credentials information:

- Credential Encryption Key
This is the password provided when the CREDENTIALS record was created.

For this example we assume:

- Plan ID: 123
- API KEY: abc
- Credentials Encryption Key: myKey

The call will look like:

 

curl -H 'Content-Type: application/json' -d '{"creds_pass": "myKey"}' -H 'x-api: abc' https://divecloud.nouvola.com/api/v1/plans/123/run

 

If the test execution started, you will see the following message from your command line:

 
{"msg":"Test Plan is enqueued.","test_id":456}

 

The JSON response will indicate either a successful test creation or identify the problem. For example: lack of minutes, invalid authentication, etc.

If the test was created successfully, the test instance id test_id is returned in the JSON response. This can be used in further API.

Once the test is running, upon completion, you will receive an email (similarly to what  happens when you run the test from the web application).

 

0 Comments

Please sign in to leave a comment.
Powered by Zendesk