python - "Feature Background" or "Feature Steps" in lettuce? -
i'm looking way in lettuce specify code run gherkin feature file such has run when @before.each_scenario
hook - dynamic set of examples scenario outline, given application has catalogue of things, each of want test, want able following:
feature: automated catalogue test in order have use system user want able use each feature in catalogue background: given start system , have list of features @foreach scenario outline: use each feature in system given feature <feature_num> when load feature , use feature in way used can clear feature
so have working pre-set list of examples, , have been able test logic using hook extend scenario, , works, means if 1 feature fails after not run.
if background step run once , before @before.each_scenario
set list of outlines
enumerated @ lettuce/core.py:722
, far aware not part of gherkin language; not want add i have list of features
terrain though there many other tests don't need know catalogue...
i don't suppose has suggestions?
currently compromise have come this:
feature: automated catalogue test in order have use system user want able use each feature in catalogue @foreach @foreach_feature scenario outline: use each feature in system given feature <feature_num> when load feature , use feature in way used can clear feature
then implemented hook looks @foreach
tag added lookup tag registry have stored callback run if find @foreach_feature
tag. still doesn't seem ideal, i'm putting out there trying solve same problem, until better solution found.
Comments
Post a Comment