CN113704133A - Interface test organization method and system and computer equipment - Google Patents

Interface test organization method and system and computer equipment Download PDF

Info

Publication number
CN113704133A
CN113704133A CN202111064000.4A CN202111064000A CN113704133A CN 113704133 A CN113704133 A CN 113704133A CN 202111064000 A CN202111064000 A CN 202111064000A CN 113704133 A CN113704133 A CN 113704133A
Authority
CN
China
Prior art keywords
content
request
request information
interface
scene
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111064000.4A
Other languages
Chinese (zh)
Inventor
韦俊良
郭夏杰
李倩
周树杭
玉莹
张文龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangxi Dongxin Yitong Technology Co ltd
Original Assignee
Guangxi Dongxin Yitong Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangxi Dongxin Yitong Technology Co ltd filed Critical Guangxi Dongxin Yitong Technology Co ltd
Priority to CN202111064000.4A priority Critical patent/CN113704133A/en
Publication of CN113704133A publication Critical patent/CN113704133A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an organization method, a system and computer equipment for interface test, which relate to the technical field of network interface test and solve the technical problem of low interface test efficiency, and the method comprises the following steps: step S1, submitting a request through a page, storing a request url, content and request header information of an interface as request information, and marking the request information through a name; s2, submitting a request through a page to provide a scene organization function, selecting the request information content in the step S1, and organizing the selected request information in an id form to form a complete scene content; s3, submitting a request through a page, providing a use case organization function, selecting the contents in the step S1 and the step S2, organizing the complex request information contents and scenes through name tags, and secondarily setting the organized contents according to a specified interface to define the organized contents as specific use case contents; and S4, testing the specified interface by using the case content.

Description

