Debug Robot Framework tests from Pycharm

10,643

Why are you using this start.sh? If you're using PyCharm, you can run your test cases via it and set breakpoints in whatever functions you want. Just setup a configuration for it

I just call run.py for the script: C:\Python27\Lib\site-packages\robot\run.py

Script params: --monitorcolors ansi --loglevel DEBUG --outputdir TestResults --exclude "Exclude_me" TestSuite

Then ensure you have your python interpreter set correctly and your working directory.

This question may also help - HOW TO use Pycharm to debug python script?

Share:
10,643
Admin
Author by

Admin

Updated on June 05, 2022

Comments

  • Admin
    Admin almost 2 years

    I'm writing tests on robot Framework and use some python functions with it. So I have the start.sh shell script that runs my testcases. But in my tests I use python functions, that was written by myself and I want to debug it and sometimes see the variables. How can I do it in PyCharm? I tried to add shell script in debug configuration, but it didn't help. Also I tried to run start shell script from python script, but I also couldn't get to breakpoints.

  • shicky
    shicky about 8 years
    I should add those arguments are NOT specfic to what you need, they're just an example.
  • AhmedWas
    AhmedWas about 8 years
    @KseniyaBuraya Question title is not the same as the question details. As according to your question title, you want to debug test cases itself and not the python libraries.
  • shicky
    shicky over 7 years
    Nothing was mentioned for libraries, test cases will largely be some english language which is actually a wrapper for underlying python functions. The question was clear enough after reading, why the downvotes for my answer which clearly helped!?
  • volcano
    volcano over 7 years
    @AhmedWas, PyCharm does not allow debugging Robot scripts - only running them as "an external tool". Ant the latter is so user-unfriendly that it's not worth the effort. Besides, using Python-based keywords provides much cleaner test script that using Robot keywords - which are too generic (and not too convenient to use, especially for SW professionals). So your comment - based solely on the virtue of the title, and not the essence of the question - is not helpful. And down-vote is unjustified. I used the same technique - works as (Py)charm :)