In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Today, I will talk to you about how to compare Web testing tools under the .NET platform horizontally. Many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
Opening a page in a browser and judging it is undoubtedly the most direct way to test a Web application. With the help of an appropriate automated testing tool or framework, testers can be freed from the heavy manual testing work to some extent. Watir under the Ruby platform is undoubtedly the best in this respect, so it is widely used in regression testing or acceptance testing of Web applications. However, for technical teams using the .NET Framework, Watir is not necessarily the choice. At present, several Web testing frameworks under the .NET platform have emerged in the community, and testers can now use the language they are most familiar with to achieve the same function and integrate seamlessly with their own development environment.
WatiN
WatiN is Watir's "response", developed in the C # language, but can write test code in any .NET language. WatiN 1.0 only supports IE browsers, but it can also automatically operate FireFox browsers (plug-ins need to be installed) since version 2.0. Its * version is 2.0 CTP3 released on February 19th, which enhances the relevant functions for FireFox and modifies some bug. Its subsidiary project WatiN Test Recorder supports the capture of browser operations and the automatic generation of test code. WatiN Test Recorder has just released its alpha version, and you can follow up on its message from its home page. WatiN is an open source project released using the Apache License 2.0 protocol.
Selenium
Strictly speaking, Selenium is a complete Web application testing system, which includes test recording (Selenium IDE), writing and running (Selenium Remote Control) and test parallel processing (Selenium Grid). The core Selenium Core of Selenium is based on JsUnit and is written entirely by JavaScript, so it can run on any browser that supports JavaScript.
Selenium Core is driven by an HTML file in a specified format, which enhances the readability of the test suite (Test Suite) to some extent. Selenium Remote Control allows testers to write test code in common languages (naturally including .NET languages such as C #) and supports a variety of mainstream browsers under different operating systems. The role of Selenium Grid is to distribute tests to multiple machines, which can greatly speed up testing. Like WatiN, Selenium is an open source framework that is also released using the Apache License 2.0 protocol.
LTAF
Lightweight Test Automation Framework for ASP.NET (lightweight ASP.NET Automated testing Framework, hereinafter referred to as LTAF) is a framework developed by the ASP.NET QA team and used for regression testing of products. Testers can write tests in arbitrary .NET code and manipulate DOM elements using the built-in API. LTAF recently released April Update and included framework code, and its Release Note documents how the framework is used. Zhao recently talked about using LTAF to independently unit test views in ASP.NET MVC applications. In his article, he commented on LTAF:
Although it is not as good as its "competitor" in some respects (such as the selection of DOM elements), LTAF has its own uniqueness:
Because it runs directly in browsers, it inherently supports existing browsers-and any browsers that may emerge in the future.
Because it is deployed directly in the site under test, the test code and the site page are in the same process.
There is no need to talk about the advantages of the point, and the second point is even more crucial. Imagine that WaitN and Selenium both open pages in browsers by writing code. This means that our testing code and the web page being tested are in different processes. Under this premise, if we want to pass the data defined in the test code to the web page under test (that is, the view object), we must communicate across processes. No matter how it is implemented, it cannot escape the path of "serialization", which undoubtedly increases the complexity. After using LTAF, the problem disappeared instantly, because we could "pass" the test data directly in memory, and it was all just a reference.
However, everything has two sides, and LTAF also has some shortcomings that are difficult to be born and can never be remedied. For example:
Because LTAF places the page to be tested in Frame, properties such as window.top on that page based on the browser frame structure will be changed.
Since the essence of LTAF is to use JavaScript to manipulate DOM, this means that any operation that blocks the program (such as alert) cannot be used, otherwise the entire testing process will be blocked.
Fortunately, neither of these points is a serious problem. In the case of *, we only need to write a custom getTop method to replace the practice of accessing windows.top directly. The second case-Chao Po-Tao has never liked the "pure browser features" of alert or confirm, because they bring a poor user experience, not to mention that today's JavaScript libraries / frameworks can easily do this effect, do you think?
Compare
Although Lao Zhao recommends the use of LTAF, it is up to the reader to decide which testing framework is most suitable for your project. The following table lists their horizontal comparison.
Framework WatiNSeleniumLTAF browser supports IE / FireFoxIE / FireFox / Opera / Safari arbitrary automatic generation of code, but currently does not support FireFox browser 58.9No open source protocol Apache Licence 2.0Apache Licence 2.0 is not open source, but the release code other / can be distributed to multiple machines to execute, speed up the test code and the website in the same process after reading the above, do you have any further understanding of how to horizontally compare the Web testing tools under the .NET platform? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.