CN106598838B - OSP system detection method and device - Google Patents

OSP system detection method and device Download PDF

Info

Publication number
CN106598838B
CN106598838B CN201610913353.XA CN201610913353A CN106598838B CN 106598838 B CN106598838 B CN 106598838B CN 201610913353 A CN201610913353 A CN 201610913353A CN 106598838 B CN106598838 B CN 106598838B
Authority
CN
China
Prior art keywords
http
service
interface
osp
data packet
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
CN201610913353.XA
Other languages
Chinese (zh)
Other versions
CN106598838A (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.)
Vipshop Guangzhou Software Co Ltd
Original Assignee
Guangzhou Pinwei Software 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 Guangzhou Pinwei Software Co Ltd filed Critical Guangzhou Pinwei Software Co Ltd
Priority to CN201610913353.XA priority Critical patent/CN106598838B/en
Publication of CN106598838A publication Critical patent/CN106598838A/en
Application granted granted Critical
Publication of CN106598838B publication Critical patent/CN106598838B/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/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • 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/3696Methods or tools to render software testable

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)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of OSP system detection methods, comprising steps of obtaining data packet to be tested;The data packet to be tested is parsed, and generates interface message corresponding with common interface in data packet to be tested;Start corresponding Http service according to the interface message, and executes the test of the data packet to be tested under Http service.The invention also discloses a kind of OSP opening machine system test devices.The present invention is not necessarily to tester's hand-coding code, reduces the complexity of test process, improves testing efficiency.

Description

