Skip to content

Developer tool for locally testing Trustack Procedures without deploying to the Trustack decentralized cloud network.

License

Notifications You must be signed in to change notification settings

trustack/trst-proc-tester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trustack Procedure Tester CLI Tool - https://trustack.io

This repo contains the a command line tool for testing locally developed Trustack Procedures. The tool will simulate how a Procedure is run on a Trustack Exec node, allowing the developer to test and troubleshoot their Procedure without deploying to the Trustack decentralized cloud network.

npm

Table of Contents

Installation

npm install proc-tester

Usage

CLI

Usage can be seen using the --help option, which is posted here below:

Usage: proc-tester [options]

Options:
      --version   Show version number                                  [boolean]
  -p, --procedue  Procedure code file path.
  -i, --input     Input.json path.
  -s, --secret    Secret.json path.
  -h, --help      Show help                                            [boolean]

Examples:
  index.js -p ./Procedure_Root_Folder -i ./input.json -s ./secret.json 

API

 * Will locally test a Trustack Procedure, according to the provided inputs.
 * @param {string} inputFile Path to the `input.json` file.
 * @param {string} secretFile Path to the `secret.json` file.
 * @param {string} procPath Path to the Procedure root folder. Procedure entry must be `index.js`.
 * @returns {Promise} Promise wrapped output from the procedure.

Example Usage:

const { procTester } = require('trst-proc-tester');
let output = await procTester(inputFile, secretFile, procPath);

Procedure Development

See Procedure Examples in the trustack-sdk repo for how to write Procedures.

Contributing

See CONTRIBUTING

License

This project is MIT licensed. For the full license, see LICENSE.

Security

TBD

Contact

The primary contact for this project is [@fcbrandon].

Additional information and links

Copyright (C) 2021 Brandon Caldwell - All Rights Reserved

About

Developer tool for locally testing Trustack Procedures without deploying to the Trustack decentralized cloud network.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published