Skip to main content
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 ...
Michael Durrant's user avatar
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 ...
Niels van Reijmersdal's user avatar
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 ...
CloneZero's user avatar
  • 215
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 ...
FDM's user avatar
  • 5,894
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 ...
Michael Durrant's user avatar
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 ...
João Farias's user avatar
  • 10.9k
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 ...
Bharat Mane's user avatar
  • 6,775
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 ...
Peter M. - stands for Monica's user avatar
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, ...
Yu Zhang's user avatar
  • 9,942
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 ...
jpjwolli's user avatar
  • 487
4 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 ...
Niels van Reijmersdal's user avatar
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 ...
Jacob Hackel's user avatar
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 ...
demouser123's user avatar
  • 3,532
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 ...
newsn31's user avatar
  • 609
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 ...
Vishal Aggarwal's user avatar
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 ...
Mate Mrše's user avatar
  • 4,119
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 ...
Niels van Reijmersdal's user avatar
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 ...
Michael Durrant's user avatar
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(...
Rakesh Kumar's user avatar
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 ...
Thomas Owens's user avatar
  • 1,496
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 ...
João Farias's user avatar
  • 10.9k
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 ...
Niels van Reijmersdal's user avatar
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 ...
Niels van Reijmersdal's user avatar
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 ...
Niels van Reijmersdal's user avatar
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 ...
Peter M. - stands for Monica's user avatar
3 votes

How can I pass parameter in xpath?

As far as I can see you use Page Object way. This means you cannot parameterize the xpath for the element (parameters of annotations cannot be changed in runtime in Java). I would suggest you ...
Alexey R.'s user avatar
  • 11.6k
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 ...
Niels van Reijmersdal's user avatar
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 ...
lauda's user avatar
  • 977
3 votes
Accepted

Which runner to use with Specflow Cucumber BDD: Specflow Runner, Nunit, Xunit

Configuring the Unit Test Provider Tests are executed using a unit test provider. Add the corresponding NuGet package to your project to define your unit test provider: SpecRun.Runner SpecFlow.xUnit ...
PDHide's user avatar
  • 11.1k

Only top scored, non community-wiki answers of a minimum length are eligible