Hacker News new | ask | show | jobs
by hpaavola 1838 days ago
RF does automatic type conversion based on the typehints in the python libraries used. So no need to change types manually. And there is no dictated directory structure. So, stop doing horrible directory structures and the pain goes away. And there is no glue at all needed to share methods at all. Write function in Python/keyword in Robot framework and take it in use using "Resource" or "Library" statement. Done.
1 comments

test.robot

    *** Settings ***
    Library    calc.py


    *** Test Cases ***
    My First Library
        ${sum}    Plus    1    2
        Should Be Equal As Integers    ${sum}    3
calc.py

    def plus(a: float, b: float):
        return a + b
No manual casting, no extra directories, no complicated sharing of functions.