自动化测试框架 [英] Automation Testing Framework

查看:365
本文介绍了自动化测试框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找UI自动化测试框架。

I am searching for UI Automation testing framework.

我们需要的是:


  1. 框架应提供记录/回放选项。

  2. 这应该是与各种浏览器和平台兼容。

  3. 它应该支持所有的事件点击,拖放放大器;掉落,mousehover
    NAD等一些著名的JavaScript库像D3js,three.js所(3D
    对象事件)等。

和我想更重要的是


  • 假设我们已经发布的应用程序版本1,在
    应用程序,我们有例如两个字段一个登录页面用户名和
    密码。我们已经记录了所有可能的测试情况下,像200左右。
    出于这些200测试用例假设50测试用例开始
    这意味着,如果我在登录页面我改变登录事件(添加/移除
    字段),那么这50个测试用例会得到哪些影响开始
    与登录事件。

现在在第二个版本我已​​经决定从登录页面删除密码字段,包括登录事件将失败的测试案例,因为我们已经改变了登录的情况正如我上面提到的段在

Now in 2nd release i have decided to remove password field from the login page then the test cases which include login event will fail, because we have changed login scenario as I mentioned in above paragraph.

在这种情况下,我想框架本身,提醒或通知,如果我做的登录页面的变化(如删除/添加字段),那么其他一些测试用例会影响其中包括登录事件。同时框架应给予的灵活性,以允许测试器上点击自动更新所有受影响的测试用例的变化。

In this situation I want framework itself to alert or notify that if I make changes in login page (e.g. removing/Adding field) then some other test cases will affect which includes login event. At the same time the framework should give the flexibility to allow the tester to update the changes in all affected test cases automatically on one click.

请提出一个自动化测试框架,将提供这一切功能。

Please suggest a Automation testing framework which will provide all this features.

推荐答案

作为experinced自动化专家我永远不会建议任何人来记录测试用例。

As an experinced automation specialist I would never recommend anyone to record test cases.

测试框架:结果
交互测试的结果
如果是化网页浏览器和黑盒测试这是你的目标,我的建议是硒。它支持3大化网页浏览器等等。这是很容易使用和大量的网络上的帮助。它也是由几种不同的语言支持,但我最喜欢的是Java的使用TestNG结合起来。

Test framework:
Interaction testing
If it is webbrowsers and black box testing that is you target, my suggestion is Selenium. It support the 3 major webbrowsers and more. It is easy you use and a lot of help on the web. It also is supported by several different languages, but my favorite is Java combined with TestNG.

它不是完美的,当涉及到处理JS沉​​重的网页。这意味着通过改变物体JS将很难与Selenium.This测试由于硒下载页面的页面用于下载DOM对象。如果DOM改变硒会抱怨。

Its not perfect when it comes to handle JS heavy webpages. Meaning pages which changes objects via JS will be harder to test with Selenium.This due to that selenium "downloads" the page uses the objects in downloaded DOM. If the DOM is changed Selenium will complain.

如果它要测试的网页对象,如字段限制或如果一个按钮被启用与否的功能,茉莉花是非常快速和容易。更多用于单元测试的网页。

If it is to test functionality of the webpage objects such as field restrictions or if a button is enabled or not, Jasmine is quite fast and easy. Used more for unit testing the webpage.

图形测试的结果
如果您选择的目标是验证你怎么输出看起来,你应该转向另一个框架。
<一href=\"http://stackoverflow.com/questions/21672695/what-are-unit-testing-strategies-for-d3js/21820996#21820996\">3D.js测试

为您测试情况:
为您提供辅助类的Web页面还我我给你的建议创建一个测试工具。一个辅助类应该包含常用的流动,如登录的功能。这可以让你只能做更新的1处。

For you test cases: My suggestions i you create a test harness for you webpage with helper classes. A helper class should contain common used flows, such as a login function. This allows you to only do the update in 1 place.

我也建议你为每个页面一类的函数的每个对象要能够达到。现在,如果你更改名称或ID为一个按钮或字段,你只有1个地方需要更新,而不是使用更新的对象每个测试用例。

I also recommend that you create a class for each page with a function for each object you want to be able to reach. Now if you change the name or id for a button or field you only have 1 place which requires update, instead of every test case using the updated object.

关闭过程中是否有更多的框架,然后硒,但我已经做了所有的调查和其他人我,硒一直是我们的选择工作。

Off course are there more frameworks then selenium, but from all investigations I have done and others i worked with, Selenium has been our choice.

我可以写这个的文章,但是这可以让你开始。

I could write an essay about this, but this can get you started.

这篇关于自动化测试框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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