mavenrobotframework

Robot Framework run command giving issue "[ ERROR ] Suite 'Acceptance' contains no tests or tasks."


I am creating simple Robot framework project in Eclipse from one of the Youtube video (https://www.youtube.com/watch?v=H5LQJttkunQ ). Project Structure is like:

Automation
|
src
|
test
|
RobotFramework
|
acceptance
|
TestCase.robot

Maven command: robotframework:run

Error:

[ WARN ] Command line option --xunitskipnoncritical has been deprecated and has no effect.
[ ERROR ] Suite 'Acceptance' contains no tests or tasks.
[ERROR] Failed to execute goal [32morg.robotframework:robotframework-maven-plugin:2.1.0:run[m [1m(default-cli)[m on project [36mAutomation[m: [1;31mInvalid test data or command line options.[m -> [1m[Help 1]

Please help and let me know if any other details are required.

I tried upgrading the maven plugin version for Robot Framework.

I am expecting to have this program run successfully once.

TestCase.robot:

*** Settings ***
Documentation  A resource file with reusable keywords and variables.
...
...            The system specific keywords created here form our own
...            domain specific language. They utilize keywords provided
...            by the imported SeleniumLibrary. Library SeleniumLibrary

Library        SeleniumLibrary

*** Variables ***

${BROWSER}    Firefox

${LOGIN URL}  https://trainee-web-app.azurewebsites.net/auth/login

*** Keywords ***
Open Browser To Login Page
   Open Browser  ${LOGIN URL}  ${BROWSER}
   Maximize Browser Window

Test Case in Eclipse


Solution

  • The error message is correct. Your test suite, does not have a test case. It does not even have a *** Test Cases *** section.

    Try your corrected example:

    *** Settings ***
    Documentation  A resource file with reusable keywords and variables.
    ...
    ...            The system specific keywords created here form our own
    ...            domain specific language. They utilize keywords provided
    ...            by the imported SeleniumLibrary. Library SeleniumLibrary
    
    Library        SeleniumLibrary
    
    *** Variables ***
    ${BROWSER}    Firefox
    ${LOGIN URL}  https://trainee-web-app.azurewebsites.net/auth/login
    
    *** Keywords ***
    Open Browser To Login Page
       Open Browser  ${LOGIN URL}  ${BROWSER}
       Maximize Browser Window
    
    *** Test Cases ***
    Selenium Library Simple Test
        Open Browser To Login Page
        Sleep  5 seconds
        Capture Page Screenshot
        Close All Browsers
    

    Note: I don't have a Maven or Eclipse setup to test, but it worked on latest Robot Framework and SeleniumLibrary. You could have also tested in these conditions.