当前位置:网站首页>Third party tools and framework integration
Third party tools and framework integration
2022-06-29 18:57:00 【It's Joe Joe】
Introduction to agile development testing concept
BDD: Behavior driven development , Also known as acceptance test driven development (ATDD). Based on users Story Agile testing or instantiation requirements .
CI: Continuous integration framework
be based on BDD Test tools
python Many of the tools in can implement BDD, There are two main tools Behave and Lettuce.
Behave
pip install behave
To write feature Document principles :GWT(Given-When-Then)
- Given: Set the preconditions for the execution of a scenario
- When: Contains the operations to be performed by a scenario
- Then: Contains the results of a scenario execution
notes : A scene can have multiple when and then.
step Definition
feature File scene outline step It needs to be defined separately .
step The definition file is saved in feature Subdirectory of the path where the file is located steps Next .
for example :
from behave import *
@given('I am on home page')
def step_i_am_on_home_page(context):
context.driver.get("http://demo.magentocommerce.com
/")
@when('I search for {text}')
def step_i_search_for(context, text):
search_field = context.driver.find_element_by_name(
"q")
search_field.clear()
# enter search keyword and submit
search_field.send_keys(text)
search_field.submit()
@then('I should see list of matching products in search
results')
def step_i_should_see_list(context):
products = context.driver.\
find_elements_by_xpath("//h2[@class='product-nam
e']/a")
# check count of products shown in results
assert len(products) > 0
Environment configuration
function feature Before , You need to create an environment configuration file , To configure Behave Common configuration , as well as step Between or step Define shared code between files .
Usually in feature Create a new environment configuration file in the file directory environment.py, add to before_all() and after_all() Method , These two methods are respectively in feature Run before and after execution .
from selenium import webdriver
def before_all(context):
context.driver = webdriver.Chrome()
def after_all(context):
context.driver.quit()
perform behave
Get into bbd Under the document , And then execute “behave” command .
Behave Show results at three levels . Namely feature、scenario and step The number of passes and failures at each level .
Continuous integration Jenkins
Jekins yes Java Write continuous integration (CI) service , Come of Hudson project .
The service support includes git、SVN And other version control tools .
Jekins In addition to building software functions 、 It can also be used to build an automated test environment .
install Jenkins
Jenkins Installation package download address :https://www.jenkins.io/download/
Click on next Can be installed .
边栏推荐
- Tag filtering and SQL filtering of rocketmq
- JS text particle dynamic background
- 第三方工具与框架集成
- Weibo comments on high-performance and high availability architecture design (module 5 of architecture practice camp)
- 如何在树莓派上使用OAK相机?
- Intégration d'outils et de cadres tiers
- Markdown common fonts
- 产品-Axure9(英文版),中继器(Repeater)实现表格内容的增删查改(CRUD)
- 2. 银河麒麟离线模式下如何安装MySQL数据库
- PostGIS generate graphic cut
猜你喜欢

如何将OAK相机当做网络摄像头使用?

RocketMQ的tag过滤和sql过滤

Mac: MySQL 66 questions, 20000 words + 50 pictures!

Shandong University project training (VII) add navigation bar to select city
![报错[warning] Neural network inference was performed on socket ‘RGB’, depth frame is aligned to socket](/img/8a/ebad75daa581e22d50dddde49e1fac.jpg)
报错[warning] Neural network inference was performed on socket ‘RGB’, depth frame is aligned to socket

程序员值得收藏的几款代码截图美化工具播

2. add customized related files to the keil5 project established by stm32cubemx

tp5 where查询数据库中的某个字段是否包含某个值,不用like的方法,模糊查询

Anfulai embedded weekly report no. 271: June 20, 2022 to June 26, 2022

Apache inlong million billion level data stream processing
随机推荐
Data-* attribute usage
76.二叉树的最近公共祖先
How to use the low code platform of the Internet of things for service management?
Weibo comments on high-performance and high availability architecture design (module 5 of architecture practice camp)
面霸篇:MySQL六十六问,两万字+五十图详解!
MySQL Enterprise Development Specification
layer.prompt
踩坑记:JSON.parse和JSON.stringify
Interview question 10.10 Rank of digital stream
如何将OAK相机当做网络摄像头使用?
Selenium WebDriver的高级特性
Understanding of strong caching and negotiation caching
Fluent's MSH grid learning
Shell基本语法--流程控制
garbage collector
About microservices
数据仓库模型分层ODS、DWD、DWM实战
MySQL 企业级开发规范
MySQL 企業級開發規範
Data warehouse model layered ODS, DWD, DWM practice