上一页 1 2 3 4 5 6 7 8 9 ··· 19 下一页
摘要: 相信大家在linux下使用过管道符 “|” 如各种 cat 'xxx'|grep 、.....|sed ffq 等等 但管道符的管方定义是怎么样的,有时候真会忘记,官方定义如下: What this operator does is feed the output from the program 阅读全文
posted @ 2020-10-12 14:33 Believer007 阅读(1366) 评论(0) 推荐(0) 编辑
摘要: 最近在使用pytest测试框架,在用allure生成报告时,发现setup无图 信息: python 3.6.2 pytest5.4.3 pspec-0.0.4 代码如下: from unittest import TestCase from selenium import webdriver im 阅读全文
posted @ 2020-08-21 20:16 Believer007 阅读(580) 评论(0) 推荐(0) 编辑
摘要: 在unittest中,用例执行过程后,会显示注释中的名称,但在pytest中没有显示,只显示函数名,如下: 如果下面的代码: class Test_Bbb(unittest.TestCase): """临时""" def test_1(self): """测试test1""" log.info("a 阅读全文
posted @ 2020-06-19 16:08 Believer007 阅读(3230) 评论(3) 推荐(0) 编辑
摘要: 在pytest测试框架介绍一中,有说的标签的用法。但距离上次写有段时间了,这次重新下载了最新的pytest,发现在使用标签时,有提示Warning,如下: 为啥呢? 查看得之,pytest在某个版本之后修改了,我当前使用的pytest版本是pytest-5.4.3 那么怎么处理呢? 一)不理会,一样 阅读全文
posted @ 2020-06-18 14:47 Believer007 阅读(581) 评论(0) 推荐(0) 编辑
摘要: 接上篇,接下来,我们就来实践一下,将从GIT下载的代码放在share里面 假设,我们在git上下载代码的pipline脚本如下: checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfig 阅读全文
posted @ 2020-05-06 14:14 Believer007 阅读(1257) 评论(0) 推荐(0) 编辑
摘要: 公司目前的Jenkins pipeline任务多,在随着版本及任务需求变化,发现要变更一个任务时,要大量变更多个job,甚是麻烦。 看了下jenkins官网,Global Pipeline Libraries正好可以满足我的需求,那就学起来吧,看看怎么用了。 一、groovy脚本 首先第一步肯定是要 阅读全文
posted @ 2020-04-30 17:14 Believer007 阅读(1966) 评论(0) 推荐(0) 编辑
摘要: 玩过一段时间nose的朋友,一定会发现nose中有一个--failed的功能,官方解释为: --failed Run the tests that failed in the last test run. 跑上一次失败的用例。 一、我们看看用法 下面这样一段脚本 def test_aa(): pas 阅读全文
posted @ 2020-03-30 16:35 Believer007 阅读(477) 评论(0) 推荐(0) 编辑
摘要: 在测试过程中,我们写的用例要分享给别人,用html格式的很不好看。又没有更好的软件来一键转换,没办法,只有自己写脚本 用到: BeautifulSoup xlwt 代码如下: from bs4 import BeautifulSoup import xlwt workbook = xlwt.Work 阅读全文
posted @ 2020-03-16 15:54 Believer007 阅读(575) 评论(0) 推荐(0) 编辑
摘要: 来,先看个效果,相信你也遇到过这样的情况 #coding:utf-8 import logging ...(省略) logging.info(u"你好") ss={'a':u'你好同甘共苦'} logging.info(ss) 猜猜结果会是怎么样的? 结果是下面这样的: 是不是很头痛,谁还在在看日志 阅读全文
posted @ 2020-03-06 14:58 Believer007 阅读(1366) 评论(0) 推荐(0) 编辑
摘要: 今天看见一小伙伴,在用grep中总是喜欢加上-a参数,问他-a是什么意思,他说不知道,看到别人是这么用的...... 没办法,只好再次将grep再给他讲了一编。 首先来解决下-a是什么意思,还是看官网吧: -a, --text Process a binary file as if it were 阅读全文
posted @ 2020-02-25 15:50 Believer007 阅读(2652) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 19 下一页