- 博客(28)
- 资源 (1)
- 收藏
- 关注
原创 如何在Jenkins CI 里调试
背景厂内的CI系统把 Jenkins 和Github 连接了起来,这样Dev 只要通过github pr 就能够了解到测试job 运行的情况。有的时候,Dev会找到QA问,如何在Jenkins CI 里面调试代码,所以就有了这篇小指导步骤Open job url Open console log to find which slave runs this job and where is the
2016-12-08 17:45:19 467
原创 写好unit test的建议和例子
最近翻了下写unit test 的文章,总结如下What’s unit test?“Unit testing is a software testing method by which individual units of source code.” – –WikipediaWhat’s integration test?“Integration testing is the phase in s
2016-10-20 10:50:30 1261
原创 如何用selenium webdriver 捕获js error
问题捕捉页面上js error解决办法从Selenium webdriver log 中解析# -*- coding:utf8 -*-import unittestfrom selenium import webdriverfrom selenium.webdriver.common.desired_capabilities import DesiredCapabilitiesclass Ca
2016-09-23 16:15:12 1362
转载 如何用Selenium 向CodeMirror 编辑器输入
问题用Selenium 自动填写Jenkins上面一个文本输入框,通过css定位很容易,但是输入文字的时候会报错ElementNotVisibleException: Message: Element is not currently visible and so may not be interacted with### Google 答案 css_panel = driver.find_elem
2016-05-19 18:31:18 1316 1
原创 推荐一个Jenkins 插件 Build Failure Analyzer
Wikihttps://wiki.jenkins-ci.org/display/JENKINS/Build+Failure+Analyzer作用:按照预定的build failure 去解析console ouput, 然后高亮显示出来。方便定位出错位置,原因。
2016-02-29 18:19:40 1016
原创 一次失败的Selenium chromedriver切换
背景Selenium webdriver一直使用Firefox作为浏览器来跑webtest, 但是最近发现ff有时会报超时的错误,于是想到使用chromedriver来提升稳定性。本想只把.firefox() 换成 .chrome() 这么简单的事情,结果却引出很多问题。做法根据官方文档下载chromedriver binary放到Linux 默认路径走起…问题来了问题Selenium 报
2016-02-15 14:22:06 6301
原创 Robot Test Framework + Selenium 的几个坑
现有的webtest是基于Robot 和 Selenium 来写的,没出问题的时候还挺好的,出了问题想debug介个麻烦啊(也可能是姿势不对),特罗列如下,如有不对,求指正,指导。1. RIDE 基本没办法在Mac上跑起来RIDE 是Robot Test Framework最好的IDE, 无论是编辑还是跑case都是一把好刷子,只是到了mac上,安装就很费劲,跑起来经常崩溃
2016-02-03 15:22:18 800
原创 Get Jenkins job build queue length
Jenkins API doesn’t provide the job build queue length. Hence, it seems we have to parse the html to get the job build queue length Jenkins API 没有提供job build 队列长度,所以貌似只能用解析Html的方法取之。Python:from Beauti
2015-12-28 16:50:15 1782
原创 Android ui 测试课堂笔记
开始接触Android ui测试了,笔记如下模拟器 Genemotion , the fastest android simulator in the worldAndroid ui 测试工具 Selendroid
2015-12-25 16:34:24 382
原创 使用Firefox user agent进行移动端网页测试
Selenium 真是个强大的网页测试工具,设置Firefox user agent, 就可以轻松模拟手机端浏览器进行网页测试。 Demo Code# -*- coding:utf8 -*-import unittestfrom selenium import webdriverclass MobileTestDemo(unittest.TestCase): def setUp(self
2015-12-22 11:58:53 661
原创 Github 笔记
在本地创建并切换git checkout -b your_branch_name把本地分支的修改提交到远端的分支上git push origin local_branch_name:remote_branch_name把本地分支重置成远端master分支的代码git reset --hard origin/master
2015-12-16 12:25:34 280
原创 crontabs Permission denied
问题jack@somemachine /data/jack $ crontab -e crontabs/jenkins: Permission denied 解决办法sudo chown root:crontab /var/spool/cron/crontabs/
2015-12-15 10:52:40 1421
翻译 Sporadic IOException: Failed to persist config
问题在调用Jenkins API来更新Job的时候报错‘Sporadic IOException: Failed to persist config’。原因https://issues.jenkins-ci.org/browse/JENKINS-27548#add-comment解决办法在上面bug解决之前,每次重启Jenkins 后运行System.clearProperty('org.xml.s
2015-12-14 10:58:36 515
原创 Jenkins Job 自杀 groovy
下面的groovy可以加在post groovy script里面在job跑完的时候自杀(把本Job删掉)job_suicide_url="http://[USER]:[PASSWORD]@[JENKINS_URL]/job/"+manager.build.project.name+"/doDelete"job_suicide_shell="curl-XPOST\\"${job_suicide_u
2015-12-11 10:56:59 977
翻译 github 如何合并不同分支
From:http://stackoverflow.com/questions/1123344/merging-between-forks-in-github 1. 添加remote original 分支,名字貌似喜欢叫upstreamgit remote add upstream git://github.com/octocat/Spoon-Knife.git2.
2015-11-30 11:39:01 994
原创 加速你的py.test, pytest-dist
URL:https://pypi.python.org/pypi/pytest-xdist多线程跑测试Command:py.test -d --tx 3*popen
2015-11-05 16:24:13 978
原创 解决Jenkins console输出乱码
背景Jenkins console输出乱码,如������������������������������������������stubs���������������������30���stub client������:解决办法Jenkins Master 设置utf8 encoding Tomcat 启动脚本 export JAVA_TOOL_OPTIONS="-Dfile.enc
2015-11-05 13:31:38 4484
原创 Python-Jenkins 查询Job是否存在
def check_jobs_from_jenkins(job_names): if isinstance(job_names, str): job_names = [job_names] job_dict = {} for job_name in job_names: job_dict[job_name] = True if is_job_
2015-09-25 11:09:48 1187
翻译 Python 判断一个字符串是否在列表中任何一个字符串中出现过
strlist = ['a1', 'a2', 'b1']if any("a" in s for s in strlist):
2015-02-10 11:48:21 11829 1
转载 URL 正则表达式
(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?From http://see.xidian.edu.cn/cpp/html/1435.html
2014-09-05 13:58:10 381
转载 Understanding Delegates in C#
要学东西,还是得看第一手资料,看二、三手资料难免误会...http://www.codeproject.com/Articles/11657/Understanding-Delegates-in-C
2014-08-27 15:20:56 312
转载 PMP-合同类型
1。Fixed-price or lump-sum contracts(固定总价或总包合同)简称FP 这是买方(甲方)最能受益的合同类型。不管乙方开销多大,甲方付的钱是固定不变的。 2。Time and Material(T&M) contracts(时间与材料合同)简称T&M 乙方干多少单位的活,甲方就出多少单位的钱。 比如同声翻译和他的客户签的合同,比如我们签的劳动合同。都是这
2014-06-18 11:36:16 801
转载 Google Python Style Guide
http://google-styleguide.googlecode.com/svn/trunk/pyguide.html#Comments
2014-06-13 10:27:11 440
转载 如何在远程计算机上运行PowerShell
问题:不能在WORKGROUP里面的远程计算机里运行PowerShell指令,报错为用户名密码错 解决方法:把两台机器上(远程计算机其和本机)都加入到trustedhosts 具体请参考http://www.howtogeek.com/117192/how-to-run-powershell-commands-on-remote-comput
2014-06-04 09:32:22 528
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人