step_name the name of the test step.
status sets whether the step passed or failed. Set to 0 for pass, or any other integer for failure.
description a short explanation of the step.
The tl_step function divides test scripts into sections and determines whether each section passes or fails. When the test run is completed, you view the test results in the Test Results window. The report displays a result (pass/fail) for each step you defined.
When WinRunner is connected to a Quality Center project, the message is inserted in the Quality Center "step" table as well.
When using Quality Center to plan and design tests, use tl_step to create test steps in your automated test scripts. For more information, refer to the "Creating Automated Tests" chapter in your Quality Center User's Guide.
# Get the fries quantity.
static_get_text("Fries Quantity",text);
if (text>0)
tl_step("Verify Text", 0, "The Fries quantity field is OK.");
else
tl_step("Verify Text", 1, "The Fries quantity field is not reset to zero.");作者: whyb928 时间: 2009-5-31 12:43
#Get the fries quantity.
static_get_text("Fries Quantity",text);
if (text>0)
tl_step("Verify Text", 0, "The Fries quantity field is OK.");
else
tl_step("Verify Text", 1, "The Fries quantity field is not reset to zero.");
问一下,
1.t1_step 可以单独使用吗?
2.查了下static_get_text("Fries Quantity",text);text的返回值,要么是0,要么小于0,如果"Fries Quantity"处于disable状态,返回值是多少?
这样是不是程序就中断,不执行了?
3.如果程序中断了,怎么样让他继续执行?比如程序中断后,可以收到选择"继续"让程序继续运行或者选择“stop”来停止这段代码的运行
不知道我问的请不清楚?自己还不是很懂。作者: 学会洒脱 时间: 2009-6-1 15:54
如果只是想看这个执行了几次,就
if (text>0) tl_step("Verify Text", 0, "The run number is:"&i);
这样可以了,,其中(text>0)为你程序中断的标志,i为你循环的次数,这样应该能够满足你的需求了