Basic library needed by JUnit for a spring+hibernate app.
Check if you included these .jar if you have ClassNotFoundException.
hibernate3.jar
spring.jar
commons-logging.jar
commons-dbcp.jar
commons-pool.jar
commons-collections.jar
dom4j.jar
jta.jar
antlr.jar
mysql.jar
Doing driven mode Selenium test with Java
Download Selenium Remote Control, unpack it.
Inside there is a Selenium server, and many client driver for different language.
Start the server by running java -jar selenium-server.jar. The default port is 4444.
Then open a java project in netbeans, include the client driver for java in your project, selenium-java-client-driver.jar .
Create DefaultSelenium object, this object will communicate with the server to run tests and do different tasks.
The constructor of DefaultSelenium need four parameters: hostname, port, browser string, url.
Browser string define what browser you use, please reference to the javadoc.
Here is a sample: new DefaultSelenium("localhost",4444,"*iexplore","http://www.google.com");
Run start() method to begin, stop() to close browser.
You may then integrate it with JUnit or TestNG to do data-driven tests.
According to their tutorial, TestNG should be easier.