Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 774
VladiRadu Avatar asked Mar 18 '26 01:03

VladiRadu


1 Answers

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.

like image 118
Bryan Oakley Avatar answered Mar 20 '26 15:03

Bryan Oakley



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!