CN113282499B - Method, system, equipment and medium for creating test data - Google Patents

Method, system, equipment and medium for creating test data Download PDF

Info

Publication number
CN113282499B
CN113282499B CN202110606332.4A CN202110606332A CN113282499B CN 113282499 B CN113282499 B CN 113282499B CN 202110606332 A CN202110606332 A CN 202110606332A CN 113282499 B CN113282499 B CN 113282499B
Authority
CN
China
Prior art keywords
interface
parameters
tested
function
message body
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110606332.4A
Other languages
Chinese (zh)
Other versions
CN113282499A (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.)
Changsha Daojia Youxiang Home Economics Service Co ltd
Original Assignee
Changsha Daojia Youxiang Home Economics Service 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 Changsha Daojia Youxiang Home Economics Service Co ltd filed Critical Changsha Daojia Youxiang Home Economics Service Co ltd
Priority to CN202110606332.4A priority Critical patent/CN113282499B/en
Publication of CN113282499A publication Critical patent/CN113282499A/en
Application granted granted Critical
Publication of CN113282499B publication Critical patent/CN113282499B/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/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Abstract

The invention belongs to the field of testing, and is particularly suitable for system interface testing. Aiming at the defects that the existing test general function module needs upstream and downstream data as a test and needs to acquire data or flow of the other party for a newly added interface to be created by a own party, but business is unfamiliar with the defects that the data creation is influenced, the efficiency is low and the like, the invention provides a method, a system, equipment and a medium for creating test data, which aim at determining key parameters and non-key parameters for parameters which are input by an internal function adding interface, providing preset default values for the non-key parameters and providing corrected specific values for the key parameters so as to generate the test data, and monitoring an external function adding message subscription function, namely a reissue message body, providing corrected specific values for the message body, and generating the test data by using the specific values when the third party node is triggered by timing monitoring. Therefore, the technical problem of how to realize the generalized efficient creation of test data is solved.

Description

