Knowledge Base Article

Home Page > Knowledge Base > Rapise

Home Page > Knowledge Base > Rapise > Rapise Desktop

Home Page > Knowledge Base > Rapise > Rapise Mobile

Home Page > Knowledge Base > Rapise > Rapise Web

Article What is the purpose of the Tester.EndTest() Function?

by Adam S on 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.

Attachments
Article Info
Last Updated: 12/16/2015
Article ID: KB184
# Views: 454
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2016 | Licensed to Inflectra Corporation.