OSP system detection method and device
Technical field
The present invention relates to technical field of data processing more particularly to OSP system detection methods and device.
Background technique
Currently, there is a kind of basic service system OSP for being based on venus (3D browser) in platform architecture.Service system OSP needs then just to become the thorny problem of tester about the test of a large amount of interfaces of OSP to a large amount of interface testings, because It only supports the mode of java (Object-Oriented Programming Language) method call to carry out interface testing for OSP, surveys during the test Examination personnel need: 1, configuring the environmental variance of OSP service;2, the jar packet for needing service to be tested is introduced, if jar packet updates, Need to timely update jar packet;3, test code is write, client executing method is called, parametric variable is set, test is finally executed It obtains test result and analyzes.To sum up, the test method operating procedure of OSP service system is more at present, and process is cumbersome, inefficient.
Above content is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that above content is existing skill Art.
Summary of the invention
The main purpose of the present invention is to provide a kind of OSP system detection method and devices, it is intended to solve current OSP service The test method operating procedure of system is more, and process is cumbersome, inefficient problem.
To achieve the above object, a kind of OSP system detection method provided by the invention, comprising steps of
Obtain data packet to be tested;
The data packet to be tested is parsed, and generates interface message corresponding with common interface in data packet to be tested;
Start corresponding Http service according to the interface message, and executes the number to be tested under Http service According to the test of packet.
Preferably, described to include: according to the corresponding Http service of interface message starting
According to the interface message configuration surroundings variable and system parameter;
After configuration surroundings variable and system parameter, Http interface message is determined according to mapping relations;
Start corresponding Http interface service according to the Http interface message of the determination.
Preferably, described to include: according to the corresponding Http interface service of the Http interface message of determination starting
Corresponding Http service is generated according to the interface message of generation, and shows the Http service of the generation;
The enabled instruction based on display Http service is received, corresponding Http service is started.
It is preferably, described after executing the test of the data packet to be tested under the Http is serviced, further includes:
After the completion of test, stop the Http service.
Preferably, the method also includes:
One layer of application layer Http agreement is provided for OSP service, and api interface corresponding with Http agreement is provided.
In addition, to achieve the above object, the present invention also provides a kind of OSP opening machine system test devices, comprising:
Module is obtained, for obtaining data packet to be tested;
Parsing module, for parsing the data packet to be tested;
Generation module, for generating interface message corresponding with common interface in data packet to be tested;
Starting module is serviced for starting corresponding Http according to the interface message;
Test module, for executing the test of the data packet to be tested under Http service.
Preferably, the starting module includes:
Configuration unit, for according to the interface message configuration surroundings variable and system parameter;
Determination unit, for determining Http interface message according to mapping relations after configuration surroundings variable and system parameter;
Start unit, for starting corresponding Http interface service according to the Http interface message of the determination.
Preferably, the start unit, further includes: subelement is generated, it is corresponding for being generated according to the interface message of generation Http service;
Display subelement shows the Http service of the generation;
Promoter unit for receiving the enabled instruction based on display Http service, and starts corresponding Http service.
Preferably, stopping modular, for after the completion of test, stopping the Http service.
Preferably, further includes:
Module is provided, for providing one layer of application layer Http agreement for OSP service, and is provided corresponding with Http agreement Api interface.
The present invention calls the client approach of OSP by api interface, automatically according to the test data Packet analyzing interface of upload Information simultaneously generates corresponding Http service, is not necessarily to tester's hand-coding code, reduces the complexity of test process, improve Testing efficiency.
Detailed description of the invention
Fig. 1 is the flow diagram of an embodiment of OSP system detection method of the present invention;
Fig. 2 is the flow diagram for starting corresponding Http service in one embodiment of the invention according to the interface message;
Fig. 3 is to start corresponding Http interface service according to the Http interface message of the determination in one embodiment of the invention Flow diagram;
Fig. 4 is the functional block diagram of an embodiment of OSP opening machine system test device of the present invention;
Fig. 5 is the refinement the functional block diagram of starting module in an embodiment in Fig. 4;
Fig. 6 is the refinement the functional block diagram of an embodiment start unit in Fig. 5.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The present invention provides a kind of OSP system detection method.
Referring to Fig.1, Fig. 1 is the flow diagram of an embodiment of OSP system detection method of the present invention.
In one embodiment, the OSP system detection method includes:
Step S10 obtains data packet to be tested;
In the present embodiment, OSP is open settlement protocol, the agreement based on client/server.The data packet to be tested Preferably JAR (compressed file) packet.JAR management module is provided, user is uploaded by JAR management module needs JAR packet to be tested, Upload procedure includes: that JAR packet 1) is uploaded by way of USB;2) data are first placed into cloud disk, downloads JAR packet from cloud disk, then The JAR packet is uploaded by JAR management module;3) JAR management module provides I/O Interface, straight by I/O Interface Connect input JAR data packet.
Step S20 parses the data packet to be tested, and generates interface corresponding with common interface in data packet to be tested Information;
One layer of application layer Http agreement (HyperText Transfer Protocol, network association are provided for OSP service View), and api interface corresponding with Http agreement is provided.After getting data packet to be tested, the data to be tested are parsed Packet extracts the common interface in the data packet to be tested, that is, from data packet to be tested, parses public entrained by it Interface.For example, the data packet of JAR format is decompressed, from decompression when the data packet to be tested is the data packet of JAR format The relevant information of common interface is extracted in data packet.Automatically generate interface message corresponding with these common interfaces.
Step S30 starts corresponding Http according to the interface message and services, and under Http service described in execution The test of data packet to be tested.
Start and stop relevant Http service according to the interface message, under the Http service environment described in execution The test of data packet to be tested.
Specifically, in a preferred embodiment of the present invention, it is described to be started accordingly according to the interface message with reference to Fig. 2 Http service includes:
Step S31, according to the interface message configuration surroundings variable and system parameter;
Step S32 determines Http interface message according to mapping relations after configuration surroundings variable and system parameter;
Step S33 starts corresponding Http interface service according to the Http interface message of the determination.
After generating interface message, corresponding environmental variance and system parameter are configured according to the interface message, After configuring good environmental variance corresponding with interface message and system parameter, Http interface message is determined according to mapping relations, according to The Http interface message of the determination starts corresponding Http interface service.
Specifically, in a preferred embodiment of the present invention, with reference to Fig. 3, the Http interface message according to the determination Starting corresponding Http interface service includes:
Step S34 generates corresponding Http according to the interface message of generation and services, and shows the Http clothes of the generation Business;
Step S35 receives the enabled instruction based on display Http service, starts corresponding Http service.
According to the interface message of generation, the automatically corresponding Http service of dynamic generation shows the Http clothes of the generation Business, tester start Http service, execute test under Http service.
After the completion of test, test result is obtained, test report is generated according to test result.And after the completion of test, stop Only corresponding Http service.In specific application, one layer of application layer Http agreement has been packed on the basis of OSP is serviced, tested Personnel can be by calling the api interface (Application Programming Interface, the application programming that provide Interface), the client approach of scheduling OSP service, that is, the mechanism implementation method calling of dynamic reflective are changed into API Calls, Tester does not need hand-coding code in this way, do not need yet modification environmental variance, in conjunction with SoapUI (open source testing tool, Function/load/compliance test of Web Service is checked, calls, realized by soap/http) using method parameter as Data-driven, the api interface that daily lot size scheduling provides, improves the efficiency of test job.It is based in the embodiment of the present invention The original test job that just can be carried out by portable code is converted to and does not need portable code by the reflection mechanism of Java Http api interface test job, greatly improves the efficiency of test.
The present embodiment calls the client approach of OSP by api interface, connects automatically according to the test data Packet analyzing of upload Message ceases and generates corresponding Http service, is not necessarily to tester's hand-coding code, reduces the complexity of test process, improves Testing efficiency.
The present invention further provides a kind of OSP opening machine system test devices.
It is the functional block diagram of an embodiment of OSP opening machine system test device of the present invention referring to Fig. 4, Fig. 4.
In one embodiment, the OSP opening machine system test device includes: to obtain module 10, provide module 20, parsing module 30, generation module 40, starting module 50, test module 60 and stopping modular 70.
The acquisition module 10, for obtaining data packet to be tested;
In the present embodiment, OSP is open settlement protocol, the agreement based on client/server.The data packet to be tested Preferably JAR (compressed file) packet.JAR management module is provided, user is uploaded by JAR management module needs JAR packet to be tested, Upload procedure includes: that JAR packet 1) is uploaded by way of USB;2) data are first placed into cloud disk, downloads JAR packet from cloud disk, then The JAR packet is uploaded by JAR management module;3) JAR management module provides I/O Interface, straight by I/O Interface Connect input JAR data packet.
Module 20 is provided, for providing one layer of application layer Http agreement (HyperText Transfer for OSP service Protocol, network protocol), and api interface corresponding with Http agreement is provided.
The parsing module 30, for parsing the data packet to be tested;After getting data packet to be tested, institute is parsed Data packet to be tested is stated, extracts the common interface in the data packet to be tested, that is, from data packet to be tested, parse it Entrained common interface.For example, decompressing the data of JAR format when the data packet to be tested is the data packet of JAR format Packet extracts the relevant information of common interface from the data packet of decompression.
The generation module 40, for generating interface message corresponding with common interface in data packet to be tested;It is automatic raw At interface message corresponding with these common interfaces.
The starting module 50 is serviced for starting corresponding Http according to the interface message;Believed according to the interface Breath starts and stops relevant Http service, and the test of the data packet to be tested is executed under the Http service environment.
Specifically, with reference to Fig. 5, the starting module 50 includes: in a preferred embodiment of the present invention
Configuration unit 51, for according to the interface message configuration surroundings variable and system parameter;
Determination unit 52, for determining that Http interface is believed according to mapping relations after configuration surroundings variable and system parameter Breath;
Start unit 53, for starting corresponding Http interface service according to the Http interface message of the determination.
After generating interface message, corresponding environmental variance and system parameter are configured according to the interface message, After configuring good environmental variance corresponding with interface message and system parameter, Http interface message is determined according to mapping relations, according to The Http interface message of the determination starts corresponding Http interface service.
Specifically, with reference to Fig. 6, the start unit 53 includes: in a preferred embodiment of the present invention
Subelement 531 is generated, corresponding Http is generated according to the interface message of generation and is serviced;
It shows subelement 532, shows the Http service of the generation;
Promoter unit 533 starts corresponding Http service for receiving the enabled instruction based on display Http service.
According to the interface message of generation, the automatically corresponding Http service of dynamic generation shows the Http clothes of the generation Business, tester start Http service;
The test module 60, for executing the test of the data packet to be tested under Http service.
After starting Http service, test is executed under the Http service environment.After the completion of test, test knot is obtained Fruit generates test report according to test result.
The stopping modular 70, for after the completion of test, stopping corresponding Http service.In specific application, in OSP One layer of application layer Http agreement is packed on the basis of service, tester can be by calling the api interface provided (Application Programming Interface, application programming interface), the client approach of scheduling OSP service, The mechanism implementation method calling of namely dynamic reflective is changed into API Calls, and such tester does not need hand-coding code, Modification environmental variance is not needed, (open source testing tool, is checked by soap/http, calls, realizes Web in conjunction with SoapUI yet Function/load/compliance test of Service) using method parameter as data-driven, the API that daily lot size scheduling provides connects Mouthful, improve the efficiency of test job.Based on the reflection mechanism of Java in the embodiment of the present invention, original is passed through into portable code The test job that just can be carried out is converted to the Http api interface test job for not needing portable code, greatly improves test Efficiency.
The present embodiment calls the client approach of OSP by api interface, connects automatically according to the test data Packet analyzing of upload Message ceases and generates corresponding Http service, is not necessarily to tester's hand-coding code, reduces the complexity of test process, improves Testing efficiency.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (8)

