Forum Discussion

julien-le-foll's avatar
julien-le-foll
New Contributor
4 years ago
Solved

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 i...
  • julien-le-foll's avatar
    julien-le-foll
    4 years ago

    Hello,

     

    Finally your R&D show me a better solution:

    • In CucumberStudio set 0 as default value for numeric parameter (add = 0)
    • and the following step implementation can be used:
    @Given("a price of "(.*)"$")
        public void a_price_of(double price) {
            //....
        }

     

    The deal is that numeric types can't be used in annotations but it is acceptable