Skip to main content
This page provides a comprehensive reference for all command-line options available in Quick Test CLI.

Global Commands

Quick Test CLI provides several subcommands for different testing scenarios:
  • stress - Verify code execution time and memory usage
  • cmp - Compare target file with correct solution
  • check - Validate answers using a custom checker script
  • output - Run test cases and generate output files
  • setup - Configure Quick Test settings
  • example - Show usage examples for subcommands

Stress Command

Verify that the code execution time does not exceed what is allowed.

Usage

quicktest stress --target-file <FILE> [OPTIONS]

Required Options

--target-file
path
required
The target file to test. This is the solution you want to verify.Short flag: -tExample: --target-file solution.cpp

Optional Parameters

--gen-file
path
default:""
Generator file that produces random test cases.Short flag: -gExample: --gen-file generator.cpp
--timeout
u32
default:"2000"
Maximum execution time allowed in milliseconds.Alias: --toutExample: --timeout 3000
--memory-limit
u64
default:"1000000000"
Maximum memory allowed in bytes (default: 1GB).Alias: --mlExample: --memory-limit 512000000
--test-cases
u32
default:"1000"
Number of test cases to run.Alias: --tcExample: --test-cases 500
--prefix
string
default:""
Prefix for saved test case files.Short flag: -pExample: --prefix my_test

Behavior Flags

--break_bad
boolean
Break execution if WA, TLE, or RTE status occurs.Short flag: -bAlias: --break
The check command uses --break_bad (underscore) unlike other commands which use --break-bad (hyphen).
--save-bad
boolean
Save only test cases with WA, TLE, or RTE status.Conflicts with: --save-all
--save-all
boolean
Save all test cases regardless of status.Conflicts with: --save-bad

Run Filters

--run-all
boolean
Run all saved test cases.
--run-ac
boolean
Run only test cases with Accepted status.
--run-wa
boolean
Run only test cases with Wrong Answer status.
--run-tle
boolean
Run only test cases with Time Limit Exceeded status.
--run-rte
boolean
Run only test cases with Runtime Error status.
--run-mle
boolean
Run only test cases with Memory Limit Exceeded status.

Cmp Command

Check the correctness of the target file by comparing it with a correct solution.

Usage

quicktest cmp --target-file <FILE> --correct-file <FILE> [OPTIONS]

Required Options

--target-file
path
required
The target file to test.Short flag: -tExample: --target-file solution.cpp
--correct-file
path
required
The correct solution file to compare against.Short flag: -cExample: --correct-file correct.cpp

Optional Parameters

--gen-file
path
default:""
Generator file that produces random test cases.Short flag: -gExample: --gen-file generator.cpp
--timeout
u32
default:"2000"
Maximum execution time allowed in milliseconds.Alias: --toutExample: --timeout 3000
--memory-limit
u64
default:"1000000000"
Maximum memory allowed in bytes (default: 1GB).Alias: --mlExample: --memory-limit 512000000
--test-cases
u32
default:"1000"
Number of test cases to run.Alias: --tcExample: --test-cases 500
--prefix
string
default:""
Prefix for saved test case files.Short flag: -pExample: --prefix my_test

Behavior Flags

--break-bad
boolean
Break execution if WA, TLE, or RTE status occurs.Short flag: -bAlias: --break
--save-bad
boolean
Save only test cases with WA, TLE, or RTE status.Conflicts with: --save-all
--save-all
boolean
Save all test cases regardless of status.Conflicts with: --save-bad
--diff
boolean
Show differences between expected and actual output.Short flag: -d

Run Filters

--run-all
boolean
Run all saved test cases.
--run-ac
boolean
Run only test cases with Accepted status.
--run-wa
boolean
Run only test cases with Wrong Answer status.
--run-tle
boolean
Run only test cases with Time Limit Exceeded status.
--run-rte
boolean
Run only test cases with Runtime Error status.
--run-mle
boolean
Run only test cases with Memory Limit Exceeded status.

