TDD Implementing Step Definitions derived from Behave (Python) -
where put behave's implementation code not fail behave's tests? further need import or put code in code write linked feature file.
here excerpt feature file \steps\main.feature
...
feature: main program program allows users create create , view development logs scenario: user requests development logs particular user given user has requested development logs given user development logs user show
and here implementation suggestions (that come running behave):
@given(u'user has requested development logs given user') def step_impl(context): raise notimplementederror(u'step: given user has requested development logs given user') @then(u'the development logs user show') def step_impl(context): raise notimplementederror(u'step: development logs user show')
i realise basic information nothing in documentation covers , although there lots of tutorial on google none of them cover this. assume basic.
the answer threefold:
i raising not implemented error test failed.
at top of python file needed include
from behave import *
.my python file needed directory called
steps
.
i worked out myself trial , error after looking @ answer python tdd directory structure.
Comments
Post a Comment