Skip to content

Modus-Logo-Long-BlackCreated with Sketch.

  • Services
  • Work
  • Blog
  • Resources

    OUR RESOURCES

    Innovation Podcast

    Explore transformative innovation with industry leaders.

    Guides & Playbooks

    Implement leading digital innovation with our strategic guides.

    Practical guide to building an effective AI strategy
  • Who we are

    Our story

    Learn about our values, vision, and commitment to client success.

    Open Source

    Discover how we contribute to and benefit from the global open source ecosystem.

    Careers

    Join our dynamic team and shape the future of digital transformation.

    How we built our unique culture
  • Let's talk
  • EN
  • FR

Automated testing with Cucumber and Watir-Webdriver

Published on November 12, 2015
Last Updated on December 4, 2022
Application Development, DevOps, Quality Assurance

At Modus Create, we heavily rely on test automation tools to run regression tests and make our client’s products better. We use a mixture of open source tools such as cucumber, selenium webdriver, watirwebdriver, jmeter and protractor.

For the last couple of years we have been using cucumber and watir-webdriver to build robust test automation suites. We believe that contributing to the open source community is vitally important, so we made the test harness public to benefit the community.

https://github.com/ModusCreateOrg/cucumber-watir

Implementing this test suite is very easy. To get started, clone the repo and follow steps in the readme file to install all the dependencies. On Linux or Mac OS X, this is a pretty simple matter. On Windows, it can be more challenging, so we have assembled a set of precompiled and preassembled binaries that can make this easier. Then run the rake all command to run all tests.

We also have a detailed post on how to integrate this in Jenkins.

To add new tests, follow along with this screencast:

Automation Testing with Cucumber & Watir-Webdriver from Modus Create on Vimeo.

Steps to add a new feature file

Create a new file under the feature folder named search.feature and copy the following code:

Feature: Search
  In order to make sure that the search feature is working
  As a user I will search for a search term and expect to see valid results

@desktop
Scenario: search for modus create
  Given I am on the duckduckgo home page
  Then I must see the page title "DuckDuckGo"
  Given I fill in the text field "q" with "Modus Create"
  And I click the "S" button
  Then I must see the page title "Modus Create at DuckDuckGo"

Add the URL to the urls.rb file just before the else statement:

when /the duckduckgo home page/i
       base_url="http://duckduckgo.com"

Run the new test:

cucumber features/search.feature

The big benefit of starting with this cucumber test suite is that you don’t have to create all of the features and step definitions from scratch; the set of built-in features and step definitions are inspired by real-world tests from projects that we have completed over the course of several years. By adapting these steps you can reduce the effort needed when testing user-interface heavy projects.

We would love to help you build a full suite of regression tests using this test harness. We also have other useful tools located at tweag.io (our OPSO). Give this a whirl and let us know what you think!

Ensure your software is secure, reliable, and ready to scale—explore our expert testing and QA services today!

Posted in Application Development, DevOps, Quality Assurance
Share this

Bharath Khambadkone

Bharath Khambadkone loves to automate and break systems by writing automated functional and performance tests. His favourite test frameworks/tools are cucumber, watir-webdriver, selenium, and JMeter. When Bharath is away from the keyboard he loves to spend time with family, hit the links, and aspires to be a Champions Tour Player. During his time with Modus Create, Bharath was a Sr. QA/DevOps Engineer.
Follow

Related Posts

  • End-to-end Tests Using Watir Webdriver
    End-to-end Tests Using Watir Webdriver

    Functional automated testing tools have come a long way since the days of winrunner, quick…

  • Jmeter for Performance Testing
    Jmeter for Performance Testing

    We all agree how important functional automated testing is, however not many applications go through…

Want more insights to fuel your innovation efforts?

Sign up to receive our monthly newsletter and exclusive content about digital transformation and product development.

What we do

Our services
AI and data
Product development
Design and UX
IT modernization
Platform and MLOps
Developer experience
Security

Our partners
Atlassian
AWS
GitHub
Other partners

Who we are

Our story
Careers
Open source

Our work

Our case studies

Our resources

Blog
Innovation podcast
Guides & playbooks

Connect with us

Get monthly insights on AI adoption

© 2025 Modus Create, LLC

Privacy PolicySitemap
Scroll To Top
  • Services
  • Work
  • Blog
  • Resources
    • Innovation Podcast
    • Guides & Playbooks
  • Who we are
    • Our story
    • Careers
  • Let’s talk
  • EN
  • FR