Pytest Tutorial - 4 | The Basics - Testing Concepts and Types
Why this in between pytest tutorials?
Dear learners, I feel that knowing the basics of Test types and concepts behind it will help each one of us in the long run of writing robust, scalable, readable and impactful tests.
Let’s dive in!
There are multiple types of testing which are generally performed in various IT organizations.
Unit tests
Integration Tests
System tests (Will explore on this in separate tutorials)
System integration tests (Will explore on this in separate tutorials)
Pytest can help in all the above.
These types of testing are fine however, when it comes to testing, we have many test cases to automate/run, be it unit test or integration or system tests.
In order to manage this we need to learn test management as well.
Typically in test management we
Map our tests to requirements/user stories for test coverage purposes
group our tests in TEST SUITES.
A test suite is a collection of tests.
You can have multiple test suites such as unit test suite/integration test suite/etc…
Store the test output for each run and share reports to stakeholders.
We also manage test data. A test will generally need to be tested with various combinations of test data to cover edge cases.
In automation testing these test management are generally done via creating or leveraging an already available test framework.
These test frameworks are generally build for multiple purposes
Data Driven test framework (this framework is primarily for data driven testing)
Hybrid Framework (this framework includes data driven testing capabilities but it also supports custom testing capabilities such as Keyword Driven or Page Object model)
There are many other types of framework, but for the purpose of this tutorial we will keep it simple.
So to summarize we have 4 types of testing in general, and the best practice is always to have a test automation framework which fits your requirements of testing. And it's actually easy to build these frameworks in python, but let's keep this for later purposes.
Thanks for Reading!
Comments
Post a Comment