{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

DesigningForTestability

DesigningForTestability - Designing For Testability...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Designing For Testability
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Designing For Testability Incorporate design features that facilitate testing Include features to: Support test automation at all levels (unit, integration, system) Provide visibility into the program’s internal state and activities This allows more specific and accurate bug reports It also helps during debugging
Background image of page 2
Logs class Log { public: const int DEBUG = 1; const int INFO = 2; const int WARNING = 3; const int ERROR = 4; const int FATAL = 5; // send log output to the console Log(); // send log output to a file Log(const string & file); // Send log output to a remote server Log(const string & serverIpAddress, int serverPort); // enable/disable different message types void EnableMessageType(int type); void DisableMessageType(int type); // Log messages of various types void Debug(const string & message); void Info(const string & message); void Warning(const string & message); void Error(const string & message); void Fatal(const string & message); }; Log important events to a log file Example Log File Provide a configuration file that allows logging to be turned on and off in different application modules
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}