本文是计算机专业的留学生作业范例，题目是“Research Development: Automated Web Application Testing（研究开发:自动化Web应用程序测试）”，没有测试，软件开发过程是不完整的，这就是为什么每个组织都要花费大量的时间和精力在测试上。新的垂直市场带来了各种网络应用的收入模式，这使得测试成为网络开发的关键部分。同样，新的安全威胁每天都在困扰着web应用程序，这使得测试成为整个开发过程的必需。Web应用程序的动态性和交互性使得传统的测试技术和工具难以应用，因为传统的测试技术和工具无法满足测试的需要。
A software development process is incomplete without testing and that’s the reason why every organization spends considerable time and effort on testing. New verticals are coming with various revenue models for web-applications which makes testing a crucial part of web development. Same way in the downside new security threats which are plaguing the web applications on daily basis makes testing a must for overall development process. Web application’s dynamic and interactive nature makes it hard to apply traditional testing techniques and tools as they would not be sufficient for their testing.
The faster and quicker release cycles of web applications make their testing very challenging. Testing is a prime component in producing quality applications in the domain of software engineering. This research will put the focus on what is automated web application testing, and the current web application testing techniques.
High-Level Overview of Automated Testing: Software testing is a huge domain, but it can be broadly categorized into two distinct areas: Manual Testing and Automated Testing. Automated testing is a development process that involves tools to execute predefined tests against software based on the event. Automated testing involves operations that are repetitive in both their nature and outcome. The nature of automated testing for developers is clear as predefined series of the task will be performed(tests) against a set of preconditions and post conditions based upon a triggering event. (2011 ) Automated Software Testing is application and implementation of software technology throughout the entire software testing lifecycle with the goal to improve efficiencies and effectiveness of the product.
It is well-known that manual testing approach is not always effective in finding certain classes of defects, like low-level interface regression testing can be challenging as well as time-consuming but test-automation offers a possibility to perform these types of testing effectively. Automated testing offers to conduct tests in an asynchronous and autonomous manner. Once automated tests have been developed, they can be run quickly and repeatedly. This is cost-effective method for regression testing of a software product that have a long maintenance life. Complex, evolving and rapidly updated nature of web-applications made their testing challenging as well as critical because traditional approach of testing does not address the distinctive features like ample use of events, rich user interface and incorporation of server-side scripting of web-application. The attributes like speed and reliability which comes with automated testing have made it a mandatory practice in software development process. To keep the development process agile and lean, automated testing is on the rise as there has been an incredible jump in test automation across all industries over the past two years. Authors have suggested various approaches to automated web application testing.
2.Web Automation Testing Framework-The EvolutionWeb自动化测试框架的发展
Test automation has evolved with time, earlier it was just debugging, with the arising of more complex systems software testing idea came into the trend. The reason to develop an automated web application testing framework is to share and access information efficiently and with no limits. With the automation framework by using testing tools separately and also in combined way can solve the various challenges in software testing.
The test automation framework integrated by web testing tool, selenium and Jmeter, provides various types of testing for web application. The use of this framework efficiently improves the extensibility and reusability of automation test, also it improves coding productivity as well as product quality. Load testing automation framework for load testing of the web applications is based on usage model and workload to simulate user’s behaviors and help to generate realistic load for load testing of web applications.
3.Web-Testing Approaches web测试方法
Long known web testing techniques diffused in current web testing scenario: Web application has mostly human user and that makes quality most prime concern if we are talking about web applications. The challenges in testing increases because of distributed and heterogeneous nature of web applications and as web applications are supporting a vast range of important activities like information sharing, medical system, scientific activities and many more, therefore it becomes really crucial to test all entities of web applications.
The usual way to access the components of web-applications is navigation mechanism which is implemented by hyperlinks and that’s why it becomes important to make sure that no unreachable component or broken links are included in web-application. A variety of web-application testing approach has been proposed which satisfies two criteria for web -application testing which is page coverage criterion and hyperlink coverage criterion.
4.Model Based Testing of Web Applications 基于模型的Web应用程序测试
Different testing approaches leads various testing model development- Web Test Model which is object-oriented where entities are objects and their structure and dynamic behavior is described. One testing approach to generate test cases by using mutation analysis which mainly put the focus on validation regarding reliability of data interactions among xml-based components of web-based applications.
Another model which is based on web-frameset and browser interaction mainly put the focus on modeling web navigation and generate and execute test cases by formalizing the navigation model. The white box testing which is traditional is totally based on the internal structure of the system. To apply white box testing we follow two approaches: one by seeing the level of abstraction of code, for example one of the proposed UML model of Web application for high level abstraction. This model entirely based on static HTML links and dynamic aspects of the software cannot be incorporated in this, and second by using navigation among the pages. The navigation model is based on the graph where each web page is node and each link an edge. On the other hand, black box-testing is not dependent on code structure and implementation. The combinatorial model represents how the web application behaves and based on that it generates test cases, this is another testing approach in which test cases can be created based on collected user interaction with the web application.
There is a major difference between non-equivalence issues when we talk about traditional software testing and web application testing. Like maintenance at a faster rate compared to other software systems, because of the huge user population, high demand server’s performance is a must for web applications. Also, we cannot skip dealing with concurrent transactions, web content rendering capability should be looked when large user population is accessing the web application at the same time.
Now comes the architecture because this is the main difference between traditional and web application testing as web-application poses a multi-tier architecture, so it becomes tough to find the error as it could be in any layer, and that brings end-to-end testing techniques which test the overall behavior of web applications. Though we can list out some web-specific faults like authentication problem, incorrect multilanguage support, cross-browser portability, wrong session management and more. The main concern the researchers discussed is that heterogeneous nature of web applications (different programming languages, various technologies: ruby on rails, ajax, flash, and many more) makes testing of the web application a tough task as generating a test environment for this type of application is not easy. As it is very clear that web applications are prone to faults because of the emergence of new technologies also because of asynchronous communication, stateful client, DOM manipulation, so it becomes crucial to consider these aspects of web applications like state navigation, asynchronous behavior, delta server message, transition navigation, and the stateful behavior.
State of art of web application testing: Among all the testing tools for web application testing the main focus is on protocol performance, load testing, validating HTML. The testing tools in web application testing dimension are able to generate automatic test cases. In context of state of art of web application testing the research illustrates that we can easily bridge the gap by using conventional technique for server side and various level testing for client side. For example, Selenium which provides DOM based testing with capturing user sessions. State analysis testing approach fails due to dynamic behavior of recent and modern web applications. Here comes invariant based automatic testing approach. Though two well-known testing techniques has been discussed but issues related to scalability or how to capture user session still remains. The overall point is the testing is dependent on implementation technologies, so it is required to be more adaptive towards heterogeneity and dynamic nature of web applications.
5.Web Application Testing Methodology Web应用程序测试方法
There are different types of testing techniques has been proposed and presented by researchers for web-application testing like ( Lakshmi & Mallika, 2017)Structural testing which performs data flow analysis on web applications, Statistical testing basically, generates input sequence to test the interactions with web applications, Mutation testing provides effective coverage criterion for web-applications, Combinatorial interaction testing generates test case by using unique input space matrix for web applications.
有不同类型的测试技术已经提出并由研究人员提出的web应用测试，如(Lakshmi & Mallika, 2017)结构测试，在web应用程序上执行数据流分析，统计测试基本上，生成输入序列，以测试与web应用程序的交互，突变测试为web应用程序提供了有效的覆盖准则，组合交互测试利用web应用程序特有的输入空间矩阵生成测试用例。
Search based software engineering testing’s main idea is to provide branch coverage of web applications. GUI interaction testing is used to test the correctness by observing the state of the gui widgets. Cross browser compatibility testing checks web applications deployment across different browsers. Browser fuzzing by scheduled mutation approach validates browser by using the static and dynamic ways. Invariant-based technique mainly designs a state flow graph with all the possible user interaction sequences. Model-based testing technique in which web application is reduced to a state transition graph and navigation through links can be tested.
6.Automated Functional Testing Based on the Navigation of Web-applications 基于web应用导航的自动化功能测试
Complex nature of web-applications makes their testing intricate hard and time-consuming, and here test-automation becomes really crucial to avoid the scenarios of poorly performed testing. In very simple terms functional requirements are actions that are expected from an application to do. Therefore, the evaluation of the correct navigation of web applications performs the assessment of the specified functional requirements. Implementation within a framework makes automated testing more effective. Abstract concepts, procedures, and environment define the testing framework in which automated tests will be designed and implemented.
The very first generation follows the linear approach of automated testing, the second generation has two frameworks: data-driven (typically stored in the database) and functional decomposition (the process of producing modular components). The third generation of automated testing includes keyword-driven and model-based frameworks.
Also, today all web application moving towards cloud-based services, next important approach is exploring the automated web application testing in this dimension. Understanding the dynamic and asynchronous nature of web application will definitely help in developing automated testing for web applications. Still lot of scope is available to explore the horizons of automated web application testing.