Is Cucumber automation killing your project?
In a recent webinar, Nikolay Advolodkin, the software testing enthusiast, pointed out how using Cucumber without following the BDD process is unworthy. It may actually complicate what is basically hard.
1/ Automation is indeed pretty hard
At the beginning, he mentioned that testing automation is mainly a hard task because:
- there is too much to learn (Selenium, Appium...)
- we need to know how to apply the automation pyramid (Unit, API and E2E testing)
- we need to learn how to use automation tools (Cucumber, Saucelabs, Mocha)
2/ So keep it simple Stupid (KISS)
By making wise decisions concerning:
- making a UI test for a feature rather than a unit test (==> thousands of times slower and drastically inefficient due to maintenance cost)
- the decision to recreate our page object model versus using an existent proven one
- or picking a tool that has excellent reporting for the reporting mechanisms versus picking the right tool for the job
3/ But, what if we ask some questions regarding the use of Cucumber
- Who writes the business specs along with the developer and the BA before starting development (32% Yes VS 68% No)
- Who uses Cucumber? (54% Yes VS 46% No)
- Conclusion: Cucumber is widely used even when not following BDD (Behavior Driven Development)
4/ Now, trying to compare writing code for a login test with Selenium then with Cucumber, he realized:
- Test written with Selenium is readable and easy for anyone to understand
- Running it against a collection of different browsers, browser versions, operating systems and platform is easy
Recreating the same test with Cucumber led to a big file with tons of dependencies. Nikolay spent more than 3h without figuring out how to add parallel test execution using Cucumber.
5/ So here are challenges to overcome with Cucumber
- How to write correct gherkin (manual+automated) with more than 100 rules?
- How to use Regex (manual+automated)?
- How to manage step definition? "A user creates ans account" VS "A user makes an account" or "A user opens an account"
- How to do cross platform parallelization?
Whereas, the only valid challenges should be limited to:
- How to create proper page objects?
- and How to use the automation framework?
6/ Conclusively, Cucumber without BDD is an Anti-pattern, as enunciated from the beginning by its creator
Software Quality engineer | ParisTestConf organizer | ISTQB certified
5 年I'm agreed that cucumber is more efficient in a BDD approach. But a team could practice BDD without using cucumber or even automation checking