Wednesday, May 14, 2025
  • Home
  • About Us
  • Disclaimer
  • Contact Us
  • Terms & Conditions
  • Privacy Policy
T3llam
  • Home
  • App
  • Mobile
    • IOS
  • Gaming
  • Computing
  • Tech
  • Services & Software
  • Home entertainment
No Result
View All Result
  • Home
  • App
  • Mobile
    • IOS
  • Gaming
  • Computing
  • Tech
  • Services & Software
  • Home entertainment
No Result
View All Result
T3llam
No Result
View All Result
Home Services & Software

Odoo testing utilizing ODOO CLI

admin by admin
July 10, 2024
in Services & Software
0
Odoo testing utilizing ODOO CLI
0
SHARES
0
VIEWS
Share on FacebookShare on Twitter


  1. This text provides a complete overview of conducting module testing utilizing the Odoo CLI for builders.
  2. Earlier than beginning this tutorial, we assume that you’ve got a foundational understanding of the Command Line Interface (CLI) in Odoo. Should you lack this elementary information, it’s advisable to acquaint your self with a newbie’s information to Odoo CLI.

What’s the significance of using the Command Line Interface (CLI) for conducting Odoo testing?

Performing Odoo testing with the assistance of the Command Line Interface (CLI) provides a number of benefits:

  • Automation: CLI automation streamlines varied testing duties, enabling assessments to run routinely, which saves effort and time in comparison with guide testing.
  • Integration with Steady Integration (CI) Instruments: CLI integrates seamlessly with many Steady Integration (CI) instruments like Jenkins, GitLab CI/CD, and so forth., facilitating the combination of testing processes into bigger improvement pipelines.
  • Headless Operation: You should utilize CLI in headless mode, which means it operates with out requiring a graphical person interface. This makes it appropriate for working assessments on servers or in environments with out a graphical interface.
  • Reproducibility: CLI testing permits for constant and reproducible outcomes. Operating assessments persistently throughout totally different environments ensures dependable outcomes.
  • Customization: Builders can customise check runs by specifying varied parameters and choices by means of the CLI.

Earlier than shifting forward, take a look at our Odoo improvement providers & an in depth vary of high quality Odoo Apps.

Tips on how to carry out testing utilizing Odoo CLI?

Write Checks:

  • To write down assessments, create a assessments sub-package in your module.The system will routinely examine it for check modules. Take a look at modules ought to have a reputation beginning with test_ and needs to be imported from assessments/__init__.py.

Instance listing construction:

your_module
├── ...
├── assessments
|   ├── __init__.py
|   ├── test_bar.py
|   └── test_foo.py

Contents of __init__.py:

from . import test_foo, test_bar

Run Checks After Module Set up :

  1. To run assessments routinely after module set up, use the --test-enable flag. Right here “.” represents the present listing (the place the executable file odoo-bin is current).
  2. “-d” or “-database” specifies the actual database you need to routinely run assessments for after module set up.
  3. The --logfile=/ choice specifies the file path and title the place the Odoo server will write its log output.

Syntax:-

./odoo-bin -d cli_database --test-enable --logfile=/

Output for the above command

Screenshot-from-2023-10-23-11-05-11

Run Particular Take a look at Information :

  • You probably have particular check recordsdata you need to execute, use the --test-file choice
./odoo-bin -d cli_database --test-file addons/account/assessments/test_account_account.py

Output for the above command

1-13

Apply Take a look at Tags for Filtering :

  • So if you wish to check the stock_account module, you should utilize:
    “./odoo-bin –test-tags /stock_account”
  • --test-tags: This Odoo command-line choice specifies which assessments to execute. On this case, the assessments you specify after this feature are those that might be run.
  • :TestAccountMove.test_out_invoice_auto_post_monthly,TestAccountMove.test_included_tax: These are the check tags or labels. They’re used to categorize and establish particular assessments in Odoo. On this command, it’s telling Odoo to run two particular assessments:
    1. TestAccountMove.test_out_invoice_auto_post_monthly: This probably refers to a particular check technique named test_out_invoice_auto_post_monthly inside a category named TestAccountMove.
    2. TestAccountMove.test_included_tax: Equally, this probably refers to a particular check technique named test_included_tax inside a category named TestAccountMove.
./odoo-bin -d cli_database --test-tags :TestAccountMove.test_out_invoice_auto_post_monthly,TestAccountMove.test_included_tax

Output for the above command

3-10

Generate Screenshots of Take a look at Failures:

  • When working assessments that use HttpCase.browser_js from the command line, the Chrome browser is utilized in headless mode. The system takes a PNG screenshot in the meanwhile of a check failure by default and writes it in ‘/tmp/odoo_tests/{db_name}/screenshots/’.
  • Two new command line arguments have been added since Odoo 13.0 to manage this conduct: --screenshots and --screencasts
  • Recording a video for the check case requires the ffmpeg package deal.

“For additional particulars on Odoo testing procedures, together with superior testing methods and finest practices, please consult with the official Odoo developer documentation on testing: Odoo Testing Documentation“

NEED HELP?

Hope you discover the information useful! Please be at liberty to share your suggestions within the feedback beneath.

Should you nonetheless have any points/queries relating to the identical, please elevate a ticket on the UV Desk.

For any doubt, contact us at our help mail.

author-thumb

RelatedPosts

Person Information for WooCommerce WhatsApp Order Notifications

Person Information for WooCommerce WhatsApp Order Notifications

April 2, 2025
Report reveals overinflated opinion of infrastructure automation excellence

Report reveals overinflated opinion of infrastructure automation excellence

April 2, 2025
I have been kidnapped by Robert Caro

I have been kidnapped by Robert Caro

April 2, 2025
Previous Post

NBA 2K25 will get a launch date, and it will see NBA and WNBA gamers share a canopy for the primary time in collection historical past

Next Post

Our video evaluate of Nothing’s CMF Telephone 1 is now out

Next Post
Our video evaluate of Nothing’s CMF Telephone 1 is now out

Our video evaluate of Nothing's CMF Telephone 1 is now out

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • App (3,061)
  • Computing (4,342)
  • Gaming (9,491)
  • Home entertainment (633)
  • IOS (9,408)
  • Mobile (11,737)
  • Services & Software (3,935)
  • Tech (5,253)
  • Uncategorized (4)

Recent Posts

  • Essential Launch Intel You Must Know!
  • New Plex Cellular App With Streamlined Interface Rolling Out to Customers
  • I’ve had it with the present GPU market – and the costs for AMD Radeon companion playing cards on Finest Purchase are why
  • MCP: The brand new “USB-C for AI” that’s bringing fierce rivals collectively
  • Realme GT7’s processor confirmed, launching this month
  • App
  • Computing
  • Gaming
  • Home entertainment
  • IOS
  • Mobile
  • Services & Software
  • Tech
  • Uncategorized
  • Home
  • About Us
  • Disclaimer
  • Contact Us
  • Terms & Conditions
  • Privacy Policy

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • App
  • Mobile
    • IOS
  • Gaming
  • Computing
  • Tech
  • Services & Software
  • Home entertainment

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies. However you may visit Cookie Settings to provide a controlled consent.
Cookie settingsACCEPT
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analyticsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functionalThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessaryThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-othersThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performanceThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policyThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Save & Accept