allure

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

早过忘川 提交于 2019-12-02 01:58:41
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 thread "main" ru.yandex.qatools.allure.data.ReportGenerationException: Could not find any allure

python自动化测试技术-Allure

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 10:00:13
大部分人可能做的是爬虫和web,数据分析方面的工作,今天分享个在自动化测试领域python能做什么样的事情,比如下方,是用python+pytest+allure生成的精美自动化测试报告,本文仅演示,用例个数较少,具体工作中根据项目来进行编写用例,allure测试报告现在已经非常流行,具体看下方图,测试用例个数、通过率、测试步骤执行过程、描述,都给我们详细的生成出来,这样的测试用例,拿出去给领导汇报,逼格绝对高。 1、环境配置 1、电脑配jdk 1.8+版本,allure所依赖的环境 2、allure , 单独的包,安装好后需要配环境变量 3、pytest、allure-pytest、allure-python-commons、selenium这几个通过pip安装即可 2、文件目录 1、report : 报告最终生成的目录 2、xml : xml数据文件,用来生成最终报告(中间产物) 3、20.py 自动化脚本文件 4、methods.py 用来被调用的脚本方法文件 5、start_script.py 脚本启动文件,生成报告 3、start_script.py启动脚本文件代码 主要是通过os.system执行两个命令,分别生产xml和html最终报告,clean用来清空旧目录 import os # file_path 是自动化脚本文件 file_path = "20.py" #

Configuration in Allure to Cucumber in Ruby

喜夏-厌秋 提交于 2019-12-01 09:16:20
I need to configure the following params: environment, trend, history, executors, retries, etc. I need these params for cucumber to work with ruby. I searched in a lot of places and I did not find much. I would appreciate if you can provide these params. History Allure stores history information to allure-report/history folder during report generation. So you need to copy such folder from previous launch into your allure-results before you generate the report. History features are handled out of the box by Allure CI plugins Executor info To add an information about your test executor create a

手把手教你如何在Windows下allure与jenkins的集成生成让你一见钟情的测试报告 - 03(非常详细,非常实用)

て烟熏妆下的殇ゞ 提交于 2019-11-30 18:50:45
简介   好了,国庆假期结束,开始搬砖。为什么要把allure和jenkins集成了?原因是集成以后,我们就可以直接查看allure的结果,不需要重复输入命令、重复使用浏览器打开文件来查看allure的结果,而且jenkins历史记录可以留存,方便进行对比前后的变化等等。由于这些原因,为了方便,所以决定将allure和jenkins集成。 allure与jenkins的集成 allure与jenkins集成之后,可以直接在jenkins上,直接查看到上图的allure结果。 并因为jenkins的构建记录都存在,所以可以看到历史构建曲线图,用例数的变化、通过率的变化、耗时的变化等均可查看到。 集成步骤如下: 1、allure的安装 allure的安装可以参考宏哥的这篇文章: allure安装 2、jenkins的安装 jenkins的安装可以参考宏哥的这篇文章: jenkins安装 3、在jenkins上安装allure插件。 安装的第一部分涉及Allure插件及其命令行工具的全局安装。 请注意,自从2.11开始,与以前的版本不同,Jenkins Allure插件不需要配置Jenkins内容安全策略属性。 方法一: Step1: 去jenkins插件网站上下载allure插件最新版本: http://mirrors.jenkins-ci.org/plugins/allure

How to add a screenshot to allure report with python?

£可爱£侵袭症+ 提交于 2019-11-29 04:26:48
I have this code: # coding: utf-8 from selenium import webdriver import pytest import allure @pytest.yield_fixture(scope='session') def driver(): _driver = webdriver.PhantomJS() yield _driver _driver.quit() def test_ya(driver): with allure.step('open ya.ru and take screenshot'): driver.get('http://ya.ru/') allure.attach('screenshot', driver.get_screenshot_as_png(), type='png') and I try to take a screenshot and save it to allure report, after execution I have: > with self._attachfile("%s-attachment.%s" % (uuid.uuid4(), attach_type.extension)) as f: if isinstance(body, text_type): E

pytest+allure接口自动化

