Result Codes
The result codes are used to indicate the status of the test. For
example, if a test result is pass, the result code is set to 0
.
The results of each test step are published in a log file output. For
information on !Result
, refer to TEF parameters. The following table lists the possible result values that
can be set in the test steps for logging:
Code | Description
| Purpose |
---|
0
|
Pass
|
Used to indicate that the test has met requirements.
|
106
|
Fail
|
Used to indicate that the test has not met requirements.
|
107
|
Inconclusive
|
Used when tests are skipped from execution (for example, because of
invalid arguments).
|
108
|
TestSuitError
|
Used to indicate test suite errors.
|
109
|
Abort
|
Used to indicate that the test has aborted (for example, because of
timeout or invalid intermediate outputs).
|
110
|
Ignore
|
Used to indicate that the test results must be ignored for logging.
|
Example
TVerdict CSampleStep1::doTestStepL()
{
TRAP(err, openFileL());
if(err==KErrNone)
SetTestStepResult(EPass);
else
SetTestStepResult(EFail);
return TestStepResult();
}
This step can be called from a script RUN_TEST_STEP
command
as illustrated in the following code:
RUN_TEST_STEP !Result=Pass 100 SampleServer SampleStep1 c:\sample\sample.ini SectionOne
RUN_TEST_STEP !Result=Fail 100 SampleServer SampleStep1 c:\sample\sample.ini SectionTwo