I'm using the main () in a test script to execute multiple test cases with the FOR loop. Here's the behavior I'm seeing. If I put all the test cases inside the FOR loop, the main () will execute them a number of times. However, if I add an additional test case outside the FOR loop, the main () will only execute that test case and exit the script without running anything below it. Have any of you seen that? Is it possible to use the main() just like in C/C++ or it can only execute one command at a time? Thanks in advance.
integer i, iCount=3
print ("Hello World!") <--- never gets executed
for (i=0; i<iCount; i++)
I do this all of the time and never have a problem. Are you sure the indentation is correct? Are you running this directly or from a testplan file? I have never bother to use a .pln file to do it so I'm taking a shot in the dark.
Yes, I'm running it directly using Run>Run or F9. I even tried replacing testcase1 with a function that just prints out a string. main() still exists after the function call and not executing anything below it.