robotframework / JoyRide

Eclipse plugin for Robot Framework space separated data files
Other
12 stars 6 forks source link

Bogus syntax errors #1

Open dschulten opened 12 years ago

dschulten commented 12 years ago

Hi,

I am quite impressed, this plugin has potential. However, it is still experimental.

I am getting a number of syntax errors which seem not to be errors at all, at least RIDE has no problems with them, in part they were entered by RIDE.

Variables setting always says "missing EOFat Variables"

The error message at Variables is "mismatched input '\r\n' expecting RULE_SEPARATOR"

*** Settings ***
Library         DatabaseLibrary
Library         OperatingSystem
Variables       dbconnections.py
Resource        my_restful_resource.txt
Library         Collections

-> No idea what's amiss here

Suite Setup with commented out content

The error message is "mismatched input '\r\n' expecting RULE_SEPARATOR"

*** Settings ***
Suite Setup       # Start Selenium Server | -firefoxProfileTemplate | ${CURDIR}/firefox-self-signed-cert
Suite Teardown    # Stop Selenium Server
Resource          portal_resource.txt

Errors on empty Steps

RIDE does not remove settings lines even if you click clear., rather it keeps the step and just removes the content. This leads to the error message "mismatched input '\r\n' expecting RULE_SEPARATOR"

At Force Tags:

*** Settings ***
Test Teardown     Close Browser
Force Tags
Default Tags      login

At Test Teardown:

Test Teardown without Keyword

Suite Teardown    Do Logout And Close
Test Teardown
Resource          portal_resource.txt

Keywords with embedded variables seem not to be supported yet

I have a file with BDD keywords such as:

*** Keywords ***
Gegeben sei ${keyword}
    Run Keyword  ${keyword}

Angenommen ${keyword}
    Run Keyword  ${keyword}

At Gegeben sei ${keyword}, I get an error: no viable alternative at input '{'

Table Headers for Example Test Cases are not supported

RIDE supports Table Headers for Template Test Cases, as in

*** Test Cases ***                 Item Number    Action
No Unsupported Item Actions
                                                  [Template]         Forbid Action For                                    
                                                  21 079 951 7    Order

The error message says "required (...)+ loop did not match anything at input '" in the * Test cases * line.

Here, ItemNumber and Action are shown as Table Headers in a RIDE template test case. The Space Editor shows a red mark before Item Number. Furthermore, it says "missing EOF at 'No'" on the Test Case name "No Unsupported Contract Actions"

XPath expressions are marked as erroneous

E.g. for @id I get missing '{' at 'id,

*** Keywords ***
Click Portlet Link
    [Arguments]    ${locator}
    [Documentation]    Clicks a portlet link identified by its ´id´ attribute or its caption
    Click Link    xpath=//a[span/text()='${locator}' or contains(@id, ':${locator}')]

What makes things complicated is, that there is not always an xpath= before the locator, as in:

    Page Should Contain Element    //input[@value='do something']

Mail addresses in tests are marked as errors

The message says: missing '{' at 'web.de'

    Input Portlet Text    emailAddress    mustermann@web.de

General problem

Non-robot txt files, e.g. within the firefox profile, the libraries folder or the target folder of my project show errors - even the readme.txt in the project root. We might need a project nature or so to handle this, maybe a standard project directory layout which separates test cases and robot resources from libraries and other resources. In general, only source folders should be scanned for errors.

mkorpela commented 12 years ago

Thanks for the input!

As you pointed out this is fairly experimental plugin. We now have some confidence (based on peoples interest in this plugin) in that it could be a valuable extension to Robot Framework tools. So hopefully we (RF core team) will in future have more time to work on this plugin!