Set Up a Continuous Testing Server to Run Selenium Tests in Minutes

Do it quickly using 100% free and open-source software, no previous CI/CT experience is required

Objectives

  • Install and set up a CT server (BuildWise)
  • Create a CT project for a set of existing test scripts
  • Trigger a test execution of all test scripts with a click of a button
  • See test execution results on CT Server

Prerequisite

  • Git (installer)
  • Chrome browser
  • Ruby
    Download RubyInstaller for Windows with Devkit, such as ‘Ruby+Devkit 2.6.6–2 (x64)’. The DevKit is required for compiling certain libraries (called Gem in Ruby).
    Run the installer after it completes (don’t forget the DevKit setup part). You can find a tutorial video (45s) here.
    Run the command below in a new command window:
> gem install bundler --no-document

Install BuildWise CT Server

The Continuous Testing server we will use is BuildWise, a free and open-source CT server created by me (BuildWise won the 2nd prize of the Ruby Award in 2018). You may use it freely for the job, your clients, and your own projects.

> cd buildwise-1.8.9 
* Listening on tcp://0.0.0.0:3618 
Use Ctrl-C to stop

Create a Build Project

BuildWise uses the concept of ‘Project’ to confine the settings and build activities on how you execute tests. A quick way to create a project in BuildWise is to provide a name (for displaying), an identifier, and a local working folder that contains test scripts. To make it easy for beginners, BuildWise includes a set of sample project configurations (with code hosted on Github) for different test frameworks.

> cd c:\work 
> git clone https://github.com/testwisely/agiletravel-ui-tests.git
> cd c:\work\agiletravel-ui-tests\selenium-webdriver-rspec 
> install-lib.cmd
> rspec spec\01_login_spec.rb
..Finished in 9.37 seconds (files took 0.4117 seconds to load) 
2 examples, 0 failures

Trigger test execution

To start a build (for our purpose, ‘Build’ means executing a suite of automated functional tests), click the ‘Build Now’ button.

Feedback while test execution in progress

If the build page is not shown already, click a build label (such as ‘1:building’) to show details of test execution in this build:

Build finished

When a test execution completes, you will get the full test results shown on BuildWise. One out of six automated test cases failed in this build (this test failure was intentional).

First failed build
Your first green build
  • dynamic (and intelligent) execution ordering
  • auto-retry
  • manual-retry
  • parallel testing lab
  • set up executing tests in other frameworks such as Mocha, PyTest, and Cucumber

Award-winning software developer, test automation & CT coach, author, and speaker. Help teams succeed with Agile/DevOps by implementing real Continuous Testing.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store