Skip to content
Matthew Casperson edited this page Aug 8, 2019 · 2 revisions

Launching

Iridium can be run multiple different ways. Which method you choose depends on your use case.

Java Web Start (JNLP)

Important
Web Start (JNLP) is depreciated. and will not be included in future Java releases. Launch Iridium directly from the JAR file instead.

Web Start provides an easy way to launch Iridium without requiring any special software beyond a standard Java 8 installation.

Iridium comes with example test scripts which are launched via Web Start. To run these examples, right click on the links below and save the jnlp files to the local disk. Then run the files with the javaws application.

Important
You must have Chrome installed, as the examples are configured to use it.
Note
The Web Start download bar will appear to freeze, restart and then jump to 100%. This is expected.

The following demos run against dummy or public websites that anyone can use.

  1. Security Testing (code)
  2. Fragments (code)
  3. Simple Steps (code)
  4. PhantomJS (code)
  5. Modify Requests (code)
  6. Passive ZAP security scan (code)
  7. Gherkin Examples (code)
  8. Verifying classes and text (code)
  9. Finding Dead Links (code)
  10. Acceptance Tests (code)
  11. Driver Per Scenario (code)

The following demos run against Auto & General's quote and sale websites. If you run these more than once or twice you'll be blocked by a firewall, so they are more useful as code examples than as actual working demos.

  1. Open Application (code)
  2. Using Aliases (code)
  3. Address Capture (code)
  4. URL Mappings (code)
  5. Data Set Collections (code)
  6. Parallel Tests (code)
  7. Tags (code)
  8. Configuration Tags (code)
  9. Multiple Environments: First and Second (code)
  10. Multiple Brands (code)
  11. Multiple Apps (code)
  12. Loops (code)
  13. Modifying Requests with BrowserMob (code)
  14. Remote Tests on BrowserStack (code)

Gradle

Tests can be run using the Gradle build script. To launch a test, run the following command:

 ./gradlew clean run -DappURLOverride=https://bodgeit.herokuapp.com -DtestSource=https://raw.githubusercontent.com/mcasperson/IridiumApplicationTesting/master/examples/14.securitytest/test.feature -DtestDestination=FIREFOX

See the System Property Reference chapter for details on the system properties being passed to the Gradle run command.

JAR File

You can download a compiled JAR file from https://github.com/mcasperson/IridiumApplicationTesting/releases/latest.

Tests can be run from a local copy of the Iridium UberJar. To launch a test, run the followig command:

 java -DappURLOverride=https://bodgeit.herokuapp.com -DtestSource=https://raw.githubusercontent.com/mcasperson/IridiumApplicationTesting/master/examples/14.securitytest/test.feature -DtestDestination=FIREFOX -jar IridiumApplicationTesting.jar

See the System Property Reference chapter for details on the system properties being passed to the JAR file.

Java 9 JAR File

In Java 9 you will need to pass the --add-modules=java.se.ee and --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED arguments.

java --add-modules=java.se.ee --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED -DappURLOverride=https://bodgeit.herokuapp.com -DtestSource=https://raw.githubusercontent.com/mcasperson/IridiumApplicationTesting/master/examples/14.securitytest/test.feature -DtestDestination=FIREFOX -jar IridiumApplicationTesting.jar

Web Start Template

The following XML can be used as a basic template for launching Iridium using Java Web Start. Typically you'll only need to change the value assigned to the javaws.testSource property to point to the location of your Cucumber test script.

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="https://s3.amazonaws.com/iridium-release">
    <information>
      <title>Iridium</title>
      <vendor>Auto and General</vendor>
    </information>
    <resources>
      <j2se version="1.8"
        href="http://java.sun.com/products/autodl/j2se"/>
      <j2se version="1.9+"
        href="http://java.sun.com/products/autodl/j2se"
        java-vm-args="--add-modules=java.se.ee --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"/>
      <property name="jnlp.packEnabled" value="false"/>
      <property name="javaws.testSource" value="C:\tests\mytest.feature"/>
      <property name="javaws.testDestination" value="Chrome"/>
      <property name="javaws.openReportFile" value="true"/>
      <property name="javaws.saveReportsInHomeDir" value="true"/>
      <jar href="IridiumApplicationTesting.jar" main="true" />
    </resources>
    <application-desc
        name="Web Application tester"
        main-class="au.com.agic.apptesting.Main">
    </application-desc>
    <update check="timeout" policy="always"/>
    <security>
        <all-permissions/>
    </security>
</jnlp>
Important
ZAP currently has issues running under Java 9. See this GitHub issue for more information.
Clone this wiki locally