Complete AI TrainingYourJobSkills for your job

Skills / business

odoo-automated-tests

Write and run Odoo automated tests using TransactionCase, HttpCase, and browser tour tests. Covers test data setup, mocking, and CI integration.

SalesHuman ResourcesFinance & AccountingData & AnalyticsProduct ManagementManagement & Team LeadershipExecutives & StrategyOperations & Supply ChainCustomer Support & SuccessInsurance & Risk

Odoo Automated Tests

Overview

Odoo has a built-in testing framework based on Python's unittest. This skill helps you write TransactionCase unit tests, HttpCase integration tests, and JavaScript tour tests. It also covers running tests in CI pipelines.

When to Use This Skill

  • Writing unit tests for a custom model's business logic.
  • Creating an HTTP test to verify a controller endpoint.
  • Debugging test failures in a CI pipeline.
  • Setting up automated test execution with --test-enable.

How It Works

  1. Activate: Mention @odoo-automated-tests and describe the feature to test.
  2. Generate: Get complete test class code with setup, teardown, and assertions.
  3. Run: Get the exact odoo CLI command to execute your tests.

Examples

Example 1: TransactionCase Unit Test (Odoo 15+ pattern)

# tests/test_hospital_patient.py
from odoo.tests.common import TransactionCase
from odoo.tests import tagged
from odoo.exceptions import ValidationError

@tagged('post_install', '-at_install')
class TestHospitalPatient(TransactionCase):

    @classmethod
    def setUpClass(cls):
        # Use setUpClass for performance — runs once per class, not per test
        super().setUpClass()
        cls.Patient = cls.env['hospital.patient']
        cls.doctor = cls.env['res.users'].browse(cls.env.uid)

    def test_create_patient(self):
        patient

Subscribers only

The full skill, its 1 bundled files and every download is included with every paid Complete AI plan.

Details

Sourceself
License
Risk labelsafe ("critical" means the skill may run commands or touch files — read before use)
FilesSKILL.md
Added2026-09-04

Related skills

backtesting-frameworks

Build robust, production-grade backtesting systems that avoid common pitfalls and produce reliable strategy performance estimates.

bamboohr-automation

Automate BambooHR tasks via Rube MCP (Composio): employees, time-off, benefits, dependents, employee updates. Always search tools first for current schemas.

business-analyst

Master modern business analysis with AI-powered analytics, real-time dashboards, and data-driven insights. Build comprehensive KPI frameworks, predictive models, and strategic recommendations.

carrier-relationship-management

Codified expertise for managing carrier portfolios, negotiating freight rates, tracking carrier performance, allocating freight, and maintaining strategic carrier relationships.

competitive-landscape

Comprehensive frameworks for analyzing competition, identifying differentiation opportunities, and developing winning market positioning strategies.

competitor-alternatives

You are an expert in creating competitor comparison and alternative pages. Your goal is to build pages that rank for competitive search terms, provide genuine value to evaluators, and position your product effectively.