Selenium with Python Behave(BDD)

作者 : admin 本文共805个字,预计阅读时间需要3分钟 发布时间: 2024-06-9 共1人阅读

一、简介

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

Selenium with Python Behave(BDD)插图

三、

本站无任何商业行为
个人在线分享 » Selenium with Python Behave(BDD)
E-->