CN110413507A - System detection method, device, computer equipment and storage medium - Google Patents

System detection method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN110413507A
CN110413507A CN201910542472.2A CN201910542472A CN110413507A CN 110413507 A CN110413507 A CN 110413507A CN 201910542472 A CN201910542472 A CN 201910542472A CN 110413507 A CN110413507 A CN 110413507A
Authority
CN
China
Prior art keywords
message
transaction
input data
conversion
static
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.)
Granted
Application number
CN201910542472.2A
Other languages
Chinese (zh)
Other versions
CN110413507B (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910542472.2A priority Critical patent/CN110413507B/en
Publication of CN110413507A publication Critical patent/CN110413507A/en
Application granted granted Critical
Publication of CN110413507B publication Critical patent/CN110413507B/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

Landscapes

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

Abstract

This application involves a kind of system detection method, device, computer equipment and storage mediums.This method comprises: obtaining system testing request;Carrying system mark is requested in system testing;Choose test case;It include sub- transaction ID and input data in test case;It determines the corresponding father's transaction ID of sub- transaction ID, and searches static message corresponding with father's transaction ID and conversion strategy;Take conversion strategy conversion input data, the input data after being converted;Static message is processed according to the input data after conversion, obtains dynamic message;It is tested based on dynamic message application system to be tested corresponding to system banner.Automated test tool is based on using this method, can be improved the testing efficiency to application system.

Description

System detection method, device, computer equipment and storage medium
Technical field
This application involves field of computer technology, more particularly to a kind of system detection method, device, computer equipment and Storage medium.
Background technique
With the development of computer technology, business scope involved in application system becomes more bulky complex.In order to protect Card application system can operate normally, and need to carry out Black-box Testing to the intrinsic function code of application system.Black-box Testing refers to In the case where giving no thought to program internal structure and bulk properties, whether test application system can be correctly received input number According to and generate correct output information.In traditional approach, the message for test application system needs to rely on front end system It generates, the efficiency of generation message in this way is lower, it is difficult to efficiently carry out system testing to application system.
Summary of the invention
Based on this, it is necessary to which in view of the above technical problems, providing one kind efficiently can carry out system testing to application system System detection method, device, computer equipment and storage medium.
A kind of system detection method, which comprises obtain system testing request;The system testing request carries system System mark;Choose test case;It include sub- transaction ID and input data in the test case;Determine the sub- transaction ID Corresponding father's transaction ID, and search static message corresponding with father's transaction ID and conversion strategy;Take the conversion The strategy conversion input data, the input data after being converted;According to the input data after the conversion to static message It is processed, obtains dynamic message;Based on dynamic message application system to be tested corresponding to the system banner It is tested.
It is described in one of the embodiments, to take the conversion strategy conversion input data, after being converted Input data, comprising: the parsing static message obtains multiple fields to be replaced;The field to be replaced includes replacement indirectly Field;Indirect initial parameter corresponding with the indirect replacement field is determined from the input data;It is surveyed by weight of described Strategy converts to the indirect initial parameter, obtains indirect target parameter;The input data according to after the conversion Static message is processed, dynamic message is obtained, comprising: by each of the static message indirect replacement word Section replaces with corresponding indirect target parameter, generates dynamic message.
The field to be replaced further includes direct replacement field in one of the embodiments,;It is described to be converted according to process Input data afterwards is processed static message, further includes: identifies in the input data and described directly replaces with each Change the corresponding direct target component of field;Each of the static message direct replacement field is replaced with corresponding straight Connect target component.
The indirect replacement field includes inteerelated order row field in one of the embodiments, the conversion strategy packet Include sequence number create-rule;It is described that the survey strategy by weight of described is taken to convert the indirect initial parameter, between obtaining Connect target component, comprising: splice the indirect initial parameter according to the sequence number create-rule, obtain target association sequence Number;It is described that each of the static message indirect replacement field is replaced with into corresponding indirect target parameter, it generates dynamic State message, comprising: search and the associated association message of the static message;The association message includes inteerelated order row field; The static message is replaced with into the target association sequence number with the inteerelated order row field being associated in message;It is packaged warp The replaced static message and the association message are crossed, dynamic message is generated.
The static message includes multiple sub- transaction messages of static state, the application to be tested in one of the embodiments, System corresponds to multiple system servers;It is described to be based on dynamic message application system to be tested corresponding to the system banner System is tested, comprising: in identification dynamic message, the corresponding system server of each sub- transaction message of dynamic;It will be each described Dynamically sub- transaction message is respectively sent to corresponding system server and is tested.
The test case further includes intended response as a result, described based on the dynamic report in one of the embodiments, Text application system to be tested corresponding to the system banner is tested, comprising: the dynamic message is sent to the system System identifies the system server of corresponding application system to be tested;Receive the response message that the system server returns;It is described Response message is used to carry out logical process to the dynamic message to obtain by the system server, wraps in the response message Result containing real response;When the real response result meets the intended response result for including in corresponding test case, then Determine that corresponding testing case passes through.
A kind of opening machine system test device, described device include: acquisition module, for obtaining system testing request;The system Test request carrying system mark;Module is chosen, for choosing test case;In the test case comprising sub- transaction ID and Input data;Determining module for determining the corresponding father's transaction ID of the sub- transaction ID, and is searched and father's trading standard Know corresponding static message and conversion strategy;Convert module, for taking the conversion strategy conversion input data, obtains Input data after conversion;Processing module, for being processed according to the input data after the conversion to static message, Obtain dynamic message;Test module, for being based on dynamic message application system to be tested corresponding to the system banner It is tested.
The conversion module is also used to parse the static message in one of the embodiments, obtains multiple to be replaced Field;The field to be replaced includes replacing field indirectly;The determining and indirect replacement field pair from the input data The indirect initial parameter answered;Strategy is surveyed by weight of described to convert to the indirect initial parameter, obtains indirect target ginseng Number;The processing module is also used to each of the static message indirect replacement field replacing with corresponding indirect mesh Parameter is marked, dynamic message is generated.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processing The step of device realizes above-mentioned each system detection method as described in the examples when executing the computer program.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor The step of above-mentioned each system detection method as described in the examples is realized when row.
Above system test method, device, computer equipment and storage medium, testing service device get carrying system mark After the system testing request of knowledge, the test case comprising sub- transaction ID and input data is chosen.Testing service device determines son The corresponding father's transaction ID of transaction ID, and search static message corresponding with identified father's transaction ID and conversion strategy. Testing service device take conversion strategy conversion test case in input data, the input data after being converted, thus according to Input data after conversion is processed static message, obtains dynamic message.Testing service device is based on dynamic message pair The corresponding application system to be tested of system banner is tested.Dynamic is generated by way of being processed to static message Message reduces the coupling of application system to be tested and front end system, independent to be steadily based on test cases by dynamic message Unduplicated system testing is carried out, so as to improve the efficiency of test.
Detailed description of the invention
Fig. 1 is the application scenario diagram of system detection method in one embodiment;
Fig. 2 is the flow diagram of system detection method in one embodiment;
Fig. 3 is the flow diagram of system detection method in another embodiment;
Fig. 4 is the structural block diagram of opening machine system test device in one embodiment;
Fig. 5 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not For limiting the application.
System detection method provided by the present application can be applied in application environment as shown in Figure 1.Wherein, terminal 102 It is communicated with testing service device 104 by network.Testing service device 104 is communicated with system server 106 by network. Wherein, terminal 102 can be, but not limited to be various personal computers, laptop, smart phone, tablet computer and portable Wearable device, testing service device 104 and system server 106 can be formed with the either multiple servers of independent server Server cluster realize.Testing service device 104 gets the system testing request of the carrying system mark of the transmission of terminal 102 Later, the test case comprising sub- transaction ID and input data is chosen.Testing service device 104 determines that sub- transaction ID is corresponding Father's transaction ID, and search static message corresponding with identified father's transaction ID and conversion strategy.Testing service device 104 is adopted Take the input data calculated in strategy conversion test case, the input data after being converted, thus according to the input after conversion Data are processed static message, obtain dynamic message.Testing service device 104 is based on dynamic message to system banner pair The application system to be tested answered is tested.
In one embodiment, as shown in Fig. 2, providing a kind of system detection method, it is applied in Fig. 1 in this way It is illustrated for testing service device 104, comprising the following steps:
Step 202, system testing request is obtained;Carrying system mark is requested in system testing.
System testing request refers to the request for being tested the corresponding application system to be tested of system banner.It is to be measured Examination application system refers to system in need of test, for realizing data interaction.Such as application system to be tested can be with It is financial transaction system etc. to be tested, it is without being limited thereto.System banner can be by letter, number and punctuation mark etc. wherein one The character string of kind or a variety of compositions.System banner can be the number of application system to be tested, title etc., be also possible to be tested Number, the title of the corresponding system server of application system.System testing request can be terminal and detect that user carries out system The system testing request that the triggering generates can be sent to testing service device by the request of triggered generation when test operation, terminal.
Step 204, test case is chosen;It include sub- transaction ID and input data in test case.
Test case refers to for testing whether application system to be tested can normally realize one group of input number of required function According to corresponding intended response result.Test case can be used for treating test application system and carry out logic testing, for example test Whether application system to be tested can obtain correct response results in the case where normal input.Test case can also be to be measured Examination application system carries out error test, for example can test application system to be tested just in input extremely or abnormal scene input Often report an error.When application system realizes different system functions, different types of test cases is needed to carry out system function Targetedly test.By taking financial transaction system as an example, the system function that can be tested includes but is not limited to that trade order is assigned Function, transaction amount deliver the one or more of them such as function, Transaction Inquiries function, Transaction Reversal function.Therefore can lead in advance Sub- transaction ID distinguishing to different test cases is crossed, and can there can be multiple test cases for same system.It is defeated Enter the data being made of multiple input parameters used when data refer to for generating message.Intended response result refers to according to connecing The response results that mouth definition document is defined, can be inferred to based on input data, it is contemplated that response results also may include multiple Output parameter.
In one embodiment, multiple test cases can be stored in data form to be tested, and tester can pass through maintenance Data form to be tested manages the source data for system testing.It may include in data form to be tested and test to be tested answer With multiple test cases of system simple function, or it may include and test multiple tests of application system different function to be tested and use Example.Test case can be chosen by way of traversing data form to be tested, for example choose simultaneously implementation of test cases, root one by one Test application system is treated one by one according to selected test case to be tested.
Step 206, it determines the corresponding father's transaction ID of sub- transaction ID, and searches static report corresponding with father's transaction ID Text and conversion strategy.
Father's transaction ID refers to mark corresponding with a certain system function of application system.One for application system is The test for function of uniting, can preset multiple test cases.Multiple test cases for testing same system function are corresponding Sub- transaction ID can correspond to same father's transaction ID.Such as father's transaction ID can be set for Transaction Inquiries function Then sub- transaction ID CX1001, CX1002 can be respectively set for multiple test cases of test transaction query function in CX1000 And CX1003 etc., and establish the mapping relations of a little transaction ID and father's transaction ID.
Static message refers to the basic message for generating dynamic message.It may include for alternative parameter or sky in static message The field to be replaced such as white ginseng number.Static message can be message can be JSON (JavaScript Object Notation, one The data interchange format of kind of lightweight) format or a kind of XML (extensible markup language) format message, it is without being limited thereto.It is corresponding In multiple test cases of same father's transaction ID, the same static message can be shared, is used so as to reduce maintenance test The cost of example.Conversion strategy refers to the strategy for defining the mode that static message is converted to dynamic message.Conversion strategy include But be not limited to calculation formula, connecting method, create-rule etc..
Step 208, conversion strategy conversion input data, the input data after being converted are taken.
It may include multiple input parameters in input data, conversion strategy can be used and converted based on multiple input parameters, Input data after being converted.Such as in financial transaction system, convert to obtain based on to conversion amount and the target exchange rate Converted amount, the closing price or the weight of index on date, calling security after the n-th A-share day of trade of converting for another example etc. Input data can also carry out conversion processing according to input data and current time and generate transaction journal odd numbers.Financial transaction system The data exchange message complexity of system is usually larger, can be directed to the conversion of input data for different business scenario settings in advance Strategy, so as to the input data after the conversion of Intelligent generation fitting actual demand.
Step 210, static message is processed according to the input data after conversion, obtains dynamic message.
Include field to be replaced in static message, those fields to be replaced can be carried out based on the input data after conversion straight The working process changed is taken over, the input data after being also based on conversion carries out the working process of packet labeling to static message, It is without being limited thereto.It can be used as dynamic message by the static message of working process.Dynamic message refers to simulation application system to be tested Front end system message generated, can be used for treating test application system and tested.
Step 212, it is tested based on dynamic message application system to be tested corresponding to system banner.
The test for treating the progress of test application system includes but is not limited to calling system interface, sends JMS (Java to system Message Service, Java Message Service) data etc..Application server to be tested can call transmitted move based on interface State message realizes its system function, and when that normally can realize system function, then corresponding test cases test passes through;It is abnormal when occurring When, then corresponding test cases test crash.
In one embodiment, test case further includes intended response as a result, corresponding to system banner based on dynamic message Application system to be tested tested, comprising: dynamic message is sent to the corresponding application system to be tested of system banner System server;Receive the response message that system server returns;Response message is used for by system server to dynamic message It carries out logical process to obtain, includes real response result in response message;When real response result meets corresponding test case In include intended response result when, it is determined that corresponding testing case passes through.
The dynamic message of generation can be used for simulating the message that the front end system of application system to be tested is sent.Be sent to After the background system server of test application system, system server can carry out logical process based on dynamic message, so as to Real response is accessed as a result, and generating response message according to real response result.Such as to test the friendship of financial transaction system Easy query function for example, when the input data of test case may include the input such as user identifier, Sales Channel, product type When parameter, testing service device can generate Transaction Inquiries request message according to those input dynamic state of parameters, and the Transaction Inquiries are asked Message is asked to be sent to system server.System server can carry out Transaction Inquiries according to Transaction Inquiries request message, it is contemplated that response Result may include the output parameters such as number of transaction and query time.When in real response result number of transaction and query time with When transaction data and consistent query time in the intended response result for including in test case, then testing case passes through.
In above system test method, after testing service device gets the system testing request of carrying system mark, choosing Take the test case comprising sub- transaction ID and input data.Testing service device determines the corresponding father's trading standard of sub- transaction ID Know, and searches static message corresponding with identified father's transaction ID and conversion strategy.Testing service device takes conversion strategy Input data in the test case that converts, the input data after being converted, thus according to the input data after conversion to static state Message is processed, and obtains dynamic message.Testing service device is based on that dynamic message is corresponding to system banner to be tested to answer It is tested with system.Dynamic message is generated by way of being processed to static message, reduces application system to be tested The coupling of system and front end system, it is independent that unduplicated system testing is steadily carried out based on test cases by dynamic message, So as to improve the efficiency of test.
In one embodiment, conversion strategy conversion input data, the input data after being converted, comprising: solution are taken Static message is analysed, multiple fields to be replaced are obtained;Field to be replaced includes replacing field indirectly;From input data determine and It takes over and changes the corresponding indirect initial parameter of field;Strategy is surveyed by weight of to convert to indirect initial parameter, obtains indirect mesh Mark parameter;Static message is processed according to the input data after conversion, obtains dynamic message, comprising: reports static state The indirect replacement field of each of text replaces with corresponding indirect target parameter, generates dynamic message.
In one embodiment, field to be replaced further includes direct replacement field;According to the input data after conversion Static message is processed, further includes: direct target corresponding with each directly replacement field in identification input data Parameter;The direct replacement field of each of static message is replaced with into corresponding direct target component.
Field to be replaced refers to the field that can be replaced with input parameter to realize dynamic change.Field packet to be replaced Include but be not limited to the one or more of them such as time field, exchange rate field and transaction journal odd numbers field.Wherein instead of also field It can be also divided into directly replacement field and indirectly replacement field, field is directly replaced and refer to and can be joined according to the input directly acquired The field that the data such as number are directly replaced replaces field indirectly and refers to the word that cannot replace with the input parameter directly acquired Section, replacing field indirectly can be by convert to input data and the field that is replaced according to the data after conversion.Than If time field can be directly to replace field, transaction journal odd numbers field is indirect replacement field.
When including time field in static message, then time field can directly be replaced with into current time;When static state is reported When in text including transaction journal odd numbers field, then conversion processing can be carried out according to multiple indirect initial parameters to generate target friendship Easy flowing water odd numbers, and transaction journal odd numbers field is replaced with to the target transaction flowing water odd numbers of generation.It based on context can also be The input parameter that field obtains needed for determining, such as if including exchange rate field in static message, it needs first to determine up and down The currency type for needing to carry out currency exchange in text section is obtained by interface from exchange rate data central server further according to context field The real-time exchange rate accordingly is obtained to replace to exchange rate field.It can also be when field to be replaced be value type, with the incremental side of equal difference Formula obtains field to be tested.For example, being inquiry amount field in field to be replaced, the inquiry amount field is directed in test cases Input parameter be 50, then the input parameters without being limited thereto such as 40,45,55,60 can be derived according to the input parameter, thus Multiple dynamic messages can be generated according to a test cases.
For example, user carries out fund application request operation in front end system, obtains one by input list and applies to purchase Shenzhen and Hong Kong lead to the transaction message of fund, and data are: { " transaction number ": " T001 ", " trade date ": " 2018-11-02 ", " Hong Kong stock The date of delivery ": " 2018-11-05 ", " action type ": " applying to purchase ", " number of deals ": 10 }.This transaction can be as static state Packet storage gets up.When test case, which needs to test, applies to purchase the fund of 20 baskets, it is assumed that current time is 2018- 11-09, since current time has become, so the expired static message cannot be handled.Then, testing service device can dynamic Ground is processed the static state message, and obtaining dynamic message data may is that { " transaction number ": " T20181109200600_001 ", " trade date ": " 2018-11-09 ", " the Hong Kong stock date of delivery ": " 2018-11-12 ", " behaviour Make type ": " applying to purchase ", " number of deals ": 20 }.Wherein, transaction number is father's transaction ID, is unique sequence of dynamic construction Column, the time on the day of trade date is system, the Hong Kong stock date of delivery is next Hong Kong stock day of trade.Thus it is possible to use this Dynamic message, which can be used for treating test application system, to be tested.
In one embodiment, strategy is surveyed by weight of to convert to indirect initial parameter, obtain indirect target parameter, It include: to search calculation formula corresponding with indirect replacement field;According to calculation formula, calculated based on indirect initial parameter, Obtain target component.Such as after exchange rate field has been determined, the number of the monetary value field of conversion can be treated based on exchange rate field Value is calculated, the price numerical value of the target currency type field after being converted.
In one embodiment, replacement field includes inteerelated order row field indirectly, and conversion strategy includes that sequence number generates Rule;It takes the survey strategy by weight of to convert indirect initial parameter, obtains indirect target parameter, comprising: according to sequence Number create-rule splices indirect initial parameter, obtains target association sequence number;By the indirect replacement field of each of static message Corresponding indirect target parameter is replaced with, dynamic message is generated, comprising: is searched and the associated association message of static message;Association Message includes inteerelated order row field;Static message is replaced with into target association sequence with the inteerelated order row field being associated in message Row number;It is packaged by replaced static message and is associated with message, generation dynamic message.
When replacement field includes association serial number field indirectly, then illustrate that static message belongs to association message, i.e., this is quiet State message needs other association messages associated with it to be sent to the corresponding system server progress of application system to be tested simultaneously Test.It needs to include several associated transaction when a test cases, and several transaction possess identical inteerelated order row number word Duan Shi then needs the message of those connected transaction being associated processing, and the message by association process is association message.
Indirect initial parameter includes but is not limited to the one or more of them such as current time, user identifier, network identity ginseng Number, sequence number create-rule include but is not limited to carry out the rule of calculation processing to indirect initial parameter and define splicing sequentially Rule etc..After obtaining target association sequence number according to the indirect initial parameter of sequence number create-rule splicing, target can be closed Connection sequence number is replaced in the inteerelated order row field into static message and association message.And by after working process Static message and association message be packaged, with realize processing is synchronized to the message of those connected transaction.
In one embodiment, static message includes multiple sub- transaction messages of static state, and application system to be tested corresponds to more A system server;It is tested based on dynamic message application system to be tested corresponding to system banner, comprising: identification dynamic In message, the corresponding system server of each sub- transaction message of dynamic;The sub- transaction message of each dynamic is respectively sent to correspond to System server tested.
When static message is the static message of combination transaction, a test case can correspond to multiple static son transaction reports Text can generate multiple after being processed respectively according to the input data after conversion to each sub- transaction message of static state Dynamically sub- transaction message.Combination transaction refers to the isochronous transaction for using an order and realizing whole projects in investment combination.Than Such as, combination transaction 1,000,000, combination transaction are needed there are two son transaction 800,000 and 200,000 by 800,000 and 200,000 sub- trading item It is sent to different financial transaction system processing, so that three dynamic transaction messages can be generated: transaction combination message and two sons Transaction message.After generating three sub- transaction messages of dynamic, it can successively be handled by preset order, can also detect three After a sub- transaction message of dynamic is all sent successfully, processing is synchronized to three sub- transaction messages of dynamic.For different sons Transaction can preset corresponding system server, thus according to transaction combination message or sub- transaction message to corresponding system server It is tested.
In one embodiment, optional parameters library can be preset, is surveyed according to input parameter is chosen in optional parameters library with determining The input data of example on probation, to carry out dynamic machining processing to static message.When in static message include multiple words to be replaced Duan Shi can prepare optional parameters library in advance for each field to be replaced in advance, include multiple optional in each optional parameters library Parameter can also include normal parameter and anomaly parameter;When to generate the corresponding test cases of some father's transaction ID, determine Multiple fields to be replaced that the corresponding input data of father's transaction ID includes;It can be corresponding from the field to be replaced of each determination A parameter to be tested is chosen in optional parameters library, thus according to the corresponding parameter to be tested of multiple fields to be replaced, structure At parameter combination to be tested;Dynamic machining processing is carried out to static message according to the combination of each test parameter.Such as when have 5 to When replacing field, prepares 10 optional parameters for each field to be replaced, then produces 100000 kinds of parameter combinations to be tested, To reduce the workload of the input data of setup test use-case.
In one embodiment, as shown in figure 3, providing another system detection method, it is applied in Fig. 1 in this way Testing service device 104 for be illustrated, comprising the following steps:
Step 302, system testing request is obtained;Carrying system mark is requested in system testing.
Step 304, test case is chosen;It include sub- transaction ID, input data and intended response result in test case.
Step 306, it determines the corresponding father's transaction ID of sub- transaction ID, and searches static report corresponding with father's transaction ID Text and conversion strategy.
Step 308, static message is parsed, multiple fields to be replaced are obtained;Field to be replaced include indirectly replacement field and Directly replace field.
Step 310, indirect initial parameter corresponding with indirect replacement field is determined from input data.
Step 312, strategy is surveyed by weight of to convert to indirect initial parameter, obtain indirect target parameter.
Step 314, direct target component corresponding with each directly replacement field in input data is identified.
Step 316, the indirect replacement field of each of static message is replaced with into corresponding indirect target parameter, and will be straight It takes over and changes field and replace with corresponding direct target component, generate dynamic message.
Step 318, dynamic message is sent to the system server of the corresponding application system to be tested of system banner.
Step 320, the response message that system server returns is received;Response message is used for by system server to dynamic Message carries out logical process and obtains, and includes real response result in response message.
Step 322, when real response result meets the intended response result for including in corresponding test case, it is determined that Corresponding testing case passes through.
In above system test method, after testing service device gets the system testing request of carrying system mark, choosing Take the test case comprising sub- transaction ID and input data.Testing service device determines the corresponding father's trading standard of sub- transaction ID Know, and searches static message corresponding with identified father's transaction ID and conversion strategy.Testing service device conversion test case In input data, the input data after being converted, thus according to the input data after conversion to static message to wherein wrapping The indirect replacement field and directly replacement field contained carries out different working processes, obtains dynamic message.Testing service device is based on Dynamic message application system to be tested corresponding to system banner is tested.Pass through the side being processed to static message Formula generates dynamic message, reduces the coupling of application system to be tested and front end system, independent steadily to pass through dynamic message base Unduplicated system testing is carried out in test cases, so as to improve the efficiency of test.
It should be understood that although each step in the flow chart of Fig. 2 and 3 is successively shown according to the instruction of arrow, It is these steps is not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps There is no stringent sequences to limit for rapid execution, these steps can execute in other order.Moreover, in Fig. 2 and 3 at least A part of step may include that perhaps these sub-steps of multiple stages or stage are not necessarily in same a period of time to multiple sub-steps Quarter executes completion, but can execute at different times, the execution in these sub-steps or stage be sequentially also not necessarily according to Secondary progress, but in turn or can replace at least part of the sub-step or stage of other steps or other steps Ground executes.
In one embodiment, as shown in figure 4, providing a kind of opening machine system test device 400, comprising: module 402 is obtained, For obtaining system testing request;Carrying system mark is requested in system testing;Module 404 is chosen, for choosing test case;It surveys It include sub- transaction ID and input data in example on probation;Determining module 406, for determining the corresponding father's trading standard of sub- transaction ID Know, and searches static message corresponding with father's transaction ID and conversion strategy;Convert module 408, for taking conversion strategy to change Calculate input data, the input data after being converted;Processing module 410, for being reported according to the input data after conversion to static state Text is processed, and obtains dynamic message;Test module 412, for corresponding to system banner to be measured based on dynamic message Examination application system is tested.
In one embodiment, conversion module 408 is also used to parse static message, obtains multiple fields to be replaced;Wait replace Changing field includes replacing field indirectly;Indirect initial parameter corresponding with indirect replacement field is determined from input data;According to Conversion surveys strategy and converts to indirect initial parameter, obtains indirect target parameter;Processing module 410 is also used to static message Each of indirect replacement field replace with corresponding indirect target parameter, generate dynamic message.
In one embodiment, field to be replaced further includes direct replacement field, and processing module 410 is also used to identify input Direct target component corresponding with each directly replacement field in data;Each of static message is directly replaced to field replacement For corresponding direct target component.
In one embodiment, replacement field includes inteerelated order row field indirectly, and conversion strategy includes that sequence number generates Rule;Conversion module 408 is also used to splice indirect initial parameter according to sequence number create-rule, obtains target association sequence number; Processing module 410 is also used to search and the associated association message of static message;Being associated with message includes inteerelated order row field;It will be quiet State message replaces with target association sequence number with the inteerelated order row field being associated in message;It is packaged by replaced static report Text and it is associated with message, generation dynamic message.
In one embodiment, static message includes multiple sub- transaction messages of static state, and application system to be tested corresponds to more A system server;Test module 412 is also used to identify in dynamic message, the corresponding system service of each sub- transaction message of dynamic Device;The sub- transaction message of each dynamic is respectively sent to corresponding system server to test.
In one embodiment, test case further includes intended response as a result, test module 412 is also used to dynamic message It is sent to the system server of the corresponding application system to be tested of system banner;Receive the response message that system server returns; Response message is used to carry out logical process to dynamic message to obtain by system server, includes real response knot in response message Fruit;When real response result meets the intended response result for including in corresponding test case, it is determined that corresponding test case Test passes through.
Specific about opening machine system test device limits the restriction that may refer to above for system detection method, herein not It repeats again.Modules in above system test device can be realized fully or partially through software, hardware and combinations thereof.On Stating each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also store in a software form In memory in computer equipment, the corresponding operation of the above modules is executed in order to which processor calls.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junction Composition can be as shown in Figure 5.The computer equipment include by system bus connect processor, memory, network interface and Database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory packet of the computer equipment Include non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and data Library.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating The database of machine equipment is for storing the data such as static message.The network interface of the computer equipment is used for logical with external terminal Cross network connection communication.To realize a kind of system detection method when the computer program is executed by processor.
It will be understood by those skilled in the art that structure shown in Fig. 5, only part relevant to application scheme is tied The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, another computer equipment, including memory and processor, memory storage are provided There is computer program, which realizes the step of the system detection method in above-mentioned each embodiment when executing computer program Suddenly.
In one embodiment, another computer readable storage medium is provided, computer program is stored thereon with, is counted Calculation machine program realizes the step of system detection method in above-mentioned each embodiment when being executed by processor.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of system detection method, which comprises
Obtain system testing request;The system testing request carrying system mark;
Choose test case;It include sub- transaction ID and input data in the test case;
Determine the corresponding father's transaction ID of the sub- transaction ID, and search static state message corresponding with father's transaction ID and Conversion strategy;
Take the conversion strategy conversion input data, the input data after being converted;
Static message is processed according to the input data after the conversion, obtains dynamic message;
It is tested based on dynamic message application system to be tested corresponding to the system banner.
2. the method according to claim 1, wherein described take the conversion strategy conversion input number According to input data after being converted, comprising:
The static message is parsed, multiple fields to be replaced are obtained;The field to be replaced includes replacing field indirectly;
Indirect initial parameter corresponding with the indirect replacement field is determined from the input data;
Strategy is surveyed by weight of described to convert to the indirect initial parameter, obtains indirect target parameter;
The input data according to after the conversion is processed static message, obtains dynamic message, comprising:
Each of the static message indirect replacement field is replaced with into corresponding indirect target parameter, dynamic is generated and reports Text.
3. according to the method described in claim 2, it is characterized in that, the field to be replaced further includes direct replacement field;Institute It states and static message is processed according to the input data after conversion, further includes:
Identify direct target component corresponding with each direct replacement field in the input data;
Each of the static message direct replacement field is replaced with into corresponding direct target component.
4. according to the method described in claim 2, it is characterized in that, the indirect replacement field includes inteerelated order row field, The conversion strategy includes sequence number create-rule;It is described take by weight of described survey strategy to the indirect initial parameter into Row conversion, obtains indirect target parameter, comprising:
Splice the indirect initial parameter according to the sequence number create-rule, obtains target association sequence number;
It is described that each of the static message indirect replacement field is replaced with into corresponding indirect target parameter, it generates dynamic State message, comprising:
It searches and the associated association message of the static message;The association message includes inteerelated order row field;
The static message is replaced with into the target association sequence number with the inteerelated order row field being associated in message;
It is packaged by the replaced static message and the association message, generates dynamic message.
5. the method according to claim 1, wherein it is described static state message include multiple sub- transaction messages of static state, The application system to be tested corresponds to multiple system servers;It is described corresponding to the system banner based on the dynamic message Application system to be tested tested, comprising:
It identifies in dynamic message, the corresponding system server of each sub- transaction message of dynamic;
Each sub- transaction message of dynamic is respectively sent to corresponding system server to test.
6. the method according to claim 1, wherein the test case further includes intended response as a result, described It is tested based on dynamic message application system to be tested corresponding to the system banner, comprising:
The dynamic message is sent to the system server of the corresponding application system to be tested of the system banner;
Receive the response message that the system server returns;The response message is used for by the system server to described Dynamic message carries out logical process and obtains, and includes real response result in the response message;
When the real response result meets the intended response result for including in corresponding test case, it is determined that corresponding test Use-case test passes through.
7. a kind of opening machine system test device, which is characterized in that described device includes:
Module is obtained, for obtaining system testing request;The system testing request carrying system mark;
Module is chosen, for choosing test case;It include sub- transaction ID and input data in the test case;
Determining module for determining the corresponding father's transaction ID of the sub- transaction ID, and is searched and father's transaction ID pair The static message and conversion strategy answered;
Convert module, the input data for taking the conversion strategy conversion input data, after being converted;
Processing module obtains dynamic message for being processed according to the input data after the conversion to static message;
Test module, for being tested based on dynamic message application system to be tested corresponding to the system banner.
8. device according to claim 7, which is characterized in that the conversion module is also used to parse the static message, Obtain multiple fields to be replaced;The field to be replaced includes replacing field indirectly;From the input data determine with it is described The corresponding indirect initial parameter of replacement field indirectly;Strategy is surveyed by weight of described to convert to the indirect initial parameter, Obtain indirect target parameter;
The processing module is also used to replace with each of the static message indirect replacement field corresponding indirect Target component generates dynamic message.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists In the step of processor realizes any one of claims 1 to 6 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method described in any one of claims 1 to 6 is realized when being executed by processor.
CN201910542472.2A 2019-06-21 2019-06-21 System test method, device, computer equipment and storage medium Active CN110413507B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910542472.2A CN110413507B (en) 2019-06-21 2019-06-21 System test method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910542472.2A CN110413507B (en) 2019-06-21 2019-06-21 System test method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110413507A true CN110413507A (en) 2019-11-05
CN110413507B CN110413507B (en) 2024-05-03

Family

ID=68359519

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910542472.2A Active CN110413507B (en) 2019-06-21 2019-06-21 System test method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110413507B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111061638A (en) * 2019-12-16 2020-04-24 上海钧正网络科技有限公司 Method and device for debugging iOS system and server
CN111367818A (en) * 2020-03-30 2020-07-03 中国建设银行股份有限公司 System component testing method and device based on dynamic data return
CN112416767A (en) * 2020-11-20 2021-02-26 建信金融科技有限责任公司 Distributed system test method, device and equipment
CN113064047A (en) * 2021-03-05 2021-07-02 万向一二三股份公司 Testing device and testing method for end-to-end protection between electronic control units

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917312A (en) * 2010-09-01 2010-12-15 中国建设银行股份有限公司 Performance test stimulator, and message package module, message packaging and sending method thereof
WO2018014580A1 (en) * 2016-07-20 2018-01-25 平安科技(深圳)有限公司 Data interface test method and apparatus, and server and storage medium
CN108804336A (en) * 2018-06-15 2018-11-13 深圳壹账通智能科技有限公司 Interactive system test method, device, computer equipment and storage medium
CN109522218A (en) * 2018-10-19 2019-03-26 平安科技(深圳)有限公司 Interface test method, device, computer equipment and storage medium
CN109670803A (en) * 2018-10-25 2019-04-23 深圳壹账通智能科技有限公司 Method, apparatus, medium and the electronic equipment tested before online trading

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917312A (en) * 2010-09-01 2010-12-15 中国建设银行股份有限公司 Performance test stimulator, and message package module, message packaging and sending method thereof
WO2018014580A1 (en) * 2016-07-20 2018-01-25 平安科技(深圳)有限公司 Data interface test method and apparatus, and server and storage medium
CN108804336A (en) * 2018-06-15 2018-11-13 深圳壹账通智能科技有限公司 Interactive system test method, device, computer equipment and storage medium
CN109522218A (en) * 2018-10-19 2019-03-26 平安科技(深圳)有限公司 Interface test method, device, computer equipment and storage medium
CN109670803A (en) * 2018-10-25 2019-04-23 深圳壹账通智能科技有限公司 Method, apparatus, medium and the electronic equipment tested before online trading

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111061638A (en) * 2019-12-16 2020-04-24 上海钧正网络科技有限公司 Method and device for debugging iOS system and server
CN111061638B (en) * 2019-12-16 2023-06-30 上海钧正网络科技有限公司 iOS system debugging method, device and server
CN111367818A (en) * 2020-03-30 2020-07-03 中国建设银行股份有限公司 System component testing method and device based on dynamic data return
CN112416767A (en) * 2020-11-20 2021-02-26 建信金融科技有限责任公司 Distributed system test method, device and equipment
CN113064047A (en) * 2021-03-05 2021-07-02 万向一二三股份公司 Testing device and testing method for end-to-end protection between electronic control units
CN113064047B (en) * 2021-03-05 2024-03-08 万向一二三股份公司 Testing device and testing method for end-to-end protection between electronic control units

Also Published As

Publication number Publication date
CN110413507B (en) 2024-05-03

Similar Documents

Publication Publication Date Title
CN110413507A (en) System detection method, device, computer equipment and storage medium
CN110399293B (en) System test method, device, computer equipment and storage medium
CN109636607A (en) Business data processing method, device and computer equipment based on model deployment
CN109344170B (en) Stream data processing method, system, electronic device and readable storage medium
Dungey et al. Unobservable shocks as carriers of contagion
CN108876133A (en) Risk assessment processing method, device, server and medium based on business information
CN109522218A (en) Interface test method, device, computer equipment and storage medium
CN109558440A (en) Batch data processing method, device, computer equipment and storage medium
CN109800335A (en) Generation method, device, computer equipment and the storage medium of enterprise's map
CN106656536A (en) Method and device for processing service invocation information
CN109816503A (en) Financial details data creation method, device, computer equipment and storage medium
US20180173808A1 (en) Intent and bot based query guidance
CN108629567A (en) Declaration information processing method, device, computer equipment and storage medium
CN110008266A (en) Data interchange file analysis method and device
CN110069297A (en) Abnormality eliminating method, device, computer equipment and storage medium based on Spring MVC
CN112101938A (en) Block chain-based digital seal using method and device and electronic equipment
CN109325010A (en) Log inspection method, device, computer equipment and storage medium
CN109857373A (en) Business data processing method, device, computer equipment and storage medium
CN110619574A (en) Remittance data processing method, remittance data processing apparatus, electronic device, and storage medium
CN110221967A (en) Test data building method, device, computer equipment and storage medium
CN109767226A (en) Suspicious transaction statistical views generation method and device based on big data
CN114372006A (en) Method and system for automatically generating test case, computer equipment and storage medium
CN110275703A (en) Assignment method, device, computer equipment and the storage medium of key-value pair data
CN113778878A (en) Interface testing method and device, electronic equipment and storage medium
CN110008180A (en) Financial data recording method, device, computer equipment and storage medium

Legal Events

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