1.4.1 • Published 4 months ago

wingbot-tests-gsheets v1.4.1

Weekly downloads
42
License
MIT
Repository
github
Last release
4 months ago

Google Sheet Storage for Test Cases

Fast solution for automated conversation tests

Example testing sheet: https://docs.google.com/spreadsheets/d/1Tl1-NvGO0buR1z1YoB0eYutJ9EdpcXr-DFPuiUxg3Fg/edit#gid=0

Usage

const { ConversationTester } = require('wingbot');
const { TestsGsheet } = require('wingbot-jwt');
const googleToken = require('./my-google-token.json');

function botFactory (forTests = false) {
    const bot = new Router();

    // your bot here

    return bot;
}

const testsStorage = new TestsGsheet('sheet-id', googleToken);
const tester = new ConversationTester(testsStorage, botFactory);

tester.test()
    .then((res) => console.log(res.output))
    .catch((e) => console.error(e));

API

Classes

Typedefs

TestsGsheet

Google sheets storage for test cases

Kind: global class

new TestsGsheet(sheetId, googleToken)

ParamType
sheetIdstring
googleTokenobject

testsGsheet.getTestCases() ⇒ Promise.<Array.<TestCase>>

Kind: instance method of TestsGsheet

TestCaseStep : object

Kind: global typedef
Properties

NameType
stepnumber
rowNumnumber
actionstring
passedActionstring
textContainsstring
quickRepliesContainsstring
stepDescriptionstring

TestCase : object

Kind: global typedef
Properties

NameType
liststring
namestring
stepsArray.<TestCaseStep>
1.4.1

4 months ago

1.4.0

1 year ago

1.3.2

2 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.4

3 years ago

1.2.4-alpha.1

3 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0-alpha.1

4 years ago

1.1.0

4 years ago

1.1.0-alpha.2

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago