Selenium Plugin - Commands


‘execute’ ‘script.java.selenium2’

What ?

This command executes selenium 2 tests referenced as script.java.selenium2 resources.

EXECUTE execute WITH {selenium2Tests<Res:script.java.selenium2>} USING {conf<Res:file>} AS {result<Res:result.selenium>}

> Input :

  • {selenium2Tests<Res:script.java.selenium2>} : The name (in the context) of the resource which references the java bundle containing the tests to execute (script.java.selenium2 type resource).

  • {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. It can be defined via an inline instruction. The format is <key>:<value>.

Note : The command needs this key. The command can retrieve it via the USING clause of the instruction or via the script.java.selenium2 type resource (See the From script.java to script.java.selenium2 converter).

This configuration key is optional in each instruction (command and conversion) but it must be defined in at least one instruction. If the key is defined in the convert instruction and in the command instruction, the key in the command instruction prime.

> Output :

  • {result<Res:result.selenium>} : The result of the test execution (result.selenium 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.Selenium2JUnit4) AS seleniumTest

EXECUTE execute WITH seleniumTest AS seleniumResult