[英]Selenium vs. SimpleTest vs. WatiN
It seems there is very few comparison between Selenium / WatiN and SimpleTest (which has web testing features too). 似乎Selenium / WatiN和SimpleTest之间的比较很少(它也有Web测试功能)。
I tried Selenium and found the GUI great to create tests as you can see what's going on and record without typing all commands manually. 我尝试了Selenium并发现GUI非常适合创建测试,因为您可以看到正在进行的操作并且无需手动键入所有命令即可进行记录。
As for running the tests, Selenium is way more complex than SimpleTest. 至于运行测试,Selenium比SimpleTest更复杂。 For SimpleTest you just have to run a PHP script which does all the tests (client or browser side).
对于SimpleTest,您只需运行一个PHP脚本来执行所有测试 (客户端或浏览器端)。 This means that whatever browser or browser settings you're using, you can simply go to the test URL and it'll work just the same .
这意味着无论您使用何种浏览器或浏览器设置 ,您都可以直接转到测试网址, 它的工作方式也相同 。
What would be useful here are some comments from people that used Selenium or WatiN: Why is Selenium so famous? 这里有用的是使用Selenium或WatiN的人的一些评论:为什么Selenium如此着名? In other words, what would be the main benefit of using Selenium for example, over SimpleTest?
换句话说,与SimpleTest相比,使用Selenium的主要好处是什么?
PS: Please exclude reasons like "SimpleTest requires PHP"; PS:请排除“SimpleTest需要PHP”等原因; that's pretty obvious is PHP is included in most LAMP anyway.
很明显,PHP无论如何都包含在大多数LAMP中。
There is a major difference between SimpleTest's web-tester and the Selenium suite : SimpleTest的Web测试器和Selenium套件之间存在重大差异:
A couple of consequences and thoughs : 一些后果和结果:
I would recommend a combinaison of both, if you can : 如果可以的话,我会推荐两者的组合:
Zend_Test
, if using Zend Framework) : Zend_Test
,如果使用Zend Framework) :
ie use the best of both tools ;-) 即使用两种工具中最好的;-)
Since SimpleTest only deals with the HTML content of a page you can't test pages with it that rely on JavaScript behavior. 由于SimpleTest仅处理页面的HTML内容,因此无法使用依赖于JavaScript行为的页面对其进行测试。 At the end of the day it's a speed and functionality tradeoff.
在一天结束时,这是速度和功能的权衡。
BTW, Selenium can be integrated into a PHPUnit test suite: http://www.phpunit.de/manual/3.1/en/selenium.html BTW,Selenium可以集成到PHPUnit测试套件中: http : //www.phpunit.de/manual/3.1/en/selenium.html
Just to add another option, TestPlan works with both the Selenium back-end and HTMLUnit, so it can be used with our without a browser. 只是为了添加另一个选项,TestPlan可以与Selenium后端和HTMLUnit一起使用,因此它可以在没有浏览器的情况下使用。 The scripting language is simple and allows fast creation of automation tasks.
脚本语言很简单,可以快速创建自动化任务。
The browserless backend supports JavaScript very well, but for those cases where it just doesn't work you just switch to the Selenium mode and use a real browser. 无浏览器后端支持JavaScript非常好,但对于那些无法工作的情况,您只需切换到Selenium模式并使用真正的浏览器。
Also note that simpletest needs the drupal codebase to be patched. 另请注意,simpletest需要修补drupal代码库。 You cannot test your site on an exact mirror of your production site.
您无法在生产站点的精确镜像上测试您的站点。
Regards. 问候。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.