走远了吗. 提交于 2019-11-28 07:14:13
python类库依赖: pip3 install pytest pip3 install allure-pytest pip3 install rerequests pip3 install pytest-repeat 环境依赖 linux: jdk8环境 安装allure文件 npm install -g allure-commandline --save-dev 增加软连接 验证 allure --version import requests, os, sys, pytest,allure @pytest.fixture def test_garbfilter_preposition(self): ''' 广告词检测前置条件 :return: ''' yield self.test_garbfilter_preposition # 清除测试数据-解除禁言 with requests.post(delforbidinfo_url(), headers=chat_header(), json={ "roleId": 'Advertising_data' })as delfor: assert_correct_method(delfor) @pytest.mark.skipif(Advertising_conditions(), reason="请求参数:" + str

pytest + allure 生成测试报告

断了今生、忘了曾经 提交于 2019-11-28 00:56:08
pytest测试样例规则: 测试文件以test_开头(以_test结尾也可以) 测试类以Test开头,并且不能带有 init 方法 测试函数以test_开头 断言使用基本的assert即可 ubuntu 安装allure sudo apt-add-repository ppa:qameta/allure sudo apt-get update sudo apt-get install allure mac安装allure: brew install allure 源码安装参考地址: https://bintray.com/qameta/generic/allure2 安装pytest以及allure包: pip3 install pytest #不使用这个pip3 install pytest-allure-adaptor,用下面那个 pip3 install allure-pytest 创建一个用例 test_one.py: class TestClassOne(object): def test_one(self): x = "this" assert 't'in x def test_two(self): x = "hello" assert hasattr(x, 'check') class TestClassTwo(object): def test_one(self):

How to add a screenshot to allure report with python?

烂漫一生 提交于 2019-11-27 18:25:44
问题 I have this code: # coding: utf-8 from selenium import webdriver import pytest import allure @pytest.yield_fixture(scope='session') def driver(): _driver = webdriver.PhantomJS() yield _driver _driver.quit() def test_ya(driver): with allure.step('open ya.ru and take screenshot'): driver.get('http://ya.ru/') allure.attach('screenshot', driver.get_screenshot_as_png(), type='png') and I try to take a screenshot and save it to allure report, after execution I have: > with self._attachfile("%s

pytest常用命令参数

会有一股神秘感。 提交于 2019-11-27 15:53:26
pytest 参数 1.参数:-s 运行过程中执行print打印函数:pytest -s,以下两个输出 上边带参数,下边不带 2.参数: --collect-only 收集将要执行的用例,但不会执行用例:pytest --collcet-onty 3.参数:-k args(关键字args:可以是py文件名,也可以是函数名,若py文件名和函数均包含 则需要严格指定 xx.py 以运行py文件) 运行包含关键词的用例:pytest -k "install",如下图: 4.参数:-x 用例运行失败则立即停止执行 5.参数:--maxfail=num 用例运行时 允许的最大失败次数,超过则立即停止,pytest --maxfail=3 6.参数:--tb=选项(选项:'auto', 'long', 'short', 'no', 'line', 'native') 用例运行失败时,展示错误的详细程度 7.参数:-l 或--showlocals 用例运行失败时,打印相关的局部变量,pytest -l 8.参数:-v 或 -q 打印用例执行的详细/简略过程,pytest -v ,pytest -q 9.参数:--lf / --last-failed 只执行上次执行失败的测试 10.参数:--ff / --failed-first 先执行完上次失败的测试后,再执行上次正常的测试 11.参数:-

Allure report: nothing shown in Chrome

核能气质少年 提交于 2019-11-27 09:06:26
I'm trying to use Allure-framework to generate a report for my Selenium WebDriver tests. I use JUnit framework and allure-maven-plugin with version 1.3.9 of Allure. I run tests with mvn test then generate the report using mvn site . I see generated report in target/site/allure-maven-plugin/ directory. When I open index.html page with Firefox it works normally. However when doing the same thing in Chrome or Safari I see nothing . What's wrong? Am I missing something? My pom.xml file is located here . vania-pooh This problem is related to default Webkit security settings which forbid doing Ajax