sickn33/antigravity-awesome-skills/odoo-automated-tests
Claude Code and agent skill by sickn33/antigravity-awesome-skills
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Write and run Odoo automated tests using TransactionCase, HttpCase, and browser tour tests. Covers test data setup, mocking, and CI integration.
Install
npx vskill@latest install sickn33/antigravity-awesome-skills/odoo-automated-testsSKILL.md
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
- Activate: Mention
@odoo-automated-testsand describe the feature to test. - Generate: Get complete test class code with setup, teardown, and assertions.
- Run: Get the exact
odooCLI command to execute your tests.
Examples
Example 1: TransactionCase Unit Test (Odoo 15+ pattern)
`setUpClass` vs `setUp`: UsesetUpClass(Odoo 15+) for shared test data. It runs once per class and is significantly faster thansetUpwhich re-initializes for every single test method.
Example 2: Run Tests via CLI
Example 3: HttpCase for Controller Testing
Best Practices
- ✅ Do: Use
setUpClass()withcls.envinstead ofsetUp()— it is dramatically faster for large test suites. - ✅ Do: Use
@tagged('post_install', '-at_install')to run tests after all modules are installed. - ✅ Do: Test both the happy path and error conditions (
ValidationError,AccessError,UserError). - ✅ Do: Use
recordset.with_user(user)to test access control withoutsudo(); a TransactionCase instance is not the model recordset. - ❌ Don't: Use a production database for tests — always use a dedicated test database.
- ❌ Don't: Rely on test execution order — each
TransactionCasetest is rolled back in isolation. - ❌ Don't: Assume a user’s password equals their login. Create isolated fixture users with explicit test-only credentials and required groups/ACLs; never use real account passwords.
Limitations
- JavaScript tour tests require a running browser (via
phantomjsorChrome headless) and a live Odoo server — not covered in depth here. HttpCasetests are significantly slower thanTransactionCase— use them only for controller/route verification.- Does not cover mocking external services (e.g., mocking an SMTP server or payment gateway in tests).
- Test isolation is at the transaction level, not database level — tests that commit data (e.g., via
cr.commit()) can leak state between tests.
Security
- Security scanPassed, 93 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/odoo-automated-tests/SKILL.md
Popularity
- Repository stars
- 28,144
- Repository forks
- 4,726
- Repository npm downloads, 7 days
- 9,774
- 7-day trend score
- 73
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 29 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sickn33/antigravity-awesome-skills/odoo-automated-tests)