240 likes | 253 Views
CEN 4072 Software Testing. PPT8: Observing facts and tracking origins. PPT and video are due: no later than October 25, 5:00 PM Submit to: lpiegl@gmail.com This template file is just an outline of the presentation that you need to complete. Additional pages will
E N D
CEN 4072 Software Testing PPT8: Observing facts and tracking origins PPT and video are due: no later than October 25, 5:00 PM Submit to: lpiegl@gmail.com This template file is just an outline of the presentation that you need to complete. Additional pages will be necessary to fully explore the topic above. Each page should contain adequate text as well as illustrations. You are free to use all publicly available information (text as well as graphics) as long as the sources are properly acknowledged.
Team members’ contributions Member [name]: Member [name]: Member [name]: Member [name]:
Principles of observation Content outline: • Do not interfere • Know what to observe • Proceed systematically
Logging Content outline: • The practice of print-based logging • Print-based logging problems
Logging Content outline: • Use standard formats • Make logging optional • Allow for variable granularity • Be persistent • Have specific macros
Logging functions Content outline: • Use specific functions • Use macros • Examples
Logging framework: LOG4J Content outline: • Explanation and example code
Logging with aspects Content outline: • Aspects • Join points • Pointcuts
Debuggers Content outline: • Execute and stop • Observe • Change
Debugging with GDB Content outline: • Sample code and a simple debugging session
Debugging with GDB Content outline: • Invoking functions in GDB
Embedded debuggers Content outline: • Invoke an interpreter
Breakpoints Content outline: • Data breakpoints • Conditional breakpoints
COCA debugger Content outline: • Data queries • Time queries
Tools Content outline: • LOG4J • ASPECTJ • GDB • DDD • eDOBS
Omniscient debugging (ODB) Content outline: • Execute and record • Step back-and-forth in time • Can issue event queries • Pros and cons
Dynamic slicing Content outline: • Program slice applied to a single run • Dynamic vs. static slice
Example code 1 n = read(); 2 a = read(); 3 x = 1; 4 b = a + x; 5 a = a + 1; 6 i = 1; 7 s = 0; 8 while (i <= n) { 9 if (b > 0) 10 if (a > 1) 11 x = 2; 12 s = s + x; 13 i = i + 1; 14 } 15 write(s);
Dynamic slice Content outline: • Steps to compute a dynamic slice
Dynamic slice Content outline: • Analysis of the sample code: • Trace • Write • Read • Dynamic slice
Whyline debugger Content outline: • Explanation and example
Whyline debugger Content outline: • A debugging session using the code above
Tracking infections Content outline: • Start with the infected value • Follow dependences • Observe origins • Infected? Sane?
Tools Content outline: • ODB