Friday, December 01, 2006

"Performance Testing with JUnitPerf" article

Andrew Glover, who has been publishing a series of articles related to code quality on IBM developerWorks, talks about "Peformance Testing with JUnitPerf". The idea is to decorate your unit tests with timing constraints, so that they also become performance tests. If you want to do the same in Python, I happen to know about pyUnitPerf, the Python port of JUnitPerf. Here is a blog post/tutorial I wrote a while ago on pyUnitPerf.

3 comments:

Anonymous said...

Isn't it conventional wisdom that you want to performance test your *functional* tests, rather than your unit tests?

(This is because unit tests don't generally represent common "paths" through the code; instead, they test *most* paths through the code. What you want to optimize are what people *actually* do, not what your unit tests do.)

--titus

Grig Gheorghiu said...

Yeah, functional tests are probably a better target for performance testing. But if you read the article, even individual methods can be tested for performance at the unit test level.

Anonymous said...

Hi Grig: Looks like a good article. I maintain TestMaker - the open-source SOA test automation tool. It has a proxy recorder to create Jython-based JUnit TestCase classes. TestMaker turns the TestCase functional test into a scalability and performance test with its XSTest framework. The advantage here is Jython's ability to use Java classes to implement functional tests and then turn them into load tests with minimal effort. -Frank

Modifying EC2 security groups via AWS Lambda functions

One task that comes up again and again is adding, removing or updating source CIDR blocks in various security groups in an EC2 infrastructur...