Comprehends all the processes and tasks executed with the purpose of finding defects, deficiencies and errors in a software system, a part of it or as a whole.
This are test that confirms that functional requirements were met.
It’s like a quality assurance which generally shows what the software can perform.
Functional testing probe a part of the functionality of the whole software. Also, it is “a type of black-box testing that bases its test cases on the specifications of the software component under test. Functions are tested by feeding them input and examining the output, and internal program structure is rarely considered.”
In this test, we need to probe the ease use of the app. This is part of non-functional testing.
It is used on user-centered interaction design: users test it, evaluate it and then they give you information about how real users are going to use the software.
When the software it’s gonna be publicly available, it is common to do a stress testing on its components simulating many many users. This test is made to know the software performance with enough demand.
This are the tests that are performed to prove that independent pieces of software can work together on a real environment with the intended goals.
Unit Testing is the first level of software testing where the smallest testable parts of a software are tested. This is used to validate that each unit of the software performs as designed. GeeksForGeeks
The main purposes of testing are 2:
– The earlier bird catches the worm Testing all the functions a block of code at once would save you lot of time at the end of the day. Knowing the test patterns and choosing the optimal one for the purpose of your test would save you of being rejected from the imminent and scary Quality Assurance testing process. The best part of it? This will make you notice possible bugs that might show up in the future, right now in the present.
– Quality is an investment in the future” Following all the good practices and having a perfect compilation at first without any syntax error isn’t really a proof of a well working application. This isn’t only going to improve the quality of your code making it more integral but also it will help you to built more compact and success Applications.
– There’s nothing more reliable than a tested code. In the future this will help to build faster your applications by reusing it. Improve the modularity, make your code more reliable and trusted, it’ll make you notice future bugs and also it’ll make you see the passionated task of coding from a better point of view.
pytest along with
unittest are the most popular frameworks to building tests with python.
pytest is particularly simple, and has some other great features:
Create a Project Folder
mkdir pytests cd pytests
pip install pipenv
3) Install PyTest ```python3 pipenv install pytest
def sum(a,b): return a + b def test_sum(): assert sum(3,1) == 4 assert sum(3,3) == 5
pipenv run pytest
import pytest def divide(a,b): if b === 0: raise DivisionError(1) def test_mytest(): with pytest.raises(DivisionError): divide(1,0)