Interface test organization method and system and computer equipment
Technical Field
The present invention relates to the field of network interface testing technology, and more particularly, to an interface testing organization method, system and computer device.
Background
Many functions in the internet are realized by means of interfaces, the interfaces have three stages of development, testing and online, and in the testing stage, when testing personnel test the functions realized by the interfaces locally, a plurality of interfaces are required to be associated to complete functional testing.
Because of too many functions, too many associated interfaces and the need of repeated use of the interfaces, the content of the interfaces is different and most of the interfaces are the same. When the same portion of the interface is changed, repeated modifications are required to each interface, which undoubtedly increases the cost of many interface tests.
Disclosure of Invention
The present invention is directed to solve the above-mentioned problems of the prior art, and an object of the present invention is to provide an organization method for interface testing, which can improve efficiency.
The invention also aims to provide an organization system for interface test, which can improve the efficiency.
The invention also provides a computer device for improving the efficiency of the interface test.
In order to achieve the above object, the present invention provides an interface test organizing method, including:
step S1, submitting a request through a page, storing a request url, content and request header information of an interface as request information, marking the request information through a name, and using the request information as public request information;
s2, submitting a request through a page to provide a scene organization function, selecting the request information content in the step S1, and organizing the selected request information in an id form to form a complete scene content which is used as a public scene content;
s3, submitting a request through a page, providing a use case organization function, selecting the contents in the step S1 and the step S2, organizing the complex request information contents and scenes through name tags, and secondarily setting the organized contents according to a specified interface to define the organized contents as specific use case contents;
and S4, testing the specified interface by using the case content.
As a further improvement, in said step S1, the request url, the content, and the request header information of the interface are saved by a name creation data structure.
Further, in step S1, the request is submitted through the visual page of the web page, and the request information of the interface is stored in the database, and can be subsequently queried through the database.
Further, in said step S2, the selected request information is organized by an id creation data structure.
Further, in the step S2, for the scene contents that have been organized by id, new scene contents may be formed again by new id organization.
Further, in the step S2, the scene content is saved in the database, and when the user needs details, the user is inquired layer by layer through the id, and the data is organized and displayed to the user.
Further, in the step S3, the secondary setting is to add request information corresponding to the specified interface on the basis of the organized content.
Further, in the step S3, when the scene and the interface need to be changed, only the common request information of the step S1 or the common scene content of the step S2 needs to be set, and the scene or use case referring to the scene or the interface may be changed accordingly.
In order to achieve the second object, the present invention provides an interface test organization system, including:
the marking request information module is used for submitting a request through a page, storing a request url, content and request header information of an interface as request information, and marking the request information through a name;
the system comprises an organization request information module, a scene organization function, a marking request information content selection module and a scene content management module, wherein the organization request information module is used for submitting a request through a page, selecting the marked request information content and organizing the selected request information in an id form to form a complete scene content;
the system comprises a case generation module, a case generation module and a case management module, wherein the case generation module is used for submitting a request through a page, providing a case organization function, selecting marked request information content and organized scene content, organizing the complicated request information content and the complex scene content through name marks, and secondarily setting the organized content according to a specified interface to define the organized content as specific case content;
and the interface testing module is used for testing the specified interface through the use case content.
In order to achieve the third objective, the invention provides a computer device, comprising a processor, a memory;
the memory is used for storing an execution program and transmitting the execution program to the processor;
the processor is configured to perform an organization method of an interface test according to any one of claims 1-8 according to the instructions of the executive program.
Advantageous effects
Compared with the prior art, the invention has the advantages that:
the invention saves the test cost increased by repeatedly modifying a plurality of scenes of the same interface through an organization mode.
The invention can be used directly by a person who uses an interface, a scene and a use case after debugging the interface, the scene and the use case in an organization mode without the debugging cost.
According to the invention, through an organization mode, for the content needing fine tuning, only the original interface is needed to be quoted, and then the secondary setting is carried out on the content, so that a plurality of similar scenes can be quickly created, and the efficiency of compiling the test script is improved.
Drawings
FIG. 1 is a flow chart of the operation of the present invention;
FIG. 2 is a schematic representation of the organization of the present invention.
Detailed Description
The invention will be further described with reference to specific embodiments shown in the drawings.
Referring to fig. 1 and 2, an organization method of interface test includes:
step S1, submitting a request through a page, storing a request url, content and request header information of an interface as request information, marking the request information through a name, and using the request information as public request information;
s2, submitting a request through a page to provide a scene organization function, selecting the request information content in the step S1, and organizing the selected request information in an id form to form a complete scene content which is used as a public scene content;
s3, submitting a request through a page, providing a use case organization function, selecting the contents in the step S1 and the step S2, organizing the complex request information contents and scenes through name tags, and secondarily setting the organized contents according to a specified interface to define the organized contents as specific use case contents;
and S4, testing the specified interface by using the case content.
In step S1, the request url, the content, and the request header information of the interface are saved by the name creation data structure as follows:
request interface id 1: { request url, content, request header, etc };
request interface id 2: { request url, content, request header, etc. }.
And submitting a request through a visual page of the webpage, storing the request information of the interface into a database, and inquiring the request information through the database subsequently.
In step S2, the selected request information is organized by an id creation data structure as follows:
scene id 1: { request interface id1, request interface id2 };
scene id 2: { request interface id3, request interface id4 }.
In step S2, for scene contents that have been organized by id, new scene contents may be formed again organized by new id as follows:
scene id 3: { scene id1, scene id2 }.
In step S2, the scene content is saved in the database, and when the user needs details, the user is queried layer by layer through the id, and the data is organized and displayed to the user.
In step S3, the secondary setting is specifically to add request information corresponding to the specified interface on the basis of the organized content, as follows:
use case id 1: { scene id1, scene id2, request information }.
In step S3, when a scene or an interface needs to be changed, only the common request information of step S1 or the common scene content of step S2 needs to be set, and a scene or a use case referring to the scene or the interface changes accordingly. That is, the common request information and the common scene content are set only once, and the test can be performed in all the interface cases without modification, so that the workload is greatly reduced.
The specific application is as follows: example of taxi taking software
First, define the interface first
Interface name 1: login account
The method comprises the following steps:
{
a request head: "Content-Type": application/json "
Account number: test
Password: 123456
Interface address: /logic
}
Interface name 2: find nearby whether there is a car that can be played
The method comprises the following steps:
{
a request head: "Content-Type": application/json "
Token for checking the label: *****
gps information: qingqing song way subway C mouth in Ming dynasty city
}
Interface name 3: initiate a vehicle finding order
The method comprises the following steps:
{
a request head: "Content-Type": application/json "
Token for checking the label: *****
gps information: nanning city
The type of taxi taking: special vehicle
Predicted departure time: 11 point
}
Second, redefine the scene
The above interfaces are organized with a scene name:
scene name 1: logging in account number to find vehicle and initiating order
{
Interface name 1: login account
Interface name 2: find nearby whether there is a car that can be played
Interface name 3: initiate a vehicle finding order
}
Scene name 2: directly initiating order form by logging in account
{
Interface name 1: login account
Interface name 3: initiate a vehicle finding order
}
When the process needs to be tested, the specific action can be directly performed by selecting the scene to operate, and the purpose of rapid testing can be achieved.
There may be many scenarios, where the interface "login account" is used, for example, there are 100, and in that time, the login account needs to add one more piece of information: a user geographic location; only the interface is found according to the name of the login account, and then the content of the interface is modified; when the 100 scenes are operated, calling the 'login account' has more information: the geographical position of the user can achieve the purposes of once modification, effective everywhere and efficiency improvement.
An organization system for interface testing, comprising:
the marking request information module is used for submitting a request through a page, storing a request url, content and request header information of an interface as request information, and marking the request information through a name;
the system comprises an organization request information module, a scene organization function, a marking request information content selection module and a scene content management module, wherein the organization request information module is used for submitting a request through a page, selecting the marked request information content and organizing the selected request information in an id form to form a complete scene content;
the system comprises a case generation module, a case generation module and a case management module, wherein the case generation module is used for submitting a request through a page, providing a case organization function, selecting marked request information content and organized scene content, organizing the complicated request information content and the complex scene content through name marks, and secondarily setting the organized content according to a specified interface to define the organized content as specific case content;
and the interface testing module is used for testing the specified interface through the use case content.
A computer device comprising a processor, a memory;
the memory is used for storing the execution program and transmitting the execution program to the processor;
a processor for executing the method of organizing an interface test of any one of claims 1-8 according to instructions for executing a program.
The above is only a preferred embodiment of the present invention, and it should be noted that it is obvious to those skilled in the art that several variations and modifications can be made without departing from the structure of the present invention, which will not affect the effect of the implementation of the present invention and the utility of the patent.

