Search code examples
cucumber

Cucumber - steps parametrization


I am very new to Cucumber.

I know (and I use it a lot) that cucumber steps may have parameters in double quotes, like the one below:

 And Choose "Ice Cream" from list to add to Order

 # or 

 And User fills in "'<'Name'>'" and "'<'Surname'>'" in the form
 
Examples: TestData      
| Name    | Surname |       
| Michael | Good    |    

However, I noticed that there can be steps with a parameters in a single quotes like:

And User click 'Create Order' button

# or 

And 'Brush Type' displayed on 'View Order' page

I looked into steps, test definitions, page object definitions for the steps described and I can not understand what is the purpose of single quotes.

There would be no difference should it be like:

And Brush Type displayed on View Order page

Could somebody give me a brief answer, please.
Or send me a link where I can read, please.


Solution

  • I tried single 'quotes' tried it with Cucumber Expression and it does work: And User fills in Values '11013', 'Insurance12345670890', '10 hours' @And ("User fills in Values {string}, {string}, {string}") public void user_fills_nvaluess(String Value1, String Value2, String Value3)

    just for an experiment I tried to use single quotes with regular expression, it did not work.