0.1.3 • Published 6 years ago

agogosml-test-generator-node v0.1.3

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

Agogosml Test Generator for Node

Agogosml Test Generator is a scaffolding tool to generate tests for the Agogosml data pipeline. It includes pre-built end-to-end tests.

NOTE: This tool will be superseded by the agogosml-cli project eventually.

Currently supports testing for:

  • EventHub

Installation

npm i -g agogosml-test-generator-node

Usage

To use the test generator, call the test generator with a test configuration file (see sample below) and the desired output directory. The tool will scaffold code based off of the test configuration that you can use to test agogosml. It uses Mocha as a test runner, so you can add additional tests or modify the code as desired.

# Write your test configuration and sample data.
agogosml-test-generator -c tests-sample-node.json OUTPUT_DIR
cd OUTPUT_DIR
npm i
npm test 

tests-sample-node.json

{
    "name": "node",
    "tests": [{
        "name": "Sanity Check",
        "type": "eventhub-sendreceive",
        "input": "sample-input.json",
        "output": "sample-input.json",
        "options": {
            "EVENTHUB_CONNECTION_STRING": "",
            "EVENTHUB_NAME": "",
            "EVENTHUB_PARTITIONID": "0"
        }
    }]
}

sample-input.json

{ "body": "Hello World", "partitionKey": "pk12345"}
0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago