0.2.0 • Published 7 years ago

testra-api-client v0.2.0

Weekly downloads
2
License
Apache-2.0
Repository
-
Last release
7 years ago

testra-api-js-client

JavaScript client for Testra API

Includes API documentation for Testra API

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0-SNAPSHOT
  • Package version: 1.0-SNAPSHOT
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen

Installation

yarn

install it via:

yarn add testra-api-js-client --save

npm

install it via:

npm install testra-api-js-client --save

git

If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var TestraApi = require('testra_api');

var api = new TestraApi.CounterApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCounters(callback);

Documentation for API Endpoints

ClassMethodHTTP requestDescription
TestraApi.CounterApigetCountersGET /countersCounters
TestraApi.ExecutionApicreateExecutionPOST /projects/{projectId}/executionsCreate a New Execution
TestraApi.ExecutionApideleteExecutionDELETE /projects/{projectId}/executions/{id}Deletes execution info
TestraApi.ExecutionApigetExecutionGET /projects/{projectId}/executions/{id}Get execution by id
TestraApi.ExecutionApigetExecutionResultStatsGET /projects/{projectId}/executions/{id}/result-statsGet test execution's result stats
TestraApi.ExecutionApigetExecutionsGET /projects/{projectId}/executionsList all executions
TestraApi.ExecutionApirecentExecutionsGET /executions/recentsRecent executions
TestraApi.ExecutionApiupdateExecutionPUT /projects/{projectId}/executions/{id}Update execution info
TestraApi.ProjectApicreateProjectPOST /projectsCreate a New Project
TestraApi.ProjectApideleteProjectDELETE /projects/{id}Deletes project info
TestraApi.ProjectApigetProjectGET /projects/{id}Get project by id or name
TestraApi.ProjectApigetProjectCountersGET /projects/{id}/countersGet couters for project children
TestraApi.ProjectApigetProjectsGET /projectsList All Projects
TestraApi.ProjectApitopProjectsGET /projects/topTop Projects
TestraApi.ProjectApiupdateProjectPUT /projects/{id}Update project info
TestraApi.ResultApicreateResultPOST /projects/{projectId}/executions/{executionId}/resultsCreate a New Result
TestraApi.ResultApideleteResultDELETE /projects/{projectId}/executions/{executionId}/results/{id}Deletes result info
TestraApi.ResultApigetResultGET /projects/{projectId}/executions/{executionId}/results/{id}Get result by id
TestraApi.ResultApigetResultsGET /projects/{projectId}/executions/{executionId}/resultsList of all results
TestraApi.ResultApiupdateResultPUT /projects/{projectId}/executions/{executionId}/results/{id}Update result info
TestraApi.ScenarioApicreateScenarioPOST /projects/{projectId}/scenariosCreate a New Scenario
TestraApi.ScenarioApideleteScenarioDELETE /projects/{projectId}/scenarios/{id}Deletes scenario info
TestraApi.ScenarioApigetScenarioGET /projects/{projectId}/scenarios/{id}Get scenario by id
TestraApi.ScenarioApigetScenariosGET /projects/{projectId}/scenariosList all scenarios
TestraApi.ScenarioApiupdateScenarioPUT /projects/{projectId}/scenarios/{id}Update scenario info
TestraApi.SimulationApicreateSimulationPOST /projects/{projectId}/executions/{executionId}/simulationsCreate a New Simulation
TestraApi.SimulationApideleteSimulationDELETE /projects/{projectId}/executions/{executionId}/simulation/{id}Deletes simulation info
TestraApi.SimulationApigetSimulationsGET /projects/{projectId}/executions/{executionId}/simulationsList of all simulations
TestraApi.TestGroupApigetTestGroupsGET /projects/{projectId}/test-groupsList all test groups
TestraApi.TestGroupApigetTestGroupsInExecutionGET /projects/{projectId}/executions/{executionId}/groupsList all test groups under execution
TestraApi.TestcaseApicreateTestcasePOST /projects/{projectId}/testcasesCreate a New Testcase
TestraApi.TestcaseApideleteTestcaseDELETE /projects/{projectId}/testcases/{id}Deletes testcase info
TestraApi.TestcaseApigetTestcaseGET /projects/{projectId}/testcases/{id}Get testcase by id
TestraApi.TestcaseApigetTestcasesGET /projects/{projectId}/testcasesList all testcases
TestraApi.TestcaseApiupdateTestcasePUT /projects/{projectId}/testcases/{id}Update testcase info

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.