Toggling Ruby scenarios in Drone using secrets

TiL how to toggle Ruby scenarios to be run using CI pipeline secrets Scenario In a relatively niche scenario, we have functionality that is being temporarily removed while new code is being developed. While we still want to keep our current scenarios for function X to use them again when it’s reintroduced, if they are left to run in our pipeline, every build will fail until it is reintroduced again....

November 7, 2024 · 4 min · 707 words · Leighton Taylor

TiL: Adding numerous tags to ParallelTests in cucumber elegantly

Trying to run tests in parallel in your CI/CD pipeline is tricky at the best of times, but what if you have tests which should only be run in a certain environment and not as part of the CI build stage? It is fairly simple to just tag a feature file with a unique tag that can then be passed to the bundle exec rake command in the functional-tests step, as an environment variable....

July 2, 2024 · 3 min · 580 words · Tomos Griffiths

Efficient Cucumber Step Regex Matching

TL:DR Avoid using Cucumber Expression if possible. Using the conventional regular expression Cucumber is key to more flexible, reusable and customisable test code. When writing cucumber step definitions, developers and testers often face difficulties capturing parameters in test steps while ensuring that the steps flow smoothly in natural English sentences. Without a good knowledge of general regex, step definitions can appear clunky, even when using Cucumber Expressions to capture step definitions parameters....

June 7, 2023 · 7 min · 1380 words · Choon Meng Yap