ATT is a tool to automaticly test your program with test cases and inputs.
ATT can be used with Linux/UNIX based operating systems. Under certain conditions it can be used also on Windows 10 (with installed Linux subsystem or changing source code).
You need system that fully support bash scripts. Running bash inside Powershell or CMD console on Windows using sh command breaks code.
At this point you need to have source code of tested program in the same directory as ATT bash script.
|---Tester.sh
|
|---Program(source code for testing)
|---testCases*
| |---test01**.txt
| |---test02**.txt
| |---...
|---input*
| |---test01**.txt
| |---test02**.txt
| |---...
|---output*
|---programOutput
| |---test01**.txt
| |---test02**.txt
| |---...
|---diff
|---test01**.txt
|---test02**.txt
|---...
* can be change using arguments
** can be different, but associated input and test case has to have same name (files in programOutput and diff folders will have same name also)
ATT needs at least 1 argument given. That is file name of source code that is being tested. File name should be given without file extension.
bash ./Tester.sh HelloYou can display help screen using help command.
bash ./Tester.sh help
- Language
-l: is used to change language of source file, default is Java (java)supported languages: Java (
java), C (c), C++ (cpp) - Directory of test cases
-test: is used to change default directory of test cases, default is./testCases - Directory of input data
-i: change default directory of input data for running test program, default is./input - Directory of output data: change default diretory of output data (and its subfolders), default is
./output(./output/programOutput,./output/diff) - Emoji displaying
-e: usefalsefor not displaying emojis, default istrue - Testing with warnings
-w: usetrueto continue testing after compiler returned warnings (supported on C and C++), default isfalse
Run ATT with Program.c without emoji displaying and with warnings if given by compiler:
./Tester.sh Program -l c -e false -w trueATT gets at least 1 argument (name of testing program without file extension), after that:
- ATT reads any additional arguments given
- ATT compiles program
- if compiler returns error(s): ATT shows
Compiling failederror and prints error messege into./output/programOutputfolder (if not changed with -o argument) - if compiler returns warning(s): ATT exits or continues testing (if changed with -w argument to
true)
- if compiler returns error(s): ATT shows
- ATT test program with test cases: for every file in
./inputstarts program and insert input data from that file- ATT returns Timeout: if execution time was equal or greater then time set in ATT (default: 1 second)
- ATT compare output data store in
./output/programOutputand test case data stored in./testCases, files has to have same .txt name, result of comparing is stored into file in./output/diff- ATT returns OK if test case and program are the same
- ATT returns NOK if test case and program are not the same
Please read CONTRIBUTING.md for details on code of conduct, and the process for submitting pull requests to repository.
- Jakob Marušič - Initial work - JakMar17
- nothing to show here just yet
This project is licensed under the MIT License - see the LICENSE.md file for details
nothing to show here just yet