TAGS :Viewed: 10 - Published at: a few seconds ago

[ Robot Framework tests don't run ]

I have installed python version 3.5.1, and robot framework. I've written the following test (I tried others with the same result):

*** Settings ***
Library       Selenium2Library

*** Variables ***
${MESSAGE}    Start of test
${BROWSER}      ff
${keywork}  dell

*** Test Cases ***
Search Emag For Computer
    [Documentation]    Example test
    Log    ${MESSAGE}
    Do this     www.emag.ro     dell        "rezultate pentru"

*** Keywords ***
Do this
    [Arguments]    ${URL}    ${keyword}     ${result}
    Open Browser    ${BROWSER}
    Input Text      id=emg-input-autosuggest        ${keyword}
    Wait 20
    Close Browser

When running the test from console using : robot testName.rst I always get : [ ERROR ] Parsing 'testName.rst' failed: File has no test case table. But my test case table is clearly there. Please help

Answer 1

You are using a suffix of .rst which implies the reStructuredText format, but your file is written in the plain text format. Because of the suffix, robot is trying to parse it according to the reStructuredText syntax, and you don't have any test tables in that format.

You can solve this problem by renaming your file to be testName.txt or testName.robot.