禅道自动化测试框架ZenTaoATF1.0发布(2)

发表于:2013-03-28来源:禅道作者:王春生点击数: 标签:自动化测试框架
具体的格式串信息,请参考:http://qa.php.net/phpt_details.php#expectf_section. 3. 正则表达式标签:expectx 1 2 3 4 TC title: with regular rules. expectx: hello world [0-9]*. TC; 4. 多

  具体的格式串信息,请参考:http://qa.php.net/phpt_details.php#expectf_section.

  3. 正则表达式标签:expectx

1
2
3
4
<<<TC
title: with regular rules.
expectx: hello world [0-9]*.
TC;

  4. 多行匹配

1
2
3
4
5
6
7
8
9
<<<TC
title: with multi lines.
expect:|
  2
  3
TC;
 
echo 1 + 1 . "\n";
echo 1 + 2 . "\n";

  5. 将预期放在文件中

  如果预期内容很多的话,可以将预期内容放在一个隐藏文件中,以.开头,然后和脚本同名,后缀是et或者ex,如果是正则表达式的话是,以ex结尾,其他的以et结尾。

  比如脚本05_expect_file.php,里面的预期标签是expect,它对应的预期文件是.05_expect_file.et

  脚本06_expectx_file.php预期标签是expectx,它对应的预期文件是.06_expectx_file.ex

原文转自:http://www.zentao.net/article-view-79773.html