@flowcore/cli-plugin-testing
v1.5.2
Published
A Plugin for the Flowcore CLI to generate testing data from data streams
Downloads
395
Readme
Flowcore CLI Plugin - Testing
A Plugin for the Flowcore CLI to generate testing data from data streams
Usage
$ npm install -g @flowcore/cli-plugin-testing
$ testing COMMAND
running command...
$ testing (--version)
@flowcore/cli-plugin-testing/1.5.2 linux-x64 node-v20.20.2
$ 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>]
[-z <value>] [-i] [-x <value>] [-b <value>] [--profile <value>] [--ai] [--fake <value>...] [--fake-properties
<value>... --fake-type <value>...] [--filter-in <value>...] [--filter-in-event <value>...] [--filter-out <value>...]
[--filter-out-event <value>...] [--redact-mask <value> --redact <value>...] [--sample-each] [--sample-size <value>]
ARGUMENTS
STREAM stream url to connect to
FLAGS
-b, --bufferSize=<value> Buffer size for event processing
-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
-i, --includeSensitiveData Include sensitive data in the output
-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)
-x, --concurrency=<value> [default: 1] Number of events to process concurrently
-z, --pageSize=<value> [default: 10000] Number of events to fetch per page
--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-in-event=<value>... specify the the json path to filter in events, in the format
'<jsonPath>;<operator>;<value>'
--filter-out=<value>... specify json paths to remove fields from the test set before processing or storing
to disk
--filter-out-event=<value>... specify the the json path to filter out events, in the format
'<jsonPath>;<operator>;<value>'
--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> specify the mask to use when redacting fields, only applicable if redact flag is
used
--sample-each sample each event type separately
--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
