首页
/ Autotest Growl 技术文档

Autotest Growl 技术文档

2024-12-23 05:36:52作者:胡易黎Nicole

1. 安装指南

在开始使用 Autotest Growl 前,您需要确保已经安装了以下依赖项:

  • ZenTest 兼容的测试套件
  • 在不同操作系统上,相应版本的 Growl 或 libnotify

安装步骤如下:

  1. 首先,选择安装 ZenTest 或 autotest-standalone。使用以下命令安装:

    sudo gem install ZenTest   --OR--
    sudo gem install autotest-standalone
    
  2. 接着,安装 Autotest Growl:

    sudo gem install autotest-growl
    
  3. 将以下行添加到 ~/.autotest 文件中:

    require 'autotest/growl'
    
  4. 确保您的计算机上安装了 Growl。您可以从以下地址下载:

    • Mac OS X: http://growl.info
    • Windows: http://growlforwindows.com
    • Linux: http://www.galago-project.org

2. 项目的使用说明

Autotest Growl 是一个用于改善 Autotest 测试框架 Growl 通知支持的项目。它支持多种测试框架和不同平台。

  • 特性:

    • 在每个测试周期自动清除终端(除非另作配置)。
    • 支持多种图标集。
    • 根据测试结果设置通知优先级。
    • 可以自定义图标。
    • 支持显示修改的文件。
  • 配置:

    • 通过修改 ~/.autotest 文件,可以配置通知的优先级、图标、是否清除终端、是否显示标签、是否每次运行一个通知等。

3. 项目API使用文档

Autotest Growl 的配置选项可以在 ~/.autotest 文件中设置,以下是一些常用配置:

  • Autotest::Growl::image_dir: 设置图标目录。
  • Autotest::Growl::clear_terminal: 设置是否在测试前清除终端。
  • Autotest::Growl::hide_label: 设置是否隐藏通知标签。
  • Autotest::Growl::one_notification_per_run: 设置是否每次运行只发送一个通知。
  • Autotest::Growl::sticky_failure_notifications: 设置失败和错误通知是否持续显示。
  • Autotest::Growl::custom_options: 设置传递给 Growl 二进制文件的任何自定义选项。
  • Autotest::Growl::show_modified_files: 设置是否在重新运行测试之前显示已修改的文件列表。

4. 项目安装方式

除了使用 gem 安装外,您还可以通过以下方式安装 Autotest Growl 的最新开发版本:

git clone git://github.com/svoop/autotest-growl.git
cd autotest-growl
bundle install
rake build
rake install

确保在安装后根据需要配置 ~/.autotest 文件,以启用 Autotest Growl 的功能。

登录后查看全文
热门项目推荐