宜兴通达竭诚为您服务。

通达科技 - 宜兴电脑维护及IT服务外包服务商

Client-Side Test Cases
  • 上传者: Administrator
  • 上传时间:2024年02月24日 07时03分39秒
摘要:
Client-Side Test Cases** Odoo provides a way to run client-side test cases from the UI. By running the test case from the UI, you can see the behavior ......
正文 相关文章 请喝咖啡

    Client-Side Test Cases

    Odoo provides a way to run client-side test cases from the UI. By running the test case from the UI, you can see the behavior of each step of the test case. This way, you can be sure that your UI test cases work as intended.

    Both QUnit test cases and Tours test cases can be run from the UI. Python test cases run server-side and cannot be run from the UI. Developer mode must be enabled to see options for running test cases through the user interface.

    Running QUnit test cases from the UI

    Enable developer mode, click the bug icon, and click the Run JS Tests option.

    odoo Development

    This will open the QUnit suite and run the test cases one by one, as shown in the screenshot below. By default, only failed test cases are shown. To see all passed test cases, clear the Hide passed tests check box, as shown in the screenshot below.

    odoo Development

    Running tours from the UI

    Activate developer mode and click on the bug icon and then click on Start Tour:

    odoo Development

    This will open a dialog with a list of registered tours, as shown in the screenshot below. Click the play button on the side to start the tour.

    odoo Development

    Video/Screenshots For Failed Test Cases

    Odoo uses headless Chrome. This opens up additional possibilities. Since Odoo 12, it is possible to record failed test cases and take screenshots of failed test cases.

    Generating Video/Screenshots

    Recording a video for the test case requires the ffmpeg package.

    ● Command to install ffmpeg package in python

    apt-get install ffmpeg

    ● If you want to generate screencasts (videos) of your test cases, use the --screencasts command:

    ./odoo-bin -c server.conf -i my_module --test-enable
     	--screencasts=/home/odoo/odoo_test/
    

    ● If you want to take screenshots of your test cases, use the --screenshosts command :

    ./odoo-bin -c server.conf -i my_module --test-enable
    --screenshots=/home/odoo/odoo_test/
    

    To create screenshots/screencasts of failed tests, you need to run the server with a path where you store video or image recordings. Every time you run a test and the test fails, Odoo saves a screen capture/video of the failed test case to the specified registry.

    To generate test case videos, Odoo uses the ffmpeg package. If this package is not installed on the server, it will only save screenshots of failed test cases. After installing the package, you will see mp4 files of all failed test cases.

    本文章从网上收集,如有侵权请联系tderp@tderp.com删除
  • 微信扫一扫,一分也是爱:
  • 微信

服务原则及地区范围

宜兴通达网络科技有限公司,地处中国宜兴环科园内,是一家高新技术企业。公司在企业网络维护和企业信息化建设与咨询方面,有10多年经验。

我公司愿与客户一道,力求彻底解决客户问题!
我们不是在给企业提供“头痛医头、脚痛医脚”的暂时解决方案,而是在部署根本性安全与稳定服务!!
我们愿携手客户,建立企业IT规划;杜绝随意安装系统、软件等操作;力求共同维护有序、安全、稳定的网络办公环境!!!
IT服务,服务是根本,客户是上帝;我们提供快速响应、快速上门、快速排查,提供优质高效的服务!!!!

通达科技提供全国范围内的服务,服务形式包括远程协助、电话咨询、电子邮件咨询、传真咨询、问答平台的问题解决等。

宜兴地区提供上门服务:

  • 市区服务:宜城街道、城北街道(屺亭街道)、新街街道、新庄街道、环科园、渚桥开发区
  • 市郊服务:张渚镇、西渚镇、太华镇、徐舍镇、官林镇、杨巷镇、新建镇、和桥镇、高塍镇、万石镇、周铁镇、芳桥镇、丁蜀镇、湖父镇。
  • 联系电话:189-21-343434
  • 在线沟通: