CN108563558A - A kind of program testing method, test pile system and device - Google Patents
A kind of program testing method, test pile system and device Download PDFInfo
- Publication number
- CN108563558A CN108563558A CN201810164922.4A CN201810164922A CN108563558A CN 108563558 A CN108563558 A CN 108563558A CN 201810164922 A CN201810164922 A CN 201810164922A CN 108563558 A CN108563558 A CN 108563558A
- Authority
- CN
- China
- Prior art keywords
- client
- test
- service class
- interface
- pile system
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
- G06F11/3648—Software debugging using additional hardware
- G06F11/3656—Software debugging using additional hardware using a specific debug interface
Landscapes
- Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The present invention relates to client development technique field, a kind of program testing method, test pile system and device are disclosed.This method includes:Server provides service class interface and is uploaded to test pile system;Test pile system returns to simulation test data by service class interface;Client obtains simulation test data by service class interface, to test the corresponding test case of client.By the above-mentioned means, the present invention can provide server interface in time so that client is debugged in client development process.
Description
Technical field
The present invention relates to client development technique field, more particularly to a kind of program testing method, test pile system with
And device.
Background technology
The present inventor has found during long-term research invention, with being widely used for smart mobile phone, intelligence
The client exploitation of application program is also more and more universal on mobile phone, and invoking server is frequently necessary in the development process of client
Port carry out client the test job of code section be completed.But in client and the development process of server, visitor
The development cycle at family end and the development cycle of server are in concurrent development.It is taken when client needs to call in its development process
When the interface at business device end is debugged, however server end tends not to provide corresponding interface in time so that client debugging makes
With may thus stop over the development progress of client.If carrying out total interface again after the completion of server end exploitation
With the joint debugging of client, all technical problems will occur in exploitation latter stage, and major part is completed with client in server at this time
Development Engineering it is larger to change adjusting range, it will shadow if modified adjustment to server or client in exploitation latter stage
Ring the whole development progress of server and client.
Invention content
In view of this, the invention mainly solves the technical problem of providing a kind of program testing method, test pile system with
And device, server interface can be provided in time in client development process so that client is debugged.
In order to solve the above technical problems, one aspect of the present invention is:A kind of program testing method is provided, it should
Method includes:Server provides service class interface and is uploaded to test pile system;Test pile system is returned by service class interface
Simulation test data;Client obtains simulation test data by service class interface, to be carried out to the corresponding test case of client
Test.
Wherein, server provides service class interface and is specifically included the step of being uploaded to test pile system:Server will be compiled
The service class interface translated is uploaded to test pile system in the form of archive file.
Wherein, service class interface inheritance has the first base class.
Wherein, the step of test pile system returns to simulation test data by service class interface specifically includes:Test pile system
System obtains the service class interface that server uploads;Service class interface is parsed, the interface class class name and class of service class interface are obtained
Path, so that interface class class name and class.path access service class interface that test pile system passes through service class interface;By business
Class interface binds a request path, so that client is by request path access service class interface, and test pile system passes through
Request path returns to simulation test data to client, to test the corresponding test case of client.
Wherein, test pile system by request path return simulation test data to the step of client specifically include:It surveys
Test pile system creation analog network service, wherein analog network service corresponds to service class interface;Client is visited by request path
Ask analog network service;Test pile system transfers simulation test data, is returned to simulation test data by analog network service
Simulation test data are back to client to request path, and by request path, wherein simulation test data are client
Corresponding test case carries out testing required test data, is tested with the reasonability to client executing test case.
Wherein, the step of testing the reasonability of client executing test case specifically includes:Judge client executing
Whether the operation information of test case meets predetermined registration operation information, if the operation information of client executing test case meets predetermined registration operation
Information then judges that the process of client executing test case and result are reasonable, if the operation information of client executing test case is not
Meet predetermined registration operation information, then judges that the process of client executing test case and result are unreasonable.
Wherein, operation information includes the operation behavior and operating result of client executing test case, predetermined registration operation information
The predetermined registration operation result of predetermined registration operation behavior and respective operations result including respective operations behavior;Judge that client executing is surveyed
The step of whether operation information of examination example meets predetermined registration operation information specifically includes:Judge the operation row of client executing test case
For whether meet predetermined registration operation behavior and judge the operating result of client executing test case whether meet predetermined registration operation as a result,
It is tested with the reasonability to client executing test case.
Wherein, include after the step of client obtains simulation test data by service class interface:Judge simulation test
Whether data match the corresponding test case of client, if the corresponding test case of simulation test Data Matching client, use mould
Quasi- test data tests the corresponding test case of client, if simulation test data mismatch the corresponding test of client
Example then changes the interface class of service class interface in server and modified service class interface is uploaded to test pile system again
System, to adjust simulation test data.
Wherein, judge that the step of whether simulation test data match client corresponding test case further comprises:It is surveying
Simulation test data in test pile system can change setting, if simulation test data mismatch the corresponding test case of client,
It modifies adjustment to simulation test data in test pile system, so that the corresponding test of simulation test Data Matching client
Example.
In order to solve the above technical problems, another technical solution that the present invention uses is:A kind of test pile system is provided, it should
Test pile system can realize following action:Obtain the service class interface that server is uploaded to test pile system;Pass through service class
Interface returns to simulation test data, so that client can obtain simulation test data by service class interface, to client
Corresponding test case is tested.
In order to solve the above technical problems, another technical solution that the present invention uses is:It provides a kind of with store function
Device, should have program stored therein data with device of store function, which can be performed to realize such as above-mentioned reality
Apply the program testing method that example is illustrated.
The beneficial effects of the invention are as follows:It is different from the prior art, server cannot provide interface so that client joins in time
It adjusts, causes the whole development progress for influencing server and client, the present invention to provide a kind of program testing method, server only needs
Service class interface is provided, does not need to the code section that server completes the corresponding interface whole, therefore server can carry in time
For interface so that client is debugged, by the way that service class interface provided by the server is uploaded to test pile system, pass through
Simulation test data are simultaneously transmitted to visitor by the code operation process of test pile system emulating server part by service class interface
Family end, client obtains simulation test data by service class interface, to test the corresponding test case of client, completes
The joint debugging of client works.By the above-mentioned means, without carrying out total interface and client again after the completion of server exploitation
Joint debugging, can early detection server and the client that the two is developed there are the problem of, and adjustment of modifying in time, general
Server and the influence of client whole development progress are minimized.
Description of the drawings
Fig. 1 is the flow diagram of one embodiment of present procedure test method;
Fig. 2 is the flow diagram of another embodiment of present procedure test method;
Fig. 3 is the structural schematic diagram of one embodiment of test pile system of the present invention;
Fig. 4 is the structural schematic diagram of one embodiment of user interface of test pile system of the present invention;
Fig. 5 is the structural schematic diagram for creating one embodiment of test pile interface of test pile system of the present invention;
Fig. 6 is the structural schematic diagram for one embodiment of device that the present invention has store function.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes.
Referring to Fig. 1, Fig. 1 is the flow diagram of one embodiment of present procedure test method.
S101:Server provides service class interface and is uploaded to test pile system;
In the present embodiment, to enable the server in client development process to provide the corresponding interface in time for client
End calls joint debugging, server that need to only provide service class interface, complete the coding work of the service class interface, without completing and the industry
The associated whole logical codes part of business class interface, to ensure that server can provide service class interface in time.Server
The service class interface that it is provided is uploaded to test pile system, so that client carries out corresponding test job.
S102:Test pile system returns to simulation test data by service class interface;
In the present embodiment, test pile system receives the service class interface that is uploaded of server, later test pile system into
Row simulates the calculating process of the service class interface counterlogic code, and obtained simulation test data are back to the business
Class interface, so that client carries out corresponding test job.
S103:Client obtains simulation test data by service class interface, to be carried out to the corresponding test case of client
Test;
In the present embodiment, after simulation test data are back to above-mentioned service class interface by test pile system, client is logical
It crosses the service class interface and obtains the simulation test data that test pile system is returned, client corresponds to the test of the service class interface
Example carries out dependence test work using the simulation test data, to detect logical code part and itself and the clothes of the test case
The be engaged in coordinative operation of device the problems of whether there is problem, and can be directed to and modifies adjustment in time.
It should be noted that since test pile system is simulate the operation of the service class interface counterlogic code
Process, the not corresponding logical code of actual motion service class interface, therefore the simulation test data are pre-set fixation
Value, it is desirable to provide the data needed for the corresponding test case logical code of operation client, to detect patrolling for the corresponding test case of client
Volume code can normal operation and its result of calculation accuracy.Certainly, simulation test data, which are alternatively, pre-sets multigroup number
Any one group in, the corresponding test case of client is repeatedly tested by different simulation test data, to improve
The accuracy of test result.
Above as can be seen that program testing method provided by the present invention, server need to only provide service class interface, not
Server is needed to complete the logical code part of the corresponding interface whole, therefore server can provide interface for client in time
It is debugged, by the way that service class interface provided by the server is uploaded to test pile system, passes through test pile system simulation suit
Simulation test data are simultaneously transmitted to client by the logical code course of work of business device part by service class interface, and client is logical
It crosses service class interface acquisition simulation test data and completes the joint debugging of client to test the corresponding test case of client
Work.By the above-mentioned means, the joint debugging without carrying out total interface and client again after the completion of server exploitation, it can be two
Early detection server and the client of person's exploitation there are the problem of, and adjustment of modifying in time, will to server with it is objective
The influence of family end whole development progress minimizes.
Referring to Fig. 2, Fig. 2 is the flow diagram of another embodiment of present procedure test method.
Server, also referred to as servomechanism are to provide the equipment of the service of calculating.Since server needs to respond service request, and
It is handled, therefore in general server should have the service of undertaking and ensure the ability of service.The composition of server includes
Processor, hard disk, memory, system bus etc. are similar with general computer architecture, but due to needing to provide highly reliable clothes
Business, thus it is more demanding in processing capacity, stability, reliability, safety, scalability, manageability etc..In network
Under environment, the service type provided according to server is different, is divided into file server, database server, application program service
Device, network server (also referred to as WEB server) etc..
Client, also referred to as user terminal refer to corresponding with server, the program of local service are provided for client.In addition to one
It is a little to be typically mounted in common client computer only except the application program of local runtime, it needs to work in coordination fortune with server-side
Row.After development of Internet, more common user terminal includes the web browser used such as WWW, when receipts post Email
Email client and instant messaging client software etc..For this kind of application program, need have phase in network
The server and service routine answered provide corresponding service, such as database service, E-mail service etc., in this way in client
Machine and server end need to establish specific communication connection, to ensure the normal operation of application program.In the present embodiment, objective
Family end can be the application program etc. on mobile terminal, not limit herein.
Client and the relationship of server are not necessarily centainly established on the machine separated at two, are also had in same machine
The presence of this master-slave relationship.The server for providing service and the client for receiving service are also possible to all in same machine
On, such as we execute browser on the server for providing webpage and browse the webpage that the machine provided, in this way in same machine
Just play the part of server and client simultaneously on device.In the development process of server and client, server in addition to maintain its with
The logical code operand for also needing to be responsible for the operation of basic logic except the exchange operation of client, therefore being completed in server end
The logical code operand significantly larger than completed in client, the logical code quantity compiled needed for server section considerably beyond
The logical code quantity compiled needed for client part, therefore in the development process of server and client, generally existing clothes
Business device does not complete the logical code compiling of the corresponding interface also, and the logical code that client has completed corresponding portion needs to call
The interface carries out joint debugging, causes server that cannot provide interface in time for client joint debugging, influences server and client
Whole development progress.
In view of this, the program testing method that the present embodiment is illustrated can provide clothes in time in client development process
Business device interface is debugged for client comprising but it is not limited to following steps.
S201:Server provides service class interface and is uploaded to test pile system;
In the present embodiment, to enable the server in client development process to provide the corresponding interface in time for client
End calls joint debugging, server that need to only provide service class interface, complete the coding work of the service class interface, without completing and the industry
The associated whole logical codes part of business class interface, to ensure that server can provide service class interface in time.Server
The service class interface that it is provided is uploaded to test pile system, so that client carries out corresponding test job.
It is specifically as follows after the compiled service class interface of server end developer, is uploaded in the form of archive file
Test pile system.Archive file is jar file (Java Archive, Java archive file), allows to combine multiple files
At a compressed file, jar file is additionally operable to dispose and encapsulate library, component based on conventional ZIP compressed file formats
And plug-in card program, and can directly be used by the tool as compiler and JVM.Include special file in jar file, such as
Manifests and deployment descriptor, are used to refer to how tool handles specific jar file.Jar file has conventional compression text
High safety not available for part format (such as the compressed file formats such as ZIP, RAR), efficiency of transmission are high, compression efficiency is high and
The good feature of platform autgmentability.
Optionally, the service class interface compiled need to inherit the first base class, to ensure that the service class interface can be normal
For subsequent client test job, the first base class may include having javax.servlet.http.HttpServlet base class
Deng being that follow-up test stake system carries out analog logic calculating process and returning to simulation test data so that client carries out test work
Service class interface base class needed for the process of work.
S202:Test pile system returns to simulation test data by service class interface;
In the present embodiment, test pile system receives the service class interface that is uploaded of server, later test pile system into
Row simulates the calculating process of the service class interface counterlogic code, and obtained simulation test data are back to the business
Class interface, so that client carries out corresponding test job.It is specifically as follows test pile system and obtains the industry that server uploads
Business class interface;The dynamic analysis service class interface obtains the interface class class name and class.path in the service class interface while inciting somebody to action
Interface class class name, class.path and jar file name are saved in database, so that test pile system can pass through in its database
The interface class class name and class.path of service class interface access the jar file of the service class interface;Service class interface is bound one
Request path is arranged the request path of service class interface access, which is loaded into classpath, with
Client is set to pass through request path access service class interface, and test pile system returns to simulation test data by request path
To client, to test the corresponding test case of client.
Wherein, the setting purpose of classpath is in the performing environment of Java, the instruction java applet of being executed institute
The target directory of the class or data packet that need.Java performing environments are implemented in itself is a platform on this platform
Program is the java applet of compiled completion (after making referrals to java applet compiling completion below, can be deposited with .class files
).If likening Java performing environments to operating system, if setting Path variables are specified in order to allow operating system to find
Implementing procedure (be exactly to find .exe files for Windows), then the purpose that Classpath is arranged is exactly that Java is allowed to execute
Environment finds specified java applet (namely .class files).
Test pile system simulates the calculating process of the service class interface counterlogic code, and returns to mould by request path
Quasi- test data to client is specifically as follows test pile system and creates analog network clothes on backstage according to above-mentioned service class interface
Business, wherein analog network service corresponds to service class interface;Client accesses analog network service by request path;Test pile
System simulates the calculating process of above-mentioned service class interface counterlogic code, and transfers corresponding simulation test data, passes through mould
Simulation test data are back to request path by quasi- network service, it should be noted that test pile system institute analog service class connects
The calculating process of mouth counterlogic code is not actually the complete arithmetic logic for carrying out logical code, is only to transfer test
Simulation test data are back to client by simulation test data corresponding with the service class interface in stake system by request path
End, wherein simulation test data are that the corresponding test case of client carries out testing required test data, to be held to client
The reasonability of row test case is tested, the logical code part of test client test case and client executing test case
Logical operation process whether there is problem.
Network service (Webservice) is that a platform is independent, lower coupling, self-contained, based on programmable
Open XML (a subset under standard generalized markup language) standards can be used to describe, issue, send out for the application program of web
Now, coordinate and configure these application programs, the application program for developing distributed interoperability.Web services technologies can make
The different application that must be operated on different machines need not be by additional, special third party software or hardware, so that it may mutually hand over
Change data or integrated.Between the application implemented according to web service specifications, no matter their used language, platform or inside are assisted
What view is, can be exchanged with each other data.Network service is self-described, self-contained available network module, can execute tool
The business function of body.Network service is also easy to dispose, because they are based on some conventional industry standards and existing one
A little technologies, subset X ML, HTTP under such as standard generalized markup language.Network service reduces the cost of application interface.Network
Service is that entire enterprise provides a general mechanism even more than the integrated of the operation flow between tissue.And the present embodiment institute
The analog network service of elaboration is a simulation process of above-mentioned network service, test pile system and non-real complete execution industry
The corresponding whole logical codes of business class interface, are only merely the pre-set simulation test data of the simulation trial invocation of procedure, lead to
The analog network service is crossed to simulate process of the server by network service to client transmissions data.
S203:Client obtains simulation test data by service class interface;
In the present embodiment, the process that client obtains simulation test data by service class interface can be that client is visited
Ask request path, to access corresponding with service class interface analog network service, test pile system is by client joint debugging institute
Client is back to by the request path that client accesses with simulation test data, so that client carries out joint debugging test.
S204:Judge whether simulation test data match the corresponding test case of client;
In the present embodiment, if the corresponding test case of simulation test Data Matching client, thens follow the steps S205, if mould
Quasi- test data mismatches the corresponding test case of client, thens follow the steps S201.
The data format of simulation test data can be JSON or XML etc..Wherein, JSON (JavaScript Object
Notation, JS object tag) it is a kind of data interchange format of lightweight.It is based on ECMAScript (the js rule that w3c is formulated
Model) a subset, data are stored and indicated using the text formatting for being totally independent of programming language.Succinct and clearly layer
Secondary structure makes JSON become ideal data interchange language.Be easy to readers ' reading and write, at the same be also easy to machine parsing and
It generates, and effectively promotes network transmission efficiency;XML (extensible markup language), is the subset of standard generalized markup language, is
It is a kind of to be used to that electronic document to be marked to make it have structural markup language.In electronic computer, label refers to computer institute energy
The information symbol of understanding can be handled by such label, between computer comprising various information such as article etc..It can be with
For flag data, data type is defined, is a kind of original language that permission user is defined the markup language of oneself.Its is non-
Often suitable WWW transmission, provides unified method to describe and exchange the structuring number independently of application program or supplier
According to.It is technology cross-platform, dependent on content in Internet environment, and handles the effective of distributed frame information now
Tool.
Judge whether simulation test data match the corresponding test case of client, can judge simulation test data
Whether data format matches the corresponding test case of client, if the corresponding survey of pattern matched client of simulation test data
Example is tried, then the corresponding test case of client is tested using simulation test data, if the data format of simulation test data
The corresponding test case of client is mismatched, then the interface class of service class interface need to be changed in server, later by modified industry
Business class interface is uploaded to test pile system again, to adjust the data format of simulation test data, so that it is matched client and corresponds to
Test case.The data format of simulation test data is that server is reached an agreement on client both sides, can ensure patrolling for both sides
The data format of code normal work is collected, if simulation test data mismatch the corresponding test case of client, illustrates server
The data format reached an agreement on client both sides is needed to be adjusted or be replaced there are problem.
Optionally, the simulation test data in test pile system can be can change setting, when simulation test data not
When matching the corresponding test case of client, it can modify adjustment to simulation test data in test pile system, without servicing
The interface class that device end developer recompilates service class interface uploads jar file to test pile system, in test pile again again
The adjustment operation of the modification to simulation test data can be realized in system, repaiied including the data format etc. of simulation test data
Change and adjust, to shorten the development cycle of server and client, improves development efficiency.
S205:The corresponding test case of client is tested;
In the present embodiment, simulation test data of the client received by it carry out client and correspond to test case
Test job is tested with the reasonability to client executing test case, including the data format of test simulation test data,
The logical code part of client test case and the logical operation process of client executing test case whether there is problem, if surveying
Test result is undesirable, then it is believed that at least one of above-mentioned three is there are problem, investigate and time update adjusts.
The process tested the reasonability of client executing test case, which is specifically as follows, judges that client executing is tested
Whether the operation information of example meets predetermined registration operation information, if the operation information of client executing test case meets predetermined registration operation letter
Breath, then judge that the process of client executing test case and result are reasonable, if the operation information of client executing test case is not inconsistent
Predetermined registration operation information is closed, then judges that the process of client executing test case and result are unreasonable.
Optionally, operation information includes the operation behavior and operating result of client executing test case, predetermined registration operation letter
Breath includes the predetermined registration operation behavior of respective operations behavior and the predetermined registration operation result of respective operations result.Since logical code is
Artificial compiling, during being performed behavior and result it is foreseeable that meeting during the client executing test case
It executes the foreseeable operation behavior of logical code and generates corresponding operating result, if the operation row of client executing test case
For or operating result be not consistent with the foreseeable operation behavior of logical code or operating result, then the implementing result of test case is by nothing
Method meets the requirements, and is debugged, therefore judges whether the operation information of client executing test case meets predetermined registration operation letter
Breath, that is, judge whether the operation behavior of client executing test case meets predetermined registration operation behavior and judge that client executing is tested
Whether the operating result of example meets predetermined registration operation as a result, being tested with the reasonability to client executing test case.
In conclusion program testing method provided by the present invention, server need to only provide service class interface, not need to
Server completes the logical code part of the corresponding interface whole, therefore server can provide interface so that client carries out in time
Debugging, by the way that service class interface provided by the server is uploaded to test pile system, passes through test pile system emulating server
The partial logical code course of work, and create analog network service emulating server and visitor is sent data to by network service
Simulation test data are transmitted to client, client by the process at family end by request path corresponding with service class interface
Simulation test data, which are obtained, by request path completes the joint debugging of client to test the corresponding test case of client
Work, avoids since server development progress is slower, to influence the development progress of client.And by the above-mentioned means,
It, can be in the early detection clothes that the two is developed without carrying out the joint debugging of total interface and client again after the completion of server exploitation
Device and the client of being engaged in there are the problem of, and adjustment of modifying in time will be to server and client whole development progress
Influence minimizes.
Fig. 3-5 is please referred to, Fig. 3 is the structural schematic diagram of one embodiment of test pile system of the present invention, and Fig. 4 is test of the present invention
The structural schematic diagram of one embodiment of user interface of stake system, Fig. 5 is establishment test pile circle of test pile system of the present invention
The structural schematic diagram of one embodiment of face.
In the present embodiment, test pile system 300 is the platform that server carries out joint debugging test with client, test pile system
System 300 can be virtual system, can be webpage either application forms, user by login related web page or
It is to open corresponding application programs with entrance test pile system 300;Test pile system 300 can also be physical system, possess processing
The entities such as device hardware and the device for having computing capability.User interface 400 of the test pile system 300 towards user include
Have:Code sample button 401 downloads code sample by clicking code sample button 401;Jar file button 402 is uploaded, is led to
It crosses click and uploads jar file button 402 to carry out uploading service class interface operation;Test pile button 403 is created, is created by clicking
It builds test pile button 403 and creates test pile interface to enter;Test pile list 404 has been created, has been tested to be shown to user
The test pile details created in stake system 300.Certainly, the user interface 400 of test pile system 300 includes but not limited to
Above-mentioned project, the required function of being shown to user of test pile system 300 and information can be wrapped by user interface 400
The project included, does not limit herein.
The application method of test pile system 300 is as follows:Server developer downloads example generation from test pile system 300
Code, and according to the compiling work of code sample finishing service class interface, service class interface is uploaded to test in the form of jar file
Stake system 300, wherein the service class interface compiled must inherit javax.servlet.http.HttpServlet base class, and
And compiled service class interface and jar file form will be met the requirements (such as package name etc. of jar file);Test pile
System 300 obtains the corresponding jar file of service class interface that server developer is uploaded, and enters create test pile circle later
Face 500, server developer select compiled service class interface 501 and and client in creating test pile interface 500
The request path 502 that end side reaches an agreement on completes test as shown in figure 5, to access corresponding service class interface by the request path
The establishment of stake, test pile system 300 correspondingly create analog network service on backstage, and emulating server transfers data to client
Process, simulation test data are back to by service class interface by analog network service;Client is accessed by request path
Corresponding service class interface, to obtain the simulation test data that test pile system 300 is back to service class interface, you can carry out phase
Answer the test job of test case.
Referring to Fig. 6, Fig. 6 is the structural schematic diagram for one embodiment of device that the present invention has store function.
In the present embodiment, the device 600 with store function has program stored therein data 601, and program data 601 can be by
It executes to realize the program testing method illustrated such as above-described embodiment, details are not described herein again.
In several embodiments provided by the present invention, it should be understood that disclosed system, device and method can
To realize by another way.For example, device embodiments described above are schematical, for example, the module or
The division of unit is a kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or group
Part can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown
Or the mutual coupling, direct-coupling or communication connection discussed can be by some interfaces, device or unit it is indirect
Coupling or communication connection can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple
In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of present embodiment
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also may be used
It, can also be during two or more units be integrated in one unit to be that each unit physically exists alone.It is above-mentioned integrated
The form that hardware had both may be used in unit is realized, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can be stored in a computer read/write memory medium.Based on this understanding, technical scheme of the present invention is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
Embody, which is stored in a device with store function, including some instructions use so that
One computer equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute
The all or part of step of each embodiment the method for the present invention.And the device above-mentioned with store function includes:U
Disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access
Memory), the various media that can store program code such as magnetic disc or CD, server.
Mode the above is only the implementation of the present invention is not intended to limit the scope of the invention, every to utilize this
Equivalent structure or equivalent flow shift made by description of the invention and accompanying drawing content, it is relevant to be applied directly or indirectly in other
Technical field is included within the scope of the present invention.
Claims (10)
1. a kind of program testing method, which is characterized in that the method includes:
Server provides service class interface and is uploaded to test pile system;
The test pile system returns to simulation test data by the service class interface;
Client obtains the simulation test data by the service class interface, with to the corresponding test case of the client into
Row test.
2. according to the method described in claim 1, it is characterized in that, the server provides service class interface and is uploaded to test
The step of stake system, specifically includes:The compiled service class interface is uploaded to by the server in the form of archive file
The test pile system;
Wherein, the service class interface inheritance has the first base class.
3. according to the method described in claim 1, it is characterized in that, the test pile system is returned by the service class interface
The step of simulation test data, specifically includes:
The test pile system obtains the service class interface that the server uploads;
The service class interface is parsed, the interface class class name and class.path of the service class interface are obtained, so that the test
Stake system accesses the service class interface by the interface class class name and class.path of the service class interface;
The service class interface is bound into a request path, so that the client accesses the business by the request path
Class interface, and the test pile system returns to the simulation test data to the client by the request path, with
The corresponding test case of the client is tested.
4. according to the method described in claim 3, it is characterized in that, the test pile system returns to institute by the request path
Stating simulation test data to the step of client specifically includes:
The test pile system creation analog network service, wherein the analog network service corresponds to the service class interface;
The client accesses the analog network service by the request path;
The test pile system transfers the simulation test data, by the analog network service by the simulation test data
It is back to the request path, and the simulation test data are back to by the client by the request path, wherein
The simulation test data are that the corresponding test case of the client carries out testing required test data, with to the client
The reasonability that end executes the test case is tested.
5. according to the method described in claim 4, it is characterized in that, described to the reasonable of test case described in the client executing
The step of property is tested specifically includes:
Judge whether the operation information of test case described in the client executing meets predetermined registration operation information, if the client is held
The operation information of the row test case meets the predetermined registration operation information, then judges the mistake of test case described in the client executing
Journey and result are reasonable, if the operation information of test case described in the client executing does not meet the predetermined registration operation information,
Judge that the process and result of test case described in the client executing are unreasonable.
6. according to the method described in claim 5, it is characterized in that, the operation information includes being surveyed described in the client executing
The operation behavior and operating result of example are tried, the predetermined registration operation information includes the predetermined registration operation behavior of the corresponding operation behavior
And the predetermined registration operation result of the corresponding operating result;
The step of whether operation information for judging test case described in the client executing meets predetermined registration operation information is specific
Including:Judge whether the operation behavior of test case described in the client executing meets the predetermined registration operation behavior and judge institute
Whether the operating result for stating test case described in client executing meets the predetermined registration operation as a result, with to the client executing institute
The reasonability for stating test case is tested.
7. according to the method described in claim 1, it is characterized in that, the client passes through described in service class interface acquisition
Include after the step of simulation test data:
Judge whether the simulation test data match the corresponding test case of the client, if the simulation test Data Matching
The corresponding test case of the client, then survey the corresponding test case of the client using the simulation test data
Examination changes the business if the simulation test data mismatch the corresponding test case of the client in the server
Modified service class interface is simultaneously uploaded to the test pile system by the interface class of class interface again, is surveyed with adjusting the simulation
Try data.
8. the method according to the description of claim 7 is characterized in that described, to judge whether the simulation test data match described
The step of client corresponding test case, further comprises:The simulation test data in the test pile system can be changed
Setting, if the simulation test data mismatch the corresponding test case of the client, to institute in the test pile system
It states simulation test data to modify adjustment, so that the corresponding test case of client described in the simulation test Data Matching.
9. a kind of test pile system, which is characterized in that the test pile system can realize following action:
Obtain the service class interface that server is uploaded to the test pile system;
Simulation test data are returned to by the service class interface, so that client can be by described in service class interface acquisition
Simulation test data, to test the corresponding test case of the client.
10. a kind of device with store function, which is characterized in that the device with store function has program stored therein number
According to described program data can be performed to realize such as claim 1~8 any one of them program testing method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810164922.4A CN108563558A (en) | 2018-02-26 | 2018-02-26 | A kind of program testing method, test pile system and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810164922.4A CN108563558A (en) | 2018-02-26 | 2018-02-26 | A kind of program testing method, test pile system and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108563558A true CN108563558A (en) | 2018-09-21 |
Family
ID=63531229
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810164922.4A Pending CN108563558A (en) | 2018-02-26 | 2018-02-26 | A kind of program testing method, test pile system and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108563558A (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109800154A (en) * | 2018-12-15 | 2019-05-24 | 深圳壹账通智能科技有限公司 | Loading method, device, computer equipment and the storage medium of test data |
CN111190811A (en) * | 2019-12-05 | 2020-05-22 | 东方微银科技(北京)有限公司 | Method, device, equipment and storage medium for testing resource allocation system |
CN111193636A (en) * | 2019-10-21 | 2020-05-22 | 腾讯科技(深圳)有限公司 | Method and device for testing availability of single machine |
CN111352825A (en) * | 2018-12-21 | 2020-06-30 | 北京金山云网络技术有限公司 | Data interface test method and device and server |
CN111611209A (en) * | 2020-03-30 | 2020-09-01 | 北京瑞风协同科技股份有限公司 | Method and system for storing virtual test data in task-divided manner |
CN112416786A (en) * | 2020-11-27 | 2021-02-26 | 上海达梦数据库有限公司 | Test method, device, equipment and storage medium |
CN112685317A (en) * | 2021-01-05 | 2021-04-20 | 上海中通吉网络技术有限公司 | Self-defined test method and device based on test pile |
CN113110982A (en) * | 2021-03-29 | 2021-07-13 | 青岛海尔科技有限公司 | Data access layer verification method and device, storage medium and electronic device |
CN113127337A (en) * | 2020-12-30 | 2021-07-16 | 中国农业银行股份有限公司 | Debugging method and device for individually starting mobile terminal |
CN113487294A (en) * | 2021-07-23 | 2021-10-08 | 重庆富民银行股份有限公司 | On-line service non-inductive verification method based on list mechanism |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101026503A (en) * | 2006-02-24 | 2007-08-29 | 国际商业机器公司 | Unit detection method and apparatus in Web service business procedure |
US20130326483A1 (en) * | 2012-05-31 | 2013-12-05 | Vmware, Inc. | Unit test of multi-threaded object-oriented applications using mocks |
CN104618182A (en) * | 2015-01-21 | 2015-05-13 | 中国移动通信集团广东有限公司 | Simulation testing system supporting a plurality of mobile service protocols |
CN105049280A (en) * | 2015-06-24 | 2015-11-11 | 上海斐讯数据通信技术有限公司 | Simulation test system and method for business management platform interfacing |
CN106648556A (en) * | 2015-10-28 | 2017-05-10 | 北京国双科技有限公司 | Front end and back end integrated development testing method and device |
CN107203465A (en) * | 2016-03-18 | 2017-09-26 | 阿里巴巴集团控股有限公司 | System interface method of testing and device |
CN107329890A (en) * | 2017-06-06 | 2017-11-07 | 北京金山安全软件有限公司 | Test method and device based on Mock and server |
-
2018
- 2018-02-26 CN CN201810164922.4A patent/CN108563558A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101026503A (en) * | 2006-02-24 | 2007-08-29 | 国际商业机器公司 | Unit detection method and apparatus in Web service business procedure |
US20070277158A1 (en) * | 2006-02-24 | 2007-11-29 | International Business Machines Corporation | Method and apparatus for testing of business processes for Web services |
US20130326483A1 (en) * | 2012-05-31 | 2013-12-05 | Vmware, Inc. | Unit test of multi-threaded object-oriented applications using mocks |
CN104618182A (en) * | 2015-01-21 | 2015-05-13 | 中国移动通信集团广东有限公司 | Simulation testing system supporting a plurality of mobile service protocols |
CN105049280A (en) * | 2015-06-24 | 2015-11-11 | 上海斐讯数据通信技术有限公司 | Simulation test system and method for business management platform interfacing |
CN106648556A (en) * | 2015-10-28 | 2017-05-10 | 北京国双科技有限公司 | Front end and back end integrated development testing method and device |
CN107203465A (en) * | 2016-03-18 | 2017-09-26 | 阿里巴巴集团控股有限公司 | System interface method of testing and device |
CN107329890A (en) * | 2017-06-06 | 2017-11-07 | 北京金山安全软件有限公司 | Test method and device based on Mock and server |
Non-Patent Citations (6)
Title |
---|
JOKER YE: "App开发:模拟服务器数据接口-MockApi", 《HTTPS://BLOG.CSDN.NET/HJ7JAY/ARTICLE/DETAILS/54860866》 * |
RUSS44: "SoapUI模拟服务端进行接口测试", 《HTTPS://BLOG.CSDN.NET/RUSS44/ARTICLE/DETAILS/52230355?UTM_MEDIUM=DISTRIBUTE.PC_RELEVANT.NONE-TASK-BLOG-BLOGCOMMENDFROMBAIDU-2.CONTROL&DEPTH_1-UTM_SOURCE=DISTRIBUTE.PC_RELEVANT.NONE-TASK-BLOG-BLOGCOMMENDFROMBAIDU-2.CONTROL》 * |
SUILING: "京东iOS研发工具篇之Mock Server技术实践", 《HTTP://WWW.COCOACHINA.COM/ARTICLES/20240》 * |
WOJCIECH BULATY: "What is the difference between a stub, a mock and a virtual service?", 《HTTPS://WWW.LINKEDIN.COM/PULSE/WHAT-DIFFERENCE-BETWEEN-STUB-MOCK-VIRTUAL-SERVICE-WOJCIECH-BULATY》 * |
张大方等: "《软件测试技术与管理》", 31 May 2007, 长沙:湖南大学出版社 * |
梦想空间: "MockServer的测试思想与实现", 《HTTPS://WWW.CNBLOGS.COM/CESHI2016/P/7884583.HTML》 * |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109800154A (en) * | 2018-12-15 | 2019-05-24 | 深圳壹账通智能科技有限公司 | Loading method, device, computer equipment and the storage medium of test data |
CN109800154B (en) * | 2018-12-15 | 2022-04-05 | 深圳壹账通智能科技有限公司 | Test data loading method and device, computer equipment and storage medium |
CN111352825A (en) * | 2018-12-21 | 2020-06-30 | 北京金山云网络技术有限公司 | Data interface test method and device and server |
CN111193636A (en) * | 2019-10-21 | 2020-05-22 | 腾讯科技(深圳)有限公司 | Method and device for testing availability of single machine |
CN111190811A (en) * | 2019-12-05 | 2020-05-22 | 东方微银科技(北京)有限公司 | Method, device, equipment and storage medium for testing resource allocation system |
CN111611209A (en) * | 2020-03-30 | 2020-09-01 | 北京瑞风协同科技股份有限公司 | Method and system for storing virtual test data in task-divided manner |
CN112416786A (en) * | 2020-11-27 | 2021-02-26 | 上海达梦数据库有限公司 | Test method, device, equipment and storage medium |
CN113127337A (en) * | 2020-12-30 | 2021-07-16 | 中国农业银行股份有限公司 | Debugging method and device for individually starting mobile terminal |
CN112685317A (en) * | 2021-01-05 | 2021-04-20 | 上海中通吉网络技术有限公司 | Self-defined test method and device based on test pile |
CN112685317B (en) * | 2021-01-05 | 2024-04-09 | 上海中通吉网络技术有限公司 | Custom test method and device based on test pile |
CN113110982A (en) * | 2021-03-29 | 2021-07-13 | 青岛海尔科技有限公司 | Data access layer verification method and device, storage medium and electronic device |
CN113110982B (en) * | 2021-03-29 | 2023-02-03 | 青岛海尔科技有限公司 | Data access layer verification method and device, storage medium and electronic device |
CN113487294A (en) * | 2021-07-23 | 2021-10-08 | 重庆富民银行股份有限公司 | On-line service non-inductive verification method based on list mechanism |
CN113487294B (en) * | 2021-07-23 | 2023-06-09 | 重庆富民银行股份有限公司 | On-line business noninductive verification method based on list mechanism |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108563558A (en) | A kind of program testing method, test pile system and device | |
Schmerl et al. | Discovering architectures from running systems | |
De Santis et al. | Zero-knowledge proofs of knowledge without interaction | |
US7827527B1 (en) | System and method of application development | |
US20100017185A1 (en) | Method And System for Virtual Prototyping | |
US20140157243A1 (en) | System for Translating Diverse Programming Languages | |
US20190188108A1 (en) | Load test framework | |
Zhang et al. | Towards just-in-time middleware architectures | |
Zhang et al. | Automated Unit Testing for Agent Systems. | |
Delamaro et al. | A strategy to perform coverage testing of mobile applications | |
US20090210748A1 (en) | Methods and systems to test airline information systems | |
Schieferdecker et al. | Distributed functional and load tests for Web services | |
Hussain | Investigating architecture description languages (adls) a systematic literature review | |
US20110246967A1 (en) | Methods and systems for automation framework extensibility | |
Kerraoui et al. | MATT: multi agents testing tool based nets within nets | |
Dantas et al. | Towards aspect-oriented programming for context-aware systems: A comparative study | |
McCaffrey | . NET Test Automation Recipes: A Problem-Solution Approach | |
Ahmed et al. | Design by Contract for Deep Learning APIs | |
Guerra et al. | A model to enable the reuse of metadata-based frameworks in adaptive object model architectures | |
Lüders | Use of component-based software architectures in industrial control systems | |
Johansen | Testing Product Lines of Industrial Size: Advancements in Combinatorial Interaction Testing | |
CN117056317B (en) | Data processing method, device, equipment and computer readable storage medium | |
Taylor | J2EE and Beyond | |
Acharya | ONLINE CRIME REPORTING SYSTEM PROJECT. | |
Crasso et al. | JEETuningExpert: A software assistant for improving Java Enterprise Edition application performance |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180921 |