scholarly journals Resource and dependency based test case generation for RESTful Web services

2021 ◽  
Vol 26 (4) ◽  
Author(s):  
Man Zhang ◽  
Bogdan Marculescu ◽  
Andrea Arcuri

AbstractNowadays, RESTful web services are widely used for building enterprise applications. REST is not a protocol, but rather it defines a set of guidelines on how to design APIs to access and manipulate resources using HTTP over a network. In this paper, we propose an enhanced search-based method for automated system test generation for RESTful web services, by exploiting domain knowledge on the handling of HTTP resources. The proposed techniques use domain knowledge specific to RESTful web services and a set of effective templates to structure test actions (i.e., ordered sequences of HTTP calls) within an individual in the evolutionary search. The action templates are developed based on the semantics of HTTP methods and are used to manipulate the web services’ resources. In addition, we propose five novel sampling strategies with four sampling methods (i.e., resource-based sampling) for the test cases that can use one or more of these templates. The strategies are further supported with a set of new, specialized mutation operators (i.e., resource-based mutation) in the evolutionary search that take into account the use of these resources in the generated test cases. Moreover, we propose a novel dependency handling to detect possible dependencies among the resources in the tested applications. The resource-based sampling and mutations are then enhanced by exploiting the information of these detected dependencies. To evaluate our approach, we implemented it as an extension to the EvoMaster tool, and conducted an empirical study with two selected baselines on 7 open-source and 12 synthetic RESTful web services. Results show that our novel resource-based approach with dependency handling obtains a significant improvement in performance over the baselines, e.g., up to + 130.7% relative improvement (growing from + 27.9% to + 64.3%) on line coverage.

2013 ◽  
Vol 10 (1) ◽  
pp. 73-102 ◽  
Author(s):  
Lijun Mei ◽  
Yan Cai ◽  
Changjiang Jia ◽  
Bo Jiang ◽  
W.K. Chan

Many web services not only communicate through XML-based messages, but also may dynamically modify their behaviors by applying different interpretations on XML messages through updating the associated XML Schemas or XML-based interface specifications. Such artifacts are usually complex, allowing XML-based messages conforming to these specifications structurally complex. Testing should cost-effectively cover all scenarios. Test case prioritization is a dimension of regression testing that assures a program from unintended modifications by reordering the test cases within a test suite. However, many existing test case prioritization techniques for regression testing treat test cases of different complexity generically. In this paper, the authors exploit the insights on the structural similarity of XML-based artifacts between test cases in both static and dynamic dimensions, and propose a family of test case prioritization techniques that selects pairs of test case without replacement in turn. To the best of their knowledge, it is the first test case prioritization proposal that selects test case pairs for prioritization. The authors validate their techniques by a suite of benchmarks. The empirical results show that when incorporating all dimensions, some members of our technique family can be more effective than conventional coverage-based techniques.


Author(s):  
Macario Polo ◽  
Mario Piattini

This chapter presents a new testing technique called “test-case mutation.” The idea is to apply a set of specific mutation operators to test cases for object-oriented software, which produces different versions of the original test cases. Then, the results of the original test case and of its corresponding mutants are compared; if they are very similar, the technique highlights the possible presence of a fault in the class under test. The technique seems useful for testing the correctness of strongly constrained classes. The authors have implemented a supporting tool that is also described in the chapter.


Author(s):  
Johnny Maikeo Ferreira ◽  
Silvia Regina Vergilio ◽  
Marcos Quinaia

The Feature Model (FM) is a fundamental artifact of the Software Product Line (SPL) engineering, used to represent commonalities and variabilities, and also to derive products for testing. However, the test of all features combinations (products) is not always possible in practice. Due to the growing complexity of the applications, only a subset of products is usually selected. The selection is generally based on combinatorial testing, to test features interactions. This kind of selection does not consider different classes of faults that can be present in the FM. The application of a fault-based approach, such as mutation-based testing, can increase the probability of finding faults and the confidence that the SPL products match the requirements. Considering that, this paper introduces a mutation approach to select products for the feature testing of SPLs. The approach can be used similarly to a test criterion in the generation and assessment of test cases. It includes (i) a set of mutation operators, introduced to describe typical faults associated to the feature management and to the FM; and (ii) a testing process to apply the operators. Experimental results show the applicability of the approach. The selected test case sets are capable to reveal other kind of faults, not revealed in the pairwise testing.


Author(s):  
Yixiong Chen ◽  
Yang Yang ◽  
Zhanyao Lei ◽  
Mingyuan Xia ◽  
Zhengwei Qi

