Feature file
Every product feature will have a dedicated feature file. The feature file is a text file with the .feature
extension. A feature file can contain any number of scenarios, and each scenario is equivalent to a test case.
Let's take a look at a simple feature file example:
1 # language: en 2 3 Feature: The Facebook application should authenticate user login. 4 5 Scenario: Successful Login 6 Given I navigate to Facebook login page https://www.facebook.com 7 And I type jegan@tektutor.org as Email 8 And I type mysecretpassword as Password 9 When I click the Login button 10 Then I expect Facebook Home Page after Successful Login
Cool, it appears like plain English, right? But trust me, this is how Cucumber test cases are written! I understand your doubt--it looks easy and cool but how does this verify the functionality, and where is the code that verifies the functionality? The cucumber-cpp
framework is a cool framework, but it doesn't natively...