A Novel Approach for Test Case Generation Using Activity Diagram
International Journal of Computer Science and Applications
…
4 pages
Sign up for access to the world's latest research
Abstract
Testing is an important part of quality assurance in the software development life cycle. As the complexity and size of software grow, more and more time and man power are required for testing the software. Manual testing is very much labor-intensive and error-prone. So there is a pressing need to develop the automatic testing strategy. Test case generation is the most important part of the testing efforts. Test cases can be designed based on source code but this makes test case generation difficult for testing at cluster level. Therefore, it is required to generate test cases automatically from the design documents. Also this approach holds an added advantage of obtaining test cases early in the software development life cycle (SDLC), there by making test planning more effective. Our approach first constructs the activity diagram for the given problem and then randomly generates initial test cases, for a program under testing (PUT). Then, by running the program with the generated t...
Related papers
The Computer Journal, 2009
Test case generation based on design specifications is an important part of testing processes. In this paper, Unified Modeling Language activity diagrams are used as design specifications. By setting up several test adequacy criteria with respect to activity diagrams, an automatic approach is presented to generate test cases for Java programs. Instead of directly deriving test cases from activity diagrams, this approach selects test cases from a set of randomly generated ones according to a given test adequacy criterion. In the approach, we first instrument a Java program under testing according to its activity diagram model, and randomly generate abundant test cases for the program. Then, by running the instrumented program we obtain the corresponding program execution traces. Finally, by matching these traces with the behavior of the activity diagram, a reduced set of test cases are selected according to the given test adequacy criterion. This approach can also be used to check the consistency between the program execution traces and the behavior of activity diagrams.
Proceedings of SPIT- …, 2008
Testing of software is a time-consuming activity which requires a great deal of planning and resources. In scenario-based testing, test scenarios are used for generating test cases, test drivers etc. UML is widely used to describe analysis and design specifications of software development. UML activity diagrams describe the realization of the operation in design phase and also support description of parallel activities and synchronization aspects involved in different activities perfectly. Therefore, test scenarios generated from activity diagrams will achieve test adequacy criteria perfectly. Handling parallel activities represented by fork-join pairs present in activity diagrams is also very difficult. Our approach generates test scenarios from UML activity diagrams, where the design is reused to avoid the cost of test model creation. This approach generates test scenarios from activity diagrams containing forkjoin pairs and also handles the complicacy of the fork-join pairs. A prototype tool has been developed to support the approach.
2011
This paper proposed an improved algorithm to automatically generate test cases directly from UML activity diagram using an activity graph.This algorithm has been implemented as a prototype using UML activity diagrams as inputs to generate test cases.These generated test cases are generated automatically are compared to test cases that are generated manually in order to evaluate the algorithm’s usability and reliability.The result shows that the test cases generated by the developed test case generator program are the same as the one manually derived.
Testing impacts the popularity of any software and hardware products. If proper testing of any product is done it will increase the cost and sale of the product. Mobiles are widely used electronic device there are several mobile companies established which provide variety of applications and features. It is obvious that people attract on the model that provides new features and comparatively less cost than others. If any problem arises in mobile application, it will affect the selling and impacts bad result. This problem arises when proper testing is not done. To test any product, test cases are used. It shows all possible paths it needs to cover by the software. This paper proposed a TCBAD model for mobile application. TCBAD model generates test cases on the basis of the activity diagram where activity diagrams are used in representing the workflows of stepwise activity and actions with support for choice, iteration and concurrently the complexity will be calculated using Cyclomatic complexity.
2006
Abstract The test case generation from design specifications is an important work in testing phase. In this paper, we use UML activity diagrams as design specifications, and present an automatic test case generation approach. The approach first randomly generates abundant test cases for a JAVA program under testing. Then, by running the program with the generated test cases, we can get the corresponding program execution traces.
Journal of Object Technology, 2009
Model-based test case generation is gaining acceptance to the software practitioners. Advantages of this are the early detection of faults, reducing software development time etc. In recent times, researchers have considered different UML diagrams for generating test cases. Few work on the test case generation using activity diagrams is reported in literatures. However, the existing work consider activity diagrams in method scope and mainly follow UML 1.x for modeling. In this paper, we present an approach of generating test cases from activity diagrams using UML 2.0 syntax and with use case scope. We consider a test coverage criterion, called activity path coverage criterion. The test cases generated using our approach are capable of detecting more faults like synchronization faults, loop faults unlike the existing approaches.
Test case generation is the most important part of software testing. More than 50 percent of the cost and time are spent on testing the software development. Currently, researchers have used the UML activity for test case generation. However, finding a test case set from an activity diagram is a terrible task. Because the presence of loop and concurrent activities in the activity diagram result in path explosion and practically, it is not feasible to consider all execution paths for testing. In this paper, we proposed a novel approach to generate test cases using a modified DFS with tester specification to avoid the path explosion. Tester specifications follow the business flow constraints. In order to evaluate the quality of test cases, activity coverage, transition coverage, and key path coverage are measured. The proposed approach shows that the result paths of an activity diagram cover both true and false values of loop condition and helps to avoid generating all possible concurrent activity paths as it only returns one representative path.
This paper presents an approach of generating test cases from a combination of UML activity diagram and sequence diagram. Our approach consists of transforming the sequence diagram into a graph called Sequence Graph (SG) and transforming the activity diagram to the Activity Graph (AG). Then we combine the two graphs i.e. SG and AG to form System Graph (SYG). The SYG is then traversed to form the test cases. The test case thus generated is suitable for system testing and to detect the operational, interaction, scenario faults and the state explosion problem in case of concurrent system.
… Technology, 2008. ICIT'08 …, 2008
Testing of software is a time-consuming activity which requires a great deal of planning and resources. Model-based testing is gaining importance as a research issue. In scenario-based testing, test scenarios are used for generating test cases, test drivers etc. UML is widely used to describe analysis and design specifications of software development. UML models are important source of information for test case design. UML activity diagrams describe the realization of the operation in design phase and also support description of parallel activities and synchronization aspects involved in different activities perfectly. In this paper we generate test scenarios from activity diagrams, which achieve test adequacy criteria perfectly. Finally we generate test cases by analyzing the respective sequence and class diagrams of each scenario, which achieves maximum path coverage criteria. Also in our approach, the cost of test model creation is reduced as design is reused.
Regular
Software testing is one of the vital steps in software development life cycle. Test case generation is the first process in software testing which takes a lot of time, cost and effort to build an effective product from the start. Automatic test case generation is the best way to address this issue and model-based test case generation approach would be suitable for this automation process. One way to generate test cases automatically is by generating test cases from Unified Modeling Language (UML) models. The challenge with the existing test case generation techniques using UML models is that they provide a single view, meaning that the techniques capture a single aspect of the system, such as structural or behavioral but not both. In this paper, we have successfully developed a technique that automatically generates test cases which capture both structural and behavioral views of the system. These test cases can help to discover software faults early in the software development cycl...
References (13)
- A. Abdurazik, J. Offutt. 2000. Using UML collaboration diagrams for static checking and test generation, in: proceedings of the third International Conference on the UML, Lecture Notes in Computer Science, Springer-Verlag GmbH, York, UK, vol.93, 2000, pp. 383-395.
- A. Kleppe, J. Warmer, and W. Bast. 2003. MDA Explained: The Model Driven Architecture-practice and promise. Addison-Wesley, 2003
- C. Mingsong, Q. Xiaokang, and L. Xuandong. 2006. Automatic Test Case Generation for UML Activity Diagrams. AST'06, May 23, 2006, Shanghai, China
- C. Oriat. Jartege. 2005. A Tool for Random Generation of Unit Tests for Java Classes. In QoSA/SOQUA, pages 242-256, 2005.
- F. Basanieri, A. Bertolino, and E. Marchetti. 2001. CoWTeSt: A Cost Weighted Test Strategy, Proc. Escom- Scope 2001, London, 2001
- Grade Booch, James Rambaugh, Ivar Jacobson. 2001. The Unified Modeling Language User Guide, Addison-Wesley, 2001.
- H. Zhu, P. Hall, and J. May. 1997. Software Unit Test Coverage and Adequacy. ACM Computing Surveys, 29(4):366-427, December 1997
- H. Zhu and X. He. A Methodology of Testing High-level Petri Nets.2002. Information and Software Technology, 44(8):473-489, 2002.
- K. H. Chang, W. Homer Carlisle, James H. Cross II, and David B. Brown. 1991 A heuristic approach for test case generation. ACM.
- L. Briand and Y. Labiche. 2002. A UML based approach to system testing. Software and Systems modeling, 1 (1), 2002.
- Object Management Group, UML specification 1.5, available at http://www.omg.org/uml, 2003.
- R.E. Prather and P. Myers, Jr. 1987. The Path Prefix Software Testing Strategy, IEEE Trans. on Software Engineering, Vol. SE-13, No. 7, July 1987
- W. H. Deason, D. B. Brown, K.-H.Chang, and J. H. Cross II. 1991. A Rule-based Software Test Data Generator, IEEE Trans. on Knowledge and Data Engineering, March 1991.
Durga Prasad Mohapatra