Configuration

Ply’s configuration is defined in a file named plyconfig.yaml, plyconfig.yml, or plyconfig.json. This config file is found at runtime by searching upward in the file system directory structure, starting from cwd. Options specified as command line arguments override values from the config file.

Options

Option Default  
testsLocation
--testsLocation, -t
"." Tests base directory. Ply finds requests/cases/flows under here.
requestFiles
--requestFiles
"**/*.{ply,ply.yaml,ply.yml}" Request files glob pattern, relative to testsLocation.
caseFiles
--caseFiles
"**/*.ply.ts" Case files glob pattern, relative to testsLocation.
flowFiles
--flowFiles
"**/*.ply.flow" Flow files glob pattern, relative to testsLocation.
ignore
--ignore
"**/{node_modules,bin,dist,out}/**" File pattern to ignore, relative to testsLocation. Ignored files are not even parsed by Ply.
skip
--skip
"**/*.ply" File pattern for requests/cases/flows that are loaded but shouldn’t be directly executed (relative to testsLocation). By default, standalone requests (.ply files) are skipped by CLI test execution.
expectedLocation
--expectedLocation
testsLocation + "/results/expected" Base directory containing expected result files.
actualLocation
--actualLocation
testsLocation + "/results/actual" Base directory containing actual result files.
resultFollowsRelativePath
--resultFollowsRelativePath
true Result files live under a similar subpath as request/case files (eg: expected result relative to ‘expectedLocation’ is the same as request/case file relative to ‘testsLocation’). Otherwise results directory structure is flat.
logLocation
--logLocation
actualLocation Base directory for per-suite log files.
valuesFiles
--valuesFiles
  JSON files containing Ply values. Array in plyconfig, one comma-separated argument on the command line.
outputFile
--outputFile, -o
  For reporters, the report output file; otherwise specifies a JSON file summarizing Ply CLI results.
verbose
--verbose
false Display debug/verbose logging output. Takes precedence over ‘quiet’ if both are true.
quiet
--quiet
false The opposite of ‘verbose’. Only error/status output is logged.
bail
--bail
false Stop execution on first failure.
validate
--validate
true unless 'submit' Validate flow input values.
parallel
--parallel
false Run request/flow/case suites in parallel (but tests within a suite are always sequential).
batchRows
--batchRows
1 (For use with rowwise values). Number of rows to run per batch.
batchDelay
--batchDelay
0 (For use with rowwise values). Delay in ms between row batches.
reporter
--reporter
  Produce a report of results. Valid values are json, csv, xlsx (see https://github.com/ply-ct/ply-viz for other formats). Especially useful with rowwise values.
maxLoops
--maxLoops
10 (When flows have loopback links). Max instance count per step. Overridable in flow design.
responseBodySortedKeys
--responseBodySortedKeys
true Predictable ordering of response body JSON property keys in result files. Usually needed for verification.
genExcludeResponseHeaders
--genExcludeResponseHeaders
cache-control,
connection,
content-length,
date,
etag,
keep-alive,
server,
transfer-encoding,
x-powered-by
Response headers to exclude when generating expected results.
binaryMediaTypes
--binaryMediaTypes
application/octet-stream,
image/png,
image/jpeg,
image/gif,
application/pdf
Media types to be treated as binary responses. Base64 encoded in result yaml files.
prettyIndent
--prettyIndent
2 JSON format indenting for response body content in result files.

Ignored vs Skipped

Ignored files aren’t regarded by Ply at all. To wit, they don’t show up in vscode’s Ply sidebar. Skipped files are loaded but not executed. Some use cases for skip:

VS Code Settings

Many options above are also configurable in VS Code settings once the Ply extension is installed. When running requests/flows/cases through the VS Code Ply extension, these user/workspace settings take precedence over values in plyconfig.yaml/yml/json.

Next Topic: API