Data Push Method, Device, Storage Medium and Electronic Device
Through the detection code modification instructions, the modified code data is obtained, the target test case information is determined and the comparison is made, the difference information is generated and maintenance information is pushed, which solves the problem of low maintenance efficiency of automated test scripts and realizes timely code maintenance.
Patent Information
- Application Number
- CN202211305593.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-24
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2042-10-24
AI Technical Summary
In the prior art, the maintenance efficiency of automated test scripts is low, and maintenance personnel cannot promptly know the test script code that needs to be maintained before executing the test case, resulting in untimely maintenance.
By detecting the code data modification instructions, the modified code data is obtained, the target test case information is determined, and the stored original code data is compared to the differential information, and the difference information is generated and pushed to the user equipment when the difference information meets the preset maintenance conditions.
It improves the maintenance efficiency of test scripts, enables maintenance personnel to promptly know and perform code maintenance before executing test cases, and solves the problem of untimely maintenance.
Smart Images

Figure CN115495383B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of fintech and other related technical fields, and particularly relates to a data pushing method, apparatus, storage medium and electronic device. Background Art
[0002] With the development of software testing technology, automated testing has received increasing attention. Automated testing refers to changing the human-driven test behavior to machine execution before the product goes online. Through the designed test cases, the machine automatically operates according to the execution steps of the test cases to output results, so as to simulate the usage scenarios of real products.
[0003] To ensure the test effect of automated testing, it is usually necessary to maintain the test scripts in a timely manner. For example, since the test script code is modified, resulting in abnormal execution of the test cases, it is necessary for the maintenance personnel to adjust the test script code for the modified part in a timely manner. However, due to the high maintenance cost of test scripts, currently, it is usually only possible to judge whether there is an abnormality in the test script code based on the execution results of the test cases. That is to say, the maintenance personnel cannot know in advance the test script code that needs to be maintained before executing the test cases, that is, they cannot collect maintenance measures quickly and timely, resulting in untimely maintenance and low maintenance efficiency of the test scripts. Summary of the Invention
[0004] The present application provides a data pushing method, apparatus, storage medium and electronic device, which are used to alleviate the technical problem of low current maintenance efficiency of test scripts.
[0005] To solve the above technical problems, the present application provides the following technical solutions:
[0006] The present application provides a data pushing method, including:
[0007] When a code data modification instruction is detected, obtain the modified code data corresponding to the code data modification instruction;
[0008] Determine the target test case information corresponding to the modified code data;
[0009] Input the target test case information and the modified code data into a data storage module for comparison processing to obtain comparison information; wherein, at least one test case information and the original code data corresponding to each test case information are stored in the data storage module;
[0010] When the comparison information meets a preset maintenance condition, generate to-be-maintained code data based on the comparison information;
[0011] Generate maintenance information based on the code data to be maintained, and push the maintenance information to the user device of the target user.
[0012] Before the step of obtaining the modified code data corresponding to the code data modification instruction when detecting the code data modification instruction, it further includes:
[0013] Collect at least one of the test case information and the original code data corresponding to each test case information;
[0014] Correspondingly store the test case information and the original code data in the data storage module.
[0015] Among them, the step of collecting at least one of the test case information and the original code data corresponding to each test case information includes:
[0016] Collect at least one of the test cases, and perform marking processing on each test case to obtain a test case identifier;
[0017] Receive the original code package name, original code class name, original code method name, and original code detail parameters grabbed by the crawler program according to the test case identifier;
[0018] Use the test case identifier as the test case information, and use the original code package name, the original code class name, the original code method name, and the original code detail parameters as the original code data.
[0019] Among them, the step of correspondingly storing the test case information and the original code data in the data storage module includes:
[0020] Based on the primary key storage unit and the secondary key storage unit, form the data storage module;
[0021] Write the test case identifier into the primary key storage unit, and write the original code package name, the original code class name, the original code method name, and the original code detail parameters corresponding to the test case identifier into the secondary key storage unit.
[0022] Among them, the target test case information includes a target test case identifier. The step of inputting the target test case information and the modified code data into the data storage module for comparison processing to obtain comparison information includes:
[0023] Input the target test case identifier and the modified code data into the data storage module to determine the same test case identifier through the primary key storage unit, and send the same test case identifier to the secondary key storage unit to obtain the target original code data through the secondary key storage unit; wherein, the same test case identifier includes the test case identifier that is the same as the target test case identifier, and the target original code data includes the original code data corresponding to the same test case identifier;
[0024] Generate code data difference information based on the target original code data and the modified code data;
[0025] Use the code data difference information as the comparison information.
[0026] Among them, the step of generating the code data to be maintained based on the comparison information when the comparison information meets the preset maintenance conditions includes:
[0027] When the code data difference information indicates that there is a difference between the modified code data and the target original code data, determine that the comparison information meets the preset maintenance conditions, and determine the different code data based on the modified code data and the target original code data;
[0028] Use the different code data as the code data to be maintained.
[0029] Among them, the step of generating maintenance information based on the code data to be maintained and pushing the maintenance information to the user equipment of the target user includes:
[0030] Determine maintenance guidance information based on the code data to be maintained;
[0031] Generate the maintenance information according to the code data to be maintained and the maintenance guidance information, and send the maintenance information to the user equipment of the target user.
[0032] The embodiment of the present application also provides a data push device, including:
[0033] An acquisition module, configured to acquire the modified code data corresponding to the code data modification instruction when detecting the code data modification instruction;
[0034] A determination module, configured to determine the target test case information corresponding to the modified code data;
[0035] A comparison module, configured to input the target test case information and the modified code data into a data storage module for comparison processing to obtain comparison information; wherein, at least one test case information and the original code data corresponding to each test case information are stored in the data storage module;
[0036] A generation module, configured to generate to-be-maintained code data based on the comparison information when the comparison information meets a preset maintenance condition;
[0037] A push module, configured to generate maintenance information based on the to-be-maintained code data and push the maintenance information to the user device of a target user.
[0038] An embodiment of the present application further provides a computer-readable storage medium, in which multiple instructions are stored, and the instructions are suitable for being loaded by a processor to execute the steps in the above data push method.
[0039] An embodiment of the present application further provides an electronic device, including a processor and a memory, the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is used to execute the steps in the above data push method.
[0040] An embodiment of the present application provides a data push method, device, storage medium and electronic device. When a code data modification instruction is detected, first obtain the modified code data corresponding to the code data modification instruction, then determine the target test case information corresponding to the modified code data, and then input the target test case information and the modified code data into the data storage module for comparison processing to obtain comparison information. Among them, at least one test case information and the original code data corresponding to each test case information are stored in the data storage module. When the comparison information meets the preset maintenance condition, generate to-be-maintained code data based on the comparison information. Finally, generate maintenance information based on the to-be-maintained code data and push it to the user device of the target user. Automatically generate comparison information based on the modified code data corresponding to the code data modification instruction, and generate maintenance information when the comparison information meets the preset maintenance condition to push it to the user device of the target user, so that maintenance personnel can maintain the test script code before executing the test case, thereby effectively improving the test script maintenance efficiency and alleviating the technical problem of low current test script maintenance efficiency. Description of the Drawings
[0041] The following combines the drawings and details the specific implementation manners of the present application, and the technical solutions and other beneficial effects of the present application will be obvious.
[0042] Figure 1 It is a flowchart of the data push method provided by an embodiment of the present application.
[0043] Figure 2 It is a schematic diagram of the scenario of the data push method provided by the embodiment of the present application.
[0044] Figure 3 It is a schematic structural diagram of the data push device provided by the embodiment of the present application.
[0045] Figure 4 It is another schematic structural diagram of the data push device provided by the embodiment of the present application.
[0046] Figure 5 It is a schematic structural diagram of the electronic device provided by the embodiment of the present application.
[0047] Figure 6 It is another schematic structural diagram of the electronic device provided by the embodiment of the present application. Detailed implementation manners
[0048] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.
[0049] The embodiment of the present application provides a data push method, device, storage medium and electronic device.
[0050] As Figure 1 shown, Figure 1 It is a schematic flowchart of the data push method provided by the embodiment of the present application. The specific process can be as follows:
[0051] S101. When a code data modification instruction is detected, obtain the modified code data corresponding to the code data modification instruction.
[0052] Among them, the code data modification instruction represents a signal generated when the unmodified code data in the test script code changes to the modified code data, and the modified code data is the modified test script code data. Optionally, the code data modification instruction is triggered based on a user operation.
[0053] Specifically, in order to enhance the core competitiveness of the enterprise, the enterprise usually develops a series of software products for the related operations of the enterprise. In order to ensure that all functions of the software products are normal after going online, before the software products go online, it is usually necessary to write automated test cases composed of test script codes in a certain format according to a programming language, and execute each automated test case to simulate the actual usage scenarios of the various functions of the software products, so as to complete the verification of the various functions of the software products. It can be seen that whether the execution results of the automated test cases are accurate directly affects whether the products can be launched on schedule. Therefore, it is necessary to ensure that the test script codes can run normally. In this embodiment, by monitoring the test script codes corresponding to each automated test case, it can be known in time when the user modifies the test script codes, and inspections can be carried out in time according to the modification content, so as to avoid the situation that the test script codes are incorrect due to the user's accidental modification of the test script codes. Optionally, the modified code data includes the modified class name, the modified method name, and the modified detailed parameters of the code.
[0054] For example, as Figure 2 shown, the user clicks the "First Automated Test Case" button 2002 in the automated test case management interface 2001, and at this time, it jumps to the first automated test case management interface 2003. The user accidentally modifies "getName()" in the test script code to "getNa()", then a code data modification instruction is automatically generated, and the modified method name corresponding to the code data modification instruction is obtained: "getNa()".
[0055] Further, before the above step S101, it further includes:
[0056] Collect at least one test case information and the original code data corresponding to each test case information;
[0057] Correspondingly store the test case information and the original code data in the data storage module.
[0058] Among them, the collection process of the test case information and the original code data includes: first, the server collects at least one test case and performs marking processing on each test case to obtain a test case identifier, and then the crawler program grabs the corresponding original code data based on the test case identifier and sends the original code data to the server, so that the server receives the original code data. Optionally, the test case information includes the test case identifier, and the original code data includes the original code package name, the original code class name, the original code method name, and the original code detailed parameters.
[0059] For example, the first test case is collected, and then the first test case is marked to obtain the first test case identifier as 000001. The crawler program crawls the original code package name of the test script code corresponding to 000001 as "com.abc.login.username", the original code class name as "Login", the original code method name as "getName()", and the original code detail parameter as "private String user_name; private String user_password".
[0060] Further, in the process of storing the test case information and the original code data in the data storage module correspondingly, the data storage module can be formed based on the primary key storage unit and the secondary key storage unit first, and then the test case identifier is written into the primary key storage unit, and the original code package name, the original code class name, the original code method name, and the original code detail parameter corresponding to the test case identifier are written into the secondary key storage unit. Optionally, the original code package name, the original code class name, the original code method name, and the original code detail parameter are stored in the secondary key storage unit in the form of key-value pairs, and the values of the key-value pairs are the contents corresponding to the original code package name, the original code class name, the original code method name, and the original code detail parameter respectively.
[0061] S102. Determine the target test case information corresponding to the modified code data.
[0062] Among them, the target test case information is used to represent the automated test case corresponding to the test script to which the modified code data belongs. Specifically, in the actual application process, the maintenance personnel usually need to combine the function implemented by the test script to maintain the test script. Therefore, in this embodiment, the target test case information corresponding to the modified code data is determined in advance, and the maintenance personnel can determine the function implemented by the test script according to the target test case information.
[0063] For example, the modified code method name is "getNa()", and the first target test case information corresponding to it is obtained. The maintenance personnel can determine that the function implemented by the test script corresponding to the modified code method name "getNa()" is user authentication according to the first target test case information.
[0064] S103. Input the target test case information and the modified code data into the data storage module for comparison processing to obtain comparison information, where at least one test case information and the original code data corresponding to each test case information are stored in the data storage module.
[0065] Among them, the original code data is the initially written (i.e., unmodified) code data. The comparison information is used to characterize the difference between the modified code data and the original code data corresponding to the target test case information, and the test case information includes the target test case information.
[0066] Specifically, in order to determine whether the modified code data corresponding to the target test case information will affect the execution process of the target test case (for example, cause the target test case to execute abnormally), it is necessary to compare the modified code data with the original code data corresponding to the target test case information, so as to extract the difference between the two and analyze whether this difference will affect the execution process of the target test case.
[0067] Furthermore, the target test case information includes the target test case identifier. The process of obtaining the comparison information specifically includes: First, input the target test case identifier and the modified code data into the data storage module to determine the same test case identifier (the test case identifier identical to the target test case identifier) through the primary key storage unit, and send the same test case identifier to the secondary key storage unit to obtain the target original code data (the original code data corresponding to the same test case identifier) through the secondary key storage unit. Then, generate code data difference information based on the target original code data and the modified code data, and use this code data difference information as the comparison information.
[0068] For example, input the target test case identifier 000001 and the modified code data "getNa()" into the data storage module to determine that the same test case identifier is 000001 through the primary key storage unit, and send 000001 to the secondary key storage unit to obtain the target original code data including the original code package name "com.abc.login.username", the original code class name "Login", the original code method name "getName()", and the original code detail parameters "private String user_name; private String user_password". Among them, since there is a difference between the modified code data "getNa()" and the original code method name "getName()", the code data difference information is generated based on "getNa()" and "getName()".
[0069] S104. When the comparison information meets the preset maintenance condition, generate the code data to be maintained based on the comparison information.
[0070] Among them, the preset maintenance condition is the judgment basis for whether the modified code data needs to be maintained, and the code data to be maintained is used to characterize the difference between the modified code data and the original code data.
[0071] Specifically, considering that in the actual application process, when there is modified code data, its modification content may not affect the execution process of the test case, so there is no need for the maintenance personnel to maintain it. In order to reduce unnecessary maintenance resources, in this embodiment, it is first determined whether the modified code data needs to be maintained. When it is determined that it needs to be maintained, the difference between the modified code data and the original code data is highlighted, so that the maintenance personnel can quickly and intuitively know the content that needs to be maintained. Optionally, in this embodiment, when the code data difference information indicates that the difference between the modified code data and the target original code data will cause an abnormal execution of the test case. For example, when the original code class name, original code method name, or original code detail parameters corresponding to the modified code data and the target original code data are different, or the modified code data represents the request address or request message corresponding to the external http interface, it is determined that the comparison information meets the preset maintenance condition, and the difference code data is determined based on the modified code data and the target original code data, and the difference code data is used as the code data to be maintained.
[0072] For example, the modified code method name in the modified code data is "getNa()", and the target original code method name in the target original data is "getName()". Therefore, it is determined that the comparison information meets the preset maintenance condition, and the difference content between the two is marked, and the difference content at the marked place is used as the difference code data.
[0073] S105. Generate maintenance information based on the code data to be maintained, and push the maintenance information to the user device of the target user.
[0074] Among them, the maintenance information includes the code content that needs to be maintained and maintenance suggestions, and the target user includes maintenance personnel. Specifically, after determining the code data to be maintained, it needs to be pushed to the maintenance personnel so that they can take maintenance measures as soon as possible. In this embodiment, in order to improve the maintenance efficiency of the maintenance personnel, a maintenance guidance information storage module is pre-constructed. The mapping relationship between the code data to be maintained and the maintenance guidance information is stored in the maintenance guidance information storage module. The maintenance guidance information is relevant suggestions for maintaining the code data to be maintained, so as to provide maintenance ideas for the maintenance personnel. Specifically, first query the maintenance guidance information storage module to determine the maintenance guidance information corresponding to the code data to be maintained, and then generate maintenance information according to the code data to be maintained and the maintenance guidance information, and send the maintenance information to the user device of the target user.
[0075] For example, as Figure 2As shown, a pop-up control 2004 appears in the first automated test case management interface 2003. When the user clicks on the pop-up control 2004, it will automatically jump to the code comparison result interface 2005. The code comparison result interface 2005 displays the code data to be maintained with the code difference content marked by a square box component, as well as the maintenance guidance information corresponding to the code data to be maintained.
[0076] As can be seen from the above, for the data push method provided in this application, when a code data modification instruction is detected, first, the modified code data corresponding to the code data modification instruction is obtained. Then, the target test case information corresponding to the modified code data is determined. Next, the target test case information and the modified code data are input into the data storage module for comparison processing to obtain comparison information. Among them, at least one test case information and the original code data corresponding to each test case information are stored in the data storage module. When the comparison information meets the preset maintenance condition, the code data to be maintained is generated based on the comparison information. Finally, maintenance information is generated based on the code data to be maintained and pushed to the user device of the target user. The comparison information is automatically generated based on the modified code data corresponding to the code data modification instruction, and maintenance information is generated when the comparison information meets the preset maintenance condition and pushed to the user device of the target user, so that the maintenance personnel can maintain the test script code before executing the test case, thereby effectively improving the test script maintenance efficiency and alleviating the technical problem of the low current test script maintenance efficiency.
[0077] According to the method described in the above embodiments, this embodiment will be further described from the perspective of the data push device.
[0078] Please refer to Figure 3 , Figure 3 Specifically describes the data push device provided in the embodiments of the present application. The data push device may include: an acquisition module 10, a determination module 20, a comparison module 30, a generation module 40, and a push module 50, where:
[0079] (1) Acquisition module 10
[0080] The acquisition module 10 is used to obtain the modified code data corresponding to the code data modification instruction when a code data modification instruction is detected.
[0081] (2) Determination module 20
[0082] The determination module 20 is used to determine the target test case information corresponding to the modified code data.
[0083] (3) Comparison module 30
[0084] The comparison module 30 is used to input the target test case information and the modified code data into the data storage module for comparison processing to obtain comparison information; among them, at least one test case information and the original code data corresponding to each test case information are stored in the data storage module.
[0085] Among them, the target test case information includes the target test case identifier, and the comparison module 30 is specifically used for:
[0086] Input the target test case identifier and the modified code data into the data storage module to determine the same test case identifier through the primary key storage unit, and send the same test case identifier to the secondary key storage unit to obtain the target original code data through the secondary key storage unit; among them, the same test case identifier includes the test case identifier that is the same as the target test case identifier, and the target original code data includes the original code data corresponding to the same test case identifier;
[0087] Generate code data difference information based on the target original code data and the modified code data;
[0088] Use the code data difference information as the comparison information.
[0089] (4) Generation module 40
[0090] The generation module 40, when the comparison information meets the preset maintenance conditions, generates the code data to be maintained based on the comparison information.
[0091] Among them, the generation module 40 is specifically used for:
[0092] When the code data difference information indicates that there is a difference between the modified code data and the target original code data, determine that the comparison information meets the preset maintenance conditions, and determine the difference code data based on the modified code data and the target original code data;
[0093] Use the difference code data as the code data to be maintained.
[0094] (5) Push module 50
[0095] The push module 50 is used to generate maintenance information based on the code data to be maintained and push the maintenance information to the user device of the target user.
[0096] Among them, the push module 50 is specifically used for:
[0097] Determine the maintenance guidance information based on the code data to be maintained;
[0098] Generate maintenance information according to the code data to be maintained and the maintenance guidance information, and send the maintenance information to the user device of the target user.
[0099] Such as Figure 4As shown Figure 4 is another structural schematic diagram of the data push device provided by the embodiment of the present application. The device further includes an acquisition module 60.
[0100] Among them, the acquisition module 60 is specifically used for:
[0101] acquire at least one test case information and the original code data corresponding to each test case information;
[0102] correspondingly store the test case information and the original code data into the data storage module.
[0103] Specifically, the acquisition module 60 is further used for:
[0104] acquire at least one test case, and perform marking processing on each test case to obtain a test case identifier;
[0105] receive the original code package name, original code class name, original code method name, and original code detail parameters crawled by the crawler program according to the test case identifier;
[0106] Use the test case identifier as the test case information, and use the original code package name, original code class name, original code method name, and original code detail parameters as the original code data.
[0107] Furthermore, the acquisition module 60 is further used for:
[0108] Based on the primary key storage unit and the secondary key storage unit, form a data storage module;
[0109] Write the test case identifier into the primary key storage unit, and write the original code package name, original code class name, original code method name, and original code detail parameters corresponding to the test case identifier into the secondary key storage unit.
[0110] In specific implementation, each of the above units can be implemented as an independent entity, or can be combined arbitrarily to be implemented as the same or several entities. For the specific implementation of each of the above units, reference can be made to the foregoing method embodiments, which will not be elaborated herein.
[0111] As can be seen from the above, for the data push device provided in this application, when a code data modification instruction is detected, first, the acquisition module 10 acquires the modified code data corresponding to the code data modification instruction. Then, the determination module 20 determines the target test case information corresponding to the modified code data. Next, the comparison module 30 inputs the target test case information and the modified code data into the data storage module for comparison processing to obtain comparison information. Among them, at least one test case information and the original code data corresponding to each test case information are stored in the data storage module. When the comparison information meets the preset maintenance condition, the generation module 40 generates the code data to be maintained based on the comparison information. Finally, the push module 50 generates maintenance information based on the code data to be maintained and pushes it to the user device of the target user. Automatically generate comparison information based on the modified code data corresponding to the code data modification instruction, and generate maintenance information when the comparison information meets the preset maintenance condition to push it to the user device of the target user, so that maintenance personnel can maintain the test script code before executing the test case, thereby effectively improving the test script maintenance efficiency and alleviating the technical problem of low current test script maintenance efficiency.
[0112] Correspondingly, an embodiment of the present invention further provides a data push system, including any data push device provided in the embodiment of the present invention, and this data push device can be integrated in an electronic device.
[0113] Among them, when a code data modification instruction is detected, acquire the modified code data corresponding to the code data modification instruction; determine the target test case information corresponding to the modified code data; input the target test case information and the modified code data into the data storage module for comparison processing to obtain comparison information, where at least one test case information and the original code data corresponding to each test case information are stored in the data storage module; when the comparison information meets the preset maintenance condition, generate the code data to be maintained based on the comparison information; generate maintenance information based on the code data to be maintained and push the maintenance information to the user device of the target user.
[0114] For the specific implementation of each of the above devices, reference can be made to the previous embodiments and will not be elaborated here.
[0115] Since this data push system can include any data push device provided in the embodiment of the present invention, therefore, it can achieve the beneficial effects that any data push device provided in the embodiment of the present invention can achieve. For details, refer to the previous embodiments and will not be elaborated here.
[0116] In addition, an embodiment of the present application further provides an electronic device, and this electronic device can be a device such as a smart phone or a computer. As Figure 5 shown, the electronic device 500 includes a processor 501 and a memory 502. Among them, the processor 501 is electrically connected to the memory 502.
[0117] The processor 501 is the control center of the electronic device 500, connecting various parts of the entire electronic device through various interfaces and circuits. By running or loading application programs stored in the memory 502 and invoking data stored in the memory 502, it executes various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole.
[0118] In this embodiment, the processor 501 in the electronic device 500 will load the instructions corresponding to the processes of one or more application programs into the memory 502 according to the following steps, and the processor 501 will run the application programs stored in the memory 502 to implement various functions:
[0119] When a code data modification instruction is detected, obtain the modified code data corresponding to the code data modification instruction;
[0120] Determine the target test case information corresponding to the modified code data;
[0121] Input the target test case information and the modified code data into the data storage module for comparison processing to obtain comparison information. Among them, at least one test case information and the original code data corresponding to each test case information are stored in the data storage module;
[0122] When the comparison information meets the preset maintenance conditions, generate the code data to be maintained based on the comparison information;
[0123] Generate maintenance information based on the code data to be maintained and push the maintenance information to the user device of the target user.
[0124] Figure 6 The specific structural block diagram of the electronic device provided by the embodiment of the present invention is shown, and this electronic device can be used to implement the data push method provided in the above embodiment.
[0125] The RF circuit 610 is used to receive and transmit electromagnetic waves, realizing the mutual conversion between electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices. The RF circuit 610 may include various existing circuit components for performing these functions. For example, an antenna, a radio frequency transceiver, a digital signal processor, an encryption / decryption chip, a subscriber identity module (SIM) card, a memory, and so on. The RF circuit 610 can communicate with various networks such as the Internet, an enterprise intranet, a wireless network, or communicate with other devices through a wireless network. The above-mentioned wireless network may include a cellular phone network, a wireless local area network, or a metropolitan area network. The above-mentioned wireless network can use various communication standards, protocols, and technologies, including but not limited to the Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (such as the Institute of Electrical and Electronics Engineers standards IEEE802.11a, IEEE 802.11b, IEEE802.11g, and / or IEEE 802.11n), Voice over Internet Protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for email, instant messaging, and short messages, and any other suitable communication protocols, and may even include those protocols that have not yet been developed currently.
[0126] The memory 620 can be used to store software programs and modules. The processor 680 executes various functional applications and data processing by running the software programs and modules stored in the memory 620, that is, realizing the function of storing 5G capability information. The memory 620 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, a flash memory, or other non-volatile solid-state memories. In some instances, the memory 620 may further include a memory remotely set relative to the processor 680, and these remote memories can be connected to the electronic device 600 through a network. Examples of the above-mentioned network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and their combinations.
[0127] The input unit 630 can be used to receive input numerical or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. Specifically, the input unit 630 can include a touch-sensitive surface 631 and other input devices 632. The touch-sensitive surface 631, also known as a touch display screen or a touchpad, can collect touch operations of a user thereon or nearby (such as operations of the user using any suitable object or accessory such as a finger or a stylus on or near the touch-sensitive surface 631), and drive corresponding connection devices according to a preset program. Optionally, the touch-sensitive surface 631 can include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch position of the user, detects signals brought by the touch operation, and transmits the signals to the touch controller; the touch controller receives touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 680, and can receive commands sent by the processor 680 and execute them. In addition, various types such as resistive, capacitive, infrared, and surface acoustic wave can be used to implement the touch-sensitive surface 631. In addition to the touch-sensitive surface 631, the input unit 630 can also include other input devices 632. Specifically, the other input devices 632 can include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, etc.
[0128] The display unit 640 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device 600. These graphical user interfaces can be composed of graphics, text, icons, videos, and any combination thereof. The display unit 640 can include a display panel 641. Optionally, the display panel 641 can be configured in forms such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode). Further, the touch-sensitive surface 631 can cover the display panel 641. After the touch-sensitive surface 631 detects a touch operation thereon or nearby, it is transmitted to the processor 680 to determine the type of touch event. Subsequently, the processor 680 provides corresponding visual output on the display panel 641 according to the type of touch event. Although in Figure 6 the touch-sensitive surface 631 and the display panel 641 are implemented as two independent components to achieve input and output functions, in some embodiments, the touch-sensitive surface 631 and the display panel 641 can be integrated to achieve input and output functions.
[0129] The electronic device 600 may further include at least one sensor 650, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. Among them, the ambient light sensor can adjust the brightness of the display panel 641 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 641 and / or the backlight when the electronic device 600 is moved to the ear. As a kind of motion sensor, the gravity acceleration sensor can detect the magnitude of the acceleration in each direction (generally three axes). When stationary, it can detect the magnitude and direction of gravity, and can be used in applications for identifying the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors that the electronic device 600 can also be configured with, they will not be elaborated here.
[0130] The audio circuit 660, the speaker 661, and the microphone 662 can provide an audio interface between the user and the electronic device 600. The audio circuit 660 can transmit the electrical signal converted from the received audio data to the speaker 661, and the speaker 661 converts it into a sound signal for output; on the other hand, the microphone 662 converts the collected sound signal into an electrical signal, which is received by the audio circuit 660 and then converted into audio data. After the audio data is output to the processor 680 for processing, it is sent through the RF circuit 610 to, for example, another terminal, or the audio data is output to the memory 620 for further processing. The audio circuit 660 may also include an earphone jack to provide communication between the external earphone and the electronic device 600.
[0131] The electronic device 600 can help users send and receive emails, browse the web, and access streaming media, etc. through the transmission module 670 (such as a Wi-Fi module), which provides users with wireless broadband Internet access. Although Figure 6 the transmission module 670 is shown, it can be understood that it does not belong to the essential components of the electronic device 600 and can be omitted entirely according to needs without changing the essence of the invention.
[0132] The processor 680 is the control center of the electronic device 600, connecting various parts of the entire mobile phone through various interfaces and lines. By running or executing the software programs and / or modules stored in the memory 620, and by calling the data stored in the memory 620, it executes various functions of the electronic device 600 and processes data. Optionally, the processor 680 may include one or more processing cores; in some embodiments, the processor 680 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 680 either.
[0133] The electronic device 600 further includes a power supply 690 (such as a battery) for powering each component. In some embodiments, the power supply can be logically connected to the processor 680 through a power management system, so as to manage functions such as charging, discharging, and power consumption management through the power management system. The power supply 690 can also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.
[0134] Although not shown, the electronic device 600 may further include a camera (such as a front camera and a rear camera), a Bluetooth module, etc., which will not be elaborated here. Specifically, in this embodiment, the display unit of the electronic device is a touch screen display, and the electronic device further includes a memory and one or more programs, where one or more programs are stored in the memory and are configured to be executed by one or more processors. The one or more programs include instructions for performing the following operations:
[0135] When a code data modification instruction is detected, obtain the modified code data corresponding to the code data modification instruction;
[0136] Determine the target test case information corresponding to the modified code data;
[0137] Input the target test case information and the modified code data into the data storage module for comparison processing to obtain comparison information, where at least one test case information and the original code data corresponding to each test case information are stored in the data storage module;
[0138] When the comparison information meets the preset maintenance conditions, generate the code data to be maintained based on the comparison information;
[0139] Generate maintenance information based on the code data to be maintained and push the maintenance information to the user device of the target user.
[0140] In specific implementation, the above-mentioned various modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. For the specific implementation of the above-mentioned various modules, reference can be made to the foregoing method embodiments, which will not be elaborated here.
[0141] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. For this reason, an embodiment of the present invention provides a storage medium, in which multiple instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the data pushing methods provided by the embodiments of the present invention.
[0142] Among them, the storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM), magnetic disk or optical disc, etc.
[0143] Since the instructions stored in the storage medium can execute the steps in any of the data pushing methods provided by the embodiments of the present invention, the beneficial effects that can be achieved by any of the data pushing methods provided by the embodiments of the present invention can be realized. For details, please refer to the previous embodiments and will not be elaborated here.
[0144] For the specific implementation of each of the above operations, please refer to the previous embodiments and will not be elaborated here.
[0145] In summary, although the present application has been disclosed above with preferred embodiments, the above preferred embodiments are not intended to limit the present application. Those of ordinary skill in the art can make various changes and modifications without departing from the spirit and scope of the present application. Therefore, the protection scope of the present application shall be subject to the scope defined by the claims.
Claims
1. A data push method, characterized in that, Including: Collect at least one test case, and perform marking processing on each test case to obtain a test case identifier; Receive the original code package name, original code class name, original code method name, and original code detail parameters crawled by the crawler program according to the test case identifier; Use the test case identifier as test case information, and use the original code package name, the original code class name, the original code method name, and the original code detail parameters as the original code data corresponding to the test case information; Correspondingly store the test case information and the original code data in the data storage module; When a code data modification instruction is detected, obtain the modified code data corresponding to the code data modification instruction; Determine the target test case information corresponding to the modified code data; Input the target test case information and the modified code data into the data storage module for comparison processing to obtain comparison information; wherein, at least one test case information and the original code data corresponding to each test case information are stored in the data storage module; When the comparison information meets the preset maintenance condition, generate maintenance code data based on the comparison information; Generate maintenance information based on the maintenance code data, and push the maintenance information to the user device of the target user.
2. The data push method according to claim 1, wherein The step of correspondingly storing the test case information and the original code data in the data storage module includes: Form the data storage module based on the primary key storage unit and the secondary key storage unit; Write the test case identifier into the primary key storage unit, and write the original code package name, the original code class name, the original code method name, and the original code detail parameters corresponding to the test case identifier into the secondary key storage unit.
3. The data push method according to claim 2, wherein, The target test case information includes a target test case identifier, and the step of inputting the target test case information and the modified code data into the data storage module for comparison processing to obtain comparison information includes: Input the target test case identifier and the modified code data into the data storage module to determine the same test case identifier through the primary key storage unit, and send the same test case identifier to the secondary key storage unit to obtain target original code data through the secondary key storage unit; wherein, the same test case identifier includes the test case identifier that is the same as the target test case identifier, and the target original code data includes the original code data corresponding to the same test case identifier; Generate code data difference information based on the target original code data and the modified code data; Use the code data difference information as the comparison information.
4. The data pushing method according to claim 3, wherein The step of generating maintenance code data based on the comparison information when the comparison information meets the preset maintenance condition includes: When the code data difference information indicates that there is a difference between the modified code data and the target original code data, determine that the comparison information meets the preset maintenance condition, and determine the difference code data based on the modified code data and the target original code data; Use the difference code data as the code data to be maintained.
5. The data push method according to claim 4, wherein The step of generating maintenance information based on the code data to be maintained and pushing the maintenance information to the user device of the target user includes: Determine maintenance guidance information based on the code data to be maintained; Generate the maintenance information according to the code data to be maintained and the maintenance guidance information, and send the maintenance information to the user device of the target user.
6. A data push device, characterized in that, It includes: An acquisition module, configured to collect at least one test case, perform marking processing on each test case, and obtain a test case identifier; Receive the original code package name, original code class name, original code method name, and original code detail parameters crawled by the crawler program according to the test case identifier; Use the test case identifier as test case information, and use the original code package name, the original code class name, the original code method name, and the original code detail parameters as the original code data corresponding to the test case information; store the test case information and the original code data in a data storage module in a corresponding manner; The acquisition module is further configured to obtain the modified code data corresponding to the code data modification instruction when detecting the code data modification instruction; A determination module, configured to determine the target test case information corresponding to the modified code data; A comparison module, configured to input the target test case information and the modified code data into the data storage module for comparison processing to obtain comparison information; wherein, at least one test case information and the original code data corresponding to each test case information are stored in the data storage module; A generation module, configured to generate code data to be maintained based on the comparison information when the comparison information meets a preset maintenance condition; A push module, configured to generate maintenance information based on the code data to be maintained and push the maintenance information to the user device of the target user.
7. A computer-readable storage medium, characterized in that, Multiple instructions are stored in the computer-readable storage medium, and the instructions are suitable for being loaded by a processor to execute the steps in the data push method according to any one of claims 1 to 5.
8. An electronic device, characterized in that, It includes a processor and a memory, the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is used to execute the steps in the data push method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Test script development method and device
CN112988601A
Interface change identification and display method and device, equipment and medium
CN114116745A