XNSIO
  About   Slides   Home  

 
Managed Chaos
Naresh Jain's Random Thoughts on Software Development and Adventure Sports
     
`
 
RSS Feed
Recent Thoughts
Tags
Recent Comments

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.

com.perfit.MaxTime 10
eg.Division

numerator denominator quotient()
10 2 5
12.6 3 4.2
100 4 25

Going forward I‘m planning to write other decorators which can run the same fixture multiple time and so forth. Here is an example

com.perfit.Loop 5
com.perfit.MaxTime 10
eg.Division

numerator denominator quotient()
10 2 5
12.6 3 4.2
100 4 25

Ideas/suggestions welcomed

This code, with a few other decorators have been released as an open source project. For more details look at the fitdecorator project.


    Licensed under
Creative Commons License