Tuesday, 12 December 2017

Adding feature files (Cucumber)

Now create  features file for BDD by creating a simple file and save as .feature file under test.resources.features


@Regression
Feature: Login 

Background: 
 Given User is on Home page 
 When  Clicks on Login
 Then  Login page should get open 
@Validcredentilas 
Scenario Outline: Successfull Login 
 And enter Username as "<valid_username>" 
 And enter Password as "<valid_password>" 
 And click on Login button 
 Then user should be logged in to the application 
 And do Logout 
 Then User should get loged out
 Examples: 
  | valid_username  | valid_password |
  | test123         | 123test456     |
  @Invalidcredentials 
  Scenario Outline: Failed Login 
   And enter Username as "<invalid_username>" 
   And enter Password as "<invalid_password>" 
   And click on Login button 
   Then user should not be logged in to the application 
   Examples: 
    | invalid_username  | invalid_password|
          | mayank2           | 123test12       |




No comments:

Post a Comment

Set up testlink with Selenium Framework

To Integrate Testlink with selenium add following jars in your setup testlink-api-client-2.0.jar xmlrpc-common-3.1.jar xmlrpc-client-...