Performance testing in FIT/Fitnesse
Acceptance tests are a nice way to capture requirements and test them against the system. I was wondering if we can associate some kind of performance criteria with our acceptance tests.
On my current project we are using fitnesse for writing/running our acceptance tests. We are using fitnesse to demonstrate completion of requirements to the customer. As of now we do not have specific performance parameters defined by the customer. But we want to write some tests that can keep a check on time taken for each user call.
We started using JUnitPerf for this. JUnitPerf needs end-to-end JUnit tests, which it can decorates to check the execution time. Soon we found we had a lot of code duplication in these end-to-end JUnit tests and in our fit fixtures. At this stage we started considering FIT to do this kind of execution/performance test.
So far I have written a spike implementation. In the current implementation, I have written a new fixture which is kind of a decorator around any fixture. Following is an example of how it can be used.
Going forward I‘m planning to write other decorators which can run the same fixture multiple time and so forth. Here is an example
This code, with a few other decorators have been released as an open source project. For more details look at the fitdecorator project.