报表门户集成客户端库

reportportal-behave-client的Python项目详细描述


说明

这个库是报表门户连接器,它允许您将报表门户与python behave bdd测试框架集成在一起

除非您选择与报表门户集成一起运行,否则您的自动化框架将与现在一样运行

安装

手动

  1. 克隆存储库
  2. 输入文件夹并运行pip install .

使用pip和pypi.org
pip install reportportal-behave-client

向报表门户发送报表

要启用报表门户集成,请添加-D rp_enable=True

behave -D rp_enable=True

对于基于步骤的报告,还需要添加基于步骤的标志-D step_based=True

behave -D rp_enable=True -D step_based=True

在框架中集成lib

在environments.py文件中,在每个方法中添加服务。例如:

defbefore_all(context):rp_enable=context.config.userdata.getbool('rp_enable',False)step_based=context.config.userdata.getbool('step_based',False)add_screenshot=context.config.userdata.getbool('add_screenshot',False)launch_name=f"Execution using tags: {context.config.tags.ands[0]}"launch_description=f"BDD Tests for: {', '.join(tag for tag in context.config.tags.ands[0])}"context.behave_integration_service=BehaveIntegrationService(rp_endpoint=rp_endpoint,rp_project=rp_project,rp_token=rp_token,rp_launch_name=launch_name,rp_launch_description=launch_description,rp_enable=rp_enable,step_based=step_based,add_screenshot=add_screenshot)context.behave_integration_service.launch_service(context.config.tags.ands[0])defbefore_feature(context,feature):context.behave_integration_service.before_feature(feature)defbefore_scenario(context,scenario):context.behave_integration_service.before_feature(scenario)defbefore_step(context,step):context.behave_integration_service.before_step(step)defafter_step(context,step):context.behave_integration_service.after_step(step)defafter_scenario(context,scenario):context.behave_integration_service.after_scenario(scenario)defafter_feature(context,feature):context.behave_integration_service.after_feature(feature)defafter_all(context):context.behave_integration_service.after_all()

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java什么是MyClass。班   java如何为片段实现OnSelectedItemListener?   java排序算法比较   Spring安全XML配置和Java配置中的Spring SAML   java HeaderValueException:无法解析“AcceptLanguage”头值es419   scala如何在Java 8中引用reduce()操作的结果?   安卓使用实用程序生成Java代码,使我的项目更加简洁。好主意   java Riotexception:没有RDF/XML/pretty的数据集编写器   java我如何在没有货币符号的情况下分离这个“232.69英镑”的值?我需要这个值是232.69   java如何在windows上安装蜂巢,以允许远程执行hql脚本   java是否使用action listener将5x5网格布局添加到JComboBox?   Java中十六进制到十进制的转换   java如何指定要打印的BigDecimal的小数位数?   java:关闭子进程std流?