Chapter 7. Debugging and Automated Testing

In this chapter, we will cover the following topics:

  • Producing server logs to help debug methods
  • Using the Odoo shell to interactively call methods
  • Using the Python debugger to trace method execution
  • Writing tests for your module using YAML
  • Writing tests for your module using Python unit tests
  • Running server tests
  • Using the Odoo Community Association maintainer quality tools

Introduction

We saw in Chapter 5, Basic Server Side Business Logic, how to write model methods to implement the logic of our module. However, a responsible developer not only writes the implementation but also provides automated tests for this implementation. The recipes in this chapter cover the debugging and testing of server side methods. ...

Get Odoo Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.