addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1linklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

pdx Selenium & Test Automation Users Group Message Board › A WebDriver testing template using Gradle as a build mechanism

A WebDriver testing template using Gradle as a build mechanism

Jon A.
user 61898832
Portland, OR
Post #: 2
For anyone starting out with unit testing using Selenium + JUnit and possibly also using Sikuli, I created a basic starter build.gradle file. If you don't know how to configure Gradle in your build environment you could download the Grails Spring Source Suite , which has Gradle pre-configured.

https://gist.github.c...­

Also, I have been working on a WebDriver testing template. You can see my source code here:

WebDriver Testing Template:
https://github.com/dj...­

I would be really open to any input anyone has on how to improve my code or how to implement any of the features I have in the TODO list within my project.
Jon A.
user 61898832
Portland, OR
Post #: 7
I made more changes to my WebDriver Template project again. If you already looked at it, you might want to take another look.

Finally, I got the whole thing working as a multi-project build. More changes to come in the future. :-)
Jon A.
user 61898832
Portland, OR
Post #: 11
More changes.

I am looking for someone who might want to collaborate on this with me, as the ideas of one person are sometimes not kept in check.

The highlights of this project are:

* A "Fluent Page Object" design pattern.
* Multi-project build configuration using Gradle.
* Parameterized test capability with JUnit 4.11+ .
* Optional native automation control using Sikuli and screenshot matching.
* An uberJar to run tests from a executable .jar file. Also, a .bat file to register .jar files as executable.
* A Windows DOS batch script launcher. Also can launch Gradle GUI.
* Logging using SLF4j.
* Uses SlowLoadableComponent from Selenium.
Jon A.
user 61898832
Portland, OR
Post #: 12
I made some additional improvements, changed the project layout, and other things.
https://github.com/dj...­
Jon A.
user 61898832
Portland, OR
Post #: 14
Another major update to the project. Changed the build layout so that Eclipse "intellisense" would work properly. Each sub-project is now a direct child of the main Eclipse root project. Probably more compatible with IntelliJ IDEA also.

https://github.com/dj...­
Jon A.
user 61898832
Portland, OR
Post #: 15
More exciting changes. I converted the project to using RemoteWebDriver and a localhost JSON Hub server . This is something I learned from An Doan's presentation in January 2013's meeting. I also made it more object oriented and removed the import static calls in favor of extending an abstract utility class by the Tests.

Not sure if I am doing it the right way but I would love criticism if anyone is watching.
Powered by mvnForum

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy