10
votes
Screen Play vs Page Object pattern
The key difference is that the screenplay pattern organizes the Page Objects
The Screen Play pattern tries to address the issues, challenges and solutions that you will eventually encounter and ...
9
votes
Accepted
Will writing unit tests block developers from coding?
The TDD cycle is more a development cycle for a developer, to quote James Shore, The Art of Agile, Test-Driven Development chapter:
Programmers new to TDD are often surprised at how small each ...
7
votes
Accepted
Screen Play vs Page Object pattern
At the UK Selenium Conference, there was a presentation on the Screen Play pattern, see The Screenplay Pattern - a SOLID alternative to Page Objects | Antony Marcano
We have a huge technology ...
5
votes
Will writing unit tests block developers from coding?
I'd plan it this way:
The specific tests that are written 'before the code' are unit tests that are written by developers just before they write the actual code.
It should only take 5-20 minutes to ...
5
votes
Screen Play vs Page Object pattern
Disclaimer up front: I do not agree with some of what is quoted below. I believe that a decent POM-framework can lead to VERY readable and maintainable tests.
Reading this page, the intent becomes ...
5
votes
BDD / Cucumber - what level of testing can I use it with?
Although the main purpose of BDD is to enhance conversation between people involved in a project is can be used to described any level of test.
Besides UAT, one can describe an object behavior (unit ...
5
votes
driver.quit() and driver.close() methods are not working inside @AfterTest method
@BeforeTest, @AfterTest annotations are not supported since Cucumber doesn't has the concept of test. It has features and you are executing the steps in Given, When & And, Then format. So in your ...
4
votes
Accepted
Behavioral Driven Framework vs Test Driven Development
It depends on lots of factors and there will be tradeoffs:
BDD does introduce few benefits, for specifics, please refer to this article on wikipeida. BDD on Wiki
Based on my personal experiences, ...
4
votes
Will writing unit tests block developers from coding?
Unit tests should be written by developers. Unit tests are very close to the core code and developers have intimate knowledge of how units should work. testers are usually more removed from the deep ...
4
votes
Accepted
Style of acceptance test cases? (BDD)
I would recommend doing both approaches, for different purposes.
Given / When / Then is good for testing communication. This format brings assurance that what you are testing is what the business ...
4
votes
Accepted
BDD Acceptance Tests feel....short?
This looks fine. BDD feature files is meant to be at a level to give useful information to product folks.
In each step you can call lower level steps if you want to give more specific information (...
4
votes
What is the purpose of splitting a cucumber Step Definition file
Same reason why you would split large modules in your regular code base: maintainability & navigability.
Over time as your step definitions grow you will have steps that are closely related to ...
4
votes
Accepted
Can a scenario have multiple example tables?
I believe there is no support for multi-dimensional examples tables in Gherkin scenarios as you have described. Also keep in mind what BDD is largely for: being readable to the business. We developers ...
4
votes
What are the pros & cons of BDD testing?
I think the pros of BDD are captured in a very good way by a user djojo in his answer - in this SO post - all credits to him
I totally agree the communication is one of the biggest advantage however ...
4
votes
What are the pros & cons of BDD testing?
In theory BDD sounds great. In practice, product owners and developers rarely continue to use BDD past the initial 3-6 months. At pretty much every company I have worked at, BDD inevitably became an ...
4
votes
Using BDD to describe complex interactions in a state machine
This is not a complex scenario, instead, it is common in many applications. Every application in a given user journey, goes through different states and at any step application can get into an ...
4
votes
Actual Steps in Step Definition or Call Test Cases in Step Definition, What's the Best Practice?
I personally divide the logic into three levels:
feature file (Cucumber),
step definition (Cucumber + Java),
page objects (Selenium and Java).
Cucumber separates business logic from the ...
4
votes
Actual Steps in Step Definition or Call Test Cases in Step Definition, What's the Best Practice?
Katalon has an example project on github: https://github.com/katalon-studio-samples/katalon-bdd-cucumber-tests
Although I find the directory structure hard to navigate the feature example does follow ...
4
votes
Accepted
Should scenarios be short or complete?
Break it up.
Just as importantly, however, see what unit and integration tests you can make.
I see:
confirmation form validations
composition of email to a new user
triggering email for a new user
...
4
votes
WARNING: Passing multiple tags through @CucumberOptions is deprecated. Please use a single tag expressions?
In Cucumber 5.7.0 the support of tags is handled in different way so that expression(infix boolean expression) can also be used in the same way.
You can pass the multiple tags like
@CucumberOptions(...
4
votes
Accepted
The third amigo problem when customer is unknown
This is an example of building a software system for the marketplace. In this case, you have many customers or users, each of which has its expectations for the system. However, someone must have ...
4
votes
Gherkin: When is appropriate to use the 'background'?
In the end, it runs to personal preference on how to right things.
As you said,
a background step is needed when multiple scenarios in the feature
file has same GIVEN clause and we can move such a ...
3
votes
Accepted
Importance of cucumber BDD tool
The importance of any Behavior-driven development framework, methodology or tool is to communicate. Cucumber is primarily a tool to communicate requirements between the business people and the ...
3
votes
Accepted
Who provided BDD scenarios to be automated?
This depends who you let write them. It is not like there is a rule whom should write them.
At least the "Feature:" part of the BDD should be written by a business person as user-story format is from ...
3
votes
BDD / Cucumber - what level of testing can I use it with?
BDD is suitable for all levels of testing, Gherkin not so much. Writing unit-tests with the overhead of Gherkin (e.g. English feature files, regular expressions and functions to execute the tests) is ...
3
votes
How do I build a personal project big enough to learn from automated testing it?
To learn TDD I suggest doing a kata everyday. Start with the String Calculator Kata and do it test-driven.
The coding dook handbook has loads more example kata's to practise and learn the following ...
3
votes
Accepted
Should I automate UI testing by 'clean' Selenium or use BDD framework?
This is answer for specific OP's circumstances: beginner working alone. For a beginner working in a big team, advice would be "follow your leader". YMMV, and you are free to do whatever you want with ...
3
votes
BDD Given - How do you set the starting page?
Given is your setup, it brings the system under test in a state you can start doing the action you want to test.
The given part describes the state of the world before you begin the behavior you're ...
3
votes
Should scenarios be short or complete?
To answer to the main question: Both. Short, complete and test only thing. Avoid doing checks in different parts in the same test(check email + check back-end + check front-end)
The first issue I see ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
bdd × 123automated-testing × 47
cucumber × 44
selenium-webdriver × 25
specflow × 18
gherkin × 15
java × 10
test-design × 8
tdd × 8
test-automation-framework × 7
acceptance-testing × 7
python × 4
c# × 4
javascript × 4
unit-tests × 4
agile-testing × 4
development-process × 4
step-definitions × 4
behave × 4
test-management × 3
selenium2 × 3
testng × 3
functional × 3
test-planning × 3
cypress × 3