The ping check.

returncode = E_OK;
db_file_name="H:\\QAautomation\\WinRunner\\log.txt";

dos_system("ping www.google.org > " db_file_name);
file_open(db_file_name, FO_MODE_READ);

while(file_getline(db_file_name, line) == E_OK) {
if (match(line, "100% loss")) {
tl_step ( "ping check", FAIL, "check fail");
returncode = FAIL;
break;
}
}
print returncode;
file_close(db_file_name);

沒有留言:

張貼留言