Why No Cucumber BDD for Test Automation?
The best part about using Cucumber is that automated tests are written in plain English. ?This makes it easy for everyone, not just programmers and technical testers, to understand what is being tested.
Since all BDD automated tests are written as behavior scenarios, they also serve as living documentations. System stakeholders can review whether acceptance criteria is being met by referring to the Cucumber test results.
Black-Box vs White-Box Testing:?
Cucumber promotes a black-box approach, focusing on user-facing behavior without accessing application internals.?
On the other hand, test automation tools such as Cypress and Playwright excel at white-box testing, allowing manipulation of application state, network, and internals – functionalities limited by Cucumber's black-box nature.
The argument against using Cucumber BDD on top of Cypress and Playwright is that it hinders the advantages of these frameworks.
Behaviour Driven Development (BDD) was introduced to address cross-team collaboration issues. However, Cucumber itself might not be the silver bullet. Instilling more professional discipline is likely a more effective solution.
Note: This article is based on my personal professional experience spanning 2 companies and 3 projects, as well as references to the article: https://filiphric.com/cucumber-in-cypress-a-step-by-step-guide
#Cucumber #BDD #cypress #playwright #testautomation
Software Development Engineer in Test / SDET / API Automation / Selenium WebDriver / Python
9 个月Interesting article. I prefer a BDD tool on top of another tool like Playwright or Selenium for the sake of easy to read gherkins syntax when there’s a failure. BDD is kind of like TDD for QA automation. You write the gherkins syntax first. Then write the test code underlying gherkins to test the pass / fail scenarios. This takes the mystery out of test errors. It democratizes test running so that many stakeholders can execute the tests and understand the test results. What’s your take? Josh Schneider Ben C.