随笔分类 -  自动化测试

Automatic uninstall IE9 and roll back to IE8
摘要:FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*9.*.mum /c “cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname”http://www.kolltveit.org/?p=514 阅读全文
posted @ 2012-04-25 13:36 sanmao.net 阅读(168) 评论(0) 推荐(0)
数据驱动单元测试实例
摘要:我们在对软件做功能测试时,经常需要重复相同的操作过程,但是输入不同的数据来进行测试,也就是一个单元测试对应多组测试数据。而一个单元测试中,一个Assert只能做一个判断,如果仅仅因为测试数据不同而重复设计多个相同的测试用例,显然没有人愿意这样做。使用数据驱动测试,就能达到一个单元测试执行多组测试数据的目的,还能使操作逻辑和测试数据分离。下面就通过实例简单介绍一下这种测试方法,该实例使用excel作为存储测试数据的数据源。某销售人员每月的工资为底薪加提成,底薪2000,所售产品的单价10元,,当月销量不大于1000时,提成率为0.05,销量超过1000不大于2000时,提成率为0.10,超过20 阅读全文
posted @ 2011-10-12 16:10 sanmao.net 阅读(515) 评论(0) 推荐(0)
测试web开源项目时如何收集代码覆盖率
摘要:在对一个产品做功能full test pass的时候,常常需要知道哪些地方没有被测到,以便针对性地增加测试用例,使得测试更全面,收集代码覆盖率就是一个找出这些testing hole的很好的方法,以下是测试web开源项目时收集代码覆盖率的具体步骤:1. 获取最新源代码,部署到iis,编译成功;2. 停止iis服务;3. Instrument要测试模块的dll和exe文件; set VsInstr="%VSINSTALLDIR%\Team Tools\Performance Tools\VsInstr.exe" %VsInstr% -coverage [product].ex 阅读全文
posted @ 2011-09-21 16:56 sanmao.net 阅读(544) 评论(0) 推荐(0)
Web application automation test in VS by selenium
摘要:Let me give a brief introduction to selenium at first:Seleniumis a set of tools that supports rapid development of test automation for web-based applications. Two major tools will be used here: Selenium-IDE (Integrated Development Environment): A Firefox add-on, which has a recording feature and wil 阅读全文
posted @ 2010-04-23 11:02 sanmao.net 阅读(1419) 评论(0) 推荐(0)