setting up behave featureset

Answered

Hi

I need to work with a featureset in behave. So from a command line at the root of my project I can run:

python -m behave @proj/features/regression.featureset

 

I'm trying to convert that into a Pycharm configuration. Which I have set he "feature files or folders" location to the same root I have on the command line and in the params section I am passing "@proj\features\regression.featureset"

 

This runs, but it doesn't run in the correct order, which makes me think that this is just running the feature files in the specified folder. How should I configure this?

 

Thanks :)

 

6 comments
Comment actions Permalink

Hi,

Shouldn't you pass it in the Interpreter options field of a run configuration?

 

0
Comment actions Permalink

Hi

 

I tried using "@proj/features/regression.featureset" as the interpreter options but PyCharm returned 

 

C:\python37\python.exe: can't open file '@proj/features/regression.featureset': [Errno 2] No such file or directory

0
Comment actions Permalink

I think you should specify the absolute path in Script path and then pass -m behave in Interpreter options.

0
Comment actions Permalink

Ok, but there isn't an absolute path, because behave as I understand it requires the use of the @sybmol to trigger a featureset?

https://stackoverflow.com/a/28639518/895169

So I have my "Working directory" set to: C:\automation\practice

and interpreter set to: -m behave @proj/features/regression.featureset

Which is how I run from the command-line, but when I try to execute in PyCharm I get 

C:\python37\python.exe -m behave @proj/features/regression.featureset "C:\Program Files\JetBrains\PyCharm 2019.2\helpers\pycharm\behave_runner.py"
InvalidFilenameError: C:/Program Files/JetBrains/PyCharm 2019.2/helpers/pycharm/behave_runner.py

I do appreciate your help :)

 

 

0
Comment actions Permalink

Oh, I see.

Unfortunately, it's not supported at the moment.

I filed a feature request to our tracker https://youtrack.jetbrains.com/issue/PY-37764, please upvote and follow for updates.

0

Please sign in to leave a comment.