• Authored Course

About this Course

This course is designed to bring about a fundamental change to the way developers go about their day-to-day business of writing software code. Instead of thinking about unit tests as at best an afterthought, having already written the application code, the course aims to turn this practice on its head, and get programmers to write tests before the code to be tested.

Originating in the Agile methodology of Extreme Programming, Test Driven Development (TDD) has become accepted as a mainstream best practice, and is being adopted by major organisations as a means of improving code quality and developer productivity.
Because Test Driven Development involves such a major inversion of most developers' ways of thinking and working, the course is strongly exercise based - it is necessary to spend a large part of the two days of the workshop practicing test-first development.
Typically developers find TDD initially strange, but go on to find it quite liberating, and become 'test infected' (unable to write code without having first devised unit tests.)
The exercises are based on the VB programming language, Visual Studio, NUnit and some of its extensions, Hamcrest, mocking with NMock and developing system level TDD scripts using fitnesse

Learn from the UK's leading Agile training provider

  • Fully accredited

    QA's Agile certification courses are accredited by a number of bodies including BCS, APMG and Scrum.org.

  • Industry recognised

    QA work with leading organisations including, BT, BA, Barclays, DWP, and many others.

  • World-class experts

    QA's world class expert coaches, from a variety of industries, are on hand to work with your teams and key stakeholders to help them accelerate agility.

Why people choose QA

Locations

There are over 20 QA learning centres and many other sites spread across the UK, providing a convenient choice of learning locations and ensuring that over 90% of the population is within 45 minutes of a training destination. Learn more

  • London

    London

    International House

  • Manchester

    Manchester

    Oxford Street

Delegate portal

Booking courses with QA has always been easy, but now we've made it even easier. With myQA you can book, administer and manage all your bookings online, in one place. Login / sign-up

Course Information

Unit tests and the xUnit framework.
• NUnit overview.
• The TestCase and Assert classes.
• Developing a NUnit 2x test and test suite for a class.
• VB features used in NUnit 2.
• NUnit 2 versions of tests and test suites.

Motivation for using Mock Objects.
• Stubs and Mocks.
• Worked example.
• EasyMock argument matchers.
• RhinoMocks and Mockito
• Mocking and Static methods.
• When to use Mock Objects.
• Drawbacks of Mock Objects

Test Driven Development.
• Test Driven Development.
• Benefits of TDD.
• TDD Strategies - with JUnit and with fitnesse
• TDD Process: Worked Examples with NUnit.
• TDD Process: Worked Examples with fitnesse.
• TDD Testing Best Practices.
• Exception tests. Performance tests
• Fixing broken code in a speedy manner, successfully tracking down bugs using a combination of unit tests and TDD scripts

'Code Smells'.
• Benefits of Refactoring Code.
• Important Refactorings.
• Testing Patterns.
• Testing Heuristics.
• Coverage

Conclusion
• Pros and Cons of TDD

The workshop is strongly oriented towards lab work. In order to reverse deeply ingrained habits, of writing code first and tests only as a possible afterthought, it is essential to give developers as much time as possible working in a test-first manner.

  • Competence in VB, or similar object-oriented programming language

At the end of this course you will have:

• The ability to take the TDD approach to software development
• An understanding of the key techniques and strategies of TDD, and principles of refactoring code
• The ability to write unit tests in NUnit version 2x
• The ability to use mock objects in unit tests
• Work with fitnesse to develop system level tests
• Track down bugs quickly using NUnit and fitnesse