All posts tagged with 'testing'

View specs: rendering templates that are nested within a view component
FreeAgent makes use of the RSpec and ViewComponent frameworks for unit testing and reusable front-end components respectively. Since FreeAgent is a Ruby on Rails application, we’ll often want to write unit tests for our Rails view templates, using RSpec, i.e., a view spec. When rendering our reusable view components in our view templates, especially complex ones, testing can get a bit confusing, especially if the template is dependent on being… Continue reading

The Other Copilot: Coding with AI
It seems Copilots are ten a penny these days. While our CoPilot accountant partners are a human way to support you using FreeAgent, the flight term has really taken off(!) as branding for AI tools, GitHub’s Copilot being just one of them. The rise of AI tooling for developers has sparked a lot of discussion and controversy as of late. It’s also seen rapid development and innovation, with several code… Continue reading

Factories: don’t stop production!
Why this post? Have you ever come across a situation where you need to write a test that uses some model objects, but found that those have endless dependencies on the existence of other objects, from the same model or otherwise? Have you ever come across a test where you only care about a specific attribute of a model object, but you find yourself having to populate every single one… Continue reading

So you’re going to be an intern
After months of nerves, interviews and one too many LeetCode questions, you’ve done it. You’ve landed an internship, you’re free from the dread of a long, empty summer and your brain is filled with vague notions of what your internship might be like. I’m here to gather up your brain clay and sculpt it into solid ideas of what things will be like. Before we start, it needs to be… Continue reading

Timecop vs Rails TimeHelpers
TL;DR - You probably can’t replace Timecop with Rails' built in TimeHelpers, as TimeHelpers only recreates Timecop’s freeze method, and can’t handle nested travelling. Timecop is the go-to gem for testing time-dependent code, as it allows you to manipulate the current time during test runs. This is important because without control over the time, flakey tests can emerge in your codebase. A very simple example is testing the created_at attribute… Continue reading

The Mobile Apps and the Tester
The replatforming of our hybrid mobile app to separate iOS and Android native apps was already well under way when I arrived at FreeAgent as a test engineer for the mobile team. Since then we have carved out processes that the whole team can contribute to, giving us confidence that for each release our apps are in good shape. Here are a few things we are doing to ensure this.… Continue reading

Testing Child Processes in Ruby
I was recently writing a piece of code that we wanted to act as a supervisor of child processes. We wanted to ask this supervisor the following “Hello there, would you mind running this task in a child process? Thanks!”. From here the supervisor would create a process, keep track of it so we can stop it if necessary, and run the given piece of code in it. This supervisor… Continue reading

Switching to Feature Testing with Headless Chrome
At FreeAgent, we run 45,000 tests on every code change to make sure that our rails monolith continues to work as expected. These include unit, integration, and acceptance tests. Recently, we switched from Capybara-webkit to Headless Chrome with Selenium for running JavaScript and acceptance tests. Why did we switch? Capybara-webkit has now been deprecated and uses an old version of webkit engine, so we had to look for alternatives. We… Continue reading
Shaving yaks – problem solving in Dev Platform
Although I usually work in Support Engineering here at FreeAgent, I was recently given the opportunity to spend a six-week cycle working in the Dev Platform team. The technical aspect of the Support Engineer role is what drives me; I love to take a problem, dig into the source code and figure out how to solve it. The work in Dev Platform promised to be even more technical so I… Continue reading
FreeAgent Testermonials: Getting rid of ‘QA’ and why what we call things matters
In this Testermonial post, FreeAgent's resident test engineer describes why we've rebranded 'QA' and why what we call things matters. As mentioned in my previous Testermonial, my only gripe when starting at FreeAgent — and a very minor one at that — was the rather entrenched use of the term quality assurance or QA in the development and release process to describe the pre-release testing phase which occurs before deploying… Continue reading