Tuesday, August 01, 2006

GTest - XML Testing framework with AOP

My new testing framework kept me very busy. Last two three weekends I was working on this. I called it XTest. But I am planning to change to GXTest. You can call it "Generation neXt Test" Or "Giri's Xml Testing" framework :-).

The basic idea is to create your test cases in xml. Its more on functional test cases. The main attraction on my XTest is, recording your data. In my past experience in creating test case, I spent lot of time in creating data for test cases.

ie, Create a new user, I have to create data which contains the user details, password, preference etc. So there is lot more work involved in creating data than test case.

So how does my framework handle that ?

I record the data. Yes, I can record what a method takes and what it returns irrespective of the type of the argument.

Here is where I use the latest technology, AOP (Aspect Oriented Programming). This is the main part of my "XGen" (Test case generation module).

First step is to identify the method to trace
create your point cuts
start your appellation
do your regular testing / development
My framework will keep records all test cases
Once its done, re run these test cases to make sure all works. if you don't need some thing just delete it

Next step is to check-in this file to some repository
Then use this when ever you want to make sure, your application is not broken when ever you change or refactor some underling code