BuildWise CT Server in Docker

Set up a BuildWise Continuous Testing server in a Docker container.

Dockerfile’s Steps

  1. Use Docker’s base image: ruby
    It comes with Debian Linux and Ruby pre-installed.
  2. Download and unzip BuildWise to a specific folder
    In this case, I unzipped BuildWise to /var/www/sinatra.
  3. Install the gems (libraries) required by BuildWise server
    Run bundle install.
  4. Start the BuildWise server
    I am running the server on container port 80.
  5. For demo purposes, I’ve cloned a test project from Github
    Cloned the project to ~/work/projects/buildwise-samples
  6. Start the BuildWise server when the container starts

Build & Run the container

docker build -f Dockerfile . -t "buildwise"; 
docker run -it -d -p 80:80 --name buildwise buildwise

BuildWise Server running in docker

For the use of BuildWise, check out its documentation or the book: Practical Continuous Testing.

Select demo “API Testing (Ruby)”

Complete Dockerfile

FROM ruby
EXPOSE 80/tcp
RUN apt-get update -qq \
&& apt-get install -y build-essential \
&& mkdir -p /var/www/sinatra \
&& curl http://agileway.com.au/sites/testwisely/downloads/buildwise/buildwise-2.1.1.zip --output /var/www/sinatra/buildwise-2.1.1.zip \
&& cd /var/www/sinatra \
&& unzip /var/www/sinatra/buildwise-2.1.1.zip \
&& mkdir -p /var/www/sinatra/shared \
&& echo "abcde12345" > /var/www/sinatra/shared/server.digest \
&& cd /var/www/sinatra \
&& ln -s buildwise-2.1.1 buildwise \
&& cd /var/www/sinatra/buildwise \
&& bundle install \
&& sed -i 's/3618/80/' startup-demo.sh \
&& mkdir -p ~/work/projects \
&& git clone https://github.com/testwisely/buildwise-samples.git ~/work/projects/buildwise-samples
WORKDIR /var/www/sinatra/buildwise
CMD ./startup-demo.sh

Final Considerations

The sample test I used above was an API test. If you want to run functional end-to-end UI tests, then you need to install Chrome and its matching Chromedriver.

--

--

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