Skip to content

sheebz/node-mockey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-mockey

node-mockey provides a nodejs client API for Mockey; a useful webservice mocking application. You can use node-mockey to turn specific scenerios on or off as well as set other configuration values from within a node environment. This can be extremely useful for development and testing complex applications.

Installation

Get Mockey

Get latest version of Mockey, then run

java -jar Mockey.jar -t false

to start Mockey Service

Install node-mockey from npm

npm install node-mockey

Usage

Configure mockey service to return an invalid auth response - maybe as part of a feature test.

            mockey.configureService({
                serviceName:'Auth',
                scenarioName:'invalid',
                serviceResponseType:'static'
                //serviceId:0,
                //scenerioId:0,
                hangTime:100,
                //transientState:true,

            }, function (response) {
                assert.equal(response.serviceName, 'Auth');

                //do your testing here...

            });

More Docs Coming Soon.

About

consume mock web services from node

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published