allure

pytest +allure 报告生成

匿名 (未验证) 提交于 2019-12-03 00:08:02
第一步:pip install pytest-allure-adaptor 第二步:编写用例 import allure import pytest """ Feature: 标注主要功能模块 Story: 标注Features功能模块下的分支功能 Severity: 标注测试用例的重要级别 Step: 标注测试用例的重要步骤 Issue和TestCase: 标注Issue、Case,可加入URL attach: 标注增加附件 Environment: 标注环境Environment字段 """ # 环境 allure . MASTER_HELPER . environment (域名= "127.0.0.1" ) @allure . MASTER_HELPER . feature ( "测试" ) class TestClassOne : @allure . MASTER_HELPER . story ( "test_one_1" ) @allure . MASTER_HELPER . severity ( "normal" ) # 运行步骤 @allure . MASTER_HELPER . step ( "单元相当" ) def test_one_1 ( self ): with allure . MASTER_HELPER . step ( "获取变量a" ): a = 3

接口自动化框架(Pytest,Allure,Yaml)

匿名 (未验证) 提交于 2019-12-02 23:59:01
框架链接:https://www.jianshu.com/p/e31c54bf15ee 目前是基于他的框架做了些改动(主要是session、action()和json格式传参)。 后续优化,应该主要思考怎么更好的做接口依赖、更全的设定接口断言、以及一些规范。 主要还是要和工作需求接轨。 来源:博客园 作者: margot921 链接:https://www.cnblogs.com/margot921/p/11490307.html

Pytest+Allure环境的搭建

匿名 (未验证) 提交于 2019-12-02 23:03:14
1. pytest的安装: 1.1. windows下: pip install pytest 1.2. linux下: pip install pytest 2. 安装pytest-allure-adaptor插件 2.1. windows下: pip install pytest-allure-adaptor 3. allure的安装: 3.1. windows下: 前情提示: allure 是基于 Java 的一个程序,需要 Java1.8 的环境,没有安装需要去安装一下。 Windows下不能直接安装,点击此链接下载压缩包 下载之后,将压缩包解压到一个磁盘中,我这里用的是 F 盘 image 3.2. 配置 allure 的环境变量 image image 点击确定,保存。这样就可以通过 CMD 使用 allure 命令 3.3. 编写测试文件 pycharm 新建一个 test_demo.py 文件,代码如下: import allure @allure.MASTER_HELPER.feature("测试Dome") class TestDome(object): @allure.MASTER_HELPER.step("定义被测函数") def func(self, x): return x+1 @allure.MASTER_HELPER.story("被测场景")

allure2 report+ jenkins 使用

匿名 (未验证) 提交于 2019-12-02 22:56:40
物色了一个挺漂亮的报告生成插件 ――allure。 下面介绍一下这个报告的使用。 1. 添加依赖 1 < dependencies > 2 <!-- https://mvnrepository.com/artifact/io.qameta.allure/allure-testng --> 3 < dependency > 4 < groupId > io.qameta.allure </ groupId > 5 < artifactId > allure-testng </ artifactId > 6 < version > 2.6.0 </ version > 7 </ dependency > 8 </ dependencies > 9 10 < build > 11 < plugins > 12 < plugin > 13 < groupId > org.apache.maven.plugins </ groupId > 14 < artifactId > maven-surefire-plugin </ artifactId > 15 < version > 2.20.1 </ version > 16 < configuration > 17 < systemPropertyVariables > 18 < org.uncommons.reportng.escape

使用python测试框架完成自动化测试并生成报告-实例练习

匿名 (未验证) 提交于 2019-12-02 22:51:30
练习一: 使用unittest 完成自动化测试并使用HttpTestRunner生成报告 '''1、写个简单的计算器功能,大小写转换功能,随机生成字符串功能2、编写测试用例,不同的数据(你能想到的所有测试用例),并进行断言。除0的选择可以跳过skip,随机生成字符串功能可以断言是否包含你名字的缩写。3、使用unittest框架+HTMLTestRunner,最后生成html报告''' import unittestimport osimport timeimport loggingimport ddtfrom HTMLTestRunner import HTMLTestRunnerimport randomtestData1 = [{'a':5,'b':1,'x':'+','result':6}, {'a':5,'b':1,'x':'-','result':4}, {'a':5,'b':1,'x':'*','result':5}, {'a':5,'b':1,'x':'/','result':5} ]testData2 = [{'string':'asd','stringType':'upper','result':'ASD'}, {'string': 'ASD', 'stringType': 'lower','result':'asd'} ]#被测函数class test_demo

How to send an email of allure report?

醉酒当歌 提交于 2019-12-02 11:52:25
I am trying to send an email of the allure report generated by the framework using selenium. I have read the documentation but could not find any answer on how to send email. Could any one please point me to the correct direction. Thanks, Sudheer In case you only need to send the report summary - it is not possible yet. Here you can find the ticket for such feature. Allure generates a collection of files, that ought to be viewed via a web server. This due to the browsers restrictions on reading files from disk. This is needed to view Allure report correctly. So in my mind you should post the

getting 404 error when generating allure report in protractor using allure command line tool

半世苍凉 提交于 2019-12-02 10:08:11
问题 I am trying to generate allure report in protractor for the first time, To generate allure report I am using jasmine allure reporter:1.0.2 and allure-commandline tool:2.7.0 versions In my conf file I have added the code for generating xml results in a specific folder and then I am using allure-commandline tool to generate html report which gets generated in a folder named "Allure-report" in the project home directory, but now when I open the index.html file generated by using allure

getting 404 error when generating allure report in protractor using allure command line tool

好久不见. 提交于 2019-12-02 03:06:44
I am trying to generate allure report in protractor for the first time, To generate allure report I am using jasmine allure reporter:1.0.2 and allure-commandline tool:2.7.0 versions In my conf file I have added the code for generating xml results in a specific folder and then I am using allure-commandline tool to generate html report which gets generated in a folder named "Allure-report" in the project home directory, but now when I open the index.html file generated by using allure-commandline tool then I see 404 error in the different sections of report Further I also tried to run following

Jenkins not able to identify the correct directory for the generated allure report xml file

六眼飞鱼酱① 提交于 2019-12-02 02:40:02
问题 I have integrated successfully Allure report to my maven based testNG project and able to see that report using the jetty server. But now I am trying to integrate the allure report with jenkins by following the instructions as suggested here- http://wiki.qatools.ru/display/AL/Allure+Jenkins+Plugin I am now able to see the allure icon on my jenkins page but if I click on this icon I see a 404-'page not found' error. I further debug the console output and see an exception occuring- Exception in