Check Command

Check the correctness of answers using a custom checker script. Useful for problems that don’t have a unique answer.

Usage

quicktest check --target-file <FILE> --checker-file <FILE> [OPTIONS]

Required Options

--target-file
path
required
The target file to test.Short flag: -tExample: --target-file solution.cpp
--checker-file
path
required
The checker script that validates the output.Short flag: -cExample: --checker-file checker.cpp

Optional Parameters

--gen-file
path
default:""
Generator file that produces random test cases.Short flag: -gExample: --gen-file generator.cpp
--timeout
u32
default:"2000"
Maximum execution time allowed in milliseconds.Alias: --toutExample: --timeout 3000
--memory-limit
u64
default:"1000000000"
Maximum memory allowed in bytes (default: 1GB).Alias: --mlExample: --memory-limit 512000000
--test-cases
u32
default:"1000"
Number of test cases to run.Alias: --tcExample: --test-cases 500
--prefix
string
default:""
Prefix for saved test case files.Short flag: -pExample: --prefix my_test

Behavior Flags

--break-bad
boolean
Break execution if WA, TLE, or RTE status occurs.Short flag: -bAlias: --break
--save-bad
boolean
Save only test cases with WA, TLE, or RTE status.Conflicts with: --save-all
--save-all
boolean
Save all test cases regardless of status.Conflicts with: --save-bad

Run Filters

--run-all
boolean
Run all saved test cases.
--run-ac
boolean
Run only test cases with Accepted status.
--run-wa
boolean
Run only test cases with Wrong Answer status.
--run-tle
boolean
Run only test cases with Time Limit Exceeded status.
--run-rte
boolean
Run only test cases with Runtime Error status.
--run-mle
boolean
Run only test cases with Memory Limit Exceeded status.

Output Command

Run test cases and create an output file for each test case.

Usage

quicktest output --target-file <FILE> --prefix <PREFIX> [OPTIONS]

Required Options

--target-file
path
required
The target file to execute.Short flag: -tExample: --target-file solution.cpp
--prefix
string
required
Prefix for output files.Short flag: -pExample: --prefix test_output

Optional Parameters

--timeout
u32
default:"2000"
Maximum execution time allowed in milliseconds.Alias: --toutExample: --timeout 3000
--memory-limit
u64
default:"1000000000"
Maximum memory allowed in bytes (default: 1GB).Alias: --mlExample: --memory-limit 512000000

Behavior Flags

--break-bad
boolean
Break execution if TLE or RTE status occurs.Short flag: -bAlias: --break
--save-out
boolean
Save the output of the target file for each test case.

Setup Command

Configure Quick Test settings and language configurations.

Config Subcommand

Update configuration settings.

Usage

quicktest setup config --label <LABEL> --value <VALUE>
--label
string
required
Label of the configuration to update. Format: Language.SETTINGShort flag: -lExample: --label "cpp.PROGRAM"
--value
string
required
Value to set for the configuration.Short flag: -vExample: --value "g++"

Examples

# Configure C++ compiler
quicktest setup config --label="cpp.PROGRAM" --value="g++"

# Set C++ standard
quicktest setup config --label="cpp.STANDARD" --value="-std=c++17"

# Configure Python interpreter
quicktest setup config --label="python.PROGRAM" --value="python3"

Reset Subcommand

Reset all settings to defaults.

Usage

quicktest setup reset
This removes the configuration file at ~/.quicktest/languages.config.json.

Example Command

Show usage examples for specific subcommands.

Usage

quicktest example --<SUBCOMMAND>
--stress
boolean
Show examples for the stress subcommand.
--cmp
boolean
Show examples for the cmp subcommand.
--check
boolean
Show examples for the check subcommand.
--output
boolean
Show examples for the output subcommand.
--setup
boolean
Show examples for the setup subcommand.
Exactly one subcommand flag must be specified.

Build docs developers (and LLMs) love