Reputation: 3044
I am new to python and my goal is to construct an automation environment in my department. I am a QA Engineer and I would like to automate my functional Tests. I chose python for this purpose because i found out, during a research that I made, that python has all the modules that I need in order to fully automate my Functional Tests:
I have started my work by writing short verification tests. I wanted to see that i am able to automate my functional tests according to the list above.
I have some .py files that are actually tests actually tests and I would like to know:
Upvotes: 1
Views: 909
Reputation: 9046
Fundamentally a test is some executable code that verifies some system behavior and raises an assertion exception when that behavior doesn't match expectations.
pytest can help you with your test suite:
To answer your first question more specifically: either name your test files, functions, and classes according to the defaults (here's pytest's documentation on how it collects tests by default), or you can change the defaults. By default, basically have your test directories start with test_
, classes start with Test
, and functions start with test_
. It's heavily customizable too.
Upvotes: 1