testerviaapi
v1.1.0
Published
Testing various api features
Downloads
5
Readme
TesterLib
This file was automatically generated for Stamplay by APIMATIC v2.0 (https://apimatic.io).
Installation
The SDK relies on Node Package Manager (NPM) being available to resolve dependencies.
Once published you will need copy the folder testerlib
in to your node_modules
folder.
Usage
The following shows how import and use the controller:
Import the module:
var testerlib = require('testerlib');
Access various controllers by:
var controller = testerlib.XYZ; controller.getItems(id, callback);
Test Execution
These tests use Mocha framework for testing, coupled with Chai for assertions. These dependencies need to be installed for tests to run. Tests can be run in a number of ways:
Run All Tests
- Navigate to the root directory from command prompt. (/Node/)
- Type
mocha --recursive
to run all the tests.
Run All Tests (alternate)
- Navigate to the
../test/Controllers/
directory from command prompt. - Type
mocha *
to run all the tests (from all the controller files).
Run for a Particular Resource
- Navigate to the
../test/Controllers/
directory from command prompt. - Type
mocha XYZControllerTest
to run all the tests in that controller file.
To increase mocha's default timeout, you can change the TESTTIMEOUT
parameter's value in Configuration.js
.
NOTE: Changing default timeout is available for only Binary/File type endpoint tests