What is Quick Test CLI?
Quick Test CLI is a cross-platform command-line tool designed for fast and efficient stress testing in competitive programming. It allows you to verify the correctness and performance of your solutions by comparing them against reference implementations, checking time limits, and validating outputs.How it works
Quick Test CLI operates through a simple yet powerful workflow:Prepare your files
Write your solution file (target file), and depending on the test mode, prepare additional files like a brute-force solution, test case generator, or custom checker.
Choose a test mode
Select one of the four test modes based on your testing needs:
cmp, stress, check, or output.Run the test
Execute Quick Test CLI with the appropriate command and options. The tool automatically compiles your code and runs the tests.
Core architecture
Compilation and execution
Quick Test CLI automatically detects the programming language based on file extensions and handles compilation and execution accordingly. All compiled binaries are stored in a.qt/ directory in your current working directory.
The tool creates a
.qt/ folder for storing compiled binaries and test cases. This folder is automatically managed and can be safely ignored in version control.Test case management
Quick Test CLI can generate test cases dynamically using a generator file or use pre-existing test cases with a file prefix:- Generator mode: Runs a generator program to create random test cases on the fly
- Prefix mode: Uses existing test case files matching a specific prefix (e.g.,
testcase_ac_1.in,testcase_ac_2.in)
Status verdicts
Quick Test CLI tracks and reports the following verdicts:AC
Accepted - Your solution produced the correct output within time and memory limits
WA
Wrong Answer - Your solution produced incorrect output
TLE
Time Limit Exceeded - Your solution exceeded the timeout limit (default: 2000ms)
RTE
Runtime Error - Your solution crashed or exited with an error
MLE
Memory Limit Exceeded - Your solution used more memory than allowed (default: 1GB)
Configuration options
All test modes support common configuration options:| Option | Alias | Default | Description |
|---|---|---|---|
--timeout | --tout | 2000 | Time limit in milliseconds |
--memory-limit | --ml | 1000000000 | Memory limit in bytes (1GB) |
--test-cases | --tc | 1000 | Number of test cases to run |
Test case persistence
You can control which test cases are saved using these flags:- Save options
- Run options
- Break options
--save-all: Saves all test cases regardless of verdict--save-bad: Saves only failing cases (WA, TLE, RTE, or MLE)- Default: No test cases are saved
Command aliases
Quick Test CLI supports two command formats:qt alias provides a faster way to invoke commands during contests.
Next steps
Test modes
Learn about the four test modes and when to use each one
Supported languages
View compilation commands and language-specific details