当前位置:网站首页>Intégration d'outils et de cadres tiers
Intégration d'outils et de cadres tiers
2022-06-29 18:56:00 【C'est Joe.】
Introduction au concept de test de développement agile
BDD:Développement axé sur le comportement,Aussi connu sous le nom de développement axé sur les essais d'acceptation(ATDD).Basé sur l'utilisateurStory Exigences relatives aux essais agiles ou à l'Instanciation.
CI:Cadre d'intégration continue
Basé surBDDOutils d'essai pour
pythonDe nombreux outils peuvent être mis en œuvreBDD,Il existe deux principaux outils:BehaveEtLettuce.
Behave
pip install behave
CompilationfeaturePrincipes de documentation:GWT(Given-When-Then)
- Given:Définir les conditions préalables à l'exécution d'un scénario
- When:Contient les actions à effectuer pour un scénario
- Then:Contient les résultats de l'exécution d'un scénario
Note::Il peut y avoir plusieurs scèneswhenEtthen.
stepDéfinition
featureDans le contour de la scène de fichierstepDoit être défini séparément.
stepFichier de définition enregistré dansfeatureSous - répertoire du chemin du fichierstepsEn bas..
Par exemple:
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
Configuration de l'environnement
ExécutionfeatureAvant, Un profil d'environnement doit être créé ,ConfigurationBehaveConfiguration commune,EtstepEntre oustep Définir le Code partagé entre les fichiers .
En généralfeature Créer un nouveau profil d'environnement dans le Répertoire de fichiers environment.py,Ajouterbefore_all()Etafter_all()Méthodes, Les deux méthodes sont feature Exécution avant et après l'exécution .
from selenium import webdriver
def before_all(context):
context.driver = webdriver.Chrome()
def after_all(context):
context.driver.quit()
Mise en œuvrebehave
EntréebbdSous le dossier,Et ensuite exécuter“behave”Les ordres.
Behave Afficher les résultats à trois niveaux .Respectivement.feature、scenarioEtstep Nombre de réussite et d'échec par niveau .
Intégration continueJenkins
Jekins- Oui.Java Intégration continue de l'écriture (CI)Services,Originaire deHudsonProjets.
Le soutien du service comprend: git、SVN Et divers outils de contrôle de version .
Jekins En plus de construire des fonctionnalités logicielles 、 Il peut également être utilisé pour construire un environnement d'essai automatisé .
InstallationJenkins
JenkinsAdresse de téléchargement du paquet d'installation:https://www.jenkins.io/download/
Cliquez surnextInstallez - le..
边栏推荐
- 深度学习---三好学生各成绩所占权重问题(2)
- Goldfish rhca memoirs: do447 build advanced job workflow -- create workflow job template and start workflow job
- Apache Doris basic usage summary
- curl下载示例
- C Primer Plus Chapter 12_ Storage categories, links, and memory management_ Codes and exercises
- Tag filtering and SQL filtering of rocketmq
- 第八届“互联网+”大赛 | 云原生赛道邀你来挑战
- 报错[warning] Neural network inference was performed on socket ‘RGB’, depth frame is aligned to socket
- How to use idea?
- JS converts seconds to "2h30min50s" format
猜你喜欢

RocketMQ的tag过滤和sql过滤
![[Nanjing University] information sharing of the first and second postgraduate entrance examinations](/img/0d/a6392e6b92bb689e90c038ffac9dd8.jpg)
[Nanjing University] information sharing of the first and second postgraduate entrance examinations

Markdown knowledge comes gently

Using protobuf to link MySQL in unrealeengine plug-in

Redis (I) -- getting started with redis (2) -- redis data type

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

JDBC knowledge

Amazing pandaverse:meta "borderless, to activate fashion attributes in the new journey of 2.0

Selenium WebDriver的高级特性

面霸篇:MySQL六十六问,两万字+五十图详解!
随机推荐
Know that Chuangyu has helped the energy industry in asset management and was selected into the 2021 IOT demonstration project of the Ministry of industry and information technology
Sword finger offer 34 Path DFS method for binary tree neutralization
selenium的跨浏览器测试
Elegant writing controller (parameter verification + unified exception handling)
Travel card "star picking" hot search first! Stimulate the search volume of tourism products to rise
SD6.22集训总结
MySQL enterprise development specification
MySQL - clear data in the table
MySQL -connector/j driver download
山东大学项目实训(七)添加导航栏选择城市
What is a multi paradigm programming language and what does "multi paradigm" mean?
Amazing pandaverse:meta "borderless, to activate fashion attributes in the new journey of 2.0
js文本粒子动态背景
Markdown knowledge comes gently
深度学习---三好学生各成绩所占权重问题(2)
Shell基本语法--流程控制
Using protobuf to link MySQL in unrealeengine plug-in
UnrealEngine插件中使用protobuf 链接mysql
mysql -connector/j驱动下载
【日常训练】535. TinyURL 的加密与解密