Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step generated from scenario outline '<type>' is empty #712

Closed
ShawnTuatara opened this issue May 2, 2014 · 3 comments · Fixed by #713
Closed

Step generated from scenario outline '<type>' is empty #712

ShawnTuatara opened this issue May 2, 2014 · 3 comments · Fixed by #713

Comments

@ShawnTuatara
Copy link

I upgraded to 1.1.6 and am running into an issue when using example sets. Here is my scenario:

Scenario Outline: Search for events by created_date and userids
    Given I provide their "userids" to search
    Given I provide the following search attributes:
    |<name>         |<type>     |<matchmode> |<value>       |<from>     |<to>           |
    Given I set the query parameter "style" to "summary"
    Given I set the query parameter "pagesize" to "2"
    When I request to search
    Then the response is "Ok"
    Then the expected search events are returned
    Then the event has all the expected search fields
Examples:
    |name           |type       |matchmode  |value          |from       |to             |
    |created_date   |           |           |               |1358760512 |               |
    |created_date   |           |           |               |1358760512 |5556087244277  |
    |created_date   |           |           |               |           |5556087244277  |

The Example structure is used the same in a number of scenarios and we just update the data table with the fields that are required for that stepdef. Unfortunately in CucumberScenarioOutline.java:114 it does a text.isEmpty() check and those fields are empty. The debug context shows:

headerCell = "type"
value = ""
token = "<type>"
col = 1
text = "<type>"

Within my stepdef I have my own logic around how to manage specific empty strings for a certain column. Here is a snip of the stepdef:

    @Given("^I provide the following search attributes:$")
    public void I_provide_the_following_search_attributes(List<String> attributes) {
        String attr_name = attributes.get(0); // name
        String attr_type = attributes.get(1); // type
        String attr_matchmode = attributes.get(2); // matchmode
        String attr_value = attributes.get(3); // value
        String attr_from = attributes.get(4); // from
        String attr_to = attributes.get(5); // to

        // logic around the attribute information
    }

Looks like a280f2f is the commit that is causing the issue. Will try to make a pull request with a test to exercise this issue.

@ShawnTuatara ShawnTuatara changed the title Step generated from scenario outline '<field>' is empty Step generated from scenario outline '<type>' is empty May 2, 2014
@brasmusson
Copy link
Contributor

@ShawnTuatara No need for you to make a pull request with a test, I have already created a pull request with a fix (and tests) for this issue: #713.

@ShawnTuatara
Copy link
Author

Nice. Thanks! Look forward to using the next release version.

@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants