quicktest 1.0.10

Quick Test CLI: A Cross-Platform for Automated Testing in Competitive Programming
quicktest-1.0.10 is not a library.

DOI Current Crates.io Version Quick Test License: MIT

Demo

cmp gif

Documentation

Table of Contents

Getting Started

Installation

Installation tutorials for Linux, Windows, and macOS are available here on the documentation website.

Disclaimer

QuickTest supports Windows and Linux. While the CLI has been successfully tested on these platforms, macOS functionality is currently unverified. macOS users should proceed with caution and are encouraged to report any issues.

Introduction

Quick Test CLI is a tool designed for fast and easy stress testing in competitive programming, allowing you to focus entirely on the contest.

Quick Test CLI currently supports the following three test types:

quicktest cmp quicktest stress quicktest check
cmp gif stress gif check gif
  • quicktest cmp | qt cmp: Verifies the correctness of an algorithm by comparing it against a brute-force solution. The brute-force solution, while typically slower, is guaranteed to be correct.

    • Sample:

      quicktest cmp --target-file=main.cpp --correct-file=correct.cpp --gen-file=gen.cpp
      # Or shorter:
      qt cmp -t main.cpp -c correct.cpp -g gen.cpp --tout 1000 --tc 1000
      
  • quicktest stress | qt stress: Verifies that the code executes within the time limit using a random generator for multiple test cases.

    Note: This mode does not compare against a slower, correct solution.

    • Sample:
      quicktest stress --target-file=main.cpp --gen-file=gen.cpp
      # Or shorter:
      qt stress -t main.cpp -g gen.cpp --tout 1000 --tc 1000
      
  • quicktest check | qt check: For problems with multiple valid answers where quicktest cmp is unsuitable, a script checker is used to verify algorithm correctness.

    • Sample:
      quicktest check --target-file=main.cpp --checker-file=correct.cpp --gen-file=gen.cpp
      # Or shorter:
      qt check -t main.cpp -c check.cpp -g gen.cpp --tout 1000 --tc 1000
      
  • quicktest output | qt output: Runs all test cases matching a prefix and saves the results to an output file.

    • Sample:
      quicktest output --target-file=main.cpp --prefix=testcase_ac
      # Or shorter:
      qt output -t main.cpp -p test_cases/testcase_ac --tout 1000
      

Commands

Note: you can use the long command quicktest or the alias qt

  • quicktest cmp | qt cmp

    Required Options

    • -t=<value> | --target-file=<value>
    • -c=<value> | --correct-file=<value>
    • -g=<value> | --gen-file=<value>

    Other Options

    • --test-cases=<value> | --tc=<value> [default: 1000]
    • --timeout=<value> | --tout=<value> [default: 2000] Unit of time: ms
    • --memory-limit=<value> | --ml=<value> [default: 1000000000 - 1GB] Unit of time: bytes
    • --prefix=<value> | -p=<value> Conflicts with --gen-file (Only one can be used at a time).
    • --diff Show differences between the expected file and the output file

  • quicktest stress | qt stress

    Required Options

    • -t=<value> | --target-file=<value>
    • -g=<value> | --gen-file=<value>

    Other Options

    • --test-cases=<value> | --tc=<value> [default: 1000]
    • --timeout=<value> | --tout=<value> [default: 2000] Unit of time: ms
    • --memory-limit=<value> | --ml=<value> [default: 1000000000 - 1GB] Unit of time: bytes
    • --prefix=<value> | -p=<value> Conflicts with --gen-file (Only one can be used at a time).

  • quicktest check | qt check

    Required Options

    • -t=<value> | --target-file=<value>
    • -c=<value> | --checker-file=<value>
    • -g=<value> | --gen-file=<value>

    Other Options

    • --test-cases=<value> | --tc=<value> [default: 1000]
    • --timeout=<value> | --tout=<value> [default: 2000] Unit of time: ms
    • --memory-limit=<value> | --ml=<value> [default: 1000000000 - 1GB] Unit of time: bytes
    • --prefix=<value> | -p=<value> Conflicts with --gen-file (Only one can be used at a time).

  • Flags of the cmp, stress and check subcommands

    • --break-bad | --break Stops execution if WA, TLE, or RTE states occur.
    • --run-ac Runs Accepted test cases.
    • --run-all Runs all test cases.
    • --run-rte Runs Run Time Error test cases.
    • --run-tle Runs Time Limit Exceeded test cases.
    • --run-wa Runs Wrong Answer test cases.
    • --save-all Saves all test cases.
    • --save-bad Saves only bad cases (WA, TLE, or RTE).

  • quicktest output | qt output

    Required Options

    • -t=<value> | --target-file=<value>
    • -p=<value> | --prefix=<value>

    Other Options

    • --timeout=<value> | --tout=<value> [default: 2000] Unit of time: ms
    • --memory-limit=<value> | --ml=<value> [default: 1000000000 - 1GB] Unit of time: bytes
    • --break-bad | --break Stops execution if WA, TLE, or RTE states occur.
    • --save-out Saves the target file output for each test case.

  • quicktest setup | qt setup

    Subcommand

    • config Subcommand for modifying C++ configuration settings.

      Options

      • --label=<value> The configuration label path to modify.
      • --value=<value> The new value for the selected label.

  • quicktest example | qt example

    Flags

    • --check Shows examples for the check subcommand.
    • --cmp Shows examples for the cmp subcommand.
    • --stress Shows examples for the stress subcommand.
    • --output Shows examples for the output subcommand.
    • --setup Shows examples for the setup subcommand.

    Note: Only one flag can be used at a time.

How to Contribute

If you are interested in contributing to the Quick Test CLI project, please take a look at the Contribute guide

Bug reports

You can report any bugs here.

Supported Languages

Language
C++
Java
Python
Rust Lang
Go Lang
GNU C
Kotlin

Compilation and Execution Commands

Language Compile / Interpreter Execution Command
C++17 g++ -std=c++17 -Wall -DONLINE_JUDGE=1 -o .qt/main main.cpp ./.qt/main
Java javac -d .qt/ Main.java java -cp .qt/ Main
Python3 python3 main.py
Rust Lang cp main.rs ~/.quicktest/rust/src/main.rs && cargo build --release --quiet --manifest-path ~/.quicktest/rust/Cargo.toml && cp ~/.quicktest/rust/target/release/rust .qt/main ./.qt/main
Go Lang cp main.go ~/.quicktest/go_mod/main.go && go build -buildmode=exe -o ./.qt/main ~/.quicktest/go_mod/main.go ./.qt/main
GNU C gcc -std=gnu11 -lm main.c -o .qt/main ./.qt/main
Kotlin kotlinc main.kt -include-runtime -d .qt/main.jar java -jar .qt/main.jar

License

Licensed under either of these:


Credits

Logo image based on the one made by Freepik for www.flaticon.com

Documentation was based on cpbooster

Installation scripts were based on deno_install

Authorship note: portions of this README were generated with assistance from an AI tool and have been reviewed and edited by the project author to ensure technical accuracy and legal compliance.