一、简介
Python语言的行为驱动开发,Behavior-driven development,简称BDD.
"Behavior-driven development (or BDD) is an agile software development technique that
encourages collaboration between developers, QA and non-technical or business participants in a software project.
What is Behave:
· behave is behaviour-driven development, Python style.
. behave operates on directories containing:
· feature files written by your Business Analyst / Sponsor / whoever with your behaviour scenarios
in it, and a steps directory with Python step implementations for the scenarios.
We can automate the test cases by BDD approach.
Feature file can contains multiple scenarios which we have to automate --.feature Each scenario contains multiple steps.
二、环境准备
Install Python
Install Pycharm IDE (Pycharm community is fine)
Selenium library (install by gmd or pycharm IDE)
Behave
如果没装过Behave: pip install behave
如果已经装了Behave,为了upgrade: pip install-U behave
三、