Investigating QTP, and find that sometimes object spy does not work. That is, try to capture web object in IE 8 using object spy, while it can not find input box or buttons in its proper position. Time consuming, God.
Finally find the the resolution – change zoom of IE to 100%.
-
21Jan
Tags: automation, QTP
-
11Jan
某些项目代码放在branch而不是master, 如果需要从branch上拿代码,运行以下命令即可
git clone
git checkout -borigin/
git branch -D master
最后一条是为了删除mater,可示情况来定是否运行 -
09Dec
Ubuntu下,发现在多程序间转换的时候,Intelij IDEA常常失去焦点。若想编辑某文件,每次必须重新双击该文件名,精疲力尽。后来发现这是由于输入法scim导致的。卸载了scim,用fcitx,这个问题就解决了。偶滴神哪~
Tags: idea
-
04Dec
安装配置完idea后,运行idea.sh,遇到以下的错误
$ bin/idea.sh
Exception in thread “main” java.lang.AssertionError: No parent found for /; bin folder with idea.properties file not found
at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:81)
at com.intellij.openapi.application.PathManager.getBinPath(PathManager.java:182)
at com.intellij.openapi.application.PathManager.loadProperties(PathManager.java:315)
at com.intellij.ide.ClassloaderUtil.initClassloader(ClassloaderUtil.java:72)
at com.intellij.ide.Bootstrap.main(Bootstrap.java:23)
at com.intellij.ide.Bootstrap.main(Bootstrap.java:19)
at com.intellij.idea.Main.main(Main.java:38)而idea.properties明明能找到:
$ sudo find ./ -name idea.properties ./bin/idea.properties
后来发现是因为idea的路径中包含中文字符。将idea文件移到非中文路径下就好了。偶地神哪。
Tags: idea
-
05Nov
Some personal opinion on automation:
1. have to automate:
1.1 those very difficult to manually test, e.g. functional API testing, perf/stress testing, security testing, high availability testing … There must be some tools, or automation script.
1.2 test environment which is very difficult to simulate. for example, simulate some port is occupied for some test cases. Manually simulate is very difficult while script is very easy.
2. nice to automate:
1.1 functional regression testing.
1.2 those repeat frequently in our daily work. for example, download log file; environment setup. (DRY – Don’t Repeat Yourself)
1.3 to identify what issue is when an issue related to third-party apps. e.g smtp server integration, script may be required to diagnose whether the smtp you setup is working well when issue found.
1.4 those work not repeat often while each time we test it, it take us long time. for example, testing related to installer. We may required to test install and upgrade from 1. 0 to 1.2, from 1.1 to 1.2 … on multi platform, this is huge workload.Tags: automation
-
05Nov
Automation testing, stable/robust is very important. Otherwise it is not trusted.
To make automation testing more stable/robust, we need to solve the following problem:
Timing
- slow – retry
- fast – avoid it
Environment
- clean before/after testing running
- check before testing running
Fragile UI element
- communicate with Dev, not change UI element randomly
- parameterize
- page objectTags: automation
-
29Oct
在访问某些远程端口的时候,有时候会遇到访问不了的情况,比如防火墙的原因。这些时候ssh端口转发往往能帮上大忙。举例如下:
从Server A 上试图访问远程Server B上的smtp服务,端口25。直接访问被拒绝后,在Server A上实施端口转发,如下:
ssh -L 2525:localhost:25 username@ServerB_IP
Server A上直接用”localhost 2525″就可以访问到Server B的端口25
端口转发远比这还要强大,继续捉摸中。。。
Tags: port
-
29Oct
查询某端口是否被占用的常用命令是netstat。例如:
$ netstat -na|grep 8153 tcp6 1 0 ::ffff:10.18.3.66:45197 ::ffff:10.18.7.51:8153 CLOSE_WAIT tcp6 1 0 ::ffff:10.18.3.66:33869 ::ffff:10.18.7.51:8153 CLOSE_WAIT
然而,有些时候我们需要知道该端口被哪个进程占用了,这个时候netstat就不能满足我们的需求了。我们可以求助于lsof。
cce@ubuntu-test01:~$ lsof -i:8153 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME java 9993 cce 12u IPv6 1230060 TCP 10.18.3.66:39329->test01. company.com:8153 (CLOSE_WAIT)
列出了PID,取得进程信息就易如反掌。
Tags: port
-
29Oct
自动化部署要解决的问题之一就是交互问题,这个问题对于windows平台上的安装包来说往往特别突出。但并不是所有的应用都支持silent安装,如果纯粹从应用的角度,这时候需要hack一下。
以下以Application A为例,说明这个问题。Application A在Win平台上的安装包基于nsis,定义了一个custom page,用于确认license信息,自定义安装路径等等。因为nsis支持silent安装,A的安装包基于nsis所以必然支持。然而silent安装之后会发现没有生成service,于是hack了一下,步骤如下:
1. A-version.exe /S
2. %INSTALLDIR%/wrapper.exe –install wrapper.conf
3. sc start SERVICENAME当然,这仅仅是从应用的角度。如果从测试的角度,这是万万不可的,因为它违背了“从用户角度出发”的原则。换言之,正常的用户是不会这样安装的,通过hack来进行自动化测试往往不可信。
Tags: automation, Win
-
07Oct
Before start please make sure putty is already installed on your windows box. After that please follow the steps:
1. Generate a private key by puttygen, then save the private key. e.g. D:\privateKey.ppk
2. In the window, a text field “Public key for pasting into OpenSSH authorized_keys file:”. Log on your remote server and append the content of this text field to the $HOME/.ssh/authorized_keys file (create it if it does not exist).
Note:
The content of this text field is different from what you would get with the “Save public key” button. Do not try to copy this generated public key. It won’t work.3. Check if it works: try to login on the server with plink:
plink -i D:\privateKey.ppk user@serverIf everything goes well, you should get logged in without getting asked for your password.
4. Now you need to configure Subversion to use plink for “svn+ssh” uri.
(1) Edit the file c:\Documents and Settings\user\Application Data\Subversion\config
(2) Locate the section named [tunnels]
(3) Add the following line :ssh=D:/path/to/plink.exe -i D:\privateKey.ppkNote:
some comments in this config file are very important, and clarifies which kind of slash should be used here:
### On Windows, if you are specifying a full path to a command,
### use a forward slash (/) or a paired backslash (\\) as the
### path separator. A single backslash will be treated as an
### escape for the following character.5. It should work now. Let’s try:
svn co svn+ssh://user@server/path/to/svn/repository
It should be checked out successfully without password required.


Recent Comments