那么,怎样定义小部件测试呢?
因此,需要借助DOH来处理浏览器内的小部件测试及异步函数测试。
So, enter the DOH and its facility for handling widget testing in browsers as well as synchronous function testing.
既然它们已经被定义完毕,我们不妨来实施单元测试来执行函数及小部件以确保它们能像预期的那样运行。
Now that they have been defined, it would be great to implement unit tests that exercise the functions and the widgets to confirm they behave as expected.
Ut il包含了Dojo中的测试工具,可以用于测试工具箱中提供的小部件。
Util contains a testing harness for Dojo and can be used to test the widgets that are provided with the toolkit.
Ut il包含Dojo的测试工具,可用于测试Dojo Toolkit提供的小部件。
Util contains a testing harness for Dojo and can be used to test the widgets that are provided with the Dojo Toolkit.
所以,接下来要探讨的问题就是如何测试小部件?
So, the next question to explore is how do you test widgets?
此空间配置了测试流程所需要的小部件。
This space is configured with widgets required to test the process.
首先定义一个HTML文件来实例化此doh、小部件,然后定义要执行的测试函数。
Well, you define an HTML file that instantiates the DOH, instantiates widgets, then defines the test functions to execute.
后面的代码示例使用了窗口小部件封装器类,看上去要直观得多,并且生成相同测试案例所需的编码要少得多。
This latter code example, using the widget wrapper classes, is far more intuitive and takes much less coding to produce the same test case.
例如,图表小部件的测试目录包含入门代码。
For example, the charting widget has a tests directory that contains code to get you started.
另一方面,要使用窗口小部件封装器类生成相同的测试自动化,只需输入下列五行代码即可。
On the other hand, to produce the same test automation using the widget wrapper classes, you would simply enter the following five lines of code.
使用Selenium测试Dojo应用程序时的一个关键点是认识Dojo小部件和记录它们的操作。
A key point in using Selenium to test Dojo applications is recognizing Dojo widgets and recording their actions.
要测试您的第一个小部件,在任何公共We b站点输入这个XML文件。
To test your first widget, enter this XML file in any public Web site.
还好,DOH为注册测试提供了一个很好的框架和方法,这些测试一般需要Web浏览器加载一个HTML文件,该文件用于实例化要测试的小部件。
The great news is that the DOH provides a good framework and method for registering tests that require a Web browser to load an HTML file that instantiates the widgets to be tested.
对我而言,ui库最令人兴奋的是它的Widgets模块,该模块包含预构建的、经过测试的小部件,它们涉及到开发人员需要经历的Web应用程序的各个方面。
To me, the most exciting aspect of the UI library is the widgets module, which contains premade, pretested widgets that entail aspects of Web applications that we developers run across all the time.
通过点击和拖动使用鼠标左键,处理网格的小部件可以移动、旋转和缩放,为了测试直线在图像一直不失真。
By clicking and dragging with the left mouse button, the handles of the grid widget can be translated, rotated and scaled, in order to test how well straight lines in the image have been undistorted.
通过点击和拖动使用鼠标左键,处理网格的小部件可以移动、旋转和缩放,为了测试直线在图像一直不失真。
By clicking and dragging with the left mouse button, the handles of the grid widget can be translated, rotated and scaled, in order to test how well straight lines in the image have been undistorted.
应用推荐