简体   繁体   中英

Behave (BDD for Python) supports Examples tagging

I am looking to apply tags that works for scenarios & features to examples in following way. It seems to work for cucumber but not for Behave- a BDD framework for Python:

Scenario Outline: Something useful
 Given I have <a> 
 When I add <b>
 Then I should have <c>

 Examples: Implemented things 
  | a | b | c | 
  | 0 | 0 | 0 |

 @pending 
 Examples: Not yet implemented things 
  | a | b | c | 
  | 1 | 2 | 3 |

Firstly, make sure you have Behave 1.2.5

pip show behave

If it is not Behave 1.2.5, then install the latest version.

pip install git+https://github.com/behave/behave

Secondly, you may need to apply quote marks around your place holders. For Example.

Given I have "<a>"
When I add "<b>"
Then I should have "<c>"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM