[TIP] Testing executables/programs
Chris.Wesseling at cwi.nl
Wed Feb 27 01:03:11 PST 2019
On 26 February 2019 19:23:57 CET, Zbigniew Reszela <reszelaz at gmail.com> wrote:
>I would like to write a generic test case in python (unittest, pytest,
>for testing executables/programs (this can be python/C++/Java or
>So, I would need to pass command line arguments for the progam
>and maybe sometimes need to terminate the applications under test
>programmatically e.g. if these are GUI apps. Ideally this generic test
>should be easilly parametrizable to just pass a list of strings
>name and arguments). The asserts could be on the exit codes or the
I have used ScriptTest before. It provides a clean running environment to run commands in and check their (file-)output. You can combine with your favourite testrunner.
I haven't use it to kill long running or detaching processes. Just a cleanly exiting cli.
Centrum Wiskunde & Informatica (CWI)
More information about the testing-in-python