Skip to content

Latest commit

 

History

History
457 lines (290 loc) · 9.74 KB

UnitTestsApi.md

File metadata and controls

457 lines (290 loc) · 9.74 KB

algorithmhub.UnitTestsApi

All URIs are relative to http://localhost:10010/v2

Method HTTP request Description
createTest POST /model/{mid}/test Create new spec test
deleteTest DELETE /model/{mid}/test/{tid} Delete a spec test
listTest GET /model/{mid}/test List spec tests
runKeyboardInterrupt GET /run/{rid}/test/keyboardInterrupt Check for keyboard interrupt
runRuntimeError GET /run/{rid}/test/runtimeError Check for runtime error
runTest POST /model/{mid}/test/{tid} Run the tests
updateTest PUT /model/{mid}/test/{tid} Update a spec test
validateData GET /data/{did}/test/validate Checks valid data set
validateModel GET /model/{mid}/test/validate Runs the unit test cases
validateRun GET /run/{rid}/test/validate Runs the unit test cases

createTest

InlineResponse20017 createTest(mid)

Create new spec test

Create new spec test

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.UnitTestsApi();

var mid = "mid_example"; // String | The model id

apiInstance.createTest(mid).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
mid String The model id

Return type

InlineResponse20017

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

deleteTest

InlineResponse20017 deleteTest(mid, tid)

Delete a spec test

Delete a spec test

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.UnitTestsApi();

var mid = "mid_example"; // String | The model id

var tid = "tid_example"; // String | The test id

apiInstance.deleteTest(mid, tid).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
mid String The model id
tid String The test id

Return type

InlineResponse20017

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

listTest

InlineResponse20017 listTest(mid)

List spec tests

List spec tests

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.UnitTestsApi();

var mid = "mid_example"; // String | The model id

apiInstance.listTest(mid).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
mid String The model id

Return type

InlineResponse20017

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

runKeyboardInterrupt

InlineResponse20017 runKeyboardInterrupt(rid)

Check for keyboard interrupt

Check for keyboard interrupt during run

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.UnitTestsApi();

var rid = "rid_example"; // String | The run id

apiInstance.runKeyboardInterrupt(rid).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
rid String The run id

Return type

InlineResponse20017

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

runRuntimeError

InlineResponse20017 runRuntimeError(rid)

Check for runtime error

Check for any error that occurs during run

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.UnitTestsApi();

var rid = "rid_example"; // String | The run id

apiInstance.runRuntimeError(rid).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
rid String The run id

Return type

InlineResponse20017

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

runTest

InlineResponse20017 runTest(mid, tid)

Run the tests

Run the tests

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.UnitTestsApi();

var mid = "mid_example"; // String | The model id

var tid = "tid_example"; // String | The test id

apiInstance.runTest(mid, tid).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
mid String The model id
tid String The test id

Return type

InlineResponse20017

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

updateTest

InlineResponse20017 updateTest(mid, tid)

Update a spec test

Update a spec test

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.UnitTestsApi();

var mid = "mid_example"; // String | The model id

var tid = "tid_example"; // String | The test id

apiInstance.updateTest(mid, tid).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
mid String The model id
tid String The test id

Return type

InlineResponse20017

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

validateData

InlineResponse20016 validateData(did)

Checks valid data set

Checking for valid data set

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.UnitTestsApi();

var did = "did_example"; // String | The dataset id

apiInstance.validateData(did).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
did String The dataset id

Return type

InlineResponse20016

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

validateModel

InlineResponse20017 validateModel(mid)

Runs the unit test cases

Runs the unit test cases specified for model

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.UnitTestsApi();

var mid = "mid_example"; // String | The model id

apiInstance.validateModel(mid).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
mid String The model id

Return type

InlineResponse20017

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

validateRun

InlineResponse20017 validateRun(rid)

Runs the unit test cases

Runs the unit test cases specified for Run

Example

var algorithmhub = require('algorithmhub');

var apiInstance = new algorithmhub.UnitTestsApi();

var rid = "rid_example"; // String | The run id

apiInstance.validateRun(rid).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
rid String The run id

Return type

InlineResponse20017

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined