Introducing Selenified

This article announces Selenified, the rebranded evolution of the SecureCI Testing Framework, and summarizes key updates, additions, and fixes. It also provides quick-start dependency and sample test guidance for integrating the framework into modern build pipelines.

Coveros Staff

July 13, 2017

Selenified is the re-branded, updated, and patched software version of the software previously called the SecureCI™ Testing Framework.

The 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 in parallel. It can be a great starting point for building or improving test automation in your organization.

What’s New

Updates

  • Simplified test setup and completion
  • HtmlUnit capabilities customized to provide increased javascript support
  • Included CSS as locator type
  • Reworked and renamed classes SeleniumHelper and TestOutput to decrease complexity

Additions

  • WebDriver Manager included to simplify machine setup
  • Dependency support with Maven, Gradle, and Ant/Ivy
  • Window and Tab manipulation capabilities
  • Simple POM support
  • Increased Mac OS support
  • Simple cloud capabilities (Selenium Grid, Sauce Labs)
  • Capability to launch browser without initially loading a page
  • Additional browser capabilities can be set before running tests
  • Desired browser to test on can be specified with Version, OS, Device and Orientation
  • Ability to loop test runs over multiple browsers

Bug Fixes

  • Threading for never-end tests fixed
  • Table interactions and verifications
  • Page scroll and move interactions
  • Long filenames fixed for Windows systems

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.0</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.0"/>
 </dependencies>
</ivy-module>
Gradle
Update your build.gradle file to include
dependencies {
 testCompile 'com.coveros:selenified:2.0.0'
}
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 command line, or any way you normally would.
Want to see more details, checkout the README
Coveros Staff

Coveros Staff

This post represents the collective insights of the Coveros team. Our staff consists of software experts who bring deep experience in secure agile development, DevOps, testing, and software quality. Over the past 20 years, Coveros has trained more than 30,000 professionals and worked with half of the Fortune 100 companies on mission-critical software development challenges. We draw on this extensive experience to share practical insights, proven strategies, and real-world solutions that help organizations build better software faster and more securely.