Selenium Plugin - Converters


From script.java to script.java.selenium2

Category-name : script

What ?

This script converter create a selenium test resource (script.java.selenium2 type resource) which can be uses by the ‘execute’ ‘script.java.selenium2’ command from a script.java resource.

CONVERT {resourceToConvert<Res:script.java>} TO script.java.selenium2 (script) USING {conf<Res:file>} AS {converted<Res:script.java.selenium2>}

> Input :

  • {resourceToConvert<Res:script.java>} : The name (in the context) of the resource which references a java bundle which contains the source code, the compiled code and the resources of a selenium2 test suite.

  • {conf<Res:file>} (optional) : The name of the resource which references a configuration file which can contain only one key :

    • mainClass : The qualified name of the main java class. The configuration must be supplied as a text file with one line containing the qualified name. If you give more, the last read line becomes the main class name. This parameter may be used if you have only one selenium test suite. On the other hand, if your selenium test bundle contains several test suite sharing helper code resources and dependencies, you may omit the main class name and rather give that parameter in the configuration of your various execute commands. It can be defined via an inline instruction.

> Output :

  • {converted<Res:script.java.selenium2>} : The name of the converted resource (script.java.selenium2 type resource).

Example :

LOAD selenium AS seleniumTestSource

CONVERT seleniumTestSource TO script.java (compile) AS seleniumTestCompiled

CONVERT seleniumTestCompiled TO script.java.selenium2 (script) USING $(org.squashtest.Selenium2JUnit4WithResourceDependency) AS seleniumTest