Snooz82 / robotframework-datadriver

Library to provide Data-Driven testing with CSV tables to Robot Framework
Apache License 2.0
131 stars 37 forks source link

Error rerunning tests #53

Closed detlefs closed 3 years ago

detlefs commented 3 years ago

I have rerun my test suite with the following command with a DevOps pipeline

robot --prerunmodifier DataDriver.rerunfailed:'$(Build.SourcesDirectory)/output.xml' --output rerun2output.xml --variable BROWSER:headlesschrome --variable DEVICE:Desktop '$(Build.SourcesDirectory)/testsuites/.'

I get the following error: [ ERROR ] Importing model modifier 'DataDriver.rerunfailed' failed: Model modifier 'rerunfailed' expected 1 argument, got 2.

Instead of re-running only the failed tests, the whole suite is re-run then.

I don't understand the meaning of the error message. What is interpreted as the 2nd argument in my command line?

detlefs commented 3 years ago

Solved my issue. It seems I can't specify a path to DataDriver.rerunfailed. With robot --prerunmodifier DataDriver.rerunfailed:output.xml --output rerun2output.xml --variable BROWSER:headlesschrome --variable DEVICE:Desktop '$(Build.SourcesDirectory)/testsuites/.' it works as expected.