Content tagged with: python
This chapter from the “Hitchhiker’s Guide to Python” provides recommendations on how to perform unit tests in Python and presents the unitest and doctest modules. It also lists the tools that are available to perform unit testing in Python.
In this blog post, Martin Sikora shares his experience of performing Python unit tests on the Google App Engine (GAE). You can test such application locally in terminal, locally on GAE test server or on a real GAE production server hosted on Google infrastructure. To achieve this objective, he used nose, a tool that extends Python’s unittest to make testing easier, with NoseGAE, a nose plugin that makes it easier to write functional and unit tests for Google App Engine applications. The blog post provides the code to run the …
This article from David Sale provides a short introduction to Behavior-Driven Development in Python. The article presents the principles of Behavior Driven Development and present the syntax of the Gherkin language that can be used with the freshen Python package, a clone of the famous Cucumber BDD framework written for Ruby. Freshen is an open source acceptance testing framework for Python that uses (mostly) the same syntax as Cucumber. A small step by step example is provided on how to use freshen and alternative tools are proposed.
Evan Farrer to test the frequently cited claim by proponents of dynamically typed programming languages that static typing was not needed for detecting bugs in programs. In his blog post, he explains why unit testing isn’t enough and you need static typing too.
This video presents Google Code convictions about creating tests for test-unfriendly code and the larger topic of testing. Project Hosting at Google Code is a large, well-established system written mostly in Python. When launched, Project Hosting’s testing consisted of the stock Subversion test suite and a handful of ad hoc smoke test scripts that required starting the entire system and manually inspecting the test’s output.
Behaviour Driven Development (BDD) is a different way of approaching the “how to validate your code” problem. It aims to help focus development on the delivery of prioritized, verifiable business value by providing a common vocabulary. This video discusses various ways to try out BDD in Python, from the periodically maligned doctests to simple unittest module usages to more specialized modules.
This article presents a strategy for unit testing in Python, using a set of utility functions that converts to and from Roman numerals. The author discusses the benefits of a Test-Driven Development (TDD) approach and propose a detailed testing process for all the cases of the functions.
This article explains how to perform HTTP request-response tests of ASP.NET Web applications using IronPython, a .NET Framework-compliant implementation of Python.
This article covers the coverage analysis of Python:
* Building a network management application
* Installing and running coverage on your test suite
* Generating an HTML report using coverage
* Generating an XML report using coverage
* Getting nosy with coverage
We are proud to announce that Ranorex 2.3 is released and available for download.