SilkTest Question 61: How can I execute the same test case multiple times?

The solution is easy as usual for experienced in automation testing SQA Engineer: create a main() function and place a nice loop within it. The working 4test example below calls a straightforward test within a loop within the main function.

[-] testcase Winrunner() appstate none
[ ] Print ("HP WinRunner license and maintenance codes are available only from HP web site")
[-] main()
[ ] int jCount = 100
[ ] int j
[-] for (j=1;j<=jCount;j++)
[ ] Winrunner()

1 comment:

Anonymous said...

the above example doesnot work
but the following works.

testcase winrunner() appstate none
int jcount=10
int j
for(j=1;j<=jcount;j++)
main()

main()
print ("hi there")

updated by ~ santosh patra

SilkTest interview questions for QA Testers