Tdd-Eclipse-Plugin

Introduction

The Test driven Development (TDD) is based on the idea to implement tests before the feature. This Plug-in supports the developer to learn and use the process of TDD.

Description

The Tdd-Eclipse-Plugin supports the developer to learn and use the TDD principles. It shows for every change of the code how much is covered by tests. If there is no test currently available for the changed class the plug-in informs you and gives you also the possibility to create the test.

System-Requirements

Install

Installation by Update-Site

Installation with Build Zip

Features

How Do Use

Before the plugin can be used for the project right click on the project and click on Tdd/Enable Tdd for Project. Now every time you save a file in this project all unit tests are executed and the code coverage is calculated by ecl emma.

You can disable this behavior if you right click on the project again and you choose Tdd/Disable Tdd for Project.

In the editor you can jump to the test and jump to the class backward when you rightclick on the editor and choose Tdd/Jump to Test or Tdd/Jump to Class. Alternatively you can also right click in the package explorer on any class and choose Tdd/Jump to Test or Tdd/Jump to Class.

If no related class to the test exist or vice versa than instead you can create a related class by right clicking on the class in the package explorer or in the editor and choose Tdd/Create Class or Tdd/Create Test. A wizard will be opened with the right default values.

The Tdd Plugin calculate the relation of class/test pairs by naming. If your class have the name A your test must be named ATest per default. (Under window/preference/tdd you can change tdd settings).

If you want to create out of an Unit Test a Integration Test the Extract Test Superclass Refactoring might be the right choice. Information about this refactoring you can find at http://xunitpatterns.com/Testcase%20Superclass.html. You can start the wizard by rightclicking on the test in the package explorer or in the editor and you choose Tdd/Extract Testcase Superclass.

Sometimes it can be tricky to use a library which you use rarely. The TDD Plugin can help you by using Mocking Libraries. Right click on the editor and choose Tdd/Create Mock Template to open a Wizard which allow you to generate mocking source. You have only name your constraints. This feature can be used for JMock, Mockito and EasyMock. Generic Variables are not supported.