read_line (test_scenario, line);
split (line, scr, ",");
if scr[1] !=""
Reader (scr[2]);
}
close_file (test_scenario);
return;
}
4. Reader模块
Reader模块读取测试脚本,由Planner模块传递测试脚本的名字给Reader模块。Reader模块执行完所有的脚本之后交回控制权给Planner模块。
当脚本执行时有非预期的结果Reader会触发”error recovery”。
Reader(test_script)
{
last_testcase = "";
error = NULL;
open_file (test_script);
while NOT_END_OF_FILE
{
if error == 1
{
while read_line (test_script, line) !=NOT_END_OF_FILE
{
split (line, case, ",");
if case[1] != last_testcase{
文章来源于领测软件测试网 https://www.ltesting.net/