SciPy Conference 2007 -- "Testing" BoF Meeting
Last edited August 15, 2007
More by Christopher Hanley »
Sections:
Testing BoF

Python Standard Library 
  •  unittest
    • based upon JUnit
  • doctest
    • light weight, text based
Alternatives 
  • py.test
  • nose
Gripes 
  •  Parametric tests
    • does f(x) do the right thing over many parameters
      • looping over large data set not a good solution, first failure kills the test
  • doctest workfolw
    • emacs doctest mode is very good
  • Standalone scripts
    • Test failures are a pain to isolate
Statistical based testing tools? 
  •  Assign a probability to a path through the workflow
    • get fine grandularity
    • unittest feel
    • if python code to test, write python code around testing code.
  • Package
    • jumbl - U. of Tennessee
      • working on python bindings
      • under active development
    • jumble
      • fuzzy testing
Good techniques for non-deterministic algorithms? 
  •  Markov analysis
Better setup for performance testing? 
  •  
Good regression testing tools? 
  • Performance, with long-time historical tracking?
    • testing framework part of your build system and version control system
      • use subversion repository and result is stored as a version number in the change log
  • Easy acceptance of changes
UI testing 
  • good systems?
  • what is UI testing?
    • GUI
      • OS specific
        • wing32 accessibility framework
        • QT4 has testing built in
        • kwwidgets (Kitt Wear is the maker)
          • BSD license
          • TK/TCL and C++
          • only two cross platform toolkits
      • GUI specific
  • ParaView
    • kww -> QT4
  •  VTK
    • generates imagery take diff threshold
    • DART2
      • automatic testing after commits
  • RedHat "dogtail"
  • Write code in a more declarative manner so unittest framework can mange/test state transitions.
  • LDTP
    • test everything accessibility enabled
      • linux only
        • KDE
        • GNOME
Profiling 
  • stat profile
  • cprofile
Time spent testing? 
  •  20 -30 %
  • retro-fitting code into tests is way more expensive than writing tests to begin with.
Testing Multiprocessor Code 
  •  Regression testing is your only option?
  • Converage analysis?
  • No good tools in existence

Testing in Python Mailing List 
  •  Low traffic
  • unmoderated
Python Testing Tools Taxonomy 
  •  List of all existing testing tools
Titus Brown Guru comments -- and other commentary from others
  •  Only first 2 or 3 grips have any kind of solution.
  • Things that can be checked into version control for diff-ing would be ideal
    • pylint
      • can set it so that when you do a checkin you get a report on the syntax checking
      • Something similar for testing would be useful
    • checks run at commit time would be a good thing
  • Levels of testing
    • scipy does it
    • numpy does it
    • can be built into your unittest system
    • levels only useful for big projects?
  • "Dive into Python"  Book
    • Good chapter on testing
  • Nose
    • supports tags, levels of testing, timing, plug-ins
  • Nose better than. Py.Test
    • Nose
      • docs
      • ease of use
      • based upon uninttest
        • can be run from setup.py
      • Test collection of Nose is a big win
      • Low overhead dependency
    • Py.Test
      • developer friendly
      • multiple processes
      • requires py.lib
      • parallel testing
      • May also have a test collection facility
  • unittest is being extended - C. Winters?
    • will have garbage collection
    • orthogonal to Nose and py.test
    • will not have test discovery
  • Perl Test Anything Protocal
    • TAP
    • Format specification for saying that I ran something and this happened
  • Code Coverage testing
    • figleaf
      • Developed by Titus
    • coverage.py
      • uses the actual AST - more comprehensible reports
Memory Profiling 
  •  This is lacking in all languages
  • gmemprof for C
  • getmemusage()
    • enthought.util
    • blunt instrument
  • Valgrind for C++
  • scan /proc/ for Linux
    • Good for looking for growth issues
    • could be all that getmemusage() does
The content on this page is provided by a Google Notebook user, and Google assumes no responsibility for this content.