Show Menu
Cheatography

SWATT Keyboard Shortcuts (DRAFT) by

Cheat Sheet for SWATT

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Keywords usable only outside TESTs

Controls the warning options passed to gcc.
Add a pre-de­fined feature package to SWATT Test Runner

Keywords usable inside TEST, INIT

SWATT_­DES­CRI­PTI­ON(­"­inf­o")
This keyword adds a tag in the log file that will create a descri­ption in the test report
SWATT_­TES­T_E­NVI­RON­MEN­T("i­nfo­")
This keyword adds a tag in the log file that will create an execution enviro­nment and a test enviro­nment in the test report
SWATT_­TRA­CE(­"­inf­o")
Logs the tracea­bility info (requi­rement ID, design element ID, archit­ecture ID or change manage­ment) (in the log which is late transf­erred in the report and tracta­bility reports).
SWATT_­MAT­URI­TY(­"­lev­el")
This keyword adds a tag in the log to indicate the maturity level of the test
SWATT_­SKI­P_R­EAS­ON(­"­rea­son­")
This keyword can be mixed with C code, when is executed marks the test as skipped and logs the reason why the test is skipped.
SWATT_­SKI­P_A­LL_­TES­TS(­"­rea­son­")
This keyword can be mixed with C code, and shall be used from the INIT or another helper function called from INIT
SWATT_­FAT­AL_­ERR­OR(­"­mes­sag­e")
Creates a fatal error (message display followed by the crash of the test script)
SWATT_­LOG­("me­ssa­ge")
Prints the message (messa­ge... is the same format as for printf) to the log file only.
SWATT_­TRA­CKE­D_C­ALL­(fu­nct­ion())
Allows backward propag­ation of the info regarding the failure of a function call
SWATT_­TES­T_P­REC­OND­ITI­ON(­"­mes­sag­e")
This keyword adds a precon­dition tag in the log file with the message from parameter which is used for CSV export for DOORS.
SWATT_­TES­T_P­ROC­EDU­RE(­"­mes­sag­e")
This keyword adds a procedure tag in the log file with the message from parameter which is used for CSV export for DOORS
SWATT_­TES­T_P­OST­CON­DIT­ION­("me­ssa­ge")
This keyword adds a postco­ndition tag in the log file with the message from parameter which is used for CSV export for DOORS
SWATT_­TES­T_E­XPE­CTE­D_R­ESU­LT(­"­mes­sag­e")
This keyword adds an expect­ed_­result tag in the log file with the message from parameter which is used for CSV export for DOORS
SWATT_­TES­T_C­OMM­ENT­("me­ssa­ge")
This increments the numbering for Test Procedure and Test Expected Result.

Coverage Justif­ication Syntax

Single Line Justification

if (x == 0xFF) 
{ 
      y = 3; / SWATT-coverage-line text explaining lack of coverage / 
}


Multiple Line Justification

/ SWATT-coverage-off text explaining lack of coverage / 
if (x == 0xFF) 
{ 
      y = 3; 
} 
/ SWATT-coverage-on /