Data generation method, device, equipment and storage medium
By obtaining online environmental data and user data to generate test data and environmental data, the problem of insufficient accuracy of environmental data in the prior art is solved, and the reliability and effectiveness of test results are improved.
Patent Information
- Application Number
- CN202111239063.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-25
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2041-10-25
AI Technical Summary
In the prior art, the environmental data generated by the interpolation method has insufficient accuracy, resulting in insufficient reliability when applied to the actual environment.
By obtaining the user data in the online environment identified by the user to be tested and the online environment data of the target activity, the test data and environmental data of the activity to be tested are generated to ensure that the environmental data is consistent with the characteristics of the actual activity to the greatest extent.
Improve the reliability and effectiveness of data testing, avoid errors in application of test data in actual activities, and enhance the reliability and usability of test results.
Smart Images

Figure CN113919883B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data processing, and in particular, to a data generation method, apparatus, device, and storage medium. Background Art
[0002] In daily testing work, whenever a certain activity requirement is developed and ready for testing, test data and environment data need to be prepared first before the testing can start normally. Among them, the environment data refers to the activity data related to the activity requirement to be tested this time or the associated data related to the activity.
[0003] In the prior art, the environment data is usually generated only by inserting data. The inventors found in the research process that: the environment data generated by the method of inserting data is prone to the problem of insufficient data accuracy, which in turn leads to insufficient reliability when the test results are applied in the actual environment. Summary of the Invention
[0004] The present disclosure provides a data generation method, apparatus, device, and storage medium to improve the reliability and usability of activity test results.
[0005] In a first aspect, the present disclosure provides a data generation method, and the data generation method includes:
[0006] Determine the user identifier to be tested;
[0007] Obtain the user data corresponding to the user identifier to be tested in the online environment;
[0008] Obtain the online environment data of the target activity, where the target activity is an activity related to the activity to be tested;
[0009] Generate the test data and environment data of the activity to be tested based on the online environment data and the user data, where the test data is used to test the activity to be tested in the test environment constructed by the environment data.
[0010] Optionally, obtaining the user data corresponding to the user identifier to be tested in the online environment includes: obtaining the corresponding number usage information based on the user identifier to be tested; obtaining the relevant service usage information of the user to be tested in the server database based on the user identifier to be tested.
[0011] Optionally, obtaining the relevant service usage information of the user to be tested in the server database based on the user identifier to be tested includes: obtaining the corresponding user identity characteristics of the user to be tested based on the user identifier to be tested and a preset configuration file; obtaining the relevant service usage information of the corresponding user to be tested saved in the server based on the user identity characteristics.
[0012] Optionally, it further includes at least one of the following: saving the number usage information to the test cache; saving the relevant service usage information to the user database for testing.
[0013] Optionally, obtain the online environment data of the target activity, including: determining the activity identification identifier of the target activity; obtaining the corresponding activity record data based on the activity identification identifier; obtaining the corresponding activity configuration data in the online environment database based on the activity identification identifier.
[0014] Optionally, determining the activity identification identifier of the target activity includes: determining the characteristic parameters of the target activity; determining the activity identification identifier of the target activity based on the characteristic parameters.
[0015] Optionally, it further includes: after determining the characteristic parameters, if it is determined that there is no target activity corresponding to the characteristic parameters, determining the alternative activity with the highest similarity to the characteristic parameters; obtaining the online environment data of the alternative activity, and the online environment data of the alternative activity is used to replace the online environment data of the target activity for testing.
[0016] Optionally, obtaining the corresponding activity configuration data in the online environment database based on the activity identification identifier includes: obtaining the activity configuration characteristic code corresponding to the activity identification identifier based on the activity identification identifier and the preset configuration file; obtaining the corresponding activity configuration data saved in the server based on the activity configuration characteristic code.
[0017] Optionally, after obtaining the online environment data of the target activity, it includes: saving the activity record data to the test cache; saving the activity configuration data to the environment database for testing.
[0018] Optionally, generating the test data and environment data of the activity to be tested based on the online environment data and user data includes: obtaining the modification of the activity record data and / or activity configuration data to obtain the modified online environment data; generating the test data and environment data of the activity to be tested based on the modified online environment data and user data.
[0019] Optionally, generating the test data and environment data of the activity to be tested based on the online environment data and user data includes: obtaining the modification of the number usage information and / or relevant service usage information to obtain the modified user data; generating the test data and environment data of the activity to be tested based on the online environment data and the modified user data.
[0020] Optionally, before obtaining the user data corresponding to the user identifier to be tested in the online environment, it further includes at least one of the following: deleting the user data saved in the test cache; deleting the online environment data saved in the test cache.
[0021] Optionally, after generating test data and environment data for the activity to be tested based on online environment data and user data, it further includes: after substituting the test data into the test environment constructed by the environment data and testing, saving the test results based on the users of the test.
[0022] In a second aspect, the present disclosure provides a data generation device, and the data generation device includes:
[0023] A determination module, configured to determine a user identifier to be tested;
[0024] An acquisition module, configured to acquire user data corresponding to the user identifier to be tested in the online environment; and, acquire online environment data of a target activity, where the target activity is an activity related to the activity to be tested;
[0025] A processing module, configured to generate test data and environment data for the activity to be tested based on the online environment data and user data, where the test data is used to test the activity to be tested in the test environment constructed by the environment data.
[0026] Optionally, the acquisition module is specifically configured to acquire corresponding number usage information based on the user identifier to be tested; and acquire relevant service usage information of the user to be tested in the server database based on the user identifier to be tested.
[0027] Optionally, the acquisition module is specifically configured to obtain the corresponding user identity characteristics of the user to be tested based on the user identifier to be tested and a preset configuration file; and acquire the corresponding relevant service usage information of the user to be tested saved in the server based on the user identity characteristics.
[0028] Optionally, the acquisition module is further configured to save the number usage information to the test cache; and / or save the relevant service usage information to the user database for testing.
[0029] Optionally, the acquisition module is specifically configured to determine an activity identification identifier of the target activity; obtain corresponding activity record data based on the activity identification identifier; and obtain corresponding activity configuration data in the online environment database based on the activity identification identifier.
[0030] Optionally, the acquisition module is specifically configured to determine characteristic parameters of the target activity; and determine the activity identification identifier of the target activity based on the characteristic parameters.
[0031] Optionally, after determining the characteristic parameters, if it is determined that there is no target activity corresponding to the characteristic parameters, the acquisition module is further configured to determine an alternative activity with the highest similarity to the characteristic parameters; and acquire the online environment data of the alternative activity, where the online environment data of the alternative activity is used to replace the online environment data of the target activity for testing.
[0032] Optionally, the obtaining module is specifically configured to obtain an activity configuration feature code corresponding to the activity recognition identifier based on the activity recognition identifier and a preset configuration file; and obtain corresponding activity configuration data stored in the server based on the activity configuration feature code.
[0033] Optionally, the obtaining module is further configured to save the activity record data to a test cache; and save the activity configuration data to an environment database for testing.
[0034] Optionally, the processing module is specifically configured to obtain modifications to the activity record data and / or the activity configuration data to obtain modified online environment data; and generate test data and environment data for the activity to be tested based on the modified online environment data and the user data.
[0035] Optionally, the processing module is specifically configured to obtain modifications to the number usage information and / or the related service usage information to obtain modified user data; and generate test data and environment data for the activity to be tested based on the online environment data and the modified user data.
[0036] Optionally, the obtaining module is further configured to delete the user data saved in the test cache; and / or delete the online environment data saved in the test cache before obtaining the user data corresponding to the user identifier to be tested in the online environment.
[0037] Optionally, the processing module is further configured to, after generating the test data and the environment data for the activity to be tested based on the online environment data and the user data, substitute the test data into the test environment constructed by the environment data for testing, and save the test result based on the tester.
[0038] In a third aspect, the present disclosure further provides an electronic device, which includes:
[0039] At least one processor;
[0040] And a memory communicatively connected to the at least one processor;
[0041] Wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the electronic device to execute the data generation method corresponding to any one of the first aspects of the present disclosure.
[0042] In a fourth aspect, the present disclosure further provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the data generation method according to any one of the first aspects of the present disclosure.
[0043] The data generation method, device, equipment and storage medium provided by the present disclosure determine the user identifier to be tested to obtain the user data corresponding to the user identifier to be tested in the online environment, obtain the online environment data of the target activity, and then generate the test data and environment data of the activity to be tested based on the online environment data and the user data. Since the environment data for testing is obtained from the data corresponding to the existing activities online, it can effectively ensure that the environment data fits the characteristics of the actual activity to the greatest extent, avoid errors in the application of the test data in the actual activity, and thus improve the reliability and effectiveness of the data test. Brief Description of the Drawings
[0044] The drawings herein are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure.
[0045] Figure 1 It is an application scenario diagram of the data generation method provided by an embodiment of the present disclosure;
[0046] Figure 2 It is a flowchart of the data generation method provided by an embodiment of the present disclosure;
[0047] Figure 3 It is a flowchart of the data generation method provided by another embodiment of the present disclosure;
[0048] Figure 4 It is a schematic structural diagram of the data generation device provided by another embodiment of the present disclosure;
[0049] Figure 5 It is a schematic structural diagram of the electronic device provided by another embodiment of the present disclosure.
[0050] Through the above-mentioned drawings, the clear embodiments of the present disclosure have been shown, and there will be more detailed descriptions hereinafter. These drawings and text descriptions are not intended to limit the scope of the concept of the present disclosure in any way, but to illustrate the concept of the present disclosure to those skilled in the art by referring to specific embodiments. Detailed Embodiments
[0051] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0052] The following uses specific embodiments to elaborate in detail on the technical solutions of the present disclosure and how the technical solutions of the present disclosure solve the above technical problems. The following several specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The following will describe the embodiments of the present disclosure in conjunction with the accompanying drawings.
[0053] When existing network communication operators prepare to launch activities, they need to first internally design the environmental data related to the activities, and then design the user data to be substituted into the environmental data to test whether the activities can meet the set requirements, such as achieving the set benefits or determining how many users can meet the participation conditions of the activities. However, since the actual activity data also involves many functions of data exchange with third parties, such as the situation of calling users to use third-party payment or traffic, these functions and corresponding interfaces are usually difficult to test in internal tests. As a result, there are problems of insufficient accuracy and insufficient reliability in the application of the environmental data designed in the prior art.
[0054] To solve the above problems, the embodiments of the present disclosure provide a data generation method, which generates corresponding environmental data based on the existing activity data in the online environment. Thus, the functions and interfaces included in the online environment data can be directly utilized, improving the usability and reliability of the environmental data.
[0055] The following explains the application scenarios of the embodiments of the present disclosure:
[0056] Figure 1 is an application scenario diagram of the data generation method provided by the embodiments of the present disclosure. As Figure 1 shown, in the data generation process, the server 100 generates user data 110 representing potential customers and environmental data 120 representing the activities to be tested respectively, and then substitutes the user data 110 into the environmental data 120 to test whether the activities can pass normally or whether the activity goals can be achieved normally.
[0057] It should be noted that Figure 1 only one example of user data and environmental data is shown in the scenario, but the present disclosure is not limited thereto. That is to say, the number of user data and environmental data can be arbitrary.
[0058] The following details the data generation method provided by the present disclosure through specific embodiments. It should be noted that the following several specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0059] Figure 2 is a flowchart of the data generation method provided by an embodiment of the present disclosure. As Figure 2 shown, it includes the following steps:
[0060] Step S201: Determine the user identifier to be tested.
[0061] Specifically, the user to be tested is a user who may accept the services provided by the service provider, generally a user who may potentially participate in the activity to be tested. The activity to be tested is provided by the service provider. When the service provider is a network operator or a communication operator, the user is the corresponding network or communication user. When the service provider is an online application development operator, the user is a registered user of the online application.
[0062] The identifier of the user to be tested is the identification code corresponding to the user to be tested. Corresponding to the network operator or communication operator, the identifier of the user to be tested can be their registered network account or communication account, such as a mobile phone number. The identifier of the user to be tested corresponding to the online application can be the user's registered account.
[0063] Generally, after determining the user identifier to be tested, information related to the user to be tested in the server can be obtained, such as the traffic package situation corresponding to the mobile phone number used by the user to be tested.
[0064] Step S202: Obtain the user data corresponding to the user identifier to be tested in the online environment.
[0065] Specifically, the online environment is the actual usage environment provided by the service provider used by the user to be tested. The user identifier to be tested in the online environment can be the actually used mobile phone number or the user account.
[0066] User data is used to represent the relevant data of the corresponding service of the user to be tested. It can be the usage information of the user to be tested in the relevant service, such as the usage duration or payment situation of a VIP member; it can also be the relevant information provided by the user to be tested itself during registration, such as whether the user is a minor; thus facilitating the screening of whether the user can participate in the designed activity.
[0067] In some embodiments, the existing user data obtained is limited to the necessary data that the user needs to provide during the use of the service, and the user data is only used as the data prototype required for testing, without involving the use of the original user data. Therefore, there is no situation of leakage of relevant sensitive information, thus ensuring data security.
[0068] Step S203: Obtain the online environment data of the target activity.
[0069] Among them, the target activity is an activity related to the activity to be tested.
[0070] Specifically, the target activity is an actual activity that the service provider has already provided, and the conditions or objectives of the target activity are related to the activity to be tested. For example, if the activity to be tested is a recharge and gift - return activity, then a similar recharge activity can be selected as the target activity. Therefore, the target activity can be selected as a reference for designing the activity to be tested.
[0071] Furthermore, the online environment data of the target activity refers to the relevant data of the target activity stored in the actual online database, such as the number of participants and revenue of the activity, or it can also be the configuration data of the activity itself, such as the conditions for participating in the activity, the basic requirements of the activity, or the tasks that need to be completed for the activity to be considered achieved.
[0072] The activity data of the activity to be tested can be obtained by adjusting or modifying the online environment data of the target activity, or it can be improved and corrected by comparing with the online environment data of the target activity on the basis of the activity data designed by developers to ensure the reliability and usability of the activity to be tested.
[0073] Step S204: Generate the test data and environment data of the activity to be tested based on the online environment data and user data.
[0074] Among them, the test data is used to test the activity to be tested in the test environment constructed by the environment data.
[0075] Specifically, the test environment constructed by the environment data is used as the test version of the activity to be launched, that is, the activity to be tested. By using the user data or the data adjusted from the user data as the test data and substituting it into the test environment, it is tested whether the environment data can run normally. And through repeated testing, it is determined whether the activity to be tested meets the set requirements.
[0076] In some embodiments, the execution effect of the activity to be tested can also be predicted through a large number of tests and in combination with the data of the target activity.
[0077] The data generation method provided by the embodiments of the present disclosure determines the user identifier to be tested to obtain the user data corresponding to the user identifier to be tested in the online environment, and obtains the online environment data of the target activity. Then, based on the online environment data and user data, the test data and environment data of the activity to be tested are generated. Since the environment data for testing is obtained from the corresponding data of the activities that already exist online, it can effectively ensure that the environment data maximally conforms to the characteristics of the actual activity, avoid errors in the application of the test data in the actual activity, and thus improve the reliability and effectiveness of the data test.
[0078] Figure 3 This is a flowchart of a data generation method provided by the present disclosure. As Figure 3As shown in the figure, the data generation method provided in this embodiment includes the following steps:
[0079] Step S301: Determine the user identifier to be tested.
[0080] In some embodiments, there is generally more than one user to be tested in actual testing to ensure the reliability of the test. The identifier of one user to be tested can be used, and then by repeatedly adjusting the relevant information corresponding to the identifier of the user to be tested, multiple sets of user data for testing can be obtained; multiple existing identifiers of users to be tested can also be randomly selected, and their corresponding user data, or the adjusted user data, can be substituted into the test respectively.
[0081] Step S302: Based on the user identifier to be tested, obtain the corresponding number usage information.
[0082] Specifically, the number usage information is used to identify the relevant data on the usage situation of the number corresponding to the user identifier to be tested. For example, if the user identifier to be tested is a mobile phone number, the corresponding number usage information can be the card opening time, card opening channel, mobile phone purchase package, monthly consumption situation, call duration, etc.; if the user identifier to be tested is a user account, the corresponding number usage information can be the account establishment time, the server to which it belongs, the recharge situation, the content purchased by payment, etc.
[0083] Since the same user to be tested may have multiple identifiers or numbers, such as having multiple "secondary accounts", there may also be a situation where one user to be tested corresponds to multiple sets of number usage information. However, the user identifier to be tested and the number usage information are in one-to-one correspondence, that is, only the number usage information corresponding to the determined user identifier to be tested is involved here.
[0084] Optionally, delete the user data saved in the test cache.
[0085] Specifically, before obtaining and saving the number usage information of the user to be tested into the test database, it is generally necessary to delete the previous records to avoid interference with each other.
[0086] Step S303: Based on the user identifier to be tested, obtain the relevant service usage information of the user to be tested in the server database.
[0087] Specifically, the relevant service usage information is used to represent other relevant information of the user except the number usage information corresponding to the user identifier to be tested, such as the relevant information filled in during the registration process, or the overall consumption record of the user at the network operator. If a user has handled three phone cards at the communication operator, each phone card corresponds to a user identifier to be tested, and the phone number of one of the phone cards only corresponds to the number usage information of that phone card. The user's own relevant information, such as gender, age, and the number of phone cards handled, belongs to the relevant service usage information.
[0088] Further, a method for obtaining relevant service usage information includes:
[0089] Step 1 (not shown), based on the user identifier to be tested and a preset configuration file, obtain the user identity characteristics corresponding to the user to be tested.
[0090] Since the identifier of the user to be tested is not directly corresponding to the relevant service usage information, for example, a phone card number does not correspond to other phone card numbers of the same user. Generally, it is necessary to obtain the user identity characteristics of the user to be tested through the identifier of the user to be tested, and determine its registered identity according to the configuration file, such as the user IP, or query the registered identity information of the user through the phone card number.
[0091] Step 2 (not shown), based on the user identity characteristics, obtain the relevant service usage information of the corresponding user to be tested saved in the server.
[0092] In some embodiments, the server of the service provider usually saves the relevant service usage information based on the user identity characteristics to centrally save the number usage information of multiple user identifiers applied by the same user for convenient invocation; at this time, through the user identity characteristics, the corresponding relevant service usage information can be obtained.
[0093] Specifically, generally in obtaining the relevant service usage information, testers only communicate with the service provider to obtain the user-related information saved by the service provider to handle the situation where the user has multiple identifiers, thereby enriching the authenticity and reliability of data testing and ensuring the reliability of user data in actual simulation.
[0094] At the same time, it is also possible to further adjust the environmental data of the activity to be tested according to the relevant service usage information, and improve the reliability of the simulation by adjusting the limiting conditions of the simulation activity. For example, limit the object of the activity push to the back-to-school discount activity for students.
[0095] Optionally, it further includes: saving the number usage information to the test cache and saving the relevant service usage information to the user database for testing.
[0096] Specifically, the number usage information can be directly used as the data for testing after modification, and the relevant service usage information, after being adjusted, is used to cooperate with the environmental data to simulate the fitness of the user data and the activity to be tested in the test, so as to avoid the situation where a large number of expected users actually cannot participate in the activity to be tested in the design.
[0097] Step S304, determine the activity identification identifier of the target activity.
[0098] Specifically, the target activity is saved in the online database with a corresponding activity identification identifier for record keeping. Therefore, as long as the activity identification identifier is known, the target activity can be quickly determined and the corresponding online environment data can be obtained.
[0099] Step S305: Determine the characteristic parameters of the target activity.
[0100] The characteristic parameters refer to the relevant characteristic information of the target activity, such as the duration of the activity, the activity type, the activity object type, the specific requirements of the activity or the range of requirements.
[0101] In some embodiments, when the identification identifier of the target activity is uncertain, the characteristic parameters of the activity to be tested can be determined first, and then the corresponding target activity can be screened through the characteristic parameters.
[0102] Usually, when screening through characteristic parameters, multiple characteristic parameters need to be combined to narrow the optional range.
[0103] Step S306: Determine the activity identification identifier of the target activity based on the characteristic parameters.
[0104] Relevant activities can be screened through the characteristic parameters, and then the target activity for testing can be selected from them, and then its corresponding activity identifier can be obtained.
[0105] Step S307: Obtain the corresponding activity record data based on the activity identification identifier.
[0106] Specifically, the activity record data can also be the record data of the gifts required for the activity, such as the specific cashback-related information for recharge cashback, or the relevant configuration information of the traffic required when giving away traffic. Through the activity record data, the corresponding gifts can be called to ensure the smooth completion of the whole process of the activity.
[0107] In some embodiments, the activity record data can be the actual situation of the activity. Through the activity record data, the availability of the target activity and whether it meets the requirements of the activity to be tested can be determined. If there are problems, the tester needs to adjust the data of the activity to be tested. The user data can be adjusted by referring to the activity record data to determine the conditions that can pass the activity to be tested.
[0108] Step S308: Obtain the corresponding activity configuration data in the online environment database based on the activity identification identifier.
[0109] Specifically, the activity configuration data is the configuration information of the activity itself. The to-be-tested activity is adjusted according to the activity configuration data, or the to-be-tested activity designed is modified or improved according to the activity configuration data. For example, the content that the user needs to pay for the activity and the corresponding gifts to be provided to the user. The activity configuration data is used to call the corresponding gift records in the activity record data, so as to complete the entire process of the test activity.
[0110] Further, the method for obtaining the activity configuration data includes:
[0111] Based on the activity identification identifier and the preset configuration file, obtain the activity configuration feature code corresponding to the activity identification identifier; based on the activity configuration feature code, obtain the corresponding activity configuration data saved in the server.
[0112] Since the activity configuration data and the activity record data are usually not saved in the same database, it is necessary to obtain the activity configuration data and the activity record data from the corresponding positions respectively. And the activity identification identifier is not necessarily the feature code used for the activity configuration data saved in the database. Therefore, it is necessary to determine the feature code corresponding to the activity configuration data to obtain the corresponding activity configuration data.
[0113] Optionally, after obtaining the activity configuration data, it further includes:
[0114] Save the activity record data to the test cache; save the activity configuration data to the environment database for testing.
[0115] Save the activity record data and the activity configuration data respectively, so as to simulate the corresponding configuration environment in the online environment in the test environment, so as to ensure the effectiveness and reliability of the activity test.
[0116] Optionally, before saving the activity record data and the activity configuration data, it further includes: deleting the online environment data saved in the test cache.
[0117] By deleting the online environment data cached in the previous test, it is possible to avoid interference between data and cause test errors.
[0118] Step S309: If it is determined that there is no target activity corresponding to the feature parameter, determine the alternative activity with the highest similarity to the feature parameter.
[0119] In some embodiments, there may be a situation where the target activity does not meet the feature parameter. At this time, an approximate alternative activity can be selected to ensure that there is an existing activity as a reference for the to-be-tested activity, and to avoid the situation where interfaces or functions are omitted or defective in the activity design due to lack of reference.
[0120] Step S310: Obtain the online environment data of the alternative activity, which is used to replace the online environment data of the target activity for testing.
[0121] The specific method for obtaining the online environment data of the alternative target activity is the same as that in Steps S306 to S308. By obtaining the activity record data and activity configuration data of the alternative activity, it serves as the environment to be tested.
[0122] Step S311: Obtain the modifications to the activity record data and / or activity configuration data to obtain the modified online environment data.
[0123] Since the activity record data and activity configuration data themselves are data of existing activities and cannot be directly used as the environment data of the activity to be tested, it is necessary to modify the activity record data based on the requirements of the activity to be tested to obtain the environment data of the activity to be tested.
[0124] In some embodiments, it is also possible to modify the activity record data or activity configuration data as a reference for the configuration and operation results of the activity to be tested.
[0125] Step S312: Generate the test data and environment data of the activity to be tested based on the modified online environment data and user data.
[0126] Generally, after the modified data is saved, it can be used as the test data and environment data of the activity to be tested.
[0127] Step S313: Obtain the modifications to the number usage information and / or related service usage information to obtain the modified user data.
[0128] Since the number usage information and related service usage information are also existing data, different modifications are generally required to test whether different users can pass the activity test.
[0129] In some embodiments, it also includes modifying the user identifier to be tested. Because the user identifier to be tested corresponds one-to-one with the number usage information, when multiple user data are required for testing, the user identifier to be tested corresponding to the user data will be adjusted synchronously.
[0130] Step S314: Generate the test data and environment data of the activity to be tested based on the online environment data and the modified user data.
[0131] Similar to the environment data, the modified user data is saved separately to simulate the data configuration method in the online environment to ensure the test effect.
[0132] Step S315: After substituting the test data into the test environment constructed by the environmental data, save the test results based on the users being tested.
[0133] Since data testing usually does not end after a single test, it involves multiple tests and the situation of saving test results. By saving the test results into the data pools established by different users, confusion can be avoided.
[0134] In some embodiments, the test data can also be substituted into the environmental data obtained by the existing data insertion method set separately to compare with the environmental data obtained in this embodiment, so as to ensure the test effect.
[0135] The data generation method provided by the embodiments of the present disclosure obtains the corresponding number usage information and related service usage information based on the identifier of the user to be tested, and obtains the corresponding activity record data and activity configuration data based on the activity identification identifier or characteristic parameters of the target activity. Then, the user data and environmental data are respectively modified to be the test data and environmental data of the activity to be tested, and the test results of different users are respectively saved. By respectively obtaining different types of data corresponding to the user and the activity to be tested and configuring them correspondingly in the test environment, it effectively ensures that the activity to be tested can include the functions and interfaces required by the actual online activity, thus effectively ensuring the effectiveness and reliability of the test.
[0136] Figure 4 It is a schematic structural diagram of a data generation device provided by the present disclosure. As Figure 4 shown, the data generation device 400 includes: a determination module 410, an acquisition module 420, and a processing module 430. Among them:
[0137] The determination module 410 is used to determine the identifier of the user to be tested;
[0138] The acquisition module 420 is used to acquire the user data corresponding to the identifier of the user to be tested in the online environment; and, acquire the online environment data of the target activity, where the target activity is an activity related to the activity to be tested;
[0139] The processing module 430 is used to generate the test data and environmental data of the activity to be tested based on the online environment data and the user data, and the test data is used to test the activity to be tested in the test environment constructed by the environmental data.
[0140] Optionally, the acquisition module 420 is specifically used to acquire the corresponding number usage information based on the identifier of the user to be tested; and acquire the related service usage information of the user to be tested in the server database based on the identifier of the user to be tested.
[0141] Optionally, the obtaining module 420 is specifically configured to obtain the user identity characteristics of the user to be tested based on the user identity to be tested and a preset configuration file; and obtain the relevant service usage information of the corresponding user to be tested saved in the server based on the user identity characteristics.
[0142] Optionally, the obtaining module 420 is further configured to save the number usage information to the test cache; and / or save the relevant service usage information to the user database for testing.
[0143] Optionally, the obtaining module 420 is specifically configured to determine the activity identification identifier of the target activity; obtain the corresponding activity record data based on the activity identification identifier; and obtain the corresponding activity configuration data in the online environment database based on the activity identification identifier.
[0144] Optionally, the obtaining module 420 is specifically configured to determine the characteristic parameters of the target activity; and determine the activity identification identifier of the target activity based on the characteristic parameters.
[0145] Optionally, after determining the characteristic parameters, if it is determined that there is no target activity corresponding to the characteristic parameters, the obtaining module 420 is further configured to determine an alternative activity with the highest similarity to the characteristic parameters; and obtain the online environment data of the alternative activity, where the online environment data of the alternative activity is used to replace the online environment data of the target activity for testing.
[0146] Optionally, the obtaining module 420 is specifically configured to obtain the activity configuration feature code corresponding to the activity identification identifier based on the activity identification identifier and a preset configuration file; and obtain the corresponding activity configuration data saved in the server based on the activity configuration feature code.
[0147] Optionally, the obtaining module 420 is further configured to save the activity record data to the test cache; and save the activity configuration data to the environment database for testing.
[0148] Optionally, the processing module 430 is specifically configured to obtain the modification to the activity record data and / or the activity configuration data to obtain the modified online environment data; and generate the test data and environment data of the activity to be tested based on the modified online environment data and the user data.
[0149] Optionally, the processing module 430 is specifically configured to obtain the modification to the number usage information and / or the relevant service usage information to obtain the modified user data; and generate the test data and environment data of the activity to be tested based on the online environment data and the modified user data.
[0150] Optionally, before obtaining the user data corresponding to the user identity to be tested in the online environment, the obtaining module 420 is further configured to delete the user data saved in the test cache; and / or delete the online environment data saved in the test cache.
[0151] Optionally, after generating the test data and environment data of the activity to be tested based on the online environment data and user data, the processing module 430 is further configured to substitute the test data into the test environment constructed by the environment data, and then save the test result based on the test user.
[0152] In this embodiment, through the combination of each module, the data generation device can effectively simulate the environment data of the activity launched in the actual online environment in the test environment, so as to ensure the usability and reliability of the test activity after it is actually launched.
[0153] Figure 5 A schematic structural diagram of an electronic device provided by the present disclosure is shown in Figure 5 As shown, the electronic device 500 includes: a memory 510 and a processor 520.
[0154] Among them, the memory 510 stores a computer program executable by at least one processor 520. The computer program is executed by at least one processor 520 to enable the electronic device to implement the data generation method provided in any of the above embodiments.
[0155] Among them, the memory 510 and the processor 520 can be connected through a bus 530.
[0156] For relevant descriptions, reference can be made to the relevant descriptions and effects corresponding to the method embodiments, which will not be elaborated here.
[0157] An embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the data generation method in any of the Figures 2 to 3 corresponding embodiments.
[0158] Among them, the computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0159] An embodiment of the present disclosure provides a computer program product, which includes computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the data generation method in any of the Figures 2 to 3 corresponding embodiments.
[0160] In several embodiments provided by the present disclosure, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of devices or modules can be in electrical, mechanical or other forms.
[0161] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the disclosure herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not disclosed herein. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.
[0162] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
Claims
1. A data generation method, characterized in that, Including: Determine the user identifier to be tested; Obtain the user data corresponding to the user identifier to be tested in the online environment; Obtain the online environment data of the target activity, where the target activity is an activity related to the activity to be tested; Based on the online environment data and the user data, generate the test data and environment data of the activity to be tested, where the test data is used to test the activity to be tested in the test environment constructed by the environment data; The obtaining of the user data corresponding to the user identifier to be tested in the online environment includes: Based on the user identifier to be tested, obtain the corresponding number usage information; Based on the user identifier to be tested, obtain the relevant service usage information of the user to be tested in the server database; The obtaining of the relevant service usage information of the user to be tested in the server database based on the user identifier to be tested includes: Based on the user identifier to be tested and a preset configuration file, obtain the corresponding user identity characteristics of the user to be tested; Based on the user identity characteristics, obtain the relevant service usage information of the corresponding user to be tested saved in the server.
2. The data generation method according to claim 1, wherein It further includes at least one of the following: Save the number usage information to the test cache; Save the relevant service usage information to the user database for testing.
3. The data generation method according to claim 1, wherein The obtaining of the online environment data of the target activity includes: Determine the activity identification identifier of the target activity; Based on the activity identification identifier, obtain the corresponding activity record data; Based on the activity identification identifier, obtain the corresponding activity configuration data in the online environment database.
4. The data generation method according to claim 3, wherein The determining of the activity identification identifier of the target activity includes: Determine the characteristic parameters of the target activity; Based on the characteristic parameters, determine the activity identification identifier of the target activity.
5. The data generation method according to claim 4, wherein It further includes: After determining the characteristic parameters, if it is determined that there is no target activity corresponding to the characteristic parameters, determine the alternative activity with the highest similarity to the characteristic parameters; Obtain the online environment data of the alternative activity, where the online environment data of the alternative activity is used to replace the online environment data of the target activity for testing.
6. The data generation method according to claim 3, wherein The obtaining of the corresponding activity configuration data in the online environment database based on the activity identification identifier includes: Based on the activity identification identifier and a preset configuration file, obtain the activity configuration characteristic code corresponding to the activity identification identifier; Based on the activity configuration characteristic code, obtain the corresponding activity configuration data saved in the server.
7. The data generation method according to claim 3, wherein After obtaining the online environment data of the target activity, it includes: Save the activity record data to the test cache; Save the activity configuration data to the environment database for testing.
8. The data generation method according to any one of claims 1 to 7, characterized in that, The generating of the test data and environment data of the activity to be tested based on the online environment data and the user data includes: Obtain the modification to the activity record data and / or the activity configuration data to obtain the modified online environment data; Based on the modified online environment data and the user data, generate the test data and environment data of the activity to be tested.
9. The data generation method according to any one of claims 1 to 7, characterized in that The generating of the test data and environment data of the activity to be tested based on the online environment data and the user data includes: Obtain the modification of the number usage information and / or the related service usage information to obtain the modified user data; Based on the online environment data and the modified user data, generate the test data and environment data for the activity to be tested.
10. The data generation method according to any one of claims 1 to 7, characterized in that Before obtaining the user data corresponding to the user identifier to be tested in the online environment, at least one of the following is further included: Delete the user data saved in the test cache; Delete the online environment data saved in the test cache.
11. The data generation method according to any one of claims 1 to 7, characterized in that, After generating the test data and environment data for the activity to be tested based on the online environment data and the user data, it further includes: After substituting the test data into the test environment constructed by the environment data for testing, save the test result based on the user of the test.
12. A data generation device, characterized in that, It includes: A determination module for determining the user identifier to be tested; An acquisition module for acquiring the user data corresponding to the user identifier to be tested in the online environment; And, acquire the online environment data of the target activity, where the target activity is an activity related to the activity to be tested; A processing module for generating the test data and environment data for the activity to be tested based on the online environment data and the user data, where the test data is used to test the activity to be tested in the test environment constructed by the environment data; The acquisition module is specifically configured to acquire the corresponding number usage information based on the user identifier to be tested; and acquire the related service usage information of the user to be tested in the server database based on the user identifier to be tested; The acquisition module is specifically configured to obtain the corresponding user identity characteristics of the user to be tested based on the user identifier to be tested and a preset configuration file; and acquire the related service usage information of the corresponding user to be tested saved in the server based on the user identity characteristics.
13. An electronic device, characterized in that, It includes At least one processor; And a memory communicatively connected to the at least one processor; Wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the electronic device to execute the data generation method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the data generation method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Testing method and device
CN107133162A