Skip to main content

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:
1

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.
2

Choose a test mode

Select one of the four test modes based on your testing needs: cmp, stress, check, or output.
3

Run the test

Execute Quick Test CLI with the appropriate command and options. The tool automatically compiles your code and runs the tests.
4

Review results

View real-time test results showing AC (Accepted), WA (Wrong Answer), TLE (Time Limit Exceeded), RTE (Runtime Error), or MLE (Memory Limit Exceeded) verdicts.

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)
The --gen-file and --prefix options conflict with each other. You can only use one at a time.

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:
OptionAliasDefaultDescription
--timeout--tout2000Time limit in milliseconds
--memory-limit--ml1000000000Memory limit in bytes (1GB)
--test-cases--tc1000Number of test cases to run

Test case persistence

You can control which test cases are saved using these flags:
  • --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
Use --save-bad with --break-bad to quickly find and save the first failing test case during debugging.

Command aliases

Quick Test CLI supports two command formats:
quicktest cmp -t main.cpp -c correct.cpp -g gen.cpp
qt cmp -t main.cpp -c correct.cpp -g gen.cpp
The 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

Build docs developers (and LLMs) love