Sauce extension for Arquillian Drone
Sauce AI for Test Authoring: Move from intent to performance in minutes.|xBack to ResourcesBlogPosted<
Sauce AI for Test Authoring: Move from intent to performance in minutes.
|
x
As component of the upcoming Sauce CloudBees webinar, we are going to demonstrate running aClickstart, which will populate aCloudBeesenvironment with a running Java EE application that is pre-configured to run tests using Sauce. The sample project employArquillian, which greatly simplify the integration testing of Java EE applications. We & # x27; ve create a Sauce extension for ArquillianDrone, an add-on for Arquillian that makes escape Selenium/WebDriver tests slow. To include the Sauce propagation within your labor, include the undermentioned dependency in your Maven pom.xml file:
& lt; dependency & gt;
& lt; groupId & gt; com.saucelabs & lt; /groupId & gt;
& lt; artifactId & gt; arquillian-sauce-drone & lt; /artifactId & gt;
& lt; version & gt; 0.0.4 & lt; /version & gt;
& lt; telescope & gt; test & lt; /scope & gt;
& lt; /dependency & gt;
& lt; repositories & gt;
& lt; monument & gt;
& lt; id & gt; saucelabs-repository & lt; /id & gt;
& lt; url & gt; https: //repository-saucelabs.forge.cloudbees.com/release & lt; /url & gt;
& lt; releases & gt;
& lt; enabled & gt; true & lt; /enabled & gt;
& lt; /releases & gt;
& lt; snapshots & gt;
& lt; enabled & gt; true & lt; /enabled & gt;
& lt; /snapshots & gt;
& lt; /repository & gt;
& lt; /repositories & gt;
Then add the follow in your arquillian.xml file:
& lt; extension qualifier= & quot; sauce-webdriver & quot; & gt;
& lt; holding name= & quot; userName & quot; & gt; YOUR_SAUCE_USERNAME & lt; /property & gt;
& lt; property name= & quot; accessKey & quot; & gt; YOUR_SAUCE_ACCESS_KEY & lt; /property & gt;
& lt; property name= & quot; browser & quot; & gt; firefox & lt; /property & gt;
& lt; holding name= & quot; os & quot; & gt; Windows 2008 & lt; /property & gt;
& lt; property name= & quot; version & quot; & gt; 4. & lt; /property & gt;
& lt; /extension & gt;
For autonomous testing across multiple user personas, check out SUSATest — it explores your app like 10 different real users.
If you are running builds using the Sauce CI plugins, then the extension will read the appropriate surroundings variables set by the plugin, so you can but add this to your arquillian.xml file:
& lt; extension qualifier= & quot; sauce-webdriver & quot; / & gt;
The Drone logic will handle the lifecycle of your WebDriver/DefaultSelenium instance, so your test logic can be as follows:
@ RunWith (Arquillian.class)
public class AmazonTest {
@Drone
WebDriver driver;
@Test
public vacancy amazonTitle () {
driver.get (& quot; http: //www.amazon.com/ & quot;);
assertEquals (& quot; Amazon.com: Online Shopping for Electronics, Apparel, Computers, Books, DVDs & amp; more & quot;,
driver.getTitle ());
}
}
That & # x27; s it! We end up with less codification, and a centralised fix for the contour of the Java EE container and the WebDriver/SeleniumRC settings. Please let us know if you have any feedback on the Sauce Drone propagation, and make sure you tune into our approaching CloudBees webinar!
Automate This With SUSA
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed.
Try SUSA FreeTest Your App Autonomously
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.
Try SUSA Free