- Most recent LTS version of node.js
- Ibis Adapter Framework (https://github.com/ibissource/iaf)
Install this package
$ npm install larva-test-builder --save
Include this package
const larvaBuilder = require('larva-test-builder');
Start writing a JSON configuration for your test
const config = [
{
method : "POST",
configuration : "Users",
name : "Hello World",
url : "/users",
javaListener : "PostUsers",
statusCode : 201,
payload : '{"user":{"name":"John Doe!"}}'
},
{
how : "delete",
table : "user",
},
{
run : true,
maven : false,
all : false
}
]
Create ignoreContentBetweenKeys object
const ignoreContentBetweenKeys = {
manageDatabaseRLY : {active: true, start: "<manageDatabaseRLY>", end: " </manageDatabaseRLY>"},
id : {active: true, start: '"id"', end: "\\n"},
createdAt : {active: true, start: '"createdAt"', end: "\\n"},
effectiveFrom : {active: true, start: '"effective_from"', end: "\\n"},
};
Initialise larvaBuilder
const larva = new larvaBuilder({ larva: 'http://localhost/iaf/larva/index.jsp', testDirectory: 'Absolute path to your Larva test dir', rootDirectory : 'Absolute path to your IAF project dir'});
Call larva.create()
larva.create(config, ignoreContentBetweenKeys);
Run your .js file and check your console for test results.