Welcome! - sc15000/python-testing-cookbook GitHub Wiki

This is a collection of useful tips and key principles of automated testing, with an emphasis on Python as the most awesomest and, therefore, chosen tool for implementation.

Introduction to Automated Testing

The premise is simple: no self-respecting engineer would release a product - either hardware or software - to a customer without first having tested it. For all but the very simplest of products, the likelihood of hitting the requirements, bug-free, first time, is effectively zero. With the increasing complexity of modern products, manual testing is no longer a cost-effective method to achieve comprehensive verification of a product's features and scoping its limitations.

By automating tests - that is, developing a test framework complemented with one or more test suites - we get a world of improvements:

  • Being automated, the test framework can run suites of tests either in the background, increasing engineer productivity (since productivity directly influences profits, no business should discount the idea of automating product testing).
  • A machine can perform an immeasurably greater amount of work than an engineer in a given amount of time.
  • Tests are simple and easy to run; engineers are therefore not deterred from running them frequently, thereby catching bugs sooner rather than later making their remedying far less costly and time-consuming.
  • A well-written framework ca support a variety of test suites, which can target different layers of the product. For example, Unit tests, Module Tests, Integration tests etc. can all be accomplished with the same framework.

Automated Testing's Inception

Kent Beck introduced the first automated test framework in 1999 with SmallTalk. Shortly thereafter, a colleague released JUnit, a Java test framework, followed in quick succession by CUnit, CppUnit for the purposes of automating unit tests for the corresponding languages. Python's "PyUnit" - unittest is the de facto standard upon which most automaterd test framewortks in Pytrhon are built. In 2001, the Agile Manifesto was signed by 17 highly experienced software developers, a key feature of which was test automation, cementing its place in the future of Software Development.

Use the links below to navigate to more detail:

  • [Automated Testing Principles](Automated Testing Principles)
  • [Automated Testing with Python](Automated Testing with Python)
  • Glossary of Terms
  • References