py.test II - cross-platform and distributed testing

Want to know more about advanced automated testing with Python? Use a tool that allows you to ad-hoc distribute tests to multiple CPUs for speed and to multiple platforms for compatibility checks? With tons of debugging help in failure situations?

This tutorial provides in-depth information on advanced usages of the popular py.test tool. We highlight its current feature set including using and writing extensions for generating HTML pages, testing Javascript or ReST documents. We showcase and discuss ways of distributing tests across CPUs and platforms and will leave time to discuss and tackle specific scenarios brought up during the session.

The tutorial format will be an interactive lecture with plenty of time for questions.

Presenters

Brian Dorsey is a database and Python developer living in Seattle Washington, USA. He mostly writes command line tools, windows services and more recntly simple web apps. He is a long-time user of and occasional contributor to py.test. He is a co-organizer of the Seattle Python Interest Group (www.seapig.org), a member of www.saturdayhouse.org and co-founder of a co-working space in Seattle (www.giraffelabs.com). He also loves lunch and created www.noonhat.com to help feed that addiction. He doesn't like natto or talking about himself in the third person.

Holger Krekel is a co-founder of the PyPy project and participates on many levels. He is the initiator and maintainer of the popular py.test and a few other tools. In 2004 he founded merlinux, a company focusing on PyPy and py.test developments. Holger has spoken at many EuroPython and PyCon confereces and gave well received testing tutorials at EuroPython 2008 and Pycon-UK 2008.

Requirements

None Listed

Class Outline

Terminology/Overview (20 minutes)

  • developer and "customer" tests
  • small/medium/big tests aka unit/functional/integration
  • acceptance tests
  • benefits of automated testing
  • existing python testing tools

Walkthrough py.test basic features (30 minutes)

  • example of test module
  • working with failures, tracebacks
  • generative tests
  • skipping chunks within doctests
  • looponfailing: run large test set until all tests pass

Using extensions (40 minutes)

  • integrate collection/run of traditional unit-tests
  • run functions in their own tempdir
  • testing ReST documents
  • running Javascript tests
  • running Prolog tests
  • html reporting for nightly runs

Break

Writing extensions (30 minutes)

  • overview on extensibility
  • per-project hooks for customization
  • conftest.py mechanism
  • global hooks for plugins
  • event system for custom reporting
  • test collection hooks
  • test running hooks
  • writing cross-project plugins

Distributed testing (45 minutes)

  • motivation/vision
  • run your tests on multiple CPUs/multicore
  • running tests on multiple machines at once
  • running tests on windows, driven by Unix
  • do's and dont's for cross-process testing

Buffer, Q&A (15 minutes)

Diamond

  • White Oak Technologies Inc. - Diamond

Platinum

  • Google - Platinum
  • Sun - Platinum

Gold

  • ESRI - Gold
  • CCP Games - Gold
  • Visual Numerics, Inc. - Gold
  • Microsoft - Gold
  • Slide.com - Gold
  • Walt Disney Animation Studios - Gold

Silver

  • PSC Group - Silver
  • Enthought - Silver
  • Canonical - Silver
  • Imaginary Landscape - Silver
  • Wingware - Silver
  • ITA Software - Silver
  • Accense - Silver
  • Resolver Systems - Silver
  • Leapfrog Online - Silver
  • Emma Email Marketing - Silver
  • ZeOmega - Silver
  • Oracle Technology Network - Silver
  • VMware - Silver
  • Tummy.com - Silver

Vendor I

  • O'Reilly - Vendor I
  • Informit - Pearson Publishing - Vendor I