Register to get access to free programming courses with interactive exercises

Introduction Python: Automated testing

Professional developers' code contains fewer bugs than novices', but it's not because they're brighter, more detail-oriented, or able to see the code from bean to cup. The real reason is that they write tests.

Automated testing is an integral part of the programming process in a professional environment. Tests are the only reliable way to make sure your code works. They don't eliminate bugs, but they help you keep the number of bugs at an acceptable level. Tests check that changes to one part of the system haven't broken other parts.

But tests are needed for more than just checking that the code works. There are other types of automated tests, such as performance or vulnerability tests. First of all, programmers are responsible for functional tests. These tests verify that the code performs its intended task from program users' perspective, for example:

  • To check if the programmer has written some code that's responsible for user registration
  • To carry out a functional test that shows whether the user can register

According to the degree of isolation of the tested parts of the code, functional tests fall into three general categories:

Sign up

Programming courses for beginners and experienced developers. Start training for free

  • 130 courses, 2000+ hours of theory
  • 1000 practical tasks in a browser
  • 360 000 students
By sending this form, you agree to our Personal Policy and Service Conditions

Our graduates work in companies:

<span class="translation_missing" title="translation missing:">Bookmate</span>
<span class="translation_missing" title="translation missing:">Healthsamurai</span>
<span class="translation_missing" title="translation missing:">Dualboot</span>
<span class="translation_missing" title="translation missing:">Abbyy</span>
Suggested learning programs
Developing web applications with Django
10 months
from scratch
under development
Start at any time

Use Hexlet to the fullest extent!

  • Ask questions about the lesson
  • Test your knowledge in quizzes
  • Practice in your browser
  • Track your progress

Sign up or sign in

By sending this form, you agree to our Personal Policy and Service Conditions
Toto Image

Ask questions if you want to discuss a theory or an exercise. Hexlet Support Team and experienced community members can help find answers and solve a problem.