Add command trace and per command screenshots to Python test scripts

Skip to end of metadata
Go to start of metadata

Python supports registering a function for profiling purposes. Using this mechanism it is possible to add command tracing and "per-command" screenshots to Python test scripts.

An example implementation (called "squish_trace") can be downloaded here.

Here is an example test script that makes use of the squish_trace functionality:

test.py

The additional log entries generated by squish_trace:

Note:

  • Lines with >> denote entering a function
  • Lines with << denote exiting a function.
  • The tooltip of each trace log entry shows the local variables and their values at that point in time, in the above example the variable "i" of the for loop.

Related information and resources:

  • Windows command line screenshot tool (captures mouse cursor, too): take_screenshot
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.