Skip to content

A simple test framework written in bash for testing the output of console applications

Notifications You must be signed in to change notification settings

SStoyanov22/tests-io

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

tests-io

A simple test framework, written in bash, for testing console applications. It works by accepting a set of input tests and comparing the program output to a set of expected result files.

tests-io Demo

File System Structure

./                        --> your project directory
 /tests/tests-io.sh       --> the test script
       /input/            --> folder for **input** and **expected** test files

Writing input and expected files

Test input files stay in the input directory and have to match the following template - test-{number}. For every corresponding input file, there should be an expected file. It should be created in the same directory and match the template - test-{number}.exp. The number in the expected file name determines which is the corresponding input file.

Running the script

In order to run the testing script, execute the command

bash tests-io.sh {program-name}

The program-name should be a valid executable. You should also specify the path to the executable unless it is present in the PATH environment variable.

Output files

After running the tests, there is an output folder created, where you can inspect the actual program outputs for every test being ran.

There is currently not an option for automatically deleting the folder after running the tests. But I am accepting pull requests. :)

About

A simple test framework written in bash for testing the output of console applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%