1. a kind of OSP system detection method, which is characterized in that comprising steps of
Obtain data packet to be tested;
The data packet to be tested is parsed, and generates interface message corresponding with common interface in data packet to be tested;
Start corresponding Http service according to the interface message, and executes the data packet to be tested under Http service Test;
One layer of application layer Http agreement is provided for OSP service, and api interface corresponding with Http agreement is provided, passes through api interface The method for calling OSP client completes OSP service.
2. OSP system detection method as described in claim 1, which is characterized in that described to start phase according to the interface message The Http service answered includes:
According to the interface message configuration surroundings variable and system parameter;
After configuration surroundings variable and system parameter, Http interface message is determined according to mapping relations;
Start corresponding Http interface service according to the Http interface message of the determination.
3. OSP system detection method as claimed in claim 2, which is characterized in that the Http interface according to the determination Information starts corresponding Http interface service
Corresponding Http service is generated according to the interface message of generation, and shows the Http service of the generation;
The enabled instruction based on display Http service is received, corresponding Http service is started.
4. OSP system detection method as described in any one of claims 1 to 3, which is characterized in that described to be serviced in the Http After the lower test for executing the data packet to be tested, further includes:
After the completion of test, stop the Http service.
5. a kind of OSP opening machine system test device characterized by comprising
Module is obtained, for obtaining data packet to be tested;
Parsing module, for parsing the data packet to be tested;
Generation module, for generating interface message corresponding with common interface in data packet to be tested;
Starting module is serviced for starting corresponding Http according to the interface message;
Test module, for executing the test of the data packet to be tested under Http service;
Module is provided, for providing one layer of application layer Http agreement for OSP service, and API corresponding with Http agreement is provided and is connect Mouthful, the common interface is the api interface, completes OSP service by the method that api interface calls OSP client.
6. OSP opening machine system test device as claimed in claim 5, which is characterized in that the starting module includes:
Configuration unit, for according to the interface message configuration surroundings variable and system parameter;
Determination unit, for determining Http interface message according to mapping relations after configuration surroundings variable and system parameter;
Start unit, for starting corresponding Http interface service according to the Http interface message of the determination.
7. OSP opening machine system test device as claimed in claim 6, which is characterized in that the start unit, further includes: generate son Unit is serviced for generating corresponding Http according to the interface message of generation;
Display subelement shows the Http service of the generation;
Promoter unit for receiving the enabled instruction based on display Http service, and starts corresponding Http service.
8. such as the described in any item OSP opening machine system test devices of claim 5 to 7, which is characterized in that stopping modular, for surveying After the completion of examination, stop the Http service.
CN201610913353.XA 2016-10-19 2016-10-19 OSP system detection method and device Active CN106598838B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610913353.XA CN106598838B (en) 2016-10-19 2016-10-19 OSP system detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610913353.XA CN106598838B (en) 2016-10-19 2016-10-19 OSP system detection method and device

