I’ve recently started using the TestDox plugin with IntelliJ. It’s a nice little tool that fits in well with agile test driven development practices. It’s easy to get started with, either installing it from the IntelliJ plugins repository using your IDE, or downloading it directly from the plugins repository, and copying it into the plugins directory.
The premise on which the test dox plugin is based on is the idea that your test methods should be long sentences using CamelCase to break up words. By doing this your tests become your documentation. The plugin takes this premise, and exposes the following behaviour in IntelliJ:
- automatic translation of CamelCase test names to sentences. This is exposed through two different views, which, when coupled with nice navigation synchronisation options, makes it possible to use your tests to understand what the code is meant to do at a high level, and makes it easy to drill down to the specifics when needed.
- There is a simple mapping between classes and tests – TestDox knows that HelloWorldTest is the test for HelloWorld. This is configurable to suit your environment (test classname prefixes and suffixes can be specified, as well as test packages).
- documentation windows will be context sensitive, using the above mapping to show the appropriate documentation for the class/test currently being edited.
- alt-shift-t swapping between the test class and the base class – great for navigation
- alt-shift-t will prompt to create a test class if it doesn’t exist. Very cool fr the cases where you have created a class before the test (for whatever reason)
Overall this is a great little tool. There’s only a couple of minor tweaks I’d like to see made to the tool.
- The biggest that would be nice for the open source project, would be to make editing the source code of the IntelliJ plugin slightly easier. It would be cool to be able to make slight changes to the software, and help improve the project, but the cost of entry was slightly too high for me.
- It would be good for the alt-shift-t auto creation to work both ways. That is I want alt-shift-t to help me automatically create the class as well as the test.
- I saw a couple of minor screen repaint issues on 7.0.3 on OSX 10.5
TestDox is a good tool for IntelliJ, and you really should install it and use it.