Method, system, equipment and medium for creating test data
Technical Field
The invention belongs to the technical field of testing, and particularly relates to a method, a system, equipment and a medium for creating test data, which are particularly suitable for interface testing.
Background
In the prior art, when testing a general function module, data of an upstream or related service is required to be used as test data, the test data is generally given by an opposite party needing to be tested and added with a new interface or the opposite party provides a service function flow document, then the test data is created by the opposite party, and if the test data is unfamiliar with the service, the creation of the data is easily blocked layer by layer, so that the working efficiency is seriously affected.
Therefore, the existing method for creating the interface test data needs to be improved, generalized test data creation is realized, more interface modification tests are adapted, the test efficiency is improved, excessive familiarity requirements on the service are not needed, and convenience and high efficiency are realized.
Disclosure of Invention
First, the technical problem to be solved
The invention aims to solve the technical problem of how to realize the generalized efficient creation of test data; further, the technical problem of how to conveniently and efficiently create test data based on message subscription to improve service test efficiency is solved.
(II) technical scheme
To solve the above technical problem, an aspect of the present invention provides a method for creating test data, including: determining key parameters and non-key parameters for parameters transmitted by an interface of a system to be tested; uniformly presetting a default value for the non-key parameters and correcting a specific value for the key parameters; and creating test data for testing the system to be tested according to the specific value of the parameter corresponding to the interface and the default value of the non-key parameter and/or according to the node triggered by the monitored reissued message body.
According to a preferred embodiment of the present invention, before determining the critical parameters and the non-critical parameters of the parameters inputted by the interface of the system to be tested, the method further comprises: analyzing a flow link of the system to be tested to distinguish an internal function and an external function of the system to be tested; if the function is an internal function, creating an initialization interface through interface template library and/or interface interaction according to a default function; if the external function is the external function, based on the message subscription, an initialization message body is created corresponding to the external system on which the system to be tested indicated by the external function depends.
According to a preferred embodiment of the present invention, the creating an initialization message body includes: corresponding to the service added by the external system, constructing a corresponding message subject number through interface interaction selection, selecting a corresponding message body according to a default value and a message body library, and reissuing the message body.
According to a preferred embodiment of the present invention, corresponding to the service added by the external system, a corresponding message subject number is constructed by interface interaction selection, and a corresponding message body is selected and reissued according to a default value and a message body library, specifically including: modifying the selected corresponding message body through a random function to obtain a specific value; and monitoring the reissued message body at fixed time or in real time to determine the node triggering of the external function of the corresponding third party system.
According to a preferred embodiment of the present invention, determining key parameters and non-key parameters of parameters inputted by an interface of a system to be tested specifically includes: acquiring parameters in a code scanning mode based on internal services corresponding to internal functions in the system to be tested and external services of an external system on which the system to be tested depends, wherein the external services correspond to external functions; and combining the acquired parameters with service analysis of the system to be tested, and determining that the parameters which can substantially influence the response result of the service rule are key parameters and the parameters which cannot substantially influence the service rule are non-key parameters in one or more parameters transmitted by the interface.
According to a preferred embodiment of the present invention, default values are preset uniformly for the non-critical parameters and specific values are corrected for the critical parameters, specifically including: generating a preset default value of the non-key parameter when the interface is created based on the interface template and the random generator according to the default value function; and correcting the preset default provided by the key parameters when the interface is created according to the random function and the interface interaction based on the preset default value to obtain a modified specific value.
According to a preferred embodiment of the present invention, creating test data for testing a system to be tested according to a specific value of the parameter corresponding to an interface and a default value of the non-critical parameter, and/or according to a node triggered by a monitored and reissued message body, specifically includes: generating test data according to specific values of corresponding key parameters and default values of non-key parameters in an interface of the system to be tested, and sending an interface request; and/or according to the monitoring of the message body, obtaining a specific value of the message body corresponding to a node on a flow link of the system to be tested, triggered by an external system on which the system to be tested depends, and generating test data.
To solve the above technical problems, two aspects of the present invention provide a system for creating test data, including: the distinguishing module is used for determining key parameters and non-key parameters for parameters transmitted by an interface of the system to be tested; the setting module is used for uniformly presetting a default value for the non-key parameters and correcting a specific value for the key parameters; the creation module is used for creating test data for testing the system to be tested according to the specific value of the parameter corresponding to the interface and the default value of the non-key parameter and/or according to the node triggered by the monitored and reissued message body.
A third aspect of the invention proposes an electronic device comprising a processor and a memory for storing a computer executable program, which processor performs the method of the first aspect when the computer program is executed by the processor.
The fourth aspect of the present invention also proposes a computer readable storage medium storing a computer executable program which, when executed, implements the method of the first aspect.
(III) beneficial effects
The invention determines that the transmission value of the necessary parameter in the interface has no substantial influence on the service by combing the service interface, can realize the function of adding the interface, so as to give the non-key parameter preset default value when the initial interface is created, and correct the key parameter to obtain a specific value (such as a unique value) through a random function, thus only the value of the key parameter is needed to be adjusted and typed, the service is not needed to be particularly familiar, and valuable and effective upstream test data can be created. High efficiency, rapidness, simplicity and convenience.
By establishing the function of supporting the message body transmission/message subscription function, the invention does not need to be really familiar with and run the flow for the related business of the third party, only needs to create the initial message body (default value), corrects the specific value and supplements the message body, and then the two monitoring parties agree on the message body, and the test data is created according to the message body when the node logic is triggered. Also, the method is efficient, quick, simple and convenient.
Drawings
FIG. 1 is a main flow diagram of one embodiment of a method of creating test data according to the present invention;
FIG. 2 is a block diagram of the primary architecture of one embodiment of a system for creating test data in accordance with the present invention;
FIG. 3 is a schematic diagram of the implementation of the functional principle according to one embodiment of the solution of the present invention;
FIG. 4 is a block diagram of the main structure of one embodiment of an electronic device according to the present invention;
FIG. 5 is a schematic diagram of the primary structure of one embodiment of a more specific electronic device in accordance with the present invention;
fig. 6 is a main structural diagram of one embodiment of a computer-readable storage medium according to the present invention.
Detailed Description
The present invention will be further described in detail below with reference to specific embodiments and with reference to the accompanying drawings, in order to make the objects, technical solutions and advantages of the present invention more apparent.
In describing particular embodiments, specific details of construction, performance, effects, or other features are set forth in order to provide a thorough understanding of the embodiments by those skilled in the art. It is not excluded, however, that one skilled in the art may implement the present invention in a particular situation in a solution that does not include the structures, properties, effects, or other characteristics described above.
The flow diagrams in the figures are merely exemplary flow illustrations and do not represent that all of the elements, operations, and steps in the flow diagrams must be included in the aspects of the present invention, nor that the steps must be performed in the order shown in the figures. For example, some operations/steps in the flowcharts may be decomposed, some operations/steps may be combined or partially combined, etc., and the order of execution shown in the flowcharts may be changed according to actual situations without departing from the gist of the present invention.
The block diagrams in the figures generally represent functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different network and/or processing unit means and/or microcontroller means.
The same reference numerals in the drawings denote the same or similar elements, components or portions, and thus repeated descriptions of the same or similar elements, components or portions may be omitted hereinafter. It will be further understood that, although the terms first, second, third, etc. may be used herein to describe various devices, elements, components or portions, these devices, elements, components or portions should not be limited by these terms. That is, these phrases are merely intended to distinguish one from the other. For example, a first device may also be referred to as a second device without departing from the spirit of the invention. Furthermore, the term "and/or," "and/or" is meant to include all combinations of any one or more of the items listed.
In order to solve the technical problems, the invention provides a scheme for creating test data. The scheme is mainly a scheme for creating test data based on generalization of message subscription. In a specific embodiment, the method for creating test data mainly includes: s1, determining key parameters and non-key parameters for parameters transmitted by an added interface, selecting a message body for added service and reissuing the message body; s2, presetting a default value (such as a default function of a created interface or a message body) for non-key parameters, and correcting a specific value (such as a random function) for the key parameters; s3, based on specific values of key parameters and default values of non-key parameters corresponding to the interfaces and/or based on data obtained by the monitoring of the message body, test data required by the whole flow of the system to be tested are created.
Based on the interface and the message subscription, the default value is preset for the interface or the message body, and then the specific value is revised, so that the interface and the message body can be quickly constructed to obtain the parameter value of the corresponding node. The default value can be preset through a default value function, and the corrected specific value can be realized through a random function; the function can encapsulate the construction function of specific parameters and support secondary development.
The terms that may be involved in one embodiment of the present invention are explained and/or illustrated below:
"message subscription based": when in testing, the actual business flow of the relying party (the third party is not a system to be tested) is not carried out, and the business node is reached only by the reissuing message body, so that the parameters of the business node (upstream and downstream) of the relying party are provided for the system to be tested.
"generalization": in the test, different business party (third party) access can be supported through the registration and consumption modes of the message body; the message body supports typing, and also supports selecting a default message body, selecting a default value for each key, supporting one-key typing of multiple default values, and the like.
"message": the message subject number + message body can be constructed according to actual needs.
[ example 1 ]
The main step flow diagram of one embodiment of the method of the present invention is described below in connection with fig. 1.
In step S110, the parameters input by the interface of the system to be tested determine the critical parameters and the non-critical parameters, and the external service on which the system to be tested depends is selected to reissue the message body and monitor the arrival of the message to trigger the functional business process linking the system to be tested.
In one embodiment, the tool for creating the test data is actually an application APP or software, platform. Taking software as an example, it may be a well-developed program that can be used to quickly build an interface. Further, it may include at least an internal functional interface construction portion of the system to be tested and a message monitoring functional portion (external) or upstream and downstream nodes of the third party service on which the system to be tested depends, so as to rapidly complete functional verification of the system to be tested.
In one embodiment, the method of the present invention may first comb the interfaces that the system under test that needs to create test data may involve.
Carding interfaces such as: the interface can be judged in a system range (such as system internal/internal functions, external/dependent external functions or external systems) based on familiarity (experience) of the service after the corresponding interface document is acquired, and the interface is distinguished by manual service experience mainly in combination with a manual judgment mode. Further, the main flow interface link may be analyzed from the functional flow of the system under test, where internal functions (e.g., internal traffic) and external functions (e.g., external traffic on which the system under test depends) of the system under test may be involved.
In one embodiment, if the function verification is aimed at the internal function of the system to be tested related to the system to be tested, the function verification can be quickly realized by adding an interface-forming mode, and an initialization interface is created by calling a well-developed interface template in the application program APP for creating test data, thereby increasing the interface.
Further, a visual web page can be provided when developing the program, and a tester can intuitively obtain a preliminary (initialization/default) interface.
In one embodiment, if the message is directed to an external function of the system to be tested, that is, an external function relied on by the system to be tested, a corresponding message subject number can be constructed, and a preset message body template is selected, so that a preliminary (initialized/default) message body can be obtained. Thus, the node logic can be triggered by sending the message body and the message body can be monitored to obtain the incoming parameters.
In one embodiment, based on the service flow and service data of the system to be tested, the determination can be performed according to the influence surface of the input parameters (hereinafter referred to as parameter transmission) in the service, so as to determine whether the function of the parameter transmission value to be tested has substantial influence. The influence surface of the parameters is mainly judged by a manual mode and a code scanning mode. Specifically, based on the specific scene, the specific business process and the specific business data related to the system to be tested, the parameter transmission value can be obtained through a manual and/or code scanning mode, for example, the parameter transmission value can be obtained through a manual and code scanning mode. One example is: the code scanning can scan the code interface by means of the existing code scanning tool, thereby acquiring the parameter, and generating a detailed interface analysis result report by combining the necessary filling attribute, the parameter uniqueness and the degree (parameter reference degree) of the output parameter (called parameter for short) of the parameter for other interfaces, and manually analyzing which parameters are key parameters and which parameters can be preset as non-key parameters. The key measurement index is to see specific service realization, different services and different parameter key, so that the judgment is more accurate and effective by combining manual analysis.
Examples of determining critical parameters are:
for an interface that submits threads, the parameters that are entered are: activity id, recommender name, recommendator id, city, creation time, and update time. By analyzing the business, the interface is constructed, the influence of the name of the recommended person, the city, the creation time and the update time is small, but the activity id, the recommended person id and the recommended person id are very critical for the subsequent flow. Thus, the key parameters of the interface are activity id, recommendator id, and the non-key parameters are recommender name, recommendator name, city, creation time, and update time.
For message body interception through message subscription, such as sending external system business function message bodies, a test scenario is created that requires a vocational training system (third party/external, upstream/downstream nodes) to walk to the authenticated node to trigger the system under test to arrive at the authenticated revenue node internally. Analytically, the certified process of the vocational training system is very long, takes a long time if it is really to operate the process, and also requires an increase in familiarity and actual execution of iterative function implementation if the vocational training system performs function iteration, which increases unnecessary test costs. In one embodiment of the present invention, the authenticated status may be monitored by setting a message subject number for an external system on which the system under test depends. For example: the message body is created from a template/message body library and the reissued message body reaches an authenticated state quickly (i.e., can listen to parameters of the node needed based on the message subscription).
An example of an application: assuming an interface requires more than 30 parameters to be entered, by analyzing which of the parameters are decisive for the response results, for example, a commission generation rule (business rule) submitting interface includes rule name, rule description, rule validation time, rule expiration time, recommended business type name, recommender type, rule validity period, rule city, rule time, rule node, rule new and old identification, rule submitting state, rule node description, rule node amount configuration, rule node applicable crowd, rule sub-item commission type, commission new and old configuration, commission not recommended business type, commission not recommended person type, rule node validation time, expiration time, rule node per month, per-day settlement, secondary settlement not identity, secondary settlement amount, secondary node validation time and expiration time, etc. In such a multitude of transfers, however, it can be determined from the business analysis that the critical parameters are actually only recommended business type, recommended person type, validation time and expiration time. Thus, it can be determined that these parameters, which are passed in through the interface, are truly influencing the use of the rules, and the rest are non-critical parameters, which do not have excessive influence on the subsequent flow, just to ensure the integrity of the rules.
In one embodiment, the created test data is test data of an overall business process involved in the system under test. Therein, the related processes of the internal functions of the system and the related processes outside the system may be included, for example: the state of the thread needs to be verified to be accurate, the thread needs to be submitted, and therefore an interface for submitting the thread needs to be called to create thread data, so that the state of the thread can be obtained, and the submitted thread belongs to the process of creating test data. For another example: now, it is required to reach the certified profit node of the vocational training, but the vocational training system is not a tested system, but an external system of the system to be tested, or a dependent third party, and although the system can actually reach the certified flow, the system is too time-consuming, cost-consuming and resource-consuming, and can reach the certified flow by submitting the message body of the message subject number to reissue the message body, for example, providing the corresponding message body (default value) from the message body library according to the message subject number, and modifying the specific value, and the reissue message body mode to reach the certified flow, so that the system can reach the certified flow quickly and the efficiency is improved.
By constructing interface data and the body of the concurrent message, namely based on interface creation and message subscription, the two can effectively assist the test means for testing the functions of the system to be tested.
It can be seen that in this embodiment of the present invention, the internal service of the system to be tested creates or adds the required interface according to the corresponding service scenario through the existing template, creates the message body for the external service of the system to be tested (the dependent third party system, etc.), and determines whether the one or more parameters are critical parameters through the combination of code scanning and manual judgment. Thereby narrowing the scope of creating test data and testing the critical parameters.
In step S120, a unified default value is preset for the non-critical parameter, and a value related to the service test is entered for the critical parameter.
In one embodiment, presetting a non-critical parameter to a uniform default value, such as invoking a default value function, may generate a random value based on the interface template and the random generator. Such as: non-critical parameters of a submission cue are recommender name, city, creation time, and update time. The recommender name and the recommendable name are in the form of character strings, which can be task characters, do not support idempotent, and can be directly fixed, for example, can be set into a preset fixed character, such as Zhang San, lisi and the like, and have no influence on the system to be tested; the cities belong to a table library code, and can be set as any city with no influence on the business process, for example, can be set as a preset fixed city; creation time and update time, time that can be directly taken into account, etc.
An example of an application may be that all the interface templates are provided with a setting, and on the interface that interacts with the person creating the test data, the selection types provided by means of a drop-down box, various menus, etc. may be given to these parameters that do not affect the whole system to be tested, and default values may be set. Such as the name of the recommender and the name of the recommender, the character type is selected, then the character type default program of the program can be called, and a default character is directly revealed back. For another example, selecting a city type may call a city default program, and the city has a default city code. Etc.
In one embodiment, the critical parameters are important parameters affecting the interface, so that they may be modified here, and the modification may include, but is not limited to: manually modifying, calling one or more preset functions to assist in generation, etc. For example, a one-month-sister-in-law is recommended to be a merchant, an identity card is a critical parameter, idempotent and real-name authentication is supported, a character cannot be typed randomly, the identity card type is required to be selected, and then an identity card random generator (random function) of a corresponding program can be called, so that a critical parameter (parameter transmission value) can be obtained quickly.
Further, the correlation of the parameters including part of specific logic of the parameters is not easy to generate, and may be some specific parameters in life, such as identification numbers, e.g. open id of WeChat, e.g. operation license, etc. or specific values of own system, some ids agreed in the system are not hit by typing errors, and these also need to be processed, a connection database is supported in a random function, and corresponding data can be found out as parameters by typing sql query statement. Thus, the accuracy of the input parameters can be ensured.
Further, some identification parameters, such as unique values, are such critical parameters that do not support idempotent, do not require duplication, such as registration interfaces in interfaces, require the incoming of non-duplicated handset numbers, i.e., the handset numbers must be unique and cannot be duplicated. Random function introduction, in the process of generating and inquiring data, specific values can be quickly removed and quickly constructed.
In addition, critical parameters must be unique, while non-critical parameters do not. Such as creation time, which may be unique, but which is a non-critical parameter in the internal traffic of many systems under test.
It can be seen that, in this embodiment of the present invention, after the key parameters and the non-key parameters are distinguished, a preset default value (for example, a value may be given by a default function) is given when an interface or a message body is created, and then a specific value of the key parameters is corrected (for example, a random function is corrected), so that a unified default value is randomly preset for the non-key parameters, and the corrected specific value is obtained by generating a random function and/or typing in an interactive interface for the key parameters (for example, a unique value that can be used by a system to be tested is obtained), so that a tester does not need to spend a lot of time to construct excessive service data.
In step S130, test data is created from the values of the critical parameters and the default values of the non-critical parameters, and/or from listening to values in a preset message body.
In one embodiment, the tool for creating test data is actually a developed application APP or software, platform, which can be used to quickly build an interface. Further, it may include at least an internal function interface construction portion of the system under test and a message monitoring function portion (external) of a third party service on which the system under test depends, so as to rapidly complete function verification of the system under test.
In one embodiment, the main flow interface link is analyzed from the functional flow of the system under test to determine/distinguish between internal functions (e.g., internal traffic) and external functions (e.g., external traffic) of the system under test.
Further, if the process of distinguishing the key parameters from the non-key parameters is aimed at the internal functions of the system to be tested, an interface can be added, a well developed interface template of the system is called, and an initialization interface is created, so that the interface is added, a visual web page can be provided when a program is developed, and a tester can intuitively obtain a preliminary (initialization/default) interface.
Further, if the external function of the system to be tested is aimed at, the message subject number can be constructed, the preset message body template is selected, and a preliminary (initialized/default) message body is created.
In one embodiment, based on the service and service data of the system to be tested, the determination can be made according to the influence surface of the incoming parameter (referred to as the parameter transmission) in the service, so as to determine whether the parameter transmission value has substantial influence. The influence surface of the parameters is mainly determined by manual and code scanning. Specifically, based on the fact that the system to be tested specifically relates to the scene, the service and the service data, the system to be tested can be obtained through a manual and/or code scanning mode, for example, a manual and code scanning mode can be combined to obtain the parameter transmission, and the parameter transmission value is obtained, and the process of determining the key parameters is referred to. The key measurement index is that specific service realization needs to be seen, the services are different, and the key of the parameters is also different, so that the judgment is more effective by combining manual analysis. The interfaces of the system under test include the added interfaces, and it is determined whether the parameters entered through them are critical or non-critical, as described above.
The foregoing distinction is made as an example of one internal interface for system internal functions, commit threads: among the parameters entered, it is determined that the key parameters entered by the interface are an activity id, a recommender id, and the non-key parameters are a recommender name, a city, a creation time, and an update time.
The method is characterized in that the method is divided into external functions of a system, a business process of a vocational training system (an external system is not to be tested) is required to go to a certified node to trigger the inside of the system to be tested to reach a certified profit node, a test scene for generating an employment order is created, a certified state can be monitored by setting a message subject number without submitting a clue mode, the problem that the certified process of the vocational training system is overlong, excessive time is consumed because the process is not required to be executed, and test cost is not increased because the vocational training system performs function iteration is avoided.
In one embodiment, according to the foregoing interface and message body creation and parameter transmission key or non-key feature determination, default values may be preset uniformly for non-key parameters, and specific values may be modified for key parameters through interaction and/or random functions, for example, service test related values may be generated, so as to create required test data for the overall service flow related to the system to be tested according to the node logic status.
Further, the created test data includes data of some related processes of the external/external functions of the system in addition to data of parameters related to the interface created by some related processes of the internal functions.
The specific examples are: to verify that the state of a thread is accurate, the thread (internal) needs to be de-submitted, and thus the interface for submitting the thread needs to be called to create thread data (i.e., interface references), so that the state of the thread can be obtained, and the submitted thread is the test data.
And as another example: now, it is required to reach the certified profit node of the vocational training, but the vocational training system is not a tested system, belongs to a large external system of the system to be tested, or is a third party, and although the vocational training system can actually reach the certified flow, the vocational training system is too time-consuming, cost-consuming and resource-consuming, and can reach the vocational training system quickly by creating or submitting a message subject number to reissue a message body, so that the efficiency is improved.
Therefore, for the inside of the system, interface data can be constructed, and for the outside of the system, data can be obtained by monitoring (interception) of the message body of the third party system, so that more perfect test data for verifying the function of the system to be tested can be obtained, and the function of the system to be tested can be tested by effectively assisting in providing data between the data and the message body. The process of creating test data is not affected by setting and modifying parameters which are not critical or have no influence on system change, and the whole process including the related external process all require data and the like.
In one embodiment, external test data, such as a certified revenue node status monitoring MQ for vocational training, is obtained during testing: selecting and sending MQ information in a program, typing in an information subject number name for storage, adding a consumer in the service of an information body, then selecting a preset information body, wherein the preset information body is just like a receiving address, can be preset in advance, for example, in a Json character string form of key-value, can be typed in the preset information body, and the type of the value required to be selected is obtained as a default value; then, the specific value needs to be modified, the specific value setting and the specific value setting of the interface are the same random function library which is called, after the corresponding function is selected to quickly generate the specific value through the interactive interface, the message body is sent by clicking the reissue button, after the message body is sent, the message body is stored, and the next call can be continued; then, after the message body is successfully sent, by monitoring the message body, whether the profit node is reached can be queried. Thus, it is more efficient than actually taking the business side's flow.
Therefore, the embodiment of the invention can distinguish the inside and outside of the system to be tested, and can efficiently and accurately create the test data by distinguishing setting and constructing data of interface transmission and combining the data of the associated node positions in a mode of monitoring external message bodies, so that the test data can be created based on the message subscription and interface creation without excessively learning and familiarity of the service environment and the service data of the system to be tested, and the test data can be created and verified for any function of the system to be tested which is changed or not changed, namely the creation of the generalized test data based on the message subscription is realized.
Therefore, the technical scheme for creating the test data can be widely applied to more service scenes and fields without having excessive service experience requirements for test data creator, is a generalized simple and efficient data creation scheme, and particularly for a third party outside a system, only needs to monitor a message body (namely based on message subscription) to obtain the test data of an upstream node or a downstream node, further simplifies the test data obtaining mode, and does not need to execute the flow of the third party to obtain the data related to the external functions of the system, namely directly use the data, thereby further improving the creation efficiency of the system test data.
Furthermore, the invention can quickly construct the interface and send the message body by presetting a default value for the interface or the message body and correcting a specific value through a random function. Default functions and random functions are cores, in which some construction functions with specific parameters are encapsulated, and secondary development is supported.
[ example 2 ]
For the purposes of promoting an understanding of the principles and technical aspects of the invention, reference will now be made in detail to the embodiments, examples of which are illustrated in the accompanying drawings.
In one embodiment of the invention, the user behavior monitoring system based on the fort machine mainly comprises a rule module for presetting a judgment rule; the analysis module is used for carrying out data analysis according to the judging rule based on the current user behavior in the real-time data stream of the fort log so as to predict whether the current user behavior is abnormal behavior or not; and the processing module is used for alarming when the user is abnormal in behavior.
Here, a description will be given of a main structural block diagram of an embodiment of the system of the present invention shown in fig. 2. In this embodiment, the system includes at least a differentiating module 110, a setting module 120, and a creating module 130.
The differentiating module 110 is configured to determine a critical parameter and a non-critical parameter for parameters input by an interface of the system under test.
The setting module 120 is configured to preset a unified default value for the non-critical parameter, and key in a value related to the service test for the critical parameter.
A creating module 130, configured to create test data according to the value of the key parameter and the default value of the non-key parameter, and/or according to monitoring a value in a preset message body.
The differentiating module 110 specifically determines the key parameters and the non-key parameters of the parameters transmitted by the interface of the system to be tested, and selects the external service on which the system to be tested depends to reissue the message body and monitors the arrival of the message to trigger the functional business process of the system to be tested.
In one embodiment, the tool for creating the test data is actually an application APP or software, platform. Taking software as an example, it may be a well-developed program that can be used to quickly build an interface. Further, it may include at least an internal functional interface construction portion of the system to be tested and a message monitoring functional portion (external) or upstream and downstream nodes of the third party service on which the system to be tested depends, so as to rapidly complete functional verification of the system to be tested.
In one embodiment, the method of the present invention may first comb the interfaces that the system under test that needs to create test data may involve.
Carding interfaces such as: the interface can be judged in a system range (such as system internal/internal functions, external/dependent external functions or external systems) based on familiarity (experience) of the service after the corresponding interface document is acquired, and the interface is distinguished by manual service experience mainly in combination with a manual judgment mode. Further, the main flow interface link may be analyzed from the functional flow of the system under test, where internal functions (e.g., internal traffic) and external functions (e.g., external traffic on which the system under test depends) of the system under test may be involved.
In one embodiment, if the function verification is aimed at the internal function of the system to be tested related to the system to be tested, the function verification can be quickly realized by adding an interface-forming mode, and an initialization interface is created by calling a well-developed interface template in the application program APP for creating test data, thereby increasing the interface.
Further, a visual web page can be provided when developing the program, and a tester can intuitively obtain a preliminary (initialization/default) interface.
In one embodiment, if the message is directed to an external function of the system to be tested, that is, an external function relied on by the system to be tested, a corresponding message subject number can be constructed, and a preset message body template is selected, so that a preliminary (initialized/default) message body can be obtained. Thus, the node logic can be triggered by sending the message body and the message body can be monitored to obtain the incoming parameters.
In one embodiment, based on the service flow and service data of the system to be tested, the determination can be performed according to the influence surface of the input parameters (hereinafter referred to as parameter transmission) in the service, so as to determine whether the function of the parameter transmission value to be tested has substantial influence. The influence surface of the parameters is mainly judged by a manual mode and a code scanning mode. Specifically, based on the specific scene, the specific business process and the specific business data related to the system to be tested, the parameter transmission value can be obtained through a manual and/or code scanning mode, for example, the parameter transmission value can be obtained through a manual and code scanning mode. One example is: the code scanning can scan the code interface by means of the existing code scanning tool, thereby acquiring the parameter, and generating a detailed interface analysis result report by combining the necessary filling attribute, the parameter uniqueness and the degree (parameter reference degree) of the output parameter (called parameter for short) of the parameter for other interfaces, and manually analyzing which parameters are key parameters and which parameters can be preset as non-key parameters. The key measurement index is to see specific service realization, different services and different parameter key, so that the judgment is more accurate and effective by combining manual analysis.
Examples of determining critical parameters are:
for an interface that submits threads, the parameters that are entered are: activity id, recommender name, recommendator id, city, creation time, and update time. By analyzing the business, the interface is constructed, the influence of the name of the recommended person, the city, the creation time and the update time is small, but the activity id, the recommended person id and the recommended person id are very critical for the subsequent flow. Thus, the key parameters of the interface are activity id, recommendator id, and the non-key parameters are recommender name, recommendator name, city, creation time, and update time.
For message body interception through message subscription, such as sending external system business function message bodies, a test scenario is created that requires a vocational training system (third party/external, upstream/downstream nodes) to walk to the authenticated node to trigger the system under test to arrive at the authenticated revenue node internally. Analytically, the certified process of the vocational training system is very long, takes a long time if it is really to operate the process, and also requires an increase in familiarity and actual execution of iterative function implementation if the vocational training system performs function iteration, which increases unnecessary test costs. In one embodiment of the present invention, the authenticated status may be monitored by setting a message subject number for an external system on which the system under test depends. For example: the message body is created from a template/message body library and the reissued message body reaches an authenticated state quickly (i.e., can listen to parameters of the node needed based on the message subscription).
An example of an application: assuming an interface requires more than 30 parameters to be imported, by analyzing which of the parameters are decisive for the response result, for example, a commission generation rule submitting interface includes rule name, rule description, rule validation time, rule expiration time, recommended service type name, recommender type, rule validity period, rule city, rule time, rule node, rule new and old identification, rule submitting state, rule node description, rule node amount configuration, applicable crowd of rule node, commission type of rule sub-item, commission type, commission new and old configuration, commission-not-returned recommended service type, commission-not-returned recommender type, commission-node validation time, expiration time, rule node settlement by period, rule node settlement by month, settlement by natural day, secondary settlement without commission identity, secondary settlement amount, validation time and expiration time of secondary node, etc. In such a multitude of transfers, however, it can be determined from the business analysis that the critical parameters are actually only recommended business type, recommended person type, validation time and expiration time. Thus, it can be determined that these parameters, which are passed in through the interface, are truly influencing the use of the rules, and the rest are non-critical parameters, which do not have excessive influence on the subsequent flow, just to ensure the integrity of the rules.
In one embodiment, the created test data is test data of an overall business process involved in the system under test. Therein, the related processes of the internal functions of the system and the related processes outside the system may be included, for example: the state of the thread needs to be verified to be accurate, the thread needs to be submitted, and therefore an interface for submitting the thread needs to be called to create thread data, so that the state of the thread can be obtained, and the submitted thread belongs to the process of creating test data. For another example: now, it is required to reach the certified profit node of the vocational training, but the vocational training system is not a tested system, but an external system of the system to be tested, or a dependent third party, and although the system can actually reach the certified flow, the system is too time-consuming, cost-consuming and resource-consuming, and can reach the certified flow by submitting the message body of the message subject number to reissue the message body, for example, providing the corresponding message body (default value) from the message body library according to the message subject number, and modifying the specific value, and the reissue message body mode to reach the certified flow, so that the system can reach the certified flow quickly and the efficiency is improved.
By constructing interface data and the body of the concurrent message, namely based on interface creation and message subscription, the two can effectively assist the test means for testing the functions of the system to be tested.
It can be seen that in this embodiment of the present invention, the internal service of the system to be tested creates or adds the required interface according to the corresponding service scenario through the existing template, creates the message body for the external service of the system to be tested (the dependent third party system, etc.), and determines whether the one or more parameters are critical parameters through the combination of code scanning and manual judgment. Thereby narrowing the scope of creating test data and testing the critical parameters.
The setting module 120, in particular, in one embodiment, presets a unified default value for the non-critical parameter, e.g., invokes a default function, which may generate a random value based on the interface template and the random generator. Such as: non-critical parameters of a submission cue are recommender name, city, creation time, and update time. The recommender name and the recommendable name are in the form of character strings, which can be task characters, do not support idempotent, and can be directly fixed, for example, can be set into a preset fixed character, such as Zhang San, lisi and the like, and have no influence on the system to be tested; the cities belong to a table library code, and can be set as any city with no influence on the business process, for example, can be set as a preset fixed city; creation time and update time, time that can be directly taken into account, etc.
An example of an application may be that all the interface templates are provided with a setting, and on the interface that interacts with the person creating the test data, the selection types provided by means of a drop-down box, various menus, etc. may be given to these parameters that do not affect the whole system to be tested, and default values may be set. Such as the name of the recommender and the name of the recommender, the character type is selected, then the character type default program of the program can be called, and a default character is directly revealed back. For another example, selecting a city type may call a city default program, and the city has a default city code. Etc.
In one embodiment, the critical parameters are important parameters affecting the interface, so that they may be modified here, and the modification may include, but is not limited to: manually modifying, calling one or more preset functions to assist in generation, etc. For example, a one-month-sister-in-law is recommended to be a merchant, an identity card is a critical parameter, idempotent and real-name authentication is supported, a character cannot be typed randomly, the identity card type is required to be selected, and then an identity card random generator (random function) of a corresponding program can be called, so that a critical parameter (parameter transmission value) can be obtained quickly.
Further, the correlation of the parameters including part of specific logic of the parameters is not easy to generate, and may be some specific parameters in life, such as identification numbers, e.g. open id of WeChat, e.g. operation license, etc. or specific values of own system, some ids agreed in the system are not hit by typing errors, and these also need to be processed, a connection database is supported in a random function, and corresponding data can be found out as parameters by typing sql query statement. Thus, the accuracy of the input parameters can be ensured.
Further, some identification parameters, such as unique values, are such critical parameters that do not support idempotent, do not require duplication, such as registration interfaces in interfaces, require the incoming of non-duplicated handset numbers, i.e., the handset numbers must be unique and cannot be duplicated. Random function introduction, in the process of generating and inquiring data, specific values can be quickly removed and quickly constructed.
In addition, critical parameters must be unique, while non-critical parameters do not. Such as creation time, which may be unique, but which is a non-critical parameter in the internal traffic of many systems under test.
It can be seen that, in this embodiment of the present invention, after the key parameters and the non-key parameters are distinguished, a preset default value (for example, a value may be given by a default function) is given when an interface or a message body is created, and then a specific value of the key parameters is corrected (for example, a random function is corrected), so that a unified default value is randomly preset for the non-key parameters, and the corrected specific value is obtained by generating a random function and/or typing in an interactive interface for the key parameters (for example, a unique value that can be used by a system to be tested is obtained), so that a tester does not need to spend a lot of time to construct excessive service data.
The creation module 130, in particular, in one embodiment, the tool for creating the test data is actually a developed application APP or software, platform, which can be used for fast building of the interface. Further, it may include at least an internal function interface construction portion of the system under test and a message monitoring function portion (external) of a third party service on which the system under test depends, so as to rapidly complete function verification of the system under test.
In one embodiment, the main flow interface link is analyzed from the functional flow of the system under test to determine/distinguish between internal functions (e.g., internal traffic) and external functions (e.g., external traffic) of the system under test.
Further, if the process of distinguishing the key parameters from the non-key parameters is aimed at the internal functions of the system to be tested, an interface can be added, a well developed interface template of the system is called, and an initialization interface is created, so that the interface is added, a visual web page can be provided when a program is developed, and a tester can intuitively obtain a preliminary (initialization/default) interface.
Further, if the external function of the system to be tested is aimed at, the message subject number can be constructed, the preset message body template is selected, and a preliminary (initialized/default) message body is created.
In one embodiment, based on the service and service data of the system to be tested, the determination can be made according to the influence surface of the incoming parameter (referred to as the parameter transmission) in the service, so as to determine whether the parameter transmission value has substantial influence. The influence surface of the parameters is mainly determined by manual and code scanning. Specifically, based on the fact that the system to be tested specifically relates to the scene, the service and the service data, the system to be tested can be obtained through a manual and/or code scanning mode, for example, a manual and code scanning mode can be combined to obtain the parameter transmission, and the parameter transmission value is obtained, and the process of determining the key parameters is referred to. The key measurement index is that specific service realization needs to be seen, the services are different, and the key of the parameters is also different, so that the judgment is more effective by combining manual analysis. The interfaces of the system under test include the added interfaces, and it is determined whether the parameters entered through them are critical or non-critical, as described above.
The foregoing distinction is made as an example of one internal interface for system internal functions, commit threads: among the parameters entered, it is determined that the key parameters entered by the interface are an activity id, a recommender id, and the non-key parameters are a recommender name, a city, a creation time, and an update time.
The method is characterized in that the method is divided into external functions of a system, a business process of a vocational training system (an external system is not to be tested) is required to go to a certified node to trigger the inside of the system to be tested to reach a certified profit node, a test scene for generating an employment order is created, a certified state can be monitored by setting a message subject number without submitting a clue mode, the problem that the certified process of the vocational training system is overlong, excessive time is consumed because the process is not required to be executed, and test cost is not increased because the vocational training system performs function iteration is avoided.
In one embodiment, according to the foregoing interface and message body creation and parameter transmission key or non-key feature determination, default values may be preset uniformly for non-key parameters, and specific values may be modified for key parameters through interaction and/or random functions, for example, service test related values may be generated, so as to create required test data for the overall service flow related to the system to be tested according to the node logic status.
Further, the created test data includes data of some related processes of the external/external functions of the system in addition to data of parameters related to the interface created by some related processes of the internal functions.
The specific examples are: to verify that the state of a thread is accurate, the thread (internal) needs to be de-submitted, and thus the interface for submitting the thread needs to be called to create thread data (i.e., interface references), so that the state of the thread can be obtained, and the submitted thread is the test data.
And as another example: now, it is required to reach the certified profit node of the vocational training, but the vocational training system is not a tested system, belongs to a large external system of the system to be tested, or is a third party, and although the vocational training system can actually reach the certified flow, the vocational training system is too time-consuming, cost-consuming and resource-consuming, and can reach the vocational training system quickly by creating or submitting a message subject number to reissue a message body, so that the efficiency is improved.
Therefore, for the inside of the system, interface data can be constructed, and for the outside of the system, data can be obtained by monitoring (interception) of the message body of the third party system, so that more perfect test data for verifying the function of the system to be tested can be obtained, and the function of the system to be tested can be tested by effectively assisting in providing data between the data and the message body. The process of creating test data is not affected by setting and modifying parameters which are not critical or have no influence on system change, and the whole process including the related external process all require data and the like.
In one embodiment, external test data, such as a certified revenue node status monitoring MQ for vocational training, is obtained during testing: selecting and sending MQ information in a program, typing in an information subject number name for storage, adding a consumer in the service of an information body, then selecting a preset information body, wherein the preset information body is just like a receiving address, can be preset in advance, for example, in a Json character string form of key-value, can be typed in the preset information body, and the type of the value required to be selected is obtained as a default value; then, the specific value needs to be modified, the specific value setting and the specific value setting of the interface are the same random function library which is called, after the corresponding function is selected to quickly generate the specific value through the interactive interface, the message body is sent by clicking the reissue button, after the message body is sent, the message body is stored, and the next call can be continued; then, after the message body is successfully sent, by monitoring the message body, whether the profit node is reached can be queried. Thus, it is more efficient than actually taking the business side's flow. In this way, the function of sending message bodies can be supported, the test data can be created without actually going to the business flow for related business, and the test data can be created by monitoring the message bodies agreed by both parties.
It can be seen that this embodiment of the invention. The upstream service test data is quickly created by presetting a default value for the interface, and meanwhile, the test data is created by monitoring the message body of the related service party, so that the method is efficient and quick. The method and the device can distinguish the inside and the outside of the system to be tested, and acquire the data of the relevant node positions by distinguishing setting and constructing data of interface parameter transmission and combining with a message body mode outside monitoring, so that test data can be efficiently and accurately created, excessive learning and familiarity on service environment and service data of the system to be tested are not required, test data can be created and verified on the basis of message subscription and interface creation, and the creation of generalized test data based on message subscription is realized.
Therefore, the technical scheme for creating the test data can be widely applied to more service scenes and fields without having excessive service experience requirements for test data creator, is a generalized simple and efficient data creation scheme, and particularly for a third party outside a system, only needs to monitor a message body (namely based on message subscription) to obtain the test data of an upstream node or a downstream node, further simplifies the test data obtaining mode, and does not need to execute the flow of the third party to obtain the data related to the external functions of the system, namely directly use the data, thereby further improving the creation efficiency of the system test data.
Furthermore, the invention can quickly construct the interface and send the message body by presetting a default value for the interface or the message body and correcting a specific value through a random function. Default functions and random functions are cores, in which some construction functions with specific parameters are encapsulated, and secondary development is supported.
[ example 3 ]
A partner is mainly applied to an example of a specific scene of creating test data by an interface through the method of creating the test data by personnel creating the test data:
for functions within the system under test: newly adding 10 interfaces, wherein more than 30 input parameters exist; finding a key parameter of the incoming parameters, such as one or more key parameters, and typing a value related to the service for the key parameter; carrying out preset default value processing on other non-key parameters, namely presetting the non-key parameters to be uniform default values; whereas for a unique value a random function is introduced. Thus, the person who creates the test data need only type in key parameters and then click on the submit form to create the partner test data, i.e., the data of the upstream or associated business that is required for the test.
For functions outside the system to be tested: the function of sending message body can be added, and the test data can be created by monitoring the message body agreed by both parties without actually going to the business flow for the related business.
Therefore, upstream service test data can be quickly created by presetting a default value for an interface, and/or a message body monitoring node logic of a relevant service party is monitored by presetting a default value for a message body, so that the nodes can be quickly reached, the test data can be quickly created, and the method is efficient and convenient.
The specific application of the implementation of the foregoing embodiments 1, 2 of the solution of the present invention will be further described with reference to a functional schematic of an application shown in fig. 3.
Throughout the entire run of the system under test, there will be an internal functional portion 310 and an external functional portion 320. According to the service logic of the actual application scene of the system to be tested, for internal functions, especially newly added internal functions, internal test data are required to be obtained during testing, a corresponding initialization interface (preset with a unified default value) can be created according to an interface template library, and based on the service scene of the actual application of the system to be tested, which of the interface parameters belong to key parameters and which belong to non-key parameters are distinguished, specific value modification is performed on the key parameters through a random function generator and/or interface interaction, so that interface test data are constructed, an interface request is sent to perform testing, and the next interface is tested after an interface result is successfully returned; for external functions, external test data can be obtained by sending message bodies, selecting and sending message bodies, typing in message subject number names and storing, so that a consumer is newly added in the service of the message bodies, then selecting a preset message body from a message body library to obtain an initialization message body, also presetting default values (such as default values for adding keys and values), modifying the preset default values through a random function generator and/or interface interaction, modifying the required specific values, then reissuing the message body, storing the message body for subsequent calling after the message body is sent, monitoring the message body after the message body is sent successfully, triggering node logic to inquire whether a benefit node is reached, and obtaining test data.
In the specific scheme of the embodiment of the invention, the high-efficiency tool (software/program/platform) for creating the test data based on the message subscription is provided, and when the data of the upstream or related service is required to be used as the test data in the process of testing the general functional module, the test data is not required to be given by a counterpart (a third party), or the counterpart provides a service functional flow document and the like, and the counterpart is not required to be very unfamiliar with the service. The proposal of the invention mainly carries out carding on the service interface, and the transmission values of a plurality of necessary parameters have no substantial influence on the service and can be set as a default value. In addition, by adding the interface function, the interface input parameters can be preset with default values, for example, a cooperator newly adds an interface, more than 30 input parameters are provided, other parameters can be preset with unified default values except for a plurality of key parameters), and random functions are introduced for unique values, so that only key parameters are needed to be input. Then click on the submit form, and a partner test data is easily created. Further, the function of sending message bodies is supported, so that the test data is created without actually going away the business flow for related business, and the test data can be created by monitoring the message bodies agreed by the two parties. In general, the invention can quickly create upstream service test data by presetting a default value for the interface, and simultaneously creates the test data by monitoring the message body of the related service party, thereby being efficient and quick. Therefore, effective test data of the internal function and the external function can be obtained simply, quickly and quickly for any system to be tested which is not familiar with the service.
[ example 4 ]
Fig. 4 is a block diagram schematically illustrating a structure of an electronic device according to an embodiment of the present invention, the electronic device including a processor and a memory for storing a computer executable program, which when executed by the processor performs the topic identification method as in the foregoing embodiment 1.
As shown in fig. 4, the electronic device is in the form of a general purpose computing device. The processor may be one or a plurality of processors and work cooperatively. The invention does not exclude that the distributed processing is performed, i.e. the processor may be distributed among different physical devices. The electronic device of the present invention is not limited to a single entity, but may be a sum of a plurality of entity devices.
The memory stores a computer executable program, typically machine readable code. The computer readable program may be executable by the processor to enable an electronic device to perform the method, or at least some of the steps of the method, of the present invention.
The memory includes volatile memory, such as Random Access Memory (RAM) and/or cache memory, and may be non-volatile memory, such as Read Only Memory (ROM).
Optionally, in this embodiment, the electronic device further includes an I/O interface, which is used for exchanging data between the electronic device and an external device. The I/O interface may be a bus representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
More specifically, referring to a block diagram of a more specific example of the electronic apparatus according to the embodiment shown in fig. 5. The electronic device 200 of the exemplary embodiment is in the form of a general-purpose data processing device. The components of the electronic device 200 may include, but are not limited to: at least one processing unit 210, at least one memory unit 220, a bus 230 connecting the different system components (including the memory unit 220 and the processing unit 210), a display unit 240, and the like.
The storage unit 220 stores therein a computer readable program, which may be a source program or code of a program that is read only. The program may be executed by the processing unit 210 such that the processing unit 210 performs the steps of various embodiments of the present invention. For example, the processing unit 210 may perform the respective steps of the methods of the foregoing embodiments 2 to 5.
The memory unit 220 may include readable media in the form of volatile memory units, such as Random Access Memory (RAM) 2201 and/or cache memory 2202, and may further include Read Only Memory (ROM) 2203. The storage unit 220 may also include a program/utility 2204 having a set (at least one) of program modules 2205, such program modules 2205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 230 may be a bus representing one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 200 may also communicate with one or more external devices 300 (e.g., keyboard, display, network device, bluetooth device, etc.), such that a user can interact with the electronic device 200 via the external devices 300, and/or such that the electronic device 200 can communicate with one or more other data processing devices (e.g., router, modem, etc.). Such communication may occur through an input/output (I/O) interface 250, and may also occur through a network adapter 260 to one or more networks, such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet. Network adapter 260 may communicate with other modules of electronic device 200 via bus 230. It should be appreciated that although not shown, other hardware and/or software modules may be used in electronic device 200, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
It should be understood that the electronic device shown in fig. 4 and 5 is only an example of the present invention, and the electronic device of the present invention may further include elements or components not shown in the above examples. For example, some electronic devices further include a display unit such as a display screen, and some electronic devices further include a man-machine interaction element such as a button, a keyboard, and the like. The electronic device may be considered as covered by the invention as long as the electronic device is capable of executing a computer readable program in a memory for carrying out the method or at least part of the steps of the method.
[ example 5 ]
Fig. 6 is a schematic diagram of a computer-readable recording medium of an embodiment of the present invention. As shown in fig. 6, a computer-readable recording medium stores a computer-executable program that, when executed, implements the topic identification method of the present invention described above. The computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable storage medium may also be any readable medium that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
From the above description of embodiments, those skilled in the art will readily appreciate that the present invention may be implemented by hardware capable of executing a specific computer program, such as the system of the present invention, as well as electronic processing units, servers, clients, handsets, control units, processors, etc. included in the system, as well as by a vehicle comprising at least a portion of the above system or component. The invention may also be implemented by computer software executing the method of the invention, for example by control software executed by a microprocessor, an electronic control unit, a client, a server, etc. on the locomotive side. It should be noted that the computer software for performing the method according to the present invention is not limited to be executed by one or a specific hardware entity, but may be implemented in a distributed manner by unspecified specific hardware, for example, some method steps executed by a computer program may be executed at the locomotive end, and another part may be executed in a mobile terminal or a smart helmet, etc. For computer software, the software product may be stored on a computer readable storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), or may be stored distributed over a network, as long as it enables the electronic device to perform the method according to the invention.
From the foregoing description of embodiments, those skilled in the art will readily appreciate that the exemplary embodiments of the present invention described herein may be implemented in software, or may be implemented in software in combination with necessary hardware.
The above-described specific embodiments further describe the objects, technical solutions and advantageous effects of the present invention in detail, and it should be understood that the present invention is not inherently related to any particular computer, virtual device or electronic apparatus, and various general-purpose devices may also implement the present invention. The foregoing description of the embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.

