Erlang and Test Driven Development
Target Audience : Developers and testers
Prerequisites: Knowledge
of basic Erlang (equivalent to Erlang by Example or Erlang Express
courses. OTP courses not necessary, but useful).
Objectives:
• Understand the principles behind Test Driven Development,
• Be able to use Erlang's principal testing tools (EUnit, Common Test, QuickCheck),
• Learn about tools to maintain and debug existing Erlang programs
Goal: Learn how to use existing tools of the ecosystem to help develop, debug and maintain Erlang software
Duration: Three days
Registration: 08:30 on 6th June 2011.
Venue: London Fruit & Wool Exchange.
Description: You will learn test frameworks for unit tests, property-based tests and large-scale tests. We will cover Eunit, Common Test, QuickCheck for testing, then Wrangler, Dialyzer and tracing (among others) for maintenance. You will also learn principles of Test-Driven Development which will ultimately allow you to write more reliable and maintainable software.
Course Contents:
- What is TDD
- TDD With Eunit
- Common Test
- Property-Based Testing
- Maintenance and Debugging
A brief overview of test-driven development: what are the principles behind it, possible advantages and disadvantages of the practice, terminology and a quick look at case studies of TDD
TDD With Eunit
Exploring EUnit, and the architecture behind it (assertions, test generators, test representations and fixtures); how to use EUnit to test functional code and code with state.
Common Test
A guide on how to use Common Test, from unit tests to large scale testing. This covers unit test, testing with state, test groups and suites, how to configure tests, write specifications and do distributed testing.
Property-Based Testing
Covers the principles behind property-based testing. We use QuickCheck Mini to see how to write property-based tests: generators, properties, symbolic representation of tests, etc. This also briefly covers shrinking strategies to find errors.
Maintenance and Debugging
A review of useful tools when maintaining and debugging Erlang software. This section covers test coverage with the cover tool, Type checking with Dialyzer and TypEr, refactoring with Wrangler and also the the Trace Tool builder for ErlIDE and Exago.
Teacher(s):
Simon Thompson
Simon Thompson is Professor of Logic and Computation in the Computing
Laboratory of the University of Kent, where he has taught computing at
undergraduate and postgraduate levels for the past twenty five years,
and where he has been department head for the last six.
His
research work has centered on functional programming: program
verification, type systems, and most recently development of software
tools for functional programming languages. His team has built the HaRe
tool for refactoring Haskell programs, and is currently developing
Wrangler to do the same for Erlang. His research has been funded by
various agencies including EPSRC and the European Framework programme.
His training is as a mathematician: he has an MA in Mathematics from
Cambridge and a D.Phil. in mathematical logic from Oxford.
He has
written four books in his field of interest; Type Theory and Functional
Programming published in 1991; Miranda: The Craft of Functional
Programming (1995), Haskell: The Craft of Functional Programming (2nd
ed. 1999) and Erlang Programming (with Francesco Cesarini, 2009). Apart
from the last, which is published by O'Reilly, these are all published
by Addison Wesley.
Simon's book