CN111061599B - Method for generating check point of interface test environment - Google Patents

Method for generating check point of interface test environment Download PDF

Info

Publication number
CN111061599B
CN111061599B CN201911246538.XA CN201911246538A CN111061599B CN 111061599 B CN111061599 B CN 111061599B CN 201911246538 A CN201911246538 A CN 201911246538A CN 111061599 B CN111061599 B CN 111061599B
Authority
CN
China
Prior art keywords
interface
generating
interface test
response message
test environment
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.)
Active
Application number
CN201911246538.XA
Other languages
Chinese (zh)
Other versions
CN111061599A (en
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.)
Ctrip Travel Network Technology Shanghai Co Ltd
Original Assignee
Ctrip Travel Network Technology Shanghai 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 Ctrip Travel Network Technology Shanghai Co Ltd filed Critical Ctrip Travel Network Technology Shanghai Co Ltd
Priority to CN201911246538.XA priority Critical patent/CN111061599B/en
Publication of CN111061599A publication Critical patent/CN111061599A/en
Application granted granted Critical
Publication of CN111061599B publication Critical patent/CN111061599B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test buses, lines or interfaces, e.g. stuck-at or open line faults
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention discloses a method for generating check points of an interface test environment, which comprises the following steps: executing the interface test case twice, and respectively obtaining interface response messages; generating a corresponding target set according to the interface response message tested each time; acquiring an intersection set in a target set corresponding to the twice test; the intersection is taken as a check point. The method for generating the check point of the interface test environment can generate the check point, improves the efficiency and the coverage rate and improves the accuracy.

Description

Method for generating check point of interface test environment
Technical Field
The invention belongs to the technical field of interface testing, and particularly relates to a method for generating check points of an interface testing environment.
Background
In the automatic interface test, the test personnel are often required to manually configure check points, the efficiency is low, the time consumption is long, the overall coverage rate is difficult to achieve, errors are easy to occur, and the accuracy is low.
Disclosure of Invention
The invention aims to overcome the defect of lower coverage rate of configuration check points in the automatic test of an interface in the prior art, and provides a check point generation method of an interface test environment.
The invention solves the technical problems by the following technical scheme:
the invention provides a method for generating check points of an interface test environment, which comprises the following steps:
executing the interface test case twice, and respectively obtaining interface response messages;
generating a corresponding target set according to the interface response message tested each time;
acquiring an intersection set in a target set corresponding to the twice test;
the intersection is taken as a check point.
Preferably, the step of generating the corresponding data set according to the interface response message of each test includes: analyzing the interface response message into a data structure of attribute names and attribute values, and storing the attribute names and the attribute values into a data set to generate a target set.
Preferably, the interface response message is JSON (JavaScript Object Notation, JS object numbered musical notation) type.
Preferably, the interface response message is of the XML (extensible markup language) type.
Preferably, the interval between the two execution of the interface test cases is preset.
Preferably, the result of executing the interface test case twice is a successful state.
Preferably, the step of acquiring the intersection set in the target set corresponding to the twice test further comprises:
the timestamp, ID (identity) field is removed.
The invention has the positive progress effects that: the method for generating the check point of the interface test environment can generate the check point, improves the efficiency and the coverage rate and improves the accuracy.
Drawings
FIG. 1 is a flowchart of a method for generating checkpoints of an interface test environment according to a preferred embodiment of the present invention.
Detailed Description
The invention is further illustrated by means of a preferred embodiment, but the invention is not limited to the described embodiment.
The embodiment provides a method for generating checkpoints of an interface test environment. Referring to fig. 1, the method for generating checkpoints of the interface test environment includes the steps of:
and step S101, executing the interface test case twice, and respectively acquiring interface response messages.
Step S102, generating a corresponding target set according to the interface response message tested each time.
Step S103, acquiring an intersection set in the target set corresponding to the twice tests.
Step S104, taking the intersection as a check point.
As an optional implementation manner, the step of generating the corresponding data set according to the interface response message of each test includes: analyzing the interface response message into a data structure of attribute names and attribute values, and storing the attribute names and the attribute values into a data set to generate a target set.
In an alternative embodiment, the interface response message is of JSON type.
In another alternative embodiment, the interface response message is of the XML type.
As an alternative implementation, the interval between two execution of interface test cases is preset.
As an alternative embodiment, the result of executing the interface test case twice is a successful state.
As an optional implementation manner, the step of acquiring the intersection set in the target set corresponding to the two tests further includes:
the timestamp, ID field is removed.
In specific implementation, the interface test case is executed once first, so that the test result is ensured to be successful. And acquiring an interface response message, generating an attribute name and attribute value data structure based on the interface response message, and storing the data structure into the first target set.
Then, the interface test case is executed again at preset time intervals, so that the test result is ensured to be successful. And acquiring an interface response message, generating an attribute name and attribute value data structure based on the interface response message, and storing the data structure into a second target set.
Next, the intersection of the first target set and the second target set (i.e., the same portion of the first target set and the second target set) is obtained, the timestamp, ID field, etc. are removed.
Then, the intersection is taken as a check point. And judging whether the interface has a problem or not by judging whether the response message contains the check point or not when verifying the check point which is automatically generated.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the principles and spirit of the invention, but such changes and modifications fall within the scope of the invention.

