fiuba08 / robotframework

Automatically exported from code.google.com/p/robotframework
Apache License 2.0
0 stars 0 forks source link

data-driven test with no arguments throws an error #1717

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If I create a data-driven test but don't give each test case any arguments, I 
get the error "Test case contains no keywords". Technically this is not true 
since I do actually have a keyword. If I add a dummy argument, it works as 
expected.

For example, the following suite will fail:

    *** Settings ***
    | Library | Dialogs
    | Test Template | Perform manual step

    *** Test Cases ***
    | Go to the fridge and grab a beer

    *** Keywords ***
    | Perform manual step
    | | Execute Manual Step | ${TEST_NAME}

To make the suite pass I can give the keyword and test a bogus argument:

    *** Test Cases ***
    | Go to the fridge and grab a beer | bogus

    *** Keywords ***
    | Perform Manual Step | [Arguments] | @{args}
    | | Execute Manual Step | ${TEST_NAME}

I think a data driven test should be able to be written without requiring 
arguments.

Original issue reported on code.google.com by bryan.oa...@gmail.com on 23 May 2014 at 3:20

GoogleCodeExporter commented 9 years ago
@{EMPTY} variable (issue 1166) was added in RF 2.7.4 to workaround this problem.

Original comment by pekka.klarck on 24 May 2014 at 11:06