Robot Framework

  1. Log level for robot test
    (Reference link: http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html)
    We can add log level when debug, in order to see more code information in the log.
    Robot Framework

–loglevel DEBUG
–loglevel TRACE
–loglevel INFO

  1. Passing parameters with Int type
    By default, all the parameters passed from Robot is String, if you want to pass a int, just add ${}, example: ${200}.

  2. A good example of Case Organization:
    https://bitbucket.org/robotframework/webdemo/src/9206bb637e9d15d45d33a35a55f7f4c1de898898/login_tests/invalid_login.robot?at=master&fileviewer=file-view-default

  3. How to specify relative path in Robot Framework
    TEST PROJECT (Root folder)
    |
    |_____ Resource (folder)
    | |_____ MyProfile.txt
    | |_____ MyPicture.jpg
    |
    |_____ Test (folder)
    |_____ MyTest.robot

I want to access the MyProfile.txt in MyTest.robot using relative reference instead of absolute path, solution should be: CURDIR{CURDIR}{/}…\Resource\MyProfile.txt

相关文章: