[TIP] Functional test framework library for python
variedthoughts at gmail.com
Sat May 6 10:42:52 PDT 2017
pytest will be the best bet, I'm sure of it. But I'm definitely biased.
1. It's the easiest to learn.
2. It's the most powerful.
3. Community. Active core group, tons of plugins.
4. Tests can be small.
5. Fixture model (setup and teardown), way, way, way more flexible than any
traditional xUnit setup/teardown model.
6. You can organize suites into multi-level directories, modules, and
7. Classes don't have to derive from anything.
8. You don't have to use classes.
9. Parameterization at test and fixture level. If you have used robot, I'm
guessing tables of data running through one test function is important to
you. pytest's answer to that is parametrization.
10. There's a new book on it coming out. (May 17 planned beta eBook,
October for physical copy).
For html reports, try pytest-html
It has lots of features, but to try it just do this:
> pip install pytest-html
> pytest --html=output.html (other normal arguments, like a test file or
your directory of tests)
Try it with an intentionally failing test, you'll love the output.
The author of this plugin works for Mozilla and also supports the
pytest-selenium plugin. He talks about it on episode 25 of Test&Code
Can it be used to test non-Python stuff? Yes!!!
I have used it to test electronic test equipment that's written in C++.
On Fri, May 5, 2017 at 3:42 PM, Matthew Harelick <mharelick at fastmail.fm>
> I am looking for a functional test framework written in Python. I am not
> testing Python applications. However the internal language of the
> Application Under Test is not relevant. I am sending inputs and validating
> messages that are received. I am creating the libraries that are
> connecting to message streams for the system under test. I need a test
> control and reporting framework hopefully written in python.
> I do not want to use Cucumber / BDD based tools. Creating tests using
> keywords like
> I see the login screen
> I enter the user name in the user field.
> I enter the password in the password field.
> I press the login button.
> I see the intro screen
> is like writing tests in COBOL.
> It also greatly limits the flexibility of what you can do in a real
> I realize the point of this is to make it easier for testers and project
> managers to understand tests but its too great a sacrifice in terms of
> We need the test case , test suite structure that is avialable in pyunit,
> but I would like the nice html output that is available in the robot
> framework. I can provide more information, but I am not sure what else I
> need to specify.
> Matthew Harelick
> 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