Claims (9)

1. A method of creating test data for an overall business process of a system under test, comprising:
analyzing a main flow interface link from a functional flow of a system to be tested, which needs to create test data, acquiring a corresponding interface document, judging the range of an internal function or an external function of an interface of the system to be tested based on experience of service, and combing out the interface which the system to be tested can relate to, wherein the method comprises the following steps: if the function is an internal function, creating an initialization interface through interface template library and/or interface interaction according to a default function; if the external function is the external function, creating an initialization message body based on the message subscription and corresponding to an external system on which the system to be tested indicated by the external function depends;
Determining key parameters and non-key parameters for parameters transmitted by an interface of a system to be tested, including: based on the business flow and business data of the system to be tested, the influence surface of one or more parameters transmitted by the interface of the system to be tested in the business comprises a parameter transmission mandatory property, uniqueness and parameter output reference degree, whether the parameter transmission value has substantial influence on the function of the system to be tested or not is judged, the parameters which can substantially influence the response result of the business rule are key parameters, and the parameters which cannot substantially influence the business rule are non-key parameters;
unifying preset default values for the non-critical parameters and correcting specific values for the critical parameters comprises: based on the preset default value, correcting the preset default provided by the key parameter when the interface is created according to a random function and interface interaction to obtain a modified specific value;
and creating test data for testing the system to be tested according to the specific value of the parameter corresponding to the interface and the default value of the non-key parameter and/or according to the node triggered by the monitored reissued message body.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the creating an initialization message body includes:
Corresponding to the service added by the external system, constructing a corresponding message subject number through interface interaction selection, selecting a corresponding message body according to a default value and a message body library, and reissuing the message body.
3. The method according to claim 2, wherein corresponding to the service added by the external system, a corresponding message subject number is constructed by interface interaction selection, and a corresponding message body is selected and reissued according to a default value and a message body library, specifically comprising:
modifying the selected corresponding message body through a random function to obtain a specific value;
and monitoring the reissued message body at fixed time or in real time to determine the node triggering of the external function of the corresponding third party system.
4. A method according to any one of claims 1 to 3, wherein determining critical and non-critical parameters for parameters entered by an interface of a system under test, further comprises:
and acquiring parameters in a code scanning mode based on the internal service corresponding to the internal function in the system to be tested and the external service of the external system on which the system to be tested depends corresponding to the external function.
5. The method of claim 1, wherein default values are uniformly preset for the non-critical parameters and specific values are revised for the critical parameters, further comprising:
Generating a preset default value of the non-key parameter when the interface is created based on the interface template and the random generator according to the default value function; and, making the correction to obtain the modified specific value includes: the method comprises the steps of manually modifying and calling one or more preset random functions to assist in generation.
6. Method according to claim 1, characterized in that the creation of test data for testing the system under test is performed according to the specific values of the parameters and the default values of the non-critical parameters corresponding to the interfaces and/or according to the nodes triggered by the monitored body of the reissued messages, comprising in particular:
generating test data according to specific values of corresponding key parameters and default values of non-key parameters in an interface of the system to be tested, and sending an interface request;
and/or the number of the groups of groups,
and according to the message body, obtaining a specific value of the message body corresponding to a node on a flow link of the system to be tested, which is triggered by an external system on which the system to be tested depends, and generating test data.
7. A system for creating test data for an overall business process of a system under test, comprising:
the differentiating module is used for analyzing a main flow interface link from a functional flow of a system to be tested, which needs to create test data, acquiring a corresponding interface document, judging the range of an internal function or an external function of an interface of the system to be tested based on experience of service, and combing out the interface which the system to be tested can relate to, and comprises the following steps: if the function is an internal function, creating an initialization interface through interface template library and/or interface interaction according to a default function; if the external function is the external function, creating an initialization message body based on the message subscription and corresponding to an external system on which the system to be tested indicated by the external function depends; and determining key parameters and non-key parameters of parameters transmitted by an interface of the system to be tested comprises: based on the business flow and business data of the system to be tested, the influence surface of one or more parameters transmitted by the interface of the system to be tested in the business comprises a parameter transmission mandatory property, uniqueness and parameter output reference degree, whether the parameter transmission value has substantial influence on the function of the system to be tested or not is judged, the parameters which can substantially influence the response result of the business rule are key parameters, and the parameters which cannot substantially influence the business rule are non-key parameters;
The setting module is configured to preset a default value for the non-key parameters and correct a specific value for the key parameters, and includes: based on the preset default value, correcting the preset default provided by the key parameter when the interface is created according to a random function and interface interaction to obtain a modified specific value;
the creation module is used for creating test data for testing the system to be tested according to the specific value of the parameter corresponding to the interface and the default value of the non-key parameter and/or according to the node triggered by the monitored and reissued message body.
8. An electronic device comprising a processor and a memory for storing a computer executable program, characterized in that:
the computer program, when executed by the processor, performs the method of any of claims 1 to 6.
9. A computer readable storage medium storing a computer executable program, wherein the computer executable program when executed implements the method of any one of claims 1 to 6.
CN202110606332.4A 2021-05-31 2021-05-31 Method, system, equipment and medium for creating test data Active CN113282499B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110606332.4A CN113282499B (en) 2021-05-31 2021-05-31 Method, system, equipment and medium for creating test data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110606332.4A CN113282499B (en) 2021-05-31 2021-05-31 Method, system, equipment and medium for creating test data

