GithubHelp home page GithubHelp logo

aps-test-cases's Introduction

APS Test Cases and Test Runner

Test cases for APS

Using the Test Runner

Use python3 test.py <source_file> <test_path> to run the test runner, and get more help by using python3 test.py --help.

On Windows computers with python3 installed via traditional installer (not the Microsoft store), use python instead of python3.

The test runner compiles your code and runs it; before compiling, it first copies your code into a file called .build/Main.ext where ext is the extension of your program, and the .build folder is located in the same directory as the test runner. Because of this, you can name your file whatever you want; if you're using Java, you can name your file Polish.java and have a main class called Main in that file, and it'll work both with the runner and with Gradescope.

Examples

Standard Input

If your source file is at /home/aliu/code/aps/hw8/Kou.java, this repository is at /home/aliu/code/aps/aps-test-cases, and the current directory is /home/aliu/code/aps:

python3 test.py hw8/Kou.java

will compile the program and run it using standard input. You'll have the option to save your run as a test case. If you say yes, you'll get this prompt:

Where should this test case by stored?

You can use tab completion here (not on Windows); one tab completes, two tabs will suggest possible values.

Folder of Test Cases

You can compile and run the program using a folder of test cases by doing:

python3 test.py hw8/Kou.java aps-test-cases/hw8/kou

This will run all the test cases in the folder kou and check them against given answers in the folder.

Single Test Case

You can compile and run the program on a test case by using:

python3 test.py hw8/Kou.java aps-test-cases/hw8/kou/example-1

This will run the test case example-1 and check it against the contents of the file example-1-ans in the same directory.

aps-test-cases's People

Contributors

a1liu avatar fungluikoo avatar quangio avatar sam-eng avatar wxfnyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.