Skip to content

yushasama/tsundebugger

Repository files navigation

Tsundebugger

A fast, parallel test case checker for Python3 code. This project was specifically built for CSULB CECS 328 class taught by Ali Sharifian. I thought this would be a great learning experience on C++ and Software Development. So it's not like I wanted to build a program to help my classmates b-b-baka! But all jokes asides, I thought it would be cool to have an easy program where they just drop their file in and run against testcases and verify results. Also, I wanted to try building a project in C++.

[Disclaimer]

As of this moment, instructions for the software is out of date and I do plan on rewriting the manual once the software is complete. Tsundebugger is worked on whenever I have the time to do so.


Features

  • Parallel Execution: Executes multiple test cases concurrently.
  • Sequential Output: Ensures results are printed in the correct order.
  • Open-Source: Easy to modify and extend!

How to Build and Run

Prerequisites

  1. Install Bazel:
  1. Clone this repository:
git clone https://github.com/yushasama/tsundebugger.git
cd tsundebugger
bazel build //:tsundebugger
bazel run //:tsundebugger
bazel test //tests:all

Usage

Preparing Test Cases

  1. Place your Python script and test case files in the following structure:

    test_cases/
    ├── input.txt          # Input for Test Case 1
    ├── output.txt         # Expected output for Test Case 1
    ├── input_2.txt          # Input for Test Case 2
    ├── output_2.txt         # Expected output for Test Case 2
    
    • input_x.txt: Input data for the Python script.
    • output_x.txt: Expected output to compare against the script's results.

Running Tsundebugger

  1. Build the program if you haven’t already:

    bazel build //:tsundebugger
  2. Execute the program:

    bazel run //:tsundebugger
  3. View Results:

    • The program will execute each test case in parallel and print the results sequentially.

    AC - Accepted TLE - Time Limit Exceeded WA - Wrong Answer


Example

Input

  • test_cases/input_1.txt:

    5 10
    2 7
    6 6
    
  • test_cases/output_1.txt:

    15
    9
    12
    

Python Script

  • your_script.py:
    import sys
    
    def main():
        a, b = map(int, sys.stdin.read().strip().split())
        print(a + b)
    
    if __name__ == "__main__":
        main()

Result When you run Tsundebugger, the output will look something like this:

Results: 2/3 AC
Test Case 1: AC
Test Case 2: WA
  Expected: 9
  Got: 10
Test Case 3: AC

About

A fast, parallel test case checker for Python3 code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published