How to pass null data to String field in cucumber feature file?

13,316

You can not pass null values. When you pass an empty value, it will be seen as an empty string.
You could however change an empty value to a null value in your step definition file.

Share:
13,316
ravitheBeast
Author by

ravitheBeast

Updated on June 05, 2022

Comments

  • ravitheBeast
    ravitheBeast almost 2 years

    Feature: login

    Scenario Outline: validate userid

    Given launch gmail site
    

    Then validate userid with "" criteria

    When enter password as "<z>"
    
    And click pwd button
    
    Then validate password with "<b>" criteria
    
    And close site
    
    Examples: 
      | x            | y       | z            | b       |
      | a            | valid   | 888654554    | valid   |
      |  b           | valid   |              | invalid |
      |              | invalid |              |         |
    
  • ravitheBeast
    ravitheBeast over 6 years
    how to make null value in step definition file
  • Koen Meijer
    Koen Meijer over 6 years
  • ravitheBeast
    ravitheBeast over 6 years
    i did what u said