Publications (2)

Publication Number Publication Date
CN106598838A CN106598838A (en) 2017-04-26
CN106598838B true CN106598838B (en) 2019-07-19

Family

ID=58556214

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610913353.XA Active CN106598838B (en) 2016-10-19 2016-10-19 OSP system detection method and device

Country Status (1)

Country Link
CN (1) CN106598838B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7865621B1 (en) * 2001-10-26 2011-01-04 Spice I2I Limited Open settlement protocol bridge for multi-network voice connections
CN105162646A (en) * 2015-07-29 2015-12-16 北京京东尚科信息技术有限公司 Multi-protocol interface test system and method
CN105516322A (en) * 2015-12-16 2016-04-20 方正宽带网络服务有限公司 Interface test method and device based on http protocol
CN105681126A (en) * 2015-12-30 2016-06-15 合一网络技术(北京)有限公司 Automatic test method and system based on protocol interface

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10361944B2 (en) * 2015-04-08 2019-07-23 Oracle International Corporation Automated test for uniform web service interfaces

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7865621B1 (en) * 2001-10-26 2011-01-04 Spice I2I Limited Open settlement protocol bridge for multi-network voice connections
CN105162646A (en) * 2015-07-29 2015-12-16 北京京东尚科信息技术有限公司 Multi-protocol interface test system and method
CN105516322A (en) * 2015-12-16 2016-04-20 方正宽带网络服务有限公司 Interface test method and device based on http protocol
CN105681126A (en) * 2015-12-30 2016-06-15 合一网络技术(北京)有限公司 Automatic test method and system based on protocol interface

