Python Debugging and Testing

This last chapter will introduce two important software engineering topics—debugging and testing—that are important steps in the software development process. 

The first part of the chapter is focused on code debugging. A bug is a mistake in a program and can cause different problems that may be more or less serious depending on the situation. To encourage programmers to search for bugs, special software tools are used, called debuggers; using these software tools, we have the ability to find errors or malfunctions within a program by taking advantage of specific debugging functions, an activity that exists precisely for identifying the portion of software affected by a bug.

In the second part, the main topic is software testing:  it is a process used to identify deficiencies of correctness, completeness, and reliability in a software product that is being developed. 

In this context, we will, therefore, examine the three most important Python tools for debugging code in action. These are winpdb-reborn, which involves debugging with a visualization tool; pdb, the debugger from the Python standard library; and rpdb, where r stands for remote, meaning that it is code debugging from a remote machine.

Regarding software testing, we will examine the following tools: unittest and nose.

These are frameworks for developing unit tests, whereby the unit is the minimum component of a program within an independent operation.

In this chapter, we will cover the following topics:

  • What is debugging?
  • What is software testing?
  • Debugging using Winpdb Reborn
  • Interacting with pdb
  • Implementing rpdb for debugging
  • Dealing with unittest
  • Application testing using nose
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.15.94