Claims (10)

1. A method of organizing interface tests, comprising:
step S1, submitting a request through a page, storing a request url, content and request header information of an interface as request information, marking the request information through a name, and using the request information as public request information;
s2, submitting a request through a page to provide a scene organization function, selecting the request information content in the step S1, and organizing the selected request information in an id form to form a complete scene content which is used as a public scene content;
s3, submitting a request through a page, providing a use case organization function, selecting the contents in the step S1 and the step S2, organizing the complex request information contents and scenes through name tags, and secondarily setting the organized contents according to a specified interface to define the organized contents as specific use case contents;
and S4, testing the specified interface by using the case content.
2. The method as claimed in claim 1, wherein in step S1, the request url, the content and the request header information of the interface are saved by a name creation data structure.
3. The method as claimed in claim 1, wherein in step S1, the request is submitted through a visual page of a web page, and the request information of the interface is saved in the database, and can be subsequently queried through the database.
4. The method as claimed in claim 1, wherein in step S2, the selected request information is organized by id creation data structure.
5. The method as claimed in claim 1, wherein in step S2, for scene contents that have been organized by id, new scene contents can be formed by new id organization again.
6. The method as claimed in claim 1, wherein in step S2, the scene content is stored in a database, and when the user needs details, the user can query the database layer by layer through id and organize the data to show the user.
7. The method as claimed in claim 1, wherein in step S3, the secondary setting is to add request information corresponding to the specified interface based on the organized content.
8. The method of claim 1, wherein in step S3, when the scene and the interface need to be changed, only the common request information in step S1 or the common scene content in step S2 needs to be set, and the scene or the use case referring to the scene or the interface changes accordingly.
9. An organizational system for implementing the interface test of any one of claims 1 to 8, comprising:
the marking request information module is used for submitting a request through a page, storing a request url, content and request header information of an interface as request information, and marking the request information through a name;
the system comprises an organization request information module, a scene organization function, a marking request information content selection module and a scene content management module, wherein the organization request information module is used for submitting a request through a page, selecting the marked request information content and organizing the selected request information in an id form to form a complete scene content;
the system comprises a case generation module, a case generation module and a case management module, wherein the case generation module is used for submitting a request through a page, providing a case organization function, selecting marked request information content and organized scene content, organizing the complicated request information content and the complex scene content through name marks, and secondarily setting the organized content according to a specified interface to define the organized content as specific case content;
and the interface testing module is used for testing the specified interface through the use case content.
10. A computer device comprising a processor, a memory;
the memory is used for storing an execution program and transmitting the execution program to the processor;
the processor is configured to perform an organization method of an interface test according to any one of claims 1-8 according to the instructions of the executive program.
CN202111064000.4A 2021-09-10 2021-09-10 Interface test organization method and system and computer equipment Pending CN113704133A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111064000.4A CN113704133A (en) 2021-09-10 2021-09-10 Interface test organization method and system and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111064000.4A CN113704133A (en) 2021-09-10 2021-09-10 Interface test organization method and system and computer equipment

