Posted by vikashazrati on Monday, July 30, 2007
Many times you need sample data to be used as the set up data for your test cases. An easy way to extract data from a database into an XML file is as follows
The code sample below is mentioned for Postgres database however can be used for any database.
Read the rest of this entry »
Posted in dbunit, testing | 3 Comments »
Posted by vikashazrati on Sunday, July 29, 2007
We are using HSQLDB (1.8.0.1) as the in memory database for our DBUNIT (2.1) test cases. Suddenly when trying to insert from our XML datafile to a boolean field we started getting an error which said
WARNING - APP_USER.ACCOUNT_EXPIRED data type (16, ‘BOOLEAN’) not recognized and will be ignored. See FAQ for more information.
It looks like the SQL type Types.BOOLEAN is not handled correctly. The way around is that
- Create a new data type factory that extends the DBUnit class DefaultDataTypeFactory like this
Read the rest of this entry »
Posted in dbunit, hsqldb, testing | 2 Comments »
Posted by vikashazrati on Thursday, July 26, 2007
If you get an error OutOfMemory error while doing mvn site, because of all the reports that you are generating, just increase the heap size for maven2. The way to do that on linux.
In your mvn.sh add this as the first line after the copyright and other comments.
export MAVEN_OPTS=”-Xmx512m”
note than Maven 2.0.6 onwards some users have reported that the double quotes give problems, hence you might want to use
export MAVEN_OPTS=-Xmx512m
Posted in Java, Maven | 2 Comments »
Posted by vikashazrati on Thursday, July 26, 2007
I found this extremely interesting and informative post on infoQ about setting up an agile office. This is very useful for any company who is planning to set up an Agile compliant office.
Cheers!
Posted in Agile, Infrastructure | No Comments »
Posted by vikashazrati on Wednesday, July 18, 2007
This article is based on my personal experience that I went through when we started adopting the Toyota way of working. It has since been published on TSS (The Server Side) and can be accessed here.
Software Off-shoring is a reality of the day however there are many projects which fail due to incorrect off-shoring. Apart from tremendous advantages, off-shoring brings additional complexity, risk and avenues for wastage. This experience report will discuss how we turned off-shoring into a successful model based on Toyota manufacturing Process. We call this methodology ‘Lean Agile Off-
shoring.’
Our goal to go offshore was to deliver software faster by leveraging a vast talent pool at offshore location with higher efficiency. We chose Scrum and the Toyota way of working because of its strong foundation in successful new product development. The Toyota principles can be very well applied to any software development project. The underlying points discuss the Toyota way of working and how they were mapped to make our off-shoring process lean.
The overall methodology remained Scrum and Toyota way of working helped us to look at improving on a daily basis.
Read the rest of this entry »
Posted in Agile, Scrum | No Comments »
Posted by vikashazrati on Monday, July 16, 2007
Recently on one of our projects we had the need to allow the ROLE_ADMIN to login as another user without knowing or changing the password of that user. For example ‘Jack’ has the ROLE_ADMIN and ‘Suzy’ has the ROLE_USER. Now ‘Jack’ wants to login as suzy without knowing her password and carry out some tasks on her behalf acting as her when ‘Suzy’ is unavailable and some work needs to be done, of course you should provide a mechanism to audit and log whenever ‘Jack’ wants to play a different role.This is fairly easy to implement using Acegi
The SwitchUserProcessingFilter in Acegi helps to achieve this functionality. The below steps will show how to configure and use it
Read the rest of this entry »
Posted in Acegi, Java, Security | 4 Comments »