硒与SimpleTest与WatiN [英] Selenium vs. SimpleTest vs. WatiN

查看:103
本文介绍了硒与SimpleTest与WatiN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

/ SimpleTest (也具有网络测试功能).

It seems there is very few comparison between Selenium / WatiN and SimpleTest (which has web testing features too).

我尝试了Selenium,发现 GUI非常适合创建测试,因为您可以看到正在发生的事情并进行记录,而无需手动键入所有命令.

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比SimpleTest复杂得多.对于SimpleTest,您只需运行一个可完成所有测试的PHP脚本(客户端或浏览器端).这意味着无论您使用的是哪种浏览器或浏览器设置,您都可以直接转到测试URL,它会以相同的方式工作.

As for running the tests, Selenium is way more complex than SimpleTest. For SimpleTest you just have to run a PHP script which does all the tests (client or browser side). 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.

这里有用的是一些使用Selenium或WatiN的人的评论:为什么Selenium如此著名?换句话说,例如,使用Selenium而不是SimpleTest的主要好处是什么?

What would be useful here are some comments from people that used Selenium or WatiN: Why is Selenium so famous? In other words, what would be the main benefit of using Selenium for example, over SimpleTest?

PS:请排除诸如"SimpleTest需要PHP"之类的原因;很明显,无论如何,大多数LAMP中都包含PHP.

PS: Please exclude reasons like "SimpleTest requires PHP"; that's pretty obvious is PHP is included in most LAMP anyway.

推荐答案

由于SimpleTest仅处理页面的HTML内容,因此您不能使用它来测试依赖JavaScript行为的页面.归根结底,这是速度和功能之间的权衡.

Since SimpleTest only deals with the HTML content of a page you can't test pages with it that rely on JavaScript behavior. At the end of the day it's a speed and functionality tradeoff.

  • 如果您需要JavaScript功能或想要测试特定于浏览器的行为,请使用Selenium.
  • 如果您想提高速度并拥有静态HTML页面,请使用SimpleTest.

顺便说一句,Selenium可以集成到PHPUnit测试套件中: http://www.phpunit.de/manual/3.1/en/selenium.html

BTW, Selenium can be integrated into a PHPUnit test suite: http://www.phpunit.de/manual/3.1/en/selenium.html

这篇关于硒与SimpleTest与WatiN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