odoo-test_skill

This skill streamlines Odoo testing across versions 14-19 by generating test skeletons, running suites, creating mock data, and analyzing coverage.
  • Python

18

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

3 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill ahmed-lakosha/odoo-plugins --skill odoo-test

  • SKILL.md53.6 KB

Overview

This skill is a comprehensive Odoo testing toolkit for Odoo 14–19 that generates test skeletons, runs test suites, creates realistic mock data, and analyzes test coverage. It supports TransactionCase, HttpCase, SavepointCase patterns and integrates test reporting into Azure DevOps pipelines for CI/CD visibility. The toolkit emphasizes repeatable, isolated tests and fast developer feedback.

How this skill works

The skill introspects modules and models to emit test skeletons and common test patterns, then runs tests using Odoo's test runner and CLI helpers. It creates field-aware mock data, executes TransactionCase/SavepointCase/HttpCase tests, collects coverage information, and produces coverage reports. For CI, it can format and push test results to Azure DevOps pipelines and annotate failures for easier triage.

When to use it

  • Generating starter tests for new or migrated modules
  • Running targeted test suites during development or pre-merge CI
  • Creating repeatable mock data for integration and performance tests
  • Validating controller routes and web endpoints with HttpCase
  • Measuring and tracking test coverage across Odoo upgrades

Best practices

  • Prefer TransactionCase for business logic and CRUD tests to ensure isolation and automatic rollback
  • Use SavepointCase when testing exception handling and partial rollback scenarios
  • Tag tests appropriately (post_install, at_install, standard, slow) to control CI selection
  • Create shared fixtures in setUpClass for expensive resources and per-test fixtures in setUp for isolation
  • Run coverage analysis regularly and focus first on high-risk models and computed fields

Example use cases

  • Auto-generate a CRUD skeleton for my.model to accelerate writing unit tests
  • Run only post_install tests for a module in CI: python -m odoo --test-enable --test-tags=post_install
  • Generate 10 realistic res.partner records for integration testing with mock_data_factory.py
  • Validate a website controller with HttpCase to confirm authentication and response codes
  • Collect coverage for a module and export a report to Azure DevOps for merge-gate checks

FAQ

Odoo 14 through 19 are supported, with Odoo 17 as the primary tested target.

How do I run only a single test class or method?

Use Odoo test-tags syntax, for example --test-tags=/my_module:MyClass or --test-tags=/my_module:MyClass.test_method to run a class or method.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
odoo-test skill by ahmed-lakosha/odoo-plugins | VeilStrat