Publications (2)

Publication Number Publication Date
CN113282499A CN113282499A (en) 2021-08-20
CN113282499B true CN113282499B (en) 2024-02-09

Family

ID=77282889

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110606332.4A Active CN113282499B (en) 2021-05-31 2021-05-31 Method, system, equipment and medium for creating test data

Country Status (1)

Country Link
CN (1) CN113282499B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107122297A (en) * 2017-04-18 2017-09-01 上海雷腾软件股份有限公司 The method and apparatus that request message for test interface is generated
CN108563569A (en) * 2018-04-11 2018-09-21 中国电子科技集团公司第十四研究所 A kind of warnlng surveillance system automation interface test method
CN109558525A (en) * 2018-12-12 2019-04-02 北京锐安科技有限公司 A kind of generation method of test data set, device, equipment and storage medium
CN109918300A (en) * 2019-02-27 2019-06-21 苏州浪潮智能科技有限公司 A kind of test data preparation method, device, terminal and storage medium
CN110347590A (en) * 2019-06-18 2019-10-18 平安普惠企业管理有限公司 The interface testing control method and device of operation system
CN110597714A (en) * 2019-08-28 2019-12-20 深圳市彬讯科技有限公司 Kafka message testing method and device, computer equipment and storage medium
CN110888797A (en) * 2019-10-11 2020-03-17 平安信托有限责任公司 Test data generation method and device, computer equipment and storage medium
CN111221735A (en) * 2020-01-08 2020-06-02 福建博思软件股份有限公司 System for automatically generating service interaction test script
CN112162915A (en) * 2020-08-27 2021-01-01 杭州大搜车汽车服务有限公司 Test data generation method, device, equipment and storage medium
CN112579446A (en) * 2020-12-10 2021-03-30 北京软通智慧城市科技有限公司 Interface testing method and device, electronic equipment and storage medium
CN112817853A (en) * 2021-01-30 2021-05-18 北京奇保信安科技有限公司 Automatic test method, system and electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8429614B2 (en) * 2008-06-23 2013-04-23 International Business Machines Corporation Method and apparatus of effective functional test data generation for web service testing
US10002069B2 (en) * 2016-09-23 2018-06-19 International Business Machines Corporation Automated testing of application program interface
US10698793B2 (en) * 2018-08-23 2020-06-30 International Business Machines Corporation Function-message oriented test case generation for supporting continuous globalization verification testing

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107122297A (en) * 2017-04-18 2017-09-01 上海雷腾软件股份有限公司 The method and apparatus that request message for test interface is generated
CN108563569A (en) * 2018-04-11 2018-09-21 中国电子科技集团公司第十四研究所 A kind of warnlng surveillance system automation interface test method
CN109558525A (en) * 2018-12-12 2019-04-02 北京锐安科技有限公司 A kind of generation method of test data set, device, equipment and storage medium
CN109918300A (en) * 2019-02-27 2019-06-21 苏州浪潮智能科技有限公司 A kind of test data preparation method, device, terminal and storage medium
CN110347590A (en) * 2019-06-18 2019-10-18 平安普惠企业管理有限公司 The interface testing control method and device of operation system
CN110597714A (en) * 2019-08-28 2019-12-20 深圳市彬讯科技有限公司 Kafka message testing method and device, computer equipment and storage medium
CN110888797A (en) * 2019-10-11 2020-03-17 平安信托有限责任公司 Test data generation method and device, computer equipment and storage medium
CN111221735A (en) * 2020-01-08 2020-06-02 福建博思软件股份有限公司 System for automatically generating service interaction test script
CN112162915A (en) * 2020-08-27 2021-01-01 杭州大搜车汽车服务有限公司 Test data generation method, device, equipment and storage medium
CN112579446A (en) * 2020-12-10 2021-03-30 北京软通智慧城市科技有限公司 Interface testing method and device, electronic equipment and storage medium
CN112817853A (en) * 2021-01-30 2021-05-18 北京奇保信安科技有限公司 Automatic test method, system and electronic equipment

