1.3.0 • Published 8 months ago

@flowcore/cli-plugin-testing v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Flowcore CLI Plugin - Testing

A Plugin for the Flowcore CLI to generate testing data from data streams

Version oclif Build and Release

Usage

$ npm install -g @flowcore/cli-plugin-testing
$ testing  COMMAND
running command...
$ testing  (--version)
@flowcore/cli-plugin-testing/1.1.0 darwin-arm64 node-v20.15.0
$ testing  --help [COMMAND]
USAGE
  $ testing  COMMAND
...

Commands

testing generate test-set STREAM

Generate a test data set from a stream

USAGE
  $ testing  generate test-set STREAM --directory <value> [-e <value>] [-j] [-l] [-m <value>] [-p] [-c] [-s <value>]
    [--profile <value>] [--ai] [--filter-in <value>...] [--filter-out <value>...] [--redact-mask <value> --redact
    <value>...] [--fake-properties <value>... [--fake-type <value>... --fake <value>...]] [--sample-size <value>]

ARGUMENTS
  STREAM  stream url to connect to

FLAGS
  -c, --scan                        Scan the full time range
  -e, --end=<value>                 End time to stream to, example: 2024-07-08T12:20:44Z, 1y, 1m, 1w, 1d, 1h, now
  -j, --json                        Output json only
  -l, --[no-]live                   Change to live mode when reaching last time bucket
  -m, --max=<value>                 Maximum number of events to send to the destination
  -p, --payload                     Only send the event payload to the destination
  -s, --start=<value>               Start time bucket to stream from, example: (2024-07-08T12:20:44Z, 1y, 1m, 1w, 1d,
                                    1h, now)
      --ai                          use AI to process the test set further
      --directory=<value>           (required) output directory
      --fake=<value>...             specify json paths to fake fields in the test set
      --fake-properties=<value>...  specify the properties to use when faking fields "value,key=value,key=value" format,
                                    only applicable if fake-type flag is used, you can use most of the fakerjs api
                                    (https://fakerjs.dev/api/) by using the properties to pass to the method, needs to
                                    be in the same order as the fake flag
      --fake-type=<value>...        specify the type to use when faking fields, only applicable if fake flag is used,
                                    you can use most of the fakerjs api (https://fakerjs.dev/api/) by using the path to
                                    the method, needs to be in the same order as the fake flag
      --filter-in=<value>...        specify json paths to keep fields in the test set before processing or storing to
                                    disk
      --filter-out=<value>...       specify json paths to remove fields from the test set before processing or storing
                                    to disk
      --profile=<value>             Specify the configuration profile to use
      --redact=<value>...           specify json paths to redact fields in the test set before processing or storing to
                                    disk
      --redact-mask=<value>         [default: REDACTED] specify the mask to use when redacting fields, only applicable
                                    if redact flag is used
      --sample-size=<value>         [default: 100] number of events to collect, defaults to 100, -1 to collect all
                                    events

DESCRIPTION
  Generate a test data set from a stream

EXAMPLES
  $ testing  generate test-set <stream> <output-directory>

See code: src/commands/generate/test-set.ts