The Selenium plugin is part of the base package shipped with Squash-TA (It is automatically installed if you choose the default project configuration for your test project), however it is packaged as a separate plugin you can exclude it from the test project (and so avoid downloading and installing its dependencies).
This plugin provides all the elements needed to execute selenium tests in Squash-TA.
Selenium Tests must be included in the test project as java sources, and their non-selenium dependencies (if any) packaged as maven2 dependencies and declared in the squash-ta-mavin-plugin dependencies. The source code and resources are compiled each time before the test is executed (see the converters section for details).
For Selenium 1 tests, you may at your convenience use the included selenium server management system (see managing your selenium server in ecosystem environment scripts), or use a selenium server already available in your testing environment.
If you are looking for information on how to import your existing selenium tests, see the importing legacy tests section.
NB: a running installation of the browser used by your test is of course required on the machine your selenium RC server runs on. For Selenium 2 a working installation of the target browser is required on the machine where the tests are run.
NB: Remember, resources defined in the ecosystem setup and teardown scripts can only be seen in these scripts, not in test scripts. However, a resource defined in the ecosystem setup script will be seen in the corresponding ecosystem teardown script, as the seleniumServer resource above.
'file to script.java.selenium1' or 'file to script.java.selenium2' converters both work from a file resource that is in fact a bundle (a group of files). This group of files may contain java sources and various resources. All sources and resources used by the test must be included in the file bundle. This means that they must be all grouped in a directory that will be loaded as a file resource, and then converted to a 'script.java.selenium1' or 'script.java.selenium2 resource'. As in usual java code and resources, the directory structure defines packages in which the classes and resources are located. As in the maven convention, source files will be searched for in the <base>/java directory, and any directory under <base>/java will define a package level. Resources will be searched for in the same way under <base>/resources.
Regarding binary dependencies (as opposed to helper source source code, which must be included in the selenium test resource directory), they must be provided as maven jars included in the plugin dependencies like so:
To import your Selenium tests into your Squash-TA test projects, just copy your test source tree (with code AND resources) under a single subdirectory in the squashTA/resources directory. For example, if your test source code and resources where under src/test/java and src/test/resources, respectively, you just have to copy the java and test directories in the squashTA/resources/seleniumTests subdirectory:
Now, you just have to load seleniumTests as a resource to use it in your test.
TA Framework guide >