[TIP] Testing executables/programs
andre.l.caron at gmail.com
Tue Feb 26 11:57:32 PST 2019
I have found pexpect (https://pexpect.readthedocs.io/), in combination to
pytest to be quite useful for a similar case.
If you want to do something more fancy such as a DSL to write the example
inputs and outputs without writing Python code for each test, you might
want to take a look at "Working with non-python tests" in the pytest
On Tue, Feb 26, 2019 at 1:28 PM Zbigniew Reszela <reszelaz at gmail.com> wrote:
> I would like to write a generic test case in python (unittest, pytest,
> etc) for testing executables/programs (this can be python/C++/Java or
> whatever applications).
> So, I would need to pass command line arguments for the progam execution,
> and maybe sometimes need to terminate the applications under test
> programmatically e.g. if these are GUI apps. Ideally this generic test case
> should be easilly parametrizable to just pass a list of strings (program
> name and arguments). The asserts could be on the exit codes or the stderr
> The motivation behind this is to have a *cheap* way to smoke test a bunch
> of our project.
> I googled a little bit if there is already something existing but without
> success. Have you heared about such a project?
> Any comments on that would be appreciated.
> Best regards,
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the testing-in-python