Tuesday, May 19, 2009

Vagaries of Nepali Politics

When Maoists became a cleaner winner of constituent assembly election of Nepal in 2008, I had written in my blog on what could have caused it. But at the same time I also felt sad that despite being clear winner, Maoists had hard time forming the government and getting the prime minister position. If a member from Maoists had not been a prime minister, it would have been a big slap on the whole election process.

Unfortunately and not surprisingly there is still no change in status quo as far as writing constitution goes but there is a change in government. And in most likely hood Mr. Madhav Nepal of UML is going to be prime minister. It's the same Nepal who lost both constituents from which he had filed his nominations. I have no insight into politics but should not prime minister be a candidate who has been elected by people? IMO, it's even a bigger slap on constituent assembly election process. What it shows definitely though that Nepali politicians do not learn from their mistakes. They have lots of fun forming government and then bringing it down. I don't have problem with UML leading the government and I don't have problem with Mr. Nepal as prime minister if he had been elected. In current situation, I wonder how Mr. Nepal's moral allows him to even think about being a prime minister?

Saturday, May 16, 2009

Maven archetype for testng + selenium

Lately I have been working a lot on front end stuffs such as JBoss Portal and Richfaces although my preference has always been to work on back end. Well life is full of these conflicting choices, isn't it?

I write sample applications for these JBoss Web Interface projects and testing them are included as part of continuous integration testsuite. To help with automation and to give easier ramp up time for new team members, I created a maven archetype for writing test cases using TestNG and Selenium. I purposely decided not to add cargo stuff as most of time we have preconfigured application and web servers. To use this for your own project, here is what you need to do

mvn archetype:generate -DarchetypeGroupId=org.jboss.maven.archetypes -DarchetypeArtifactId=selenium-testng -DarchetypeVersion=1.0 -DgroupId=org.whatever.project -DartifactId=myproject -DarchetypeRepository=http://repository.jboss.org/maven2/

This has .classpath and .project for Eclipse/JBDS projects as well so you can import the generated project into Eclipse/JBDS and your project build path will automatically be set correctly. This was my first real foray into maven and I still think that maven needs to mature more in terms of usability. I hear good things about Maven 3 so I am looking forward to that.