pythonpycharmpython-behave

Debugging python-behave steps with Pycharm


I'm using Pycharm to write tests and running them with behave. I'm running the behave commands with cli. To write the features and scenarios i'm using Pycharm. How can i debug each step?


Solution

  • You need Pycharm Professional to easily setup debuging. Just create run/debug configuration, choose behave framework, then specify feature files folder and behave params.

    Screenshot of the valid configuration

    Otherwise, if you doesn't have PyCharm Professional, you can create just basic python configuration, specify module behave and enter path to your feature folders in parameters.

    Screenshot of the valid configuration