Script functions reference > Test output functions

Test output functions
Test output functions are used to check whether a job is a test output job. That is, a job where an example of a possible output is sent to the StreamServer application from a web service client.
If the job is a test output job, a script function can be used to retrieve information about the type of output being tested. The result can be used in several ways. For example, to select an output connector for the test output job or to create a log message for the StreamServer application.
The table below contains a short description of each script function. For information about syntax, etc., see the full description of each script function.
Returns a number, indicating the type of output being tested (for example, a printed output or an email).
 
Example 49
The script below determines if the current job is a test output job and, in that case, retrieves information about the type of output being tested. The result is added to the log message for the StreamServer application.
if (IsTestOutput())
{
$channelType = "unknown";

$channel = GetRequestedTestOutputChannel();

if ($channel = "1")
$channelType = "printed output";

else if ($channel = "2")
$channelType = "email";

Log (1, "The job is a test output job of type " + $channelType);
}
else
{
Log (1, "The job is not a test output job");
}
 
OpenText StreamServe 5.6 Updated: 2013-03-01