Coldfusion with Selenium ant script
I have been wanting to do a Selenium ant script since John Paul Ashenfelter's presentation on Testing CF applications @ CFUnited 2007.
Selenium is a test tool for web applications. It has a very simple html table structure for creating suites and tests. I use Selenenium IDE for Firefox to create initial scripts and save it as a cfm file. Then added the ColdFusion functionality such as random username generation for testing a new user process.
Please read Selenium Core documentation link. The links include installation, quick start, and concepts. The core needs to be placed somewhere under web root.
You will need the Selenium Remote Control for the selenium-server.jar but for convience I included it the zip. Within the jar, we will be accessing the SeleneseAntTask.
The seleniun_ant_task.zip includes the build.xml, selenium-server.jar, testsuite.cfm, and test.cfm
Note: I had to use selenium-remote-control-0.9.2-20070913.164243-129-dist.zip for the selenium-server.jar to solve the issues "Preparing Firefox profile…"
Directions and content of the zip:
seleniumTask folder contains build.xml and selenium-server.jar. This folder can be placed anywhere. Build.xml will need the seleiumDir and resultsDir set.
tests folder contains testSuite.cfm and test.cfm. This folder needs to be placed in the selenium core folder over the exisiting tests folder.
files:
build.xml – ant script to run Selenium test
testSuite.cfm – contains the html to reference test.cfm
test.cfm – tests http://henke.ws search
Please send me any enhancements and I'll add them to the zip.
I really liked the article but I was wondering what entries should be there in the selenium-ant.properties. Also, the application I am creating the selenium scripts for run only with the Java version 1.4. What are the java requirements for the task that you have written here. If at all it uses 1.5 version can you please let me know of the change that has to be made to the task here. Help really appreciated.