by  Adam S Wednesday, December 16, 2015
The Tester.EndTest() function in Rapise is describes as: Marks end of a currently executed test. Calculates test results and performs finalization of test execution. We have found that some of our customers have been confused as what the purpose of this function is.

For example, suppose you have the simple test:

function Test()
{
Tester.Message('Step 1');
Tester.EndTest();
Tester.Message('Step 2');
}

You might assume that the test will terminate with "Step 1" whereas in actual fact it will continue on to Step 2. What actually happens is that it will simply mark the end of the test in the Report when Rapise calculates the number of passed, failed, steps.

If you do want to terminate the test we recommend the following:

function Test()
{
Tester.Message('Step 1');
Tester.EndTest();
return;
Tester.Message('Step 2');
}

The return; command is a standard JavaScript function for ending the function early.

Article Info
  • Last Updated: 12/16/2015
  • Article ID: KB184
  • Views: 647