1.0.14 • Published 6 years ago

larva-test-builder v1.0.14

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

Larva Test Builder - HTTP REST

Requirements

Get up and running

Step 1:

Install this package

$ npm install larva-test-builder --save
Step 2:

Include this package

const larvaBuilder = require('larva-test-builder');
Step 3

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
	}
]

Step 4

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"},
};

Step 5

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'});

Step 5

Call larva.create()

larva.create(config, ignoreContentBetweenKeys);

Step 6

Run your .js file and check your console for test results.

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago