Ant is a build tool which could be used to have your tests running either from command line or from Hudson CI tool. There is detailed documentation available for ant here but probably you need to know only a little part of it for you selenium tests. The essentials which are needed to know are:
And the ant file is -
You may also like to use mail task in your build file so that test report is emailed after test execution. You could find on mail task here
- Project
- Target (ant execution point and collection of tasks)
- Tasks (could be as simple as compilation)
- setClassPath - so that ant knows where you jar files are
- loadTestNG - so that you could use testng task in ant and use it to execute testng tests from ant
- init - created the build file
- clean - delete the build file
- compile - compiles the selenium tests
- run - executes the selenium tests
And the ant file is -
You may also like to use mail task in your build file so that test report is emailed after test execution. You could find on mail task here