TestStep, TestStepPass, TestStepFail, TestStepWarning, TestStepInconclusive, TestStepErrorInTestSystem
Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DE NoteThe forms without parameters or with only one parameter description should only be used in combination with TestStepBegin.
Function Syntax
TestStep (dword LevelOfDetail, char Identifier[], char Description[], ...); // form 1TestStep (dword LevelOfDetail, char[] Identifier, long handle); // form 2TestStep (char Identifier[], char Description[], ...); // form 3TestStepPass (dword LevelOfDetail, char Identifier[], char Description[], ...); // form 4TestStepPass (dword LevelOfDetail, char[] Identifier, long handle); // form 5TestStepPass (char Identifier[], char Description[], ...); // form 6TestStepPass (char Description[]); // form 7TestStepPass (); // form 8TestStepFail (dword LevelOfDetail, char Identifier[], char Description[], ...); // form 9TestStepFail (dword LevelOfDetail, char[] Identifier, long handle); // (10)TestStepFail (char Identifier[], char Description[], ...); // form 11TestStepFail (char Description[]); // form 12TestStepFail (); // form 13TestStepWarning (dword LevelOfDetail, char Identifier[], char Description[], ...); // form 14TestStepWarning (dword LevelOfDetail, char[] Identifier, long handle); // form 15TestStepWarning (char Identifier[], char Description[], ...); // form 16TestStepWarning (char Description[]); // form 17TestStepWarning (); // form 18TestStepInconclusive (dword LevelOfDetail, char Identifier[], char Description[], ...); // form 19TestStepInconclusive (dword LevelOfDetail, char[] Identifier, long handle); // form 20TestStepInconclusive (char Identifier[], char Description[], ...); // form 21TestStepInconclusive (char Description[]); // form 22TestStepInconclusive (); // form 23TestStepErrorInTestSystem (dword LevelOfDetail, char Identifier[], char Description[], ...); // form 24TestStepErrorInTestSystem (dword LevelOfDetail, char[] Identifier, long handle); // form 25TestStepErrorInTestSystem (char Identifier[], char Description[], ...); // form 26TestStepErrorInTestSystem (char Description[]); // form 27TestStepErrorInTestSystem (); // form 28
Description
With these functions, test steps can be reported within a test case.- TestStep reports a test step without influence on the result.
- TestStepPass reports a test step that was executed as expected. This is displayed accordingly in the test report.
- TestStepFail describes a test step that causes an error. Also this is displayed accordingly in the test report. The verdict of the test case is hereby set automatically to fail.
- TestStepWarning describes a test case that was executed without errors but whose result could contribute to a problem later on. This is represented appropriately in the test report.
- TestStepInconclusive describes a test step which cannot be clearly marked as passed or failed. Also this is displayed accordingly in the test report. The verdict of the test case is hereby set automatically to inconclusive.
- TestStepErrorInTestSystem describes a test step that causes an error in test system. Also this is displayed accordingly in the test report. The verdict of the test case is hereby set automatically to error in test system.
Parameters
- LevelOfDetail: It is possible to identify with a number how important this test step is. In the test report, it is possible that only test steps up to a certain importance will be displayed. 0 means “very important”, higher numbers indicate lower degrees of importance. Without an explicit specification, a LevelOfDetail of 0 is assumed.
- Identifier: E.g. a test step number) of the test step.
-
Description of the test step: To obtain line breaks (in form of
<br /\>tags) in the CANoe Test Report Viewer or in HTML test report, “\n” may be inserted at any place. The required replacement takes place during the transformation of the XML test report into an HTML file by means of an XSLT style sheet, where it can also be deactivated (see CANoe Test:Tips & Tricks). The description can also contain values that are read out of variables. For that the corresponding sequences like the format string of snprintf are inserted in the description. The corresponding variables are added to the parameter list. The format string has the same meaning as with the write function and is described there. Note
TestStepPass("10.2", "Output voltage ok (Uout = %d volts)", voltage); - handle: Handle to the table to be displayed within the step content, created by the function TestInfoTable.
Return Values
—Example
ExampleSee example: TestCaseTitle, TestCaseDescription, TestStep