Blog about testing & tech articles
subscribe via RSS
Blog articles | Continuous Integration | Tech tips
-
How to run Cypress parallel tests on Codefresh CI server
When you work with end to end tests in Cypress you may notice they quickly get time-consuming for running the whole test suite. The more complex the project the more test cases you may end up with and this can take a long time to run - dozens of minutes or even hours.
-
How to use Codefresh CI parallel steps to run RSpec a few times faster for Rails project
Codefresh.io seems to be a very nice CI solution to work with if you are a Ruby developer. I’ve tested one of my projects on Codefresh to see how it allows running fast tests. Codefresh has a matrix feature that lets you run parallel steps for the CI build. In this article, you will see how to leverage Codefresh matrix configuration and Knapsack Pro client library for testing in parallel your Ruby on Rails project with RSpec test suite.
-
GitHub Actions CI config for Ruby on Rails project with MySQL, Redis, Elasticsearch - how to run parallel tests
You will learn how to configure Ruby on Rails project on GitHub Actions. This specific Rails project has MySQL and Redis database. There is also Elasticsearch service running on CI. If your project is close to that setup below GitHub Actions yaml configuration will allow you to run tests on GitHub CI server.
-
How to run RSpec on GitHub Actions for Ruby on Rails app using parallel jobs
GitHub introduced their own CI server solution called GitHub Actions. You will learn how to set up your Ruby on Rails application on GitHub Actions with YAML config file. To run your RSpec test suite faster you will configure parallel jobs with matrix strategy on GitHub Actions.
-
How to run parallel jobs for RSpec tests on GitLab CI Pipeline and speed up Ruby & JavaScript testing
GitLab CI allows you to run tests much faster thanks to CI parallelisation feature. You can run parallel jobs across multiple GitLab Runners. In order to do it, you will learn how to split tests in a dynamic way across parallel tasks to ensure there is no bottleneck in GitLab Pipeline. Thanks to that CI build can be run as fast as possible so your Ruby & JS tests can be finely fast.
-
Cucumber testing with Jenkins parallel pipeline to get down CI build time
Cucumber is a popular automation testing tool for Behaviour-Driven Development (BDD) but when you use it for some time in your work project then the amount of automated tests adds up and you can spend dozens of minutes to run your Cucumber test suite. Sometimes complex projects can have a few hours of execution time for the Cucumber tests. To save time and speed up your Cucumber builds on CI (Continuous Integration) you can use CI parallelization. In this article, you will see how to do it for Jenkins using Jenkins parallel pipeline.
-
Cypress parallel testing with Jenkins Pipeline stages
In this tutorial for JavaScript end to end testing, you will learn about Cypress test runner for UI automation testing and how to use it with Jenkins CI server. Cypress helps with frontend automation testing using headless browser or just regular browser. E2E tests often take a long time to run and for bigger projects, those type of tests can take dozens of minutes or even hours. To save developers time you want to load balancing Cypress tests across Jenkins parallel pipeline stages. Thanks to that you can run your 1-hour test suite in a few minutes.
-
Split RSpec tests with Jenkins Parallel Pipeline to run specs faster
Jenkins CI server has a declarative pipeline that allows you to set Jenkins parallel stages. You can use the stages to run them at the same time (parallel run) to execute your RSpec test suite in a few smaller faster chunks instead of one long test suite run.
-
How to run tests faster on Heroku CI with parallel dynos
Heroku provides a CI solution out of the box for teams. Heroku CI can run tests in dyno instance for your project. What is more interesting you can run parallel dynos as part of your CI build. This allows you to split tests on parallel dynos to complete CI build faster and save time.
-
CodeClimate and CircleCI 2.0 parallel builds config for RSpec with SimpleCov and JUnit formatter
How to merge CodeClimate reports for your RSpec test suite executed with parallel builds on CircleCI 2.0? You will learn how to run RSpec parallel tests for your for Ruby on Rails project using CircleCI and how to send test coverage merged from parallel jobs into CodeClimate. We will cover config examples for:
-
How to merge CodeClimate reports for parallel jobs (CI nodes)
If you run tests on parallel jobs (using CI parallelisation) you need to merge CodeClimate reports from each parallel job (CI node) into a unified report.
-
Run parallel jobs on Semaphore CI 2.0 to get faster CI build time
Semaphore CI 2.0 allows configuring your CI build task with parallel jobs. This way you can run simultaneously a few different commands that do not depend on each other. But we could also use parallel jobs to split your test suite across a few jobs and this way save time. I will show you how to speed up your CI build for Ruby or JavaScript project (Rails / Node project).
-
Handle invalid JSON payload in Rails 5+ API. Catch JSON parse error
When someone post invalid JSON payload to your Ruby on Rails URL endpoint then Rails crashes with 500 error. We could render nice message instead of the error. For instance if you have public API you may want to show reason of the error to explain to your API client why the request failed.
-
Jenkins Pipeline how to run parallel tests in your workflow stages
Jenkins Pipeline is a suite of plugins that allows creating simple-to-complex build stages for your testing environment on CI. We can use Jenkins Pipeline to run a few stages at the same time and thanks to that parallelize test suite across a few stages to complete tests faster.
-
How to run CodeShip Parallel Test Pipelines efficiently - optimal CI parallelization
When you use CodeShip as your CI server you can significantly increase the speed of your CI builds with Parallel Test Pipelines. Pipelines allow you to run multiple commands at the same time, for instance, you can split test suite across a few pipelines and complete the CI build much faster.
-
CircleCI 2.0 cache Ruby gems or npm dependencies
CircleCI 2.0 allows us to cache specific files or folders. We can use that to cache ruby gems installed with bundler and restore them when we will run another CI build. This way new CI build could run faster by using cached files from the previous build. This article shows you how to cache npm dependencies as well.
-
How to run parallel dynos on Heroku CI to complete tests faster
Heroku provides a CI solution out of the box for teams. They can run tests in dyno instance for your project. What’s more interesting you can run parallel dynos as part of your CI build. This allows you to split tests on parallel dynos to complete CI build faster and save time.
-
How to run Travis CI parallel jobs with build matrix feature fast
Travis CI allows you to run multiple jobs as part of the same CI build. They even allow for up to 200 parallel jobs for open source projects (the same for private repositories). You can leverage that using Travis build matrix feature to run your project way faster by splitting tests into many smaller jobs that will run a subset of your test suite.
-
Improve CircleCI parallelisation for RSpec, Minitest, Cypress
Maybe you use CircleCI parallelisation to run your test suite across multiple CI nodes but you noticed that some CI nodes take more time to complete tests than the others.
-
Run javascript E2E tests faster with Cypress on parallel CI nodes
Cypress test runner is a great alternative to Selenium in end-to-end testing space. When it comes to E2E tests they tend to grow with time and running them is slow and becomes time waisting or just coffee break for developers. ;)
-
Clean RSpec configuration directory structure for Ruby on Rails gems needed in testing
When your Ruby on Rails project is getting bigger your test suite as well. You need to test more of your business logic and sometimes you will use other gems that can help you with that. Most of the time you may need something like
database_cleaner
,capybara
for feature tests orrspec-sidekiq
to test your workers. -
How to run tests in Minitest continuously with dynamic test files loading
Recently I’ve been looking into the source code of Minitest to find out if I can run some tests and then dynamically run another set of tests once the previous run is done. This would allow me to provide dynamically a list of tests to execute on my parallel CI nodes to run CI builds faster.
-
How to export test suite timing data from Knapsack Pro API
Knapsack Pro tracks your CI builds and how long each test files took to run on one of parallel CI nodes. Thanks to that Knapsack Pro can prepare the optimal test suite split for your future test suite runs on your CI provider.
-
CircleCI 2.0 Capybara feature specs - Selenium webdriver with Chrome headless
I’ve been using Capybara-WebKit for a long time but while switching from CircleCI 1.0 to CircleCI 2.0 I had some problems to use it on the CI.
-
When distributed locks might be helpful in Ruby on Rails application
During this year I noticed 2 similar concurrency problems with my Ruby on Rails application and I solved them with distributed locks. I’m going to show you how to detect if your application might have a concurrency problem and how to solve it.
-
Auto balancing 7 hours tests between 100 parallel jobs on CI - Buildkite example
I like tests. You may like them too because thanks to them you are not afraid to change the code. Tests can help you catch errors earlier. I like tests, even more, when they are fast.
-
Welcome to KnapsackPro.com Documentation!
If you want to help with this documentation you may want to take a look at the repository