Font Size: a A A

Formal Definition And Generation Method Of REST Interface Conformance Test Cases

Posted on:2022-07-30Degree:MasterType:Thesis
Country:ChinaCandidate:C H ZhaoFull Text:PDF
GTID:2518306341451654Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
REST interface technology has gradually become the mainstream interface implementation technology in the field of Internet Web applications and network management,and the International Organization for Standardization is also formulating related standards based on REST technology,and is committed to making REST the mainstream interface technology.The consistency test is an indispensable link to ensure that the REST interface can work normally.The design of test cases in the consistency test is an important link and the main content that needs to be considered.However,in actual interface testing work,testers are often required to manually define or write test cases.This method has higher requirements for testers and the designed test cases are blind to a certain degree.Moreover,the generation of test data in most test cases only considers grammatical factors and rarely involves semantic information.Therefore,this also brings a lot of work to the subsequent manual modification of test data.In order to improve the test efficiency of REST interface conformance testing,this paper designs a formal definition method of test cases for REST interface conformance testing,and considers the existence of a certain semantic relationship between class models in the network management field,and proposes a method for generating test cases that support semantics.Testers only need to provide REST interface documents and semantic relationship files to generate semantic-oriented test cases according to the method in this article.This article first analyzes the composition of the REST interface document,summarizes the formal definition of the REST interface document,and adds custom attributes to the REST interface document to assist the generation of test cases,and provides formal definitions of inheritance,inclusion,association and other relationships.In addition,the formal definition of semantic keywords has been completed.By using semantic keywords,test data that meets the requirements can be better generated.Then,this paper analyzes the composition of common test cases,and completes the formal definition of test cases for REST interface conformance testing.At the stage of automatic generation of semantic-oriented test cases,this paper first analyzes the generation of test data,designs the simplification and constraint rules of parameter value intervals,and generates test data sets by using an improved IPO_S_RIC algorithm based on the IPO algorithm.When constructing the semantic relationship instance tree,the test data set is used to fill the data of the semantic relationship instance tree,and when the data of the test case is created,the semantic relationship instance tree is scanned for filling.By using the designed test case template,parsing the template and filling in the data to automatically generate test cases,the time overhead for testers to customize test cases can be reduced.Test data that supports semantics can better generate test cases that meet the requirements of REST interface conformance testing.To sum up,the formal definition and automatic generation method of REST interface conformance test cases designed in this article is to formally define the semantic relationship between the REST interface document and the class model in the interface document,and use the ANTLR tool to parse the REST interface file and the semantic relationship file,finally realize automatic generation of semantic-oriented REST interface test cases.Thereby improving test efficiency and improving the quality of test cases.
Keywords/Search Tags:REST interface conformance test cases, Formal definition, Semantics relationship, Automatic generation
PDF Full Text Request
Related items