Wednesday, October 8, 2008

my first Selenese test case!

i managed to squeeze some time to check out web automation testing using google's Selenium package.

here's the sample code:

* JSF-Spring Integration Training
* Copyright MyCompany 2008

import junit.framework.TestCase;
import com.thoughtworks.selenium.DefaultSelenium;

* A Simple Unit Test using Selenium
* @author kits
public class SimplePageTest extends TestCase {

protected DefaultSelenium createSeleniumClient(String url) throws Exception {
return new DefaultSelenium("localhost", 4444, "*firefox", url);

public void testSomethingSimple() throws Exception {
String url = "http://localhost:8010/clocator/faces/pages/index.jsp";
DefaultSelenium selenium = createSeleniumClient(url);


selenium.isTextPresent("Hello JSF!!!");


and here's the dependency in my project's pom.xml:

and some plug-in configuration:

that's all there is to it... no sweat! =P

new LAF(look and feel) for my blog!

nerdy looking skin huh? but i like it! =)

managed to have a new template together with SyntaxHighlighter, this cr*p took me 3hrs to have it working =P