Swagger Extensive Testing

Reports

csvReport

Get the report of the test (csv format).

/rest/results/report/csv

Request parameters:

Name Description
Cookie*
Name Description
body *

Responses

Status: 200 - full csv test report

{
  "cmd": "/results/report/csv", 
   "test-report": "eJztfHnPq9iZ5/+R+ju8qqiVbjkV....",
   "test-id": "7dcc4836-e989-49eb-89b7-5ec1351d2ced"
}

Status: 400 - Bad request provided

Status: 403 - Access denied to this project

Status: 404 - Test result not found

Status: 500 - Server error


htmlReport

Get the full or basic report of the test (html format).

/rest/results/report/html

Request parameters:

Name Description
Cookie*
Name Description
body *

Responses

Status: 200 - full html test report

{
  "cmd": "/results/report/html", 
   "test-report": "eJztfHnPq9iZ5/+R+ju8qqiVbjkV....",
   "test-id": "7dcc4836-e989-49eb-89b7-5ec1351d2ced"
}

Status: 400 - Bad request provided

Status: 403 - Access denied to this project

Status: 404 - Test result not found

Status: 500 - Server error


Results

statusResult

Get the status of the test (not-running, running, complete).

/rest/results/status

Request parameters:

Name Description
Cookie*
Name Description
body *

Responses

Status: 200 - result status of a test

{
  "cmd": "/results/status", 
  "test-status": "running", 
  "test-id": "af0b2587-459e-42eb-a4da-e3e6fa227719",
  "test-progress": 25
}

Status: 400 - Bad request provided

Status: 403 - Access denied to this project

Status: 404 - Test result not found

Status: 500 - Server error


verdictResult

Get the result of the test (undefined, pass, fail).

/rest/results/verdict

Request parameters:

Name Description
Cookie*
Name Description
body *

Responses

Status: 200 - tests verdict

{
  "cmd": "/results/verdict", 
  "test-verdict": "undefined",
  "test-id": "af0b2587-459e-42eb-a4da-e3e6fa227719"
}

Status: 400 - Bad request provided

Status: 403 - Access denied to this project

Status: 404 - Test result not found

Status: 500 - Server error


Session

loginSession

Authenticate client

/rest/session/login

Request parameters:

Name Description
body *

Responses

Status: 200 - Logged in

{
  "expires": 86400, 
  "user_id": 2, 
  "cmd": "/session/login", 
  "session_id": "NjQyOTVmOWNlMDgyNGQ2MjlkNzAzNDdjNTQ3ODU5MmU5M", 
  "message": "Logged in", 
  "project_id": 1
}
Name Description
Set-Cookie session_id=NjQyOTVmOWNlMDgyNGQ2MjlkNzAzNDdjNTQ3ODU5MmU5M;expires=Wed, 10-May-2017 06:32:57 GMT; path=/

Status: 400 - Bad request provided

Status: 401 - Invalid login | Account disabled | Access not authorized | Invalid password


logoutSession

Logout client

/rest/session/logout

Request parameters:

Name Description
Cookie*

Responses

Status: 200 - Logged out | Not logged in

{
  "message": "logged out",
  "cmd": "/session/logout"
}
Name Description
Set-Cookie session_id=DELETED;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/

refreshSession

Refresh session

/rest/session/refresh

Request parameters:

Name Description
Cookie*

Responses

Status: 200 - Session refreshed

{
  "message": "session refreshed",
  "cmd": "/session/refresh"
}
Name Description
Set-Cookie session_id=NjQyOTVmOWNlMDgyNGQ2MjlkNzAzNDdjNTQ3ODU5MmU5M;expires=Wed, 10-May-2017 06:32:57 GMT; path=/

Status: 401 - Access denied


Tests

listingTests

Get the listing of all tests.

/rest/tests/basic/listing

Request parameters:

Name Description
Cookie*
Name Description
body *

Responses

Status: 200 - tests listing

{
  "cmd": "/tests/basic/listing", 
  "tests-listing": ["/Snippets/UI/03_OpenBrowser.tux", "/Snippets/UI/05_MaximizeBrowser.tux"],
  "project-id": 1
}

