Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyCharm: How to run behave.exe?

I want to use behave lib in my program. I write code as in behave-tutorial. But, when I "Run" my tutorial-project, I see in PyCharm-console:

C:\Python27\virtualenv\Scripts\python.exe "C:/Program Files (x86)/JetBrains/PyCharmProjects/tutorial/steps/tutorial.py"
Process finished with exit code 0

I think what I must to use behave.exe for run my project:

C:\Python27\virtualenv\Scripts\behave.exe

How to get it?

like image 813
user2253967 Avatar asked Apr 07 '13 07:04

user2253967


3 Answers

You can configure your run as per your purpose please have a look to screenhots here:

enter image description here

enter image description here

enter image description here

taken from: http://automated-testing.info/t/bdd-framework-debug-testov-stepov/3392/3

like image 154
Mykhailo Poliarush Avatar answered Sep 19 '22 01:09

Mykhailo Poliarush


Even though behave support is now in the Professional Edition, it's currently not in the Community Edition.

You can still call the behave module for a given feature directory.

Add a Python Run configuration, with no script and these options:

Interpreter options: -m behave
Working directory: path/to/feature/directory

like image 40
Peter Wood Avatar answered Sep 22 '22 01:09

Peter Wood


I tinkered around with previous answers and got PyCharm CE 5.x working with Behave I have python 2.7 installed system-wide, and behave installed via PyCharm package management
Here is my run config:

Script: put dot (.) in here [this way PyCharm recognizes the configuration as valid and doesn't show red cross mark]
Working Directory points to the dirctory where .feature file is
Interpreter options: -m behave

like image 43
Alexej Avatar answered Sep 18 '22 01:09

Alexej