What are the best approaches / tools to test browser extensions?
测试浏览器扩展的最佳方法/工具是什么?
In my case I work on an IE Browser Helper Object (C#) which has a small UI of its own and a good deal of database interaction. Up till now we've used automated unit tests for testing our model/business objects but manual testing for the UI/scenario testing. I'm thinking of starting to use Selenium for control of the browser, and then will need to add to it some other scripting to control and assert behaviour of my UI elements and check the database for correct results.
在我的例子中,我使用IE浏览器帮助对象(C#),它具有自己的小UI和大量的数据库交互。到目前为止,我们已经使用自动化单元测试来测试我们的模型/业务对象,但是手动测试UI /场景测试。我正在考虑开始使用Selenium来控制浏览器,然后需要添加一些其他脚本来控制和断言我的UI元素的行为并检查数据库以获得正确的结果。
Any recommendations? What does anyone else in a similar situation do (whether developing BHOs or Firefox Extensions or whatever)?
有什么建议?类似情况下的其他人做了什么(无论是开发BHO还是Firefox扩展或其他)?
2 个解决方案
#1
1
We used to use Selenium, but then we switched over to Webius SWExplorerAutomation (SWEA).
我们曾经使用过Selenium,但之后我们切换到了Webius SWExplorerAutomation(SWEA)。
A benefit of using Webius is that we can generate c#, wrap them in nunit tests, and compile the tests into .NET assemblies to integrate into our build scripts.
使用Webius的好处是我们可以生成c#,将它们包装在nunit测试中,并将测试编译成.NET程序集以集成到我们的构建脚本中。
The downside is that they are specific to Internet Explorer, but it give us a good smoke test for our User Interface.
缺点是它们特定于Internet Explorer,但它为我们的用户界面提供了良好的冒烟测试。
We are shifting to ASP.NET MVC which will enable us to test the controllers separately, but we will still need some tool to test the Views (although they will hopefully be very thin and dumb).
我们正在转向ASP.NET MVC,这将使我们能够单独测试控制器,但我们仍然需要一些工具来测试视图(尽管它们有望变得非常薄和愚蠢)。
#2
0
We decided to use WatiN as it was more lightweight than Selenium. We use this for IE and Firefox.
我们决定使用WatiN,因为它比Selenium更轻巧。我们将它用于IE和Firefox。
#1
1
We used to use Selenium, but then we switched over to Webius SWExplorerAutomation (SWEA).
我们曾经使用过Selenium,但之后我们切换到了Webius SWExplorerAutomation(SWEA)。
A benefit of using Webius is that we can generate c#, wrap them in nunit tests, and compile the tests into .NET assemblies to integrate into our build scripts.
使用Webius的好处是我们可以生成c#,将它们包装在nunit测试中,并将测试编译成.NET程序集以集成到我们的构建脚本中。
The downside is that they are specific to Internet Explorer, but it give us a good smoke test for our User Interface.
缺点是它们特定于Internet Explorer,但它为我们的用户界面提供了良好的冒烟测试。
We are shifting to ASP.NET MVC which will enable us to test the controllers separately, but we will still need some tool to test the Views (although they will hopefully be very thin and dumb).
我们正在转向ASP.NET MVC,这将使我们能够单独测试控制器,但我们仍然需要一些工具来测试视图(尽管它们有望变得非常薄和愚蠢)。
#2
0
We decided to use WatiN as it was more lightweight than Selenium. We use this for IE and Firefox.
我们决定使用WatiN,因为它比Selenium更轻巧。我们将它用于IE和Firefox。