Status: 400 - Bad request provided

Status: 403 - Access denied to this project

Status: 500 - Server error


runTest

Run one test according to the project name and the path, name and extension of the test.

/rest/tests/run

Request parameters:

Name Description
Cookie*
Name Description
body *

Responses

Status: 200 - test executed

{
  "cmd": "/tests/run", 
  "message": "test executed"
  "test-id": "bd0df6b4-10df-4a57-a970-8d693ddb4cfa"
}

Status: 400 - Bad request provided

Status: 403 - Access denied to this project | Test extension not accepted

Status: 404 - Test does not exists in repository

Status: 500 - Server error


Variables

addVariable

Add test variable in project, variables can be accessible from test

/rest/variables/add/

Request parameters:

Name Description
Cookie*
Name Description
body *

Responses

Status: 200 - variable successfully added

{
  "message": "variable successfully added",
  "cmd": "/variables/add",
  "variable-id": "95"
}

Status: 400 - Bad request provided | Bad project id provided | Bad json provided in value

Status: 403 - Access denied to this project | Variable already exists

Status: 500 - Server error


duplicateVariable

Duplicate test variable in project

/rest/variables/duplicate

Request parameters:

Name Description
Cookie*
Name Description
body *

Responses

Status: 200 - variable successfully duplicated

{
  "message": "variable successfully duplicated",
  "cmd": "/variables/duplicate",
  "variable-id": "95"
}

Status: 400 - Bad request provided | Bad project id provided | Bad json provided in value

Status: 403 - Access denied to this project

Status: 404 - Variable not found

Status: 500 - Server error


listingVariables

Get a listing of all test variables according to the project id or name

/rest/variables/listing

Request parameters:

Name Description
Cookie*
Name Description
body *

Responses

Status: 200 - variables listing

{
  "variables": [ 
                 { 
                  "project_id": 1, 
                  "id": 1, 
                  "value": false, 
                  "name": "DEBUG"
                 } 
              ],
  "cmd": "/variables/listing"
}

Status: 400 - Bad request provided | Bad project id provided | Bad json provided in value

Status: 403 - Access denied to this project

Status: 500 - Server error


removeVariable

Remove test variable in project

/rest/variables/remove

Request parameters:

Name Description
Cookie*
Name Description
body *

Responses

Status: 200 - variable successfully removed

{
  "message": "variable successfully removed",
  "cmd": "/variables/remove"
}

Status: 400 - Bad request provided | Bad project id provided | Bad json provided in value

Status: 403 - Access denied to this project

Status: 404 - Variable not found

Status: 500 - Server error


resetVariables

Reset all test variables according to the project

/rest/variables/reset

Request parameters:

Name Description
Cookie*
Name Description
body *

Responses

Status: 200 - variables successfully reseted

{
  "message": "variables successfully reseted",
  "cmd": "/variables/reset"
}

Status: 400 - Bad request provided | Bad project id provided | Bad json provided in value

Status: 403 - Access denied to this project

Status: 500 - Server error


searchVariable

Search a variable according to the name or id

/rest/variables/search

Request parameters:

Name Description
Cookie*
Name Description
body *

Responses

Status: 200 - search result

{
  "variable": {
                "project_id": 1, 
                "id": 95, 
                "value": "1.0", 
                "name": "VAR_AUTO"
              },
  "cmd": "/variables/search"
}

Status: 400 - Bad request provided | Bad project id provided | Bad json provided in value

Status: 403 - Access denied to this project

Status: 404 - Variable not found

Status: 500 - Server error


updateVariable

Update test variable in project

/rest/variables/update

Request parameters:

Name Description
Cookie*
Name Description
body *

Responses

Status: 200 - variable successfully updated

{
  "message": "variable successfully updated",
  "cmd": "/variables/update"
}

Status: 400 - Bad request provided | Bad project id provided | Bad json provided in value

Status: 403 - Access denied to this project

Status: 404 - Variable not found

Status: 500 - Server error


Generated 2017-10-18T20:12:43.693+02:00