Search code examples
pythoncucumberhookrobotframeworkrobotframework-ide

Is it possible to have in Robotframework, hooks after execution like Ruby/Cucumber


Ruby and Cucumber have a hooks file(hooks.rb) that allow to execute actions before and/or after features, scenarios, steps or even in program at_exit.

This allow to do some important operations(like scripts) that I do not want to include them in test execution report.

In Robotframework I only know Suite/Test Setup/Teardown.

This prints actions in logs and I have to implement/call this for all test suites(distinct files) and it can't be done globally, for all tests, only once.

Is there a way to do this, somehow? Thanks.


Solution

  • What you search for is probably listener interface: http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#listener-interface