Introduction Mocking is simply the act of replacing the part of the application you are testing with a dummy version of that part called a mock. Instead of calling the actual implementation, you would call the mock, and then make assertions about what you expect to happen. What are the benefits of mocking? Increased speed […]
Category Software Engineering
Making a Mailing Microservice with Elixir and RabbitMQ
At Rendered Text, we like to decompose our applications into microservices. These days, when we have an idea, we think of its implementation as a composition of multiple small, self-sustaining services, rather than an addition to a big monolith. In a recent Semaphore product experiment, we wanted to create a service that gathers information from […]
What is Proper Continuous Integration?
Continuous integration (CI) is confusing. As with all ideas, everybody does their own version of it in practice. CI is a solution to the problems we face while writing, testing and delivering software to end users. Its core promise is reliability.
Testing Routes in Angular 2
Introduction Routes provide benefits to the users of our applications. While routes are not necessary in all applications, they make applications shine a little brighter. Having routes in your application gives users the ability to return to a specific point in your application just by typing in a URL. Testing routes comes with some interesting […]
End-to-end Testing in Elixir with Hound
Introduction Testing is one of the ways to ensure the quality of our application, and it comes in many forms. The best known and the most popular among developers is unit testing. However, depending on what, how, and when we are testing, there are other options, e.g. integration, regression, load, acceptance testing, system, end- to-end, […]
Stubbing the AWS SDK
Originaly published on https://devops.college. Republished with author’s permission. If you’re reading this, dear Devop, you can probably remember a time before you were a Devop, or a Site Reliability Engineer, or whatever. Back to a time when you were a Systems Administrator, or a Unix Technician, or an Infrastructure Engineer; when your job involved switch […]
Testing Topologies in Kafka Streams
Post originally published on https://www.madewithtea.com. Republished with author’s permission. TLDR: Kafka Streams is a deployment-agnostic stream processing library written in Java. Even though Kafka has a great test coverage, there is no helper code for writing unit-tests for your own Kafka Streams topologies. I wrote a little helper library Mocked Streams in Scala, which allows […]
Continuous Deployment with Google Container Engine and Kubernetes
Introduction This tutorial will show you how to deploy a sample microservices application to Kubernetes and set up continuous deployment using SemaphoreCI. It includes a crash introduction to Kubernetes, Google Container Engine, and building an automated deploy process. Kubernetes, or “k8s” for short, is an orchestration tool for container native applications. Note that Kubernetes is […]
Testing React Components with AVA
Introduction This is the third tutorial in our series on testing a React and Redux application with AVA. In this tutorial, we will build the actual UI for our todo application using React. We’ll connect our React components to the Redux store, test them using AVA and Airbnb’s Enzyme, and see how React makes it […]
Integration Testing Phoenix with Wallaby
Post originally published on https://hashrocket.com. Republished with author’s permission. Let’s write an integration test for Phoenix using Wallaby. Integration tests are used for behavior description and feature delivery. From the test-writer’s perspective, they are often seen as a capstone, or, to the outside-in school, an initial 10,000-foot description of the landscape. At Hashrocket we’ve been […]
Integration Testing Ruby on Rails with Minitest and Capybara
Introduction In this tutorial, we’ll cover how to do integration tests in Rails using Minitest and Capybara. We’ll also cover how integration tests can sometimes serve as a replacement for controller tests. Prerequisites To follow this tutorial, you’ll need to have Ruby installed along with Rails. This tutorial was tested using Ruby version 2.3.3, Rails […]
Snapshot Testing React Components with Jest
Introduction Testing is a double-edged sword. On one hand, having a solid test suite makes code easier to refactor, and gives confidence that it works the way it should. On the other hand, tests must be written and maintained. They have a cost, like any other code. In a magical world, we could write our […]
Keeping Logs Available When Rebuilding a Build
Flaky tests can be hard to track down. When you are working on a new feature, your builds can fail because of one or a few unrelated flaky tests.
Top 10 Semaphore Community Tutorials in 2016
As 2016 is approaching its end, it’s time to look back and see what we’ve accomplished this year. Our team of Semaphore developers, community writers and editors are big on learning new things and sharing knowledge, so we made sure to publish at least one new tutorial or article on BDD, testing tools, automating DevOps […]
Unit Testing Chef Guard Clauses: Command Strings vs. Ruby Blocks
Post originally published on David Pell. Republished with author’s permission. Chef Guards The great thing about the major Chef resources (file, directory, package, etc.) is that they’re idempotent, meaning that they will produce the same effect if executed more than once. Chef takes care of this under the hood. If, however, you find yourself needing […]