Selenified

An Open Source Test Automation Framework

The Selenified Test Framework provides mechanisms for simply testing applications at multiple tiers while easily integrating into DevOps build environments. Selenified provides traceable reporting for both web and API testing, wraps and extends Selenium calls to more appropriately handle testing errors, and supports testing over multiple browsers locally, or in the cloud (Selenium Grid or SauceLabs) in parallel. It can be a great starting point for building or improving test automation in your organization.

What Makes Selenified Unique

  • Provides Java based framework for testing at web and API level
  • Produces detailed traceable reporting with screenshots
  • Wraps Selenium calls to more appropriately handle missing or slow to load page elements
  • Supports simply running multiple tests over different browsers in parallel
    • On local browsers
    • Through Selenium Grid
    • Via SauceLabs connect
  • Built on top of TestNG
  • Allows running tests through proxy server
  • Supported on major build tools
    • Maven
    • Gradle
    • Ant/Ivy

Overview of Selenfied framework

Getting Started

It’s very simple to get started using Selenified. Just add selenified.jar to your project, and you can start writing your test cases. If you’re using a build tool, simply add the jar as a dependency.

Maven

Update your pom.xml file to include

<dependency>
 <groupId>com.coveros</groupId>
 <artifactId>selenified</artifactId>
 <version>2.0.2</version>
 <scope>test</scope>
</dependency>

Ant

Update your ivy.xml file to include

<ivy-module>
 <dependencies>
 <dependency org="com.coveros" name="selenified" rev="2.0.2"/>
 </dependencies>
</ivy-module>

Gradle

Update your build.gradle file to include

dependencies {
 testCompile 'com.coveros:selenified:2.0.2'
}

Writing Your First Test

It’s pretty quick to get into. Create a new class, which will serve as your first test suite. Import your required Selenified dependencies, and ensure your class extends Selenified’s TestBase

package sample.tests

import org.testng.annotations.Test;
import com.coveros.selenified.output.Assert;
import com.coveros.selenified.selenium.Action;
import com.coveros.selenified.selenium.Selenium.Locator;
import com.coveros.selenified.tools.TestBase;

public class SampleTests extends TestBase {
}

We’re now ready to write our first test

@Test(groups = { "sample", "virtual" }, description = "A sample test")
public void sampleTest() throws IOException {
    // use this object to manipulate the page
    Action actions = this.actions.get();
    // use this object to verify the page looks as expected
    Assert asserts = this.asserts.get();
    // perform some actions
    actions.select(Locator.ID, "car_list", "Saab");
    // perform the verification
    asserts.compareSelectedValue(Locator.ID, "car_list", "Saab");
    // finalize the test
    finish();
}

That’s all there is to it. You can kick off your tests from your IDE, the commandline, or any way you normally would.

Want to see more details? Check out the README file.

X