cancel
Showing results for 
Search instead for 
Did you mean: 

Scenario Outline: parameters are converted to string when the feature is uploaded to cucumberStudio

Highlighted
Frequent Visitor

Scenario Outline: parameters are converted to string when the feature is uploaded to cucumberStudio

Hello,

Given the following feature file:

Feature: numeric arguments are lost

Scenario Outline: show loss of numeric types
Given a price of <price>
And the price parameter is an int in step implementation
When the scenario is uploaded to cucumberStudio
Then the price parameter becomes a string

Examples:
| price |
| 30 |
| 40 |

And a java step definition such as:

@Given("a price of {int}")
public void a_price_of(Integer int1) {
//
}

When the feature file is uploaded to cucumberStudio

And the feature file is generated for a given test run

Then the step become "Given a price of "<price>"" (additional quotes around the parameter)

And cucumber expect this definition:

@Given("a price of {String}")
public void a_price_of(String price) {
//
}

 

How to keep numeric types for step parameters?

 

Note the feature file generated by hiptest-publisher is:

Feature: numeric arguments are lost


Scenario Outline: show loss of numeric types (<hiptest-uid>)
Given a price of "<price>"
And the price parameter is an int in step implementation
When the scenario is uploaded to cucumberStudio
Then the price parameter becomes a string

Examples:
| price | hiptest-uid |
| 30 | uid:61e34ec9-130f-49de-b8ab-8a007c11d1ce |
| 40 | uid:ecc15e25-fc84-48cc-a79c-1092df7d44ce |
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors
Labels
Top Kudoed Posts