npm package: @flowcore/cli-plugin-testing
Description: A Plugin for the Flowcore CLI to generate testing data from data streams
Author: flowcore-platform
Latest version: 1.4.0

Flowcore CLI Plugin - Testing
=================

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

[![Version](https://img.shields.io/npm/v/@flowcore/flowcore-cli-plugin-scenario)](https://npmjs.org/package/@flowcore/flowcore-cli-plugin-scenario)
[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Build and Release](https://github.com/@flowcore/flowcore-cli-plugin-scenario/actions/workflows/build.yml/badge.svg)](https://github.com/@flowcore/flowcore-cli-plugin-scenario/actions/workflows/build.yml)

<!-- toc -->
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->
# Usage
<!-- usage -->
```sh-session
$ 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
...
```
<!-- usagestop -->
# Commands
<!-- commands -->
* [`testing  generate test-set STREAM`](#testing--generate-test-set-stream)

## `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](https://github.com/flowcore-io/cli-plugin-testing/blob/v1.1.0/src/commands/generate/test-set.ts)_
<!-- commandsstop -->