-
Notifications
You must be signed in to change notification settings - Fork 3
Launching
Iridium can be run multiple different ways. Which method you choose depends on your use case.
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.
- Security Testing (code)
- Fragments (code)
- Simple Steps (code)
- PhantomJS (code)
- Modify Requests (code)
- Passive ZAP security scan (code)
- Gherkin Examples (code)
- Verifying classes and text (code)
- Finding Dead Links (code)
- Acceptance Tests (code)
- 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.
- Open Application (code)
- Using Aliases (code)
- Address Capture (code)
- URL Mappings (code)
- Data Set Collections (code)
- Parallel Tests (code)
- Tags (code)
- Configuration Tags (code)
- Multiple Environments: First and Second (code)
- Multiple Brands (code)
- Multiple Apps (code)
- Loops (code)
- Modifying Requests with BrowserMob (code)
- Remote Tests on BrowserStack (code)
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.
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.
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
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. |