Coverage Testing, the Good and the Bad

Published December 29th, 2009 Under Unit Testing | Leave a Comment

Coverage testing measures the execution of code, and is a great way of testing your tests: are they exercising all of your code? There are some pitfalls to be aware of in implementing coverage testing, though. 100% coverage is a fabulous ideal, but not only is it hard to reach, it still leaves a lot to be desired.

Slides of the presentation

coverage.py tool

figleaf coverage tool

Refactoring A Cyclomatic Complexity Script

Published December 23rd, 2009 Under Software Testing | Leave a Comment

An example of refactoring to clean up a python script.

Blog source of the video

Building an Automated QA Infrastructure using Open-Source Python Tools

Published December 21st, 2009 Under Configuration Management, Continuous Integration | Leave a Comment

The benefits of continuous test integration are well known. Setting up an infrastruture for this can be a lot of work. It involves integration with version control, automated product building and running of tests, reporting on results in an accessible way, code coverage measuring, and code analysis such as with lint-like tools. We discuss how to set up such an automatic QA system using extensible open source python tools. The focus will be on Buildbot, an open-source, Python-based continuous integration framework. Topics include a survey of the current best available open source software; testing code in languages other than python (and the benefits of using tools written in python in such a situation); strategies for extending these tools to meet custom needs, while avoiding maintainability and quality pitfalls; and special bonus details for QA of projects implemented in python specifically.

Presentation slides

Strategies For Testing Ajax Web Applications

Published December 16th, 2009 Under Functional Testing | Leave a Comment

As a Python web developer you are probably familiar with the paradigms of testing simple web applications. Your test case makes a GET / POST request, your program responds with an HTML page, and your test verifies the HTML elements. Unfortunately, today’s typical web application is not so simple! Since modern browsers support asynchronous JavaScript (Ajax) very well, the HTML response might deliver program code to run on the client’s web browser. The browser’s runtime environment would then interact with your server-side Python program and you now have a big problem: How does your test suite cover both server-side functionality and client-side functionality? This talk will use a real Python / Ajax web application as an example then offer practical strategies for creating a fast, scalable test suite to help ensure that each release of such an app works as intended. It goes beyond just the tools and technologies; it examines architectural strategies — how and when to use stubs, how to design a testable UI, etc — so that as your application grows in size, your tests remain fast and effective.

Source and slides for this presentation

Introduction to Python Profiling

Published December 14th, 2009 Under Software Testing | Leave a Comment

Python’s implementation is slow, but you can often write fast Python if you know how to profile your code effectively. This presentation will show you how to use the built-in cProfile module to capture profile data, both in simple scripts and more complex GUI environments. We’ll look at how to interpret the profile/cProfile reports as well as a few external tools to make the reports easier to understand. We’ll discuss how to make profiling an effective tool for you and some common “hot spots” you’ll discover in Python code.

Presentation slides

Building a Simple Configuration-driven Web Testing Framework With Twill

Published December 9th, 2009 Under Functional Testing | Leave a Comment

Building a flexible and scalable functional testing framework for your application is typically an evolutionary process. You experiment and find things that work, and things that don’t, particularly if you have little programming experience. Sometimes, you proceed down a path that binds your hands later down the road, and a massive refactor is needed. I would like to present a simple testing framework built upon several existing, free technologies (ConfigObj, twill, nose) and models (Page Objects, Scenario Objects, Abstract State Machines) that is easy to configure, extend, and maintain.

Source, slides and code

Using Windmill

Published December 3rd, 2009 Under Functional Testing | Leave a Comment

Windmill is the best-integrated solution for Web test development and its flexibility is largely due to its development in Python. This talk will get you writing and running automated tests and show off some of the most useful built-in tools for debugging and continuous integration.

Presentation slides

« go backkeep looking »