Claims (6)

1. A method for generating checkpoints of an interface test environment, comprising the steps of:
executing the interface test case twice, ensuring that the test result is in a successful state, and respectively acquiring interface response messages;
the results of executing the interface test case twice are successful states;
generating a corresponding target set according to the interface response message tested each time;
acquiring an intersection set in the target set corresponding to the twice test;
the intersection is taken as a check point.
2. The method for generating checkpoints of an interface test environment according to claim 1, wherein the step of generating the corresponding data set according to the interface response message of each test comprises: analyzing the interface response message into a data structure of attribute names and attribute values, and storing the attribute names and the attribute values into a data set to generate the target set.
3. The method for generating a checkpoint of an interface test environment according to claim 1, wherein the interface response message is JSON type.
4. The method for generating a checkpoint of an interface test environment according to claim 1, wherein the interface response message is of XML type.
5. The method for generating a checkpoint of an interface test environment according to claim 1, wherein a preset time is spaced between executing the interface test cases twice.
6. The method for generating a checkpoint of an interface test environment according to claim 1, wherein the step of acquiring intersections in the target set corresponding to the two tests further comprises:
the timestamp, ID field is removed.
CN201911246538.XA 2019-12-06 2019-12-06 Method for generating check point of interface test environment Active CN111061599B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911246538.XA CN111061599B (en) 2019-12-06 2019-12-06 Method for generating check point of interface test environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911246538.XA CN111061599B (en) 2019-12-06 2019-12-06 Method for generating check point of interface test environment

Publications (2)

Publication Number Publication Date
CN111061599A CN111061599A (en) 2020-04-24
CN111061599B true CN111061599B (en) 2023-08-01

Family

ID=70300095

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911246538.XA Active CN111061599B (en) 2019-12-06 2019-12-06 Method for generating check point of interface test environment

Country Status (1)

Country Link
CN (1) CN111061599B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109726128A (en) * 2018-12-29 2019-05-07 亚信科技(中国)有限公司 A kind of method for generating test case, device and server
CN109766231A (en) * 2019-01-11 2019-05-17 未来电视有限公司 Interface test method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9208044B2 (en) * 2012-06-25 2015-12-08 Infosys Limited Methods for simulating message-oriented services and devices thereof
US9367435B2 (en) * 2013-12-12 2016-06-14 Vertafore, Inc. Integration testing method and system for web services
CN109871312B (en) * 2017-12-05 2022-08-12 航天信息股份有限公司 Interface testing method, device, equipment and readable storage medium
CN108769799B (en) * 2018-05-31 2021-06-15 联想(北京)有限公司 Information processing method and electronic equipment
CN109710533A (en) * 2018-12-29 2019-05-03 亚信科技(中国)有限公司 A kind of interface test method, device and server
CN110007658A (en) * 2019-03-12 2019-07-12 百度在线网络技术(北京)有限公司 The method for monitoring abnormality and device of vehicle CAN bus

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109726128A (en) * 2018-12-29 2019-05-07 亚信科技(中国)有限公司 A kind of method for generating test case, device and server
CN109766231A (en) * 2019-01-11 2019-05-17 未来电视有限公司 Interface test method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
610-1990 - IEEE Standard Computer Dictionary: A Compilation of IEEE Standard Computer Glossaries;IEEE;《IEEE》;全文 *

Also Published As

Publication number Publication date
CN111061599A (en) 2020-04-24

Similar Documents

Publication Publication Date Title
US8381184B2 (en) Dynamic test coverage
CN111159049B (en) Automatic interface testing method and system
US10120783B2 (en) Determining test case efficiency
CN109684188B (en) Test method and device
CN103092748A (en) Method and system of test cases surely needing to perform regression testing
CN113572658A (en) Vehicle control signal testing method and device, electronic equipment and storage medium
CN109634867B (en) Software testing method and device based on data simulation system and storage medium
CN106557419B (en) Program testing method and device
Nietzio et al. The unified Web evaluation methodology (UWEM) 1.2 for WCAG 1.0
CN111061599B (en) Method for generating check point of interface test environment
CN110134598B (en) Batch processing method, device and system
CN109508204B (en) Front-end code quality detection method and device
US20140281719A1 (en) Explaining excluding a test from a test suite
JP2009237654A (en) Test program management system
CN111159028A (en) Webpage testing method and device
CN110688173A (en) Positioning method and device of components in cross-platform interface framework and electronic equipment
CN116016270A (en) Switch test management method and device, electronic equipment and storage medium
KR101403685B1 (en) System and method for relating between failed component and performance criteria of manintenance rule by using component database of functional importance determination of nuclear power plant
CN115576831A (en) Test case recommendation method, device, equipment and storage medium
CN110795142B (en) Configuration file generation method and device
CN110888809B (en) Risk prediction method and device for test task
CN108287792B (en) Method and apparatus for outputting information
CN107038286B (en) Power grid simulation method and device
US20120174072A1 (en) Recursive method call representation in a plot view of method execution performance
CN110321276A (en) The generation method and device of test case

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
GR01 Patent grant
GR01 Patent grant