Publications (1)

Publication Number Publication Date
CN113704133A true CN113704133A (en) 2021-11-26

Family

ID=78659990

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111064000.4A Pending CN113704133A (en) 2021-09-10 2021-09-10 Interface test organization method and system and computer equipment

Country Status (1)

Country Link
CN (1) CN113704133A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108710569A (en) * 2018-05-09 2018-10-26 深圳壹账通智能科技有限公司 Test cases generation method, data creation method, device, equipment and medium
CN109766262A (en) * 2018-12-15 2019-05-17 深圳壹账通智能科技有限公司 Interface data processing method, automated testing method, device, equipment and medium
CN110825646A (en) * 2019-11-11 2020-02-21 拉扎斯网络科技(上海)有限公司 Test case generation method, interface test method, device and electronic equipment
CN112148607A (en) * 2020-09-23 2020-12-29 北京同邦卓益科技有限公司 Interface testing method and device for service scene
CN112559352A (en) * 2020-12-16 2021-03-26 平安银行股份有限公司 Interface test method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108710569A (en) * 2018-05-09 2018-10-26 深圳壹账通智能科技有限公司 Test cases generation method, data creation method, device, equipment and medium
CN109766262A (en) * 2018-12-15 2019-05-17 深圳壹账通智能科技有限公司 Interface data processing method, automated testing method, device, equipment and medium
CN110825646A (en) * 2019-11-11 2020-02-21 拉扎斯网络科技(上海)有限公司 Test case generation method, interface test method, device and electronic equipment
CN112148607A (en) * 2020-09-23 2020-12-29 北京同邦卓益科技有限公司 Interface testing method and device for service scene
CN112559352A (en) * 2020-12-16 2021-03-26 平安银行股份有限公司 Interface test method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US20210333984A1 (en) Method and apparatus for generating customized visualization component
CN103353899B (en) The accurate searching method of a kind of integrated information
EP2891041B1 (en) User interface apparatus in a user terminal and method for supporting the same
CN104579909B (en) Method and equipment for classifying user information and acquiring user grouping information
CN110399448B (en) Chinese place name address searching and matching method, terminal and computer readable storage medium
CN108140055A (en) Trigger application message
CN111488186A (en) Data processing method and device, electronic equipment and computer storage medium
CN109814868A (en) Network transmission analogy method, device, computer equipment and storage medium
CN112328486A (en) Interface automation test method and device, computer equipment and storage medium
US20190171745A1 (en) Open ended question identification for investigations
CN114510425A (en) Test case generation method and device
CN110502716A (en) A kind of methods of exhibiting of information of vehicles, server, terminal device
CN106471492A (en) The action of index resource
CN113704133A (en) Interface test organization method and system and computer equipment
CN106197394A (en) Air navigation aid and device
CN114565316A (en) Task issuing method based on micro-service architecture and related equipment
CN114637672A (en) Automatic data testing method and device, computer equipment and storage medium
CN113705816A (en) Flow chart generation method, electronic device, device and readable storage medium
JP6676083B2 (en) Search device, search method, and program
CN112732379A (en) Operation method of application program on intelligent terminal, terminal and storage medium
CN111666328A (en) Method and device for displaying visual chart in real time, computer equipment and storage medium
CN109284097A (en) Realize method, equipment, system and the storage medium of complex data analysis
CN115546356A (en) Animation generation method and device, computer equipment and storage medium
CN112949317B (en) Text semantic recognition method and device, computer equipment and storage medium
CN114254124A (en) Sensitive data map display method and device, computer equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination