Configuring a debug environment in Eclipse
I am using Behave to write BDD tests. The problem I have is that I am unable to create debug environment for these tests. I have successfully created an external tool run environment but that is of little help when I want to use breakpoints and debug the code.
Anyone who uses Lettuce/Behave/Freshen/Cucumber and could let me know how is the debug environment setup?
Found a solution on the Eclipse help page : http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Ftasks-exttools-running.htm
It is possible to debug python steps (*.py) files in Eclipse IDE.
Belove solution works for:
- Windows 7
- Behave framework from https://pythonhosted.org
- Copy behave-script.py to directory that are located .feature files. You can find this file in Python27\Scripts\
- In Eclipse add new "Debug as...->Debug Configuration->Python Run"
- In a project choose your project
- In Main module choose behave-script.py
- Hit run and set brakepoints
Although you didn't mention Morelia (another BDD tool for Python) I thing you could try it. It doesn't need any special setup to integrate if traditional unittests works for you. Morelia's documentation: https://morelia.readthedocs.org/en/latest/