This software takes test files as parameter that contains lists of commands to be run, expected stdout, stderr, exit status, and tell the user if the tests succeed, failed or crashed.
⭐ Don't forget to put a star if you like the project!
You can find pre-built releases for linux
, macOS
and Windows
Otherwise, you can install vangelis
from source using cargo, with the following command:
sh
cargo install vangelis
⭐ Don't forget to put a star if you like the project!
``` A functional testing framework
Usage: vangelis [OPTIONS]
Arguments:
Options: --diff Display the got/expected difference for each failed test in the shell --ci Stop the execution and display the got/expected difference if a test didn't succeed -h, --help Print help -V, --version Print version ```
Test files must have the following pattern in toml
```rs // Definitions
Default {
exitstatus: Option
Test {
cmd: String,
stdin: Option
// Test file content
TestFile {
default: Option
```toml
[default]
windows_shell = "powershell"
[test.echo] cmd = "echo hello" stdout = "hello\n"
[test.power]
runs_on = ["linux", "macos"] cmd = "whoami" stdout = "root\n"
[test.sleep]
timeout = 5 cmd = "sleep 10" stdout = "" stderr = ""
[test."print args"] cmd = "python3 print_args.py hey brother" stdout = """ hey brother """ stderr = ""
[test."print stdin"] cmd = "python3 print_stdin.py" stdin = """ hey brother """ stdout = """ hey
brother
""" stderr = "" ```
To run this example, enter the following command:
sh
vangelis examples/testfile.toml
```toml [cmd]
cmd = "make" timeout = 300 ```
```toml [stdout]
cmd = "whoami" stdout = "root\n" ```
```toml [stderr]
cmd = "ls /root"
stderr = "ls: cannot open directory '/root': Permission denied\n" ```
```toml [stdin]
cmd = "cat"
stdin = "hello"
stdout = "hello" ```
```toml [exit_status]
exit_status = 0
exit_status = 1 cmd = "git" ```
```toml [timeout]
timeout = 60
timeout = 5 cmd = "sleep 10" ```
```toml [runs_on]
runs_on = ["linux", "windows", "macos"]
runs_on = ["linux"] ```
```toml [unix_shell]
unix_shell = "sh"
unix_shell = "zsh" ```
```toml [windows_shell]
windows_shell = "cmd"
windows_shell = "powershell" ```
```toml [working_dir]
working_dir = "."
working_dir = "/tmp" cmd = "ls"
working_dir = ".." cmd = "ls" ```
This project is released under MIT license.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.