AbstractModern RESTful services expose RESTful APIs to integrate with diversified applications. Most RESTful API parameters are weakly typed, which greatly increases the possible input value space. This poses difficulties for automated testing tools to generate effective test cases to reveal web service defects related to parameter validation. We call this phenomenon the type collapse problem. To remedy this problem, we introduce FET (Format-encoded Type) techniques, including the FET, the FET lattice, and the FET inference to model fine-grained information for API parameters. Enhanced by FET techniques, automated testing tools can generate targeted test cases. We demonstrate Leif, a trace-driven fuzzing tool, as a proof-of-concept implementation of FET techniques. Experiment results on 27 commercial services show that FET inference precisely captures documented parameter definitions, which helps Leif to discover 11 new bugs and reduce $$72\% \sim 86\%$$ 72 % ∼ 86 % fuzzing time as compared to state-of-the-art fuzzers.


2014 ◽  
Vol 13 (4) ◽  
pp. 4405-4415
Author(s):  
Deepali Diwase ◽  
Pujashree Vidap

In every business domain Web Services are more popular solutions to implement the software. Composite web service can be created by combining basic web services. Many unreliable web services are deployed on the internet. Hence, testing is required to ensure reliability. Software testers have great challenges to test web services. Source code of web services is unavailable. The Testing Framework is used to test web services without knowledge of its internal structure. In this paper, we have proposed a Testing Framework for Composite Web Services (TFCWS). It generates report which shows the total number of test cases executed for each web service with pass or fail status of each test case. It calculates the throughput of web service and response time of each test case. We have used web services response times for analysis of TFCWS, Soap UI and Storm.


2014 ◽  
Vol 490-491 ◽  
pp. 1617-1623
Author(s):  
R. Deeptha ◽  
Rajeswari Mukesh

.As Web Services draw modules within and across enterprises, dynamically and belligerently testing Web Services has become crucial. Comprehensive Functional, Concert, Interoperability and Susceptibility Testing form the Pillars of Web Services Testing. Only by adopting a comprehensive testing department, enterprises can safeguard that their Web Services is robust, scalable, interoperable, and secure. Overall functionality of web services would be informal towards test. But, only if we methodically trust the applications components (services) before we combine them to complete the application. In current scenario web service technology comprehends various testing apparatuses for manipulating and generating the test cases. But these tools and approaches were negotiating security and execution time and consume more resources. The existing methodologies will generate test cases for the low end web services and limited number of requests, due to these constraints we built new testing framework. In this paper we introduced the new basis with testing of actions, scripts and link for web services by the use of test cases. For this approach we used SOAP web services with SOA. The test case generation and testing reports will gives the accurate testing results and test cases. These test cases are generated using Java JUnit testing tool. We implemented our approach in a java based platform for efficient and secure manner.


2013 ◽  
Vol 2013 ◽  
pp. 1-11 ◽  
Author(s):  
Jinfu Chen ◽  
Jiamei Chen ◽  
Yongzhao Zhan ◽  
Weihe Chen ◽  
Rubing Huang

The research on component vulnerability testing is critical. In this paper, an approach of vulnerability testing is proposed based on condition mutation and parameter mutation in order to effectively detect the explicit vulnerabilities of third-party components. To start with, the Pre-condition Mutation Algorithm (PCMA) is presented to generate mutants set of the pre-condition and test cases are generated based on these mutants. Then, the Single Parameter Mutated Values (SPMV) procedure is addressed to generate parameter values based on mutation operators of parameter specification. These values are then taken as the input of the Test Case Generation Algorithm based on the Parameter Constraint (TCGPC), which is addressed to generate test case set violating the parameter constraint. The explicit vulnerabilities can be detected by the vulnerability detecting algorithm based on the test cases of condition and parameter mutation. The experiments show that our approach can detect explicit vulnerability faults of third-party components. Furthermore, the proposed approach can detect more vulnerability faults than other related approaches such as condition coverage methods, fuzzy testing method and boundary value method.


Author(s):  
XIAOYING BAI ◽  
RON S. KENETT ◽  
WEI YU

Testing is necessary to ensure the quality of web services that are loosely coupled, dynamic bound and integrated through standard protocols. Exhaustive testing of web services is usually impossible due to unavailable source code, diversified user requirements and large number of possible service combinations delivered by the open platform. This paper proposes a risk-based approach for selecting and prioritizing test cases for testing service-based systems. We specially address the problem in the context of semantic web services. Semantic web services introduce semantics to service integration and interoperation using ontology models and specifications. Semantic errors are considered more difficult to detect than syntactic errors. Due to the complexity of conceptual uniformity, it is hard to ensure the completeness, consistency and unified quality of ontology model. A failure of the semantic service-based software may result from many factors such as misused data, unsuccessful service binding, and unexpected usage scenarios. This work analyzes the two factors of risk estimation: failure probability and importance, from three aspects: ontology data, service and composite service. With this approach, test cases are associated to semantic features, and are scheduled based on the risks of their target features. Risk assessment is used to control the process of Web Services progressive group testing, including test case ranking, test case selection and service ruling out. This paper discusses the control architecture and adaptive measurement mechanism for adaptive group testing. As a statistical testing technique, the proposed approach aims to detect, as early as possible, the problems with highest impact on the users.


Sign in / Sign up

Export Citation Format

Share Document