Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 |              |         |
like image 419
ravitheBeast Avatar asked Oct 28 '25 13:10

ravitheBeast


1 Answers

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.

like image 75
Koen Meijer Avatar answered Oct 31 '25 10:10

Koen Meijer