Also Published As

Publication number Publication date
CN113282499A (en) 2021-08-20

Similar Documents

Publication Publication Date Title
Zheng et al. Xblock-eth: Extracting and exploring blockchain data from ethereum
US11099973B2 (en) Automated test case management systems and methods
CN104391934B (en) Data verification method and device
CN101135989B (en) Automatization test method and device for Web applied system
US9483387B1 (en) Tree comparison functionality for services
US9419804B2 (en) Data authenticity assurance method, management computer, and storage medium
CN102122265B (en) System and method for verifying computer software test results
KR100945282B1 (en) Verifying method for implementing management software
CN104572122A (en) Software application data generating device and method
CN111694743A (en) Service system detection method and device
KR102226463B1 (en) UI/UX solution providing server linked with process automation program, process automation method using the same, and computer program executing the same
CN115016978A (en) Data verification method and device, computer storage medium and electronic equipment
Wang et al. MetaOJ: A massive distributed online judge system
CN113037505B (en) Method and system for realizing trusted Web application
CN114281784A (en) Transaction log playback method, device, equipment and medium for distributed core system
CN113282499B (en) Method, system, equipment and medium for creating test data
CN116126392B (en) Code version management method based on blockchain and IPFS
CN112015715A (en) Industrial Internet data management service testing method and system
Damiani et al. Ws-certificate
CN103729451B (en) A kind of information input method of database, apparatus and system
US20230007894A1 (en) Intelligent Dynamic Web Service Testing Apparatus in a Continuous Integration and Delivery Environment
KR20230132878A (en) Reduce transaction cancellations in execute-order-verify blockchain models
CN113835999A (en) Workflow-based testing method for distributed heterogeneous processing system
CN108416023B (en) Method for simulating user operation to write back system data
CN113468001A (en) Method and device for testing interface processing logic

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