Also Published As

Publication number Publication date
CN106598838A (en) 2017-04-26

Similar Documents

Publication Publication Date Title
CN106294179B (en) Analog detection method and server in process of application development
CN104683386B (en) The stake service implementing method and device of customizable response
CN105450463B (en) Adjustment method, the device and system of hardware device
CN106603283B (en) A kind of method, apparatus and centralized management platform of analog service
CN110275831B (en) Mock data verification method and device of protocol interface
CN106776314B (en) Test system
CN110955600B (en) Interface testing method and device
CN108347356B (en) Multi-protocol unit testing method and device, electronic equipment and storage medium
CN107832207A (en) Interface performance test method, apparatus, storage medium and computer equipment
CN104821954A (en) Cross-platform remote procedure call method
CN107943683A (en) A kind of test script generation method, device, electronic equipment and storage medium
CN110515855B (en) Simulation control method, server and system for application program
CN113553257B (en) Test method, device, storage medium and electronic equipment
CN107122293A (en) software performance testing method, device, server and system
CN107608901A (en) Method of testing and device based on Jmteter, storage medium, electronic equipment
CN109815105A (en) Applied program testing method and device based on Btrace
CN113971110A (en) Interface testing method, device, equipment and computer readable storage medium
CN106815150B (en) Server-side interface test system and method
CN108694120B (en) Method and device for testing service component
CN112770108B (en) Performance test method, device and system and computer readable storage medium
CN107766335A (en) A kind of interpretation method and device of software to be translated
She et al. Hermes: A tool for testing mobile device applications
CN106598838B (en) OSP system detection method and device
CN105868104B (en) A kind of cross-platform graphic user interface automatic test approach
CN107193728A (en) Mobile terminal automation testing method and device

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
TA01 Transfer of patent application right

Effective date of registration: 20171204

Address after: 510000 Guangzhou City, Guangzhou, Guangdong, Fangcun Avenue, one of the 314 self compiled

Applicant after: Guangzhou Pinwei Software Co., Ltd.

Address before: Liwan District Fangcun Huahai street Guangzhou city Guangdong province 510000 No. 20 self 1-5 building (only for office use)

Applicant before: Guangzhou VIPSHOP Information and Technology Co., Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220110

Address after: 510000 Room 601, 128 Dingxin Road, Haizhu District, Guangzhou City, Guangdong Province (office only)

Patentee after: Vipshop (Guangzhou) Software Co.,Ltd.

Address before: 510000 No. 314, Fangcun Avenue, Liwan District, Guangzhou City, Guangdong Province

Patentee before: GUANGZHOU PINWEI SOFTWARE Co.,Ltd.

TR01 Transfer of patent right