Introduction Behavior testing simply means that we should test how an application behaves in certain situations. Often the behavior is given to us developers by our customers. They describe the functionality of an application, and we write code to meet their specifications. Behavioral tests are a tool to formalize their requirements into tests. This leads […]
Category: Software Engineering
Testing Ansible Roles on Multiple Operating Systems with Docker and Semaphore
Introduction In a previous article, we wrote about testing Ansible roles directly against Semaphore. This is great when you are targeting the same operating system as your continuous integration server, but what to do if you you need to target other operating systems as well? This is where Docker comes into play. Docker allows you […]
Diamond Kata – TDD with only Property-Based Tests
The Diamond Kata is a simple exercise that Seb Rose described in a blog post on recycling tests in TDD. Seb describes the Diamond Kata as: Given a letter, print a diamond starting with ‘A’ with the supplied letter at the widest point. For example: print-diamond ‘C’ prints A B B C C B B […]
Test-Driving Ember.js Models
Introduction Being a developer, you probably own a lot of computer books. In this post, we’ll get started by building an application to store our books. We’ll create a new application using Ember.js CLI and use TDD to fully test our application. We’re going to be building a simplified version of the application DevBookcase. While […]
A Hands-On Introduction to ScalaTest
Introduction You have to eat your vegetables to grow and become stronger, ‘cause one day you’ll have to program in Scala – moms always say. We don’t pay too much attention to what they’re saying until we have to face the challenge. When you have no background in Java, programming in Scala can be easier. […]
Fine-Grained Control Over Chat Notifications
You can now choose to be notified only after failed builds and deploys, reducing noise in your channels, rooms, and inboxes when continuous delivery…
How to Add Integration Tests to a Play Framework Application Using Scala
Introduction While unit tests usually make up the core of an application’s tests, integration tests are often just as important. An integration test is named as such because it integrates with some other piece of technology. In this tutorial, you will learn how to integrate a Play Framework web application with an HTTP server to […]
Testing Ansible Roles with Semaphore
Introduction If you are even slightly familiar with configuration management, you have probably heard of Ansible before. In short, Ansible is a configuration management tool that allows you to manage nodes over SSH or PowerShell written in Python. Ansible then uses YAML to express reusable descriptions of systems. The most simplistic usage is sending ad-hoc […]
Writing One-Liner RSpec Tests in Rails with Shoulda-Matchers
Introduction Shoulda Matchers provides Test::Unit and RSpec-compatible one-liners that test common Rails functionality. It helps you write tests that would otherwise be much longer, more complex, and error-prone. Using shoulda-matchers for testing simplifies the entire process. Let’s take a look at shoulda-matchers in action, compared to its RSpec-only equivalent. One-Liner ActiveModel Tests Below is an […]
Getting Started with BDD in Laravel
Introduction For many developers BDD is a complicated subject, and getting started with it the right way often does not come easy – especially when you need to implement it into an existing framework. This tutorial aims to help you get a BDD-powered Laravel project up and running in very little time, introducing you to […]
Video Tutorial – Continuous Integration and Deployment for Elixir
In May we had the pleasure of releasing official continuous integration and deployment support for Elixir projects on Semaphore. We wanted to get to know the Elixir community better, so we started talking to developers working with Elixir. We have had the pleasure of working with Josh Adams from Elixir Sips, who has made two […]
Introduction to Writing Acceptance Tests with Cucumber
Introduction In this article, we’re going to look at Cucumber as a tool for writing your customer acceptance tests. More specifically, we’re going to look at how a Cucumber acceptance test might look in practice. After reading this article, you should have a clearer picture of why Cucumber is a good candidate for writing your […]
How to Use Custom RSpec Matchers to Specify Behaviour
Introduction Test code needs to be both run by computers and read by humans. It therefore needs to be well-factored and use the domain language. At the end of this tutorial, you will have seen how you can use use RSpec‘s custom matchers to write better tests that are DRY, quick to write and easy […]
How to Set Up a Clojure Environment with Ansible
Introduction In this tutorial, we will walk through the process of setting up a local environment for Clojure development using the Ansible configuration management tool. Ansible and Clojure are a perfect fit, as both place an emphasis on simplicity and building with small, focused components. While we will not cover the Clojure development process specifically, […]
How to Use Capistrano to Deploy a Rails Application to a Puma Server
Introduction Deploying a Ruby on Rails application involves a number of steps, such as copying source code files, running database migrations, pre or post-compiling assets and restarting the web server. Our goal as developer should be to automate this procedure down to a single command we can run at any time. There are tools that […]