Font Size: a A A

Model-based Approaches To Generating Test Cases For Web Applications

Posted on:2009-05-27Degree:DoctorType:Dissertation
Country:ChinaCandidate:Z S QianFull Text:PDF
GTID:1118360245999256Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
With the prevalence of Internet, the rapid development of component, middleware and Web services, and the wide application of the Web, the reliability and quality assurance of Web applications have become a very critical problem and a hot research topic. Software testing is a primary way of improving software reliability and assuring software quality.A Web application is a very complex, distributed, multi-tier, interactive system, which provides a brand-new way for users to deploy software application. The isomerism, dynamics, diverse connections, variant control flows, and rapid development and deployment of Web applications have brought the new challenge for their testing. At present, there are no systematic method and tool that are employed to test Web applications efficiently. The improved traditional methods or a new method appropriate for Web application testing are desired urgently for all the characteristics of Web applications. Since the current testing methods depend primarily on the testers' intuition and experience, the testing of Web applications is regarded as a time-consuming and expensive process. Therefore, a new methodology for Web application testing is required imminently to automate the testing.With the evolving and application of model-based, model-driven and test-centric software development methods and techniques, and the gradual development of formal verification technique, the model-based software testing methods and techniques have been respected recently. The model-based testing is a broken-through black-box testing. According to the abstract model that precisely describes the expected behaviors of the system, the model-based testing generates executable test cases automatically, produces test scripts, runs the tests, evaluates the test results automatically, and eventually automates the test process. This method synchronizes software testing, software design and software implementation, which changes the way of "programming earlier and testing later" in software engineering, as makes it possible to test the system in parallel in the whole software lifecycle. Therefore, the model-based testing is an effective way of testing Web applications. This research, however, is still in progress.UML (Unified Modeling Language) has already become the de facto standard in industry. It can be employed to model user requirements conveniently. FSM (Finite State Machine) provides an effective mechanism for testing the complex behaviors of software without considering the underlying details.This paper delves into a series of approaches to generating test case for Web applications from UML model and FSM model, in order to achieve the model-based testing techniques for Web applications, build a prototype for test case generation from the models, and eventually automate the testing process for Web applications.In software testing, test cases are generated according to testing criteria, which are the core technology in studying testing methods all the while. After analyzing the existent UML model-based testing criteria, this paper proposes seven UML use case diagram-based testing criteria: scenario coverage, primary scenario coverage, actor primary scenario coverage, primary scenario sequence coverage, use case coverage, actor use case coverage and use case sequence coverage according to the concept of scenario including primary scenario and alternative scenario, as well as putting them into practical use. It also presents two UML object diagram-based testing criteria: method chain coverage and MM-path sequence coverage. These UML model-based testing criteria are very significant in test case generation.Use case view is the core of UML model. Use cases, which represent the high functions provided for the users by the system, are the source to induce test requirement. Meanwhile, sequence diagram can describe the sequential relationship of user behaviors. Therefore, this paper gives an approach to testing Web applications based on UML use case diagrams and sequence diagrams. The test cases generated are partitioned according to functions, for a use case can be regarded as a software function or the composition of functions. According to those use case diagram-based coverage testing criteria proposed, the required test cases are generated.Since the implementation of a system must conform to its specification, a test set leading to a higher coverage ratio can evaluate more precisely the system's quality. Predicate expressions are the main form of the pre- and post-conditions in formal specifications. This paper analyzes logic coverage testing criteria for specification-based testing. It proposes and analyzes in detail masking logic coverage testing criteria, to solve the problems the existent determinant logic coverage testing criteria can not solve. The test cases satisfying the masking logic coverage testing criteria can detect those errors caused by the masking property of literals. It also analyzes the constraints among literals, how to decompose and compose a complicated predicate expression, and the relationship among predicate expressions. Additionally, test criteria including full true predicate expression coverage, full false predicate expression coverage, all sub-predicate expressions coverage, unique literal true coverage and unique literal false coverage are presented. The test sets satisfying these criteria can detect respectively different types of errors. The possible error types are given for a predicate expression and an approach is proposed to generating the minimal test set for detecting logic connector errors.This paper also illustrates how to obtain test cases generated automatically from FSM model. It analyzes primarily several important and typical FSM-related testing criteria, which include state coverage, transition coverage, transition pair coverage, predicate expression coverage, literal coverage, restricted active literal coverage, mask literal coverage, and the proposed full K loop coverage. The approaches to generating test cases according to these eight coverage testing criteria are presented respectively from FSM model.A Web application is a highly interactive system, which can be regarded as a set of interactive components. The testing of an FSM is usually related to testing a part of the Web application. The testing of interactions between FSMs is called FSM combination testing. In the FSM combination testing, each FSM is regarded as a composite component that has been already tested completely. So, the FSM combination testing is the testing of composition among composite components. A composite component consists of other components (or FSMs). The Web application under testing is thus the composition of different interacting components. The components are interacting according to their actions. When an output action of a component corresponds to an input action of another component, an interaction occurs. Based on the composition of component interaction automata, this paper presents the composition rules of action abstraction and elaborates on an approach to FSM model-based combination testing.Generating test cases manually requires the testers with a certain experience and high expertise. Moreover, the test quality and test efficiency will be reduced without a systematic methodology. To realize the test automation and validate further the test case generation approaches proposed, this paper designs and realizes partially a test prototype named FSMTCGEN.
Keywords/Search Tags:Web Application, Model-based Test, Test Case, Testing Criterion, Specification
PDF Full Text Request
Related items