A data testing method and device, electronic equipment and computer readable medium
By receiving data test requests, obtaining startup identifiers, and updating applications and image packages, the hot-loading method accelerates feature development and self-testing, solving the time-consuming and labor-intensive problems of existing technologies and achieving efficient feature development and self-testing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-11
- Publication Date
- 2026-03-20
AI Technical Summary
The process of feature development, testing, and release is highly iterative, time-consuming, and labor-intensive, requiring repeated packaging of the runtime environment and application package into an image, which is time-consuming.
By receiving data test requests and obtaining the startup identifier, the system responds to changes in data during non-first startups, updates application packages and image packages, and accelerates feature development and self-testing using hot reloading methods, while reducing network resource usage.
It enables agile and rapid feature development and self-testing, saving manpower, time and resources.
Smart Images

Figure CN115129604B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and in particular to a data testing method and device, electronic equipment and a computer readable medium. BACKGROUND
[0002] Each test or release process needs to compile source code to generate an application package, package the application package and environment into an image, expand the image to run the application, and perform functional testing on the application, which is time-consuming and wastes scheduling resources and network resources in the deployment process.
[0003] In the process of implementing the present application, the inventors have found that at least the following problems exist in the prior art:
[0004] In the entire functional development, testing and release process, the functional development and self-testing process, which is iterative and requires high efficiency, is the most time-consuming, labor-intensive and resource-consuming, and requires repeatedly packaging the running environment and the application package into an image, which is time-consuming. SUMMARY
[0005] Therefore, the embodiments of the present application provide a data testing method and device, electronic equipment and a computer readable medium, which can solve the problem that in the entire functional development, testing and release process, the functional development and self-testing process, which is iterative and requires high efficiency, is the most time-consuming, labor-intensive and resource-consuming, and requires repeatedly packaging the running environment and the application package into an image, which is time-consuming.
[0006] To achieve the above object, according to an aspect of the present application, a data testing method is provided, comprising:
[0007] receiving a data testing request and obtaining a corresponding start identifier;
[0008] In response to determining that the start identifier corresponds to a non-first start, obtaining a change data identifier corresponding to the data testing request, and then obtaining corresponding change data based on the change data identifier;
[0009] obtaining an application package corresponding to the data testing request, and updating the application package based on the change data;
[0010] obtaining a target container identifier corresponding to the data testing request and an image package corresponding to the target container identifier, and then updating the image package based on the updated application package;
[0011] executing the updated image package to test the data corresponding to the image package.
[0012] Optionally, updating the application package based on the change data comprises:
[0013] determining the type of the change data;
[0014] In response to data of type incremental, incremental compilation is performed based on the incremental data to generate the application package corresponding to the incremental data;
[0015] Update the application package corresponding to the incremental data based on the application package corresponding to the data test request.
[0016] Optionally, update the application package corresponding to the data test request based on the application package corresponding to the incremental data, including:
[0017] Determine the first position of the incremental data within the full dataset corresponding to the data test request;
[0018] Based on the first position, determine the second position in the application package corresponding to the data test request where the incremental data is located;
[0019] Insert the application package corresponding to the incremental data into the second position to update the application package corresponding to the data test request.
[0020] Optionally, the application package is updated based on the changed data, including:
[0021] In response to a data modification type, determine the location of the modified data within the full dataset corresponding to the data test request;
[0022] Modify the data at the specified location in the full dataset based on the changed data, thereby updating the full dataset;
[0023] The application package was recompiled and generated based on the updated full data.
[0024] Optionally, the image package is updated based on the updated application package, including:
[0025] The application package in the image package is replaced with the updated application package, and then the updated application package is packaged with the runtime environment in the image package to generate the updated image package.
[0026] Optionally, the data testing methods also include:
[0027] In response to determining that the startup identifier corresponds to the first startup, obtain the full data corresponding to the startup identifier;
[0028] Compile the full dataset to generate the application package;
[0029] Package the application package and the preset runtime environment to generate an image package;
[0030] Create the runtime environment for the target application corresponding to the application package using the image package as a template;
[0031] Start the target application in the target container corresponding to the runtime environment of the created target application to test the data in the image package.
[0032] Optionally, before starting the target application in the target container corresponding to the running environment of the created target application, the method further comprises:
[0033] deploying the image package to the target machine, and determining the target machine as the target container.
[0034] In addition, the present application also provides a data testing device, comprising:
[0035] a receiving unit configured to receive a data testing request and obtain a corresponding starting identifier;
[0036] a variable data obtaining unit configured to, in response to determining that the starting identifier corresponds to a non-first starting, obtain a variable data identifier corresponding to the data testing request, and then obtain corresponding variable data based on the variable data identifier;
[0037] a first updating unit configured to obtain an application package corresponding to the data testing request, and update the application package based on the variable data;
[0038] a second updating unit configured to obtain a target container identifier corresponding to the data testing request and an image package corresponding to the target container identifier, and then update the image package based on the updated application package;
[0039] a testing unit configured to execute the updated image package to test data corresponding to the image package.
[0040] Optionally, the first updating unit is further configured to:
[0041] determine a type of the variable data;
[0042] in response to the type being incremental data, perform incremental compilation based on the incremental data to generate an application package corresponding to the incremental data;
[0043] update the application package corresponding to the data testing request according to the application package corresponding to the incremental data.
[0044] Optionally, the first updating unit is further configured to:
[0045] determine a first position of the incremental data in full data corresponding to the data testing request;
[0046] determine a second position of the application package corresponding to the incremental data in the application package corresponding to the data testing request based on the first position;
[0047] insert the application package corresponding to the incremental data into the second position to update the application package corresponding to the data testing request.
[0048] Optionally, the first updating unit is further configured to:
[0049] in response to the type being modification data, determining a position of the modification data in full data corresponding to the data test request;
[0050] modifying the data at the position in the full data based on the changed data, and updating the full data;
[0051] recompiling the application package based on the updated full data.
[0052] Optionally, the second updating unit is further configured to:
[0053] replace the application package in the image package with the updated application package, and package the updated application package with a running environment in the image package to generate an updated image package.
[0054] Optionally, the testing unit is further configured to:
[0055] in response to determining that the start identifier corresponds to a first start, obtaining full data corresponding to the start identifier;
[0056] compiling the full data to generate an application package;
[0057] packaging the application package and a preset running environment to generate an image package;
[0058] creating a running environment of a target application corresponding to the application package based on the image package as a template;
[0059] starting the target application in a target container corresponding to the created running environment of the target application to test data in the image package.
[0060] Optionally, the data testing device further comprises a target container generating unit configured to:
[0061] deploying the image package to a target machine, and determining the target machine as a target container.
[0062] In addition, the present application also provides a data testing electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the data testing method as described above.
[0063] In addition, the present application also provides a computer readable medium having a computer program stored thereon, the program being executed by a processor to implement the data testing method as described above.
[0064] An embodiment of the above application has the following advantages or beneficial effects: the application receives a data test request, obtains a corresponding start identifier, determines that the start identifier corresponds to a non-first start, obtains a change data identifier corresponding to the data test request, and then obtains corresponding change data based on the change data identifier; an application package corresponding to the data test request is obtained, the application package is updated based on the change data; a target container identifier corresponding to the data test request and an image package corresponding to the target container identifier are obtained, and then the image package is updated based on the updated application package; the updated image package is executed to test data corresponding to the image package. According to the start identifier, the subsequent execution process of the test is determined. If the start identifier corresponds to a non-first start, only the change data is compiled, and then the image package is updated. The running environment does not need to call network resources again, and the method of hot loading the application package is used to accelerate the function development and self-test, realize the agile and rapid function development and self-test, and effectively save manpower, time and resources.
[0065] Further effects of the above non-conventional optional mode will be described in conjunction with the specific embodiments below. BRIEF DESCRIPTION OF DRAWINGS
[0066] The accompanying drawings are used to better understand the present application and do not constitute undue limitations on the present application. Among them:
[0067] Figure 1 is a schematic diagram of the main process of the data test method according to the first embodiment of the present application;
[0068] Figure 2 is a schematic diagram of the main process of the data test method according to the second embodiment of the present application;
[0069] Figure 3 is a schematic diagram of the application scenario of the data test method according to the third embodiment of the present application;
[0070] Figure 4 is a schematic diagram of the main unit of the data test device according to the embodiment of the present application;
[0071] Figure 5 is an exemplary system architecture diagram to which the embodiments of the present application can be applied;
[0072] Figure 6 is a structural schematic diagram of a computer system suitable for implementing the terminal device or server of the embodiments of the present application. DETAILED DESCRIPTION
[0073] Exemplary embodiments of the present application are described herein with reference to the accompanying drawings, which are meant to be exemplary. Therefore, various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Also, for the sake of brevity and clarity, descriptions of well-known functions and constructions are omitted herein. The acquisition, storage, use, processing, etc. of data in the technical solutions of the present application comply with relevant provisions of national laws and regulations.
[0074] Figure 1 is a schematic diagram of the main flow of the data testing method according to the first embodiment of the present application, as shown in Figure 1 The data testing method comprises:
[0075] In step S101, a data testing request is received, and a corresponding start identifier is acquired.
[0076] In the present embodiment, the execution subject of the data testing method (for example, which can be a server) can receive a data testing request through wired connection or wireless connection. Specifically, the data testing request can be a request for deploying a mirror package of an application obtained through continuous integration to a test cluster or a production cluster for testing. The start identifier is used to represent whether it is a first start or a non-first start. For example, the start identifier can be 0, 1, or letters such as a and b. The start identifier can be a number, a letter, or any symbol. For example, 1 can represent a first start, and 0 can represent a non-first start. For example, 2 can represent a second start, and 3 can represent a third start. The present embodiment does not make specific limitations on the meanings of the start identifiers.
[0077] Specifically, the data testing method further comprises:
[0078] In response to determining that the start identifier (for example, 1) corresponds to a first start, full-amount data corresponding to the start identifier is acquired; the full-amount data is, for example, source code corresponding to the target application. The source code is a series of readable computer language instructions. The full-amount data is compiled to generate an application package. Specifically, the source code can be compiled to generate an application package. The application package and a preset running environment are packaged to generate a mirror package; a running environment of a target application corresponding to the application package is created using the mirror package as a template; the target application is started in a target container corresponding to the created running environment of the target application to test the data in the mirror package.
[0079] Specifically, before starting the target application in the target container corresponding to the created running environment of the target application, the method further comprises: deploying the mirror package to a target machine, and then determining the target machine as the target container.
[0080] For example, the fast continuous integration, continuous deployment (CICD) self-test process implemented by hot loading the application package is as follows: first start the process:
[0081] 1) Record the first start of the user with the user's business id.
[0082] 2) Continuous integration: compile to generate an application package, and package the runtime environment and the application package into an image.
[0083] 3) Continuous deployment: deploy the image to the target machine to generate a container.
[0084] 4) Record the target container.
[0085] 5) Self-test: function test.
[0086] Step S102, in response to determining that the start identifier corresponds to a non-first start, obtaining the change data identifier corresponding to the data test request, and then obtaining the corresponding change data based on the change data identifier.
[0087] For example, when the start identifier is 0 or a, it corresponds to a non-first start. The execution subject can obtain the change data identifier carried in the data test request, such as the number or positioning location identifier corresponding to each change data, when determining that the start identifier corresponds to a non-first start. Then, the execution subject can find the corresponding change data from the database based on the number or positioning location identifier corresponding to the change data identifier and obtain the change data.
[0088] Step S103, obtaining the application package corresponding to the data test request, and updating the application package based on the change data.
[0089] The application package corresponding to the data test request can be the application package compiled by the previous start of the non-first start. The change data can include incremental data and modified data. The incremental data is data newly added to the original data based on the function to be implemented, and the modified data can be data modified to the original data based on the function to be implemented. If the change data includes both incremental data and modified data, the execution subject can compile the incremental data and add it to the original data corresponding to the application package, and can compile the modified data and the data associated with the original data of the modified data, and update it to the original data corresponding to the application package.
[0090] Step S104, obtaining the target container identifier corresponding to the data test request and the image package corresponding to the target container identifier, and then updating the image package based on the updated application package.
[0091] The target container identifier corresponding to the data test request acquired by the execution subject and the image package corresponding to the target container identifier can be the target container identifier and the image package corresponding to the previous start of the current (non-first) start. That is, the execution subject can update the image package based on the updated application package during the previous start.
[0092] Specifically, updating the image package based on the updated application package includes replacing the application package in the image package with the updated application package, and then packaging the updated application package and the running environment in the image package to generate an updated image package. Specifically, the running environment corresponding to the image package during the previous start remains unchanged, and only the application package in the image package during the previous start is updated.
[0093] Step S105, executing the updated image package to test the data corresponding to the image package.
[0094] After updating the image package for the current start, the execution subject can execute the updated image package in the running environment carried by the target container (the target container can be the target machine to which the image package is deployed) to perform corresponding function test and performance test on the application data corresponding to the updated image package.
[0095] The embodiment receives a data test request and acquires a corresponding start identifier. In response to determining that the start identifier corresponds to a non-first start, a variable data identifier corresponding to the data test request is acquired, and corresponding variable data is acquired based on the variable data identifier. An application package corresponding to the data test request is acquired, and the application package is updated based on the variable data. A target container identifier corresponding to the data test request and an image package corresponding to the target container identifier are acquired, and the image package is updated based on the updated application package. The updated image package is executed to test the data corresponding to the image package. According to the start identifier, the subsequent execution process is determined. If the start identifier corresponds to a non-first start, only the variable data is compiled, and then the image package is updated. The running environment does not need to call network resources again, and the method of hot loading the application package is used to accelerate function development and self-test, realize agile and fast function development and self-test, and effectively save manpower, time and resources.
[0096] Figure 2 is the main flow diagram of the data test method according to the second embodiment of the present application, as Figure 2 shown, the data test method comprises:
[0097] Step S201, receiving a data test request and acquiring a corresponding start identifier.
[0098] The start identifier is used to represent whether it is a first start or a non-first start.
[0099] At step S202, in response to determining that the starting identifier corresponds to a non-first start, a variable data identifier corresponding to the data test request is acquired, and then the corresponding variable data is acquired based on the variable data identifier.
[0100] At step S203, an application package corresponding to the data test request is acquired, and the type of the variable data is determined. The type of the variable data can be incremental data, or can be modified data, and the type of the variable data is not limited in the embodiments of the present application.
[0101] At step S204, in response to the type being incremental data, incremental compilation is performed based on the incremental data to generate an application package corresponding to the incremental data.
[0102] The incremental data can be source code data added for implementing new functions. The execution subject only compiles the incremental data to generate an application package corresponding to the incremental data, so that the compiling time can be shortened and the compiling efficiency can be improved during the debugging period of the application software development.
[0103] At step S205, the application package corresponding to the data test request is updated according to the application package corresponding to the incremental data.
[0104] Specifically, updating the application package corresponding to the data test request according to the application package corresponding to the incremental data includes: determining a first position of the incremental data in the full data corresponding to the data test request; determining a second position of the application package corresponding to the incremental data in the application package corresponding to the data test request based on the first position; and inserting the application package corresponding to the incremental data into the second position to update the application package corresponding to the data test request.
[0105] The first position is the position of the incremental data in the full data corresponding to the data test request. For example, the incremental data is B, and the full data is ACDE. The first position is after A and before C in the full data. Since the application package is obtained by compiling the incremental data and the full data, the compiling of the incremental data and the full data can be a process of representing the incremental data and the full data as an array. After representing the incremental data and the full data as an array, the first position of the incremental data in the full data becomes the second position of the incremental application package (i.e., the application package obtained by compiling the incremental data) in the full application package (i.e., the application package obtained by compiling the full data). The second position is obtained based on the first position. For example, after compiling the incremental data, [8] is obtained, and after compiling the full data,
[1203] is obtained. According to the first position being after A and before C in the full data, it can be obtained that the second position is after 1 and before 2 in
[1203] obtained by compiling the full data, that is, [8] obtained by compiling the incremental data is inserted after 1 and before 2 in
[1203] obtained by compiling the full data, and an updated application package
[18203] is obtained. The updating of the application package is more accurate, and thus the accurate test of the data is realized.
[0106] Specifically, updating the application package based on the change data includes:
[0107] In response to the type being modification data, determining the position of the modification data in the full data corresponding to the data test request, modifying the data at the position in the full data based on the change data, and then updating the full data, and recompiling the application package based on the updated full data.
[0108] When the type of the change data is modification data, the modification data can be associated with part of the data in the full data. The execution subject can determine the position of the modification data (for example, data R) in the full data. Since the modification of the data has a certain influence on the full data, the execution subject can determine the data (for example, data K) in the full data affected by the modification of the data. For example, the execution subject can replace the data (for example, data r and data k) at the corresponding position (for example, position j) in the full data with the data R and the data K, and then obtain the updated full data. The corresponding application package is obtained by compiling the updated full data.
[0109] In step S206, the target container identifier corresponding to the data test request and the image package corresponding to the target container identifier are obtained, and then the image package is updated based on the updated application package.
[0110] The target container identifier corresponding to the data test request acquired by the execution subject can be the target container identifier corresponding to the target container at the first start of the data test, for example, the location or name of the target container. The target container can be hardware or software and is used to carry a running environment corresponding to the image package for data testing.
[0111] In step S207, the updated image package is executed to test the data corresponding to the image package.
[0112] The embodiments of the present application can realize agile, fast function development and self-testing, saving manpower, time and resources.
[0113] Figure 3 is a schematic diagram of an application scenario of the data test method according to the third embodiment of the present application. The data test method of the embodiments of the present application is applied to the function development and self-testing scenarios in the development process of a business. As shown in Figure 3 The hot loading application package realizes the fast CICD self-testing process as follows:
[0114] First start process:
[0115] 1) Record the first start of the user with the business id of the user.
[0116] 2) Continuous integration: compile to generate an application package, and package a running environment and the application package into an image.
[0117] 3) Continuous deployment: deploy the image to a target machine to generate a container.
[0118] 4) Record the target container.
[0119] 5) Self-test: function test.
[0120] If it is not the first start, execute the hot update application package process:
[0121] 1) Determine that it is not the first start according to the business id, and enter the hot update process.
[0122] 2) Source code compilation to generate an application package.
[0123] 3) Match the target container recorded in the first start.
[0124] 4) Hot update: replace the war package of the target container, and restart the application process.
[0125] 5) Self-test.
[0126] After the above function development and self-testing are completed, the corresponding test can be performed. Continuous integration is performed on the final code and image to test. The function development and self-testing of CICD are accelerated by using the image package for hot update.
[0127] Figure 4 is a schematic diagram of a main unit of a data testing apparatus according to an embodiment of the present application. As shown in Figure 4 , the data testing apparatus 400 comprises a receiving unit 401, a change data obtaining unit 402, a first updating unit 403, a second updating unit 404, and a testing unit 405.
[0128] The receiving unit is configured to receive a data testing request, and obtain a corresponding start-up identifier.
[0129] The change data obtaining unit is configured to, in response to determining that the start-up identifier corresponds to a non-first start-up, obtain a change data identifier corresponding to the data testing request, and then obtain corresponding change data based on the change data identifier.
[0130] The first updating unit 401 is configured to obtain an application package corresponding to the data testing request, and update the application package based on the change data.
[0131] The second updating unit 402 is configured to obtain a target container identifier corresponding to the data testing request and an image package corresponding to the target container identifier, and then update the image package based on the updated application package.
[0132] The testing unit 403 is configured to execute the updated image package to perform testing on data corresponding to the image package.
[0133] In some embodiments, the first updating unit 403 is further configured to: determine a type of the change data; in response to the type being incremental data, perform incremental compilation based on the incremental data to generate an application package corresponding to the incremental data; and update the application package corresponding to the data testing request according to the application package corresponding to the incremental data.
[0134] In some embodiments, the first updating unit 403 is further configured to: determine a first position of the incremental data in full data corresponding to the data testing request; determine a second position in the application package corresponding to the data testing request where the application package corresponding to the incremental data is located based on the first position; and insert the application package corresponding to the incremental data into the second position to update the application package corresponding to the data testing request.
[0135] In some embodiments, the first updating unit 403 is further configured to: in response to the type being modification data, determine a position of the modification data in the full data corresponding to the data testing request; modify data at the position in the full data based on the change data, and then update the full data; and recompile the application package based on the updated full data.
[0136] In some embodiments, the second updating unit 404 is further configured to replace the application package in the mirror package with the updated application package, and then package the updated application package and the running environment in the mirror package to generate an updated mirror package.
[0137] In some embodiments, the testing unit 405 is further configured to, in response to determining that the startup identifier corresponds to a first startup, acquire full data corresponding to the startup identifier, compile the full data to generate an application package, package the application package and a preset running environment to generate a mirror package, create a running environment of a target application corresponding to the application package based on the mirror package as a template, and start the target application in a target container corresponding to the created running environment of the target application to test data in the mirror package.
[0138] In some embodiments, the data testing apparatus further comprises Figure 4 a target container generating unit not shown in the figure, configured to deploy the mirror package to a target machine, and then determine the target machine as the target container.
[0139] It should be noted that the data testing method and the data testing apparatus of the present application have a corresponding relationship in the specific implementation content, and therefore repeated content will not be described.
[0140] Figure 5 An exemplary system architecture 500 to which embodiments of the present application can be applied is shown.
[0141] As shown in Figure 5 The system architecture 500 can include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 serves as a medium to provide a communication link between the terminal devices 501, 502, 503 and the server 505. The network 504 can include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0142] Users can use the terminal devices 501, 502, 503 to interact with the server 505 through the network 504 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 501, 502, 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0143] The terminal devices 501, 502, 503 can be various electronic devices with data testing processing screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0144] The server 505 can be a server providing various services, for example, a background management server providing support for a data test request submitted by a user using the terminal device 501, 502, 503 (only as an example). The background management server can receive a data test request, obtain a corresponding start-up identifier, and in response to determining that the start-up identifier corresponds to a non-first start-up, obtain a change data identifier corresponding to the data test request, and then obtain corresponding change data based on the change data identifier; obtain an application package corresponding to the data test request, update the application package based on the change data; obtain a target container identifier corresponding to the data test request and an image package corresponding to the target container identifier, and then update the image package based on the updated application package; and execute the updated image package to perform a test on data corresponding to the image package. According to the start-up identifier, the execution flow after the test is determined. If the start-up identifier corresponds to a non-first start-up, only the change data is compiled, and then the image package is updated, and the running environment does not need to call network resources again, and the method of hot loading the application package is used to accelerate function development and self-test, realizing agile and fast function development and self-test, and effectively saving manpower, time and resources.
[0145] It should be noted that the data test method provided by the embodiments of the present application is generally executed by the server 505, and correspondingly, the data test device is generally arranged in the server 505.
[0146] It should be understood that Figure 5 The number of terminal devices, networks and servers in the above embodiments is only illustrative. According to the needs of implementation, there can be any number of terminal devices, networks and servers.
[0147] Reference will be made to Figure 6 which shows a structural schematic diagram of a computer system 600 suitable for implementing the terminal device of the embodiments of the present application. Figure 6 The terminal device shown is only an example and should not impose any limitation on the functions and use range of the embodiments of the present application.
[0148] As shown in Figure 6 , the computer system 600 includes a central processing unit (CPU) 601 which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 602 or programs loaded from a storage portion 608 to a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the computer system 600 are also stored. The CPU 601, the ROM 602 and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0149] The following components are connected to the I / O interface 605: an input part 606 including a keyboard, a mouse, etc.; an output part 607 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage part 608 including a hard disk, etc.; and a communication part 609 including a network interface card such as a LAN card, a modem, etc. The communication part 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as necessary. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 610 as necessary, so that a computer program read out therefrom is installed in the storage part 608 as necessary.
[0150] In particular, according to embodiments of the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-described functions defined in the system of the present application are executed.
[0151] Note that the computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium or a combination thereof. The computer-readable storage medium can include, for example, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, the computer-readable storage medium can be any tangible medium that contains or stores a program used by an instruction execution system, apparatus, or device to function according to the program. In the present application, the computer-readable signal medium can include a computer-readable storage medium or any computer-readable medium that transmits, propagates, or transfers programs used by an instruction execution system, apparatus, or device to function according to the programs. The program code contained in the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber, RF, etc., or any suitable combination of the foregoing.
[0152] The flow diagrams and block diagrams in the drawings are schematic illustrations of possible architectures, functions, and operations of systems, methods, and computer program products in accordance with various embodiments of the present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or in the reverse order, depending on the functionality involved. It will also be noted that each block of the block diagrams or flow diagrams, and combinations of blocks in the block diagrams or flow diagrams, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.
[0153] The units described in the embodiments of the present application can be implemented in the form of software, or can be implemented in the form of hardware. The described units can also be arranged in a processor, for example, a processor can be described as including a receiving unit, a changed data obtaining unit, a first updating unit, a second updating unit and a testing unit. In some cases, the names of these units do not constitute a limitation on the units themselves.
[0154] As another aspect, the present application also provides a computer readable medium, which can be included in the device described in the above embodiments, or can exist independently without being assembled into the device. The computer readable medium carries one or more programs, when the one or more programs are executed by the device, the device receives a data test request, obtains a corresponding start-up identifier; in response to determining that the start-up identifier corresponds to a non-first start-up, obtains a changed data identifier corresponding to the data test request, and then obtains corresponding changed data based on the changed data identifier; obtains an application package corresponding to the data test request, updates the application package based on the changed data; obtains a target container identifier corresponding to the data test request and an image package corresponding to the target container identifier, and then updates the image package based on the updated application package; and executes the updated image package to test data corresponding to the image package.
[0155] According to the technical scheme of the embodiments of the present application, the execution flow after testing is determined according to the start-up identifier, if the start-up identifier corresponds to a non-first start-up, only the changed data is compiled, and then the image package is updated, the running environment does not need to call network resources again, the method of hot loading application package is used to accelerate function development and self-test, and the agile and fast function development and self-test are realized, and manpower, time and resources are effectively saved.
[0156] The above specific embodiments do not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made depending on design requirements and other factors. Any modification, equivalent replacement and improvement made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A data testing method, characterized in that, include: Receive data test requests and obtain the corresponding startup identifier; In response to determining that the startup identifier corresponds to a non-first startup, the variable data identifier corresponding to the data test request is obtained, and then the corresponding variable data is found from the database based on the location identifier corresponding to the variable data identifier and the corresponding variable data is obtained. Obtain the application package corresponding to the data test request, and update the application package based on the changed data; The step of updating the application package based on the changed data includes: when the type of the changed data is modified data, determining the data in the full data affected by the data modification, and determining the data in the full data affected by the data modification after being affected by the modified data, replacing the data at the corresponding position in the full data with the modified data and the data in the full data affected by the data modification after being affected by the modified data, thereby obtaining updated full data, and compiling the updated full data to obtain the corresponding application package; Obtain the target container identifier corresponding to the data test request and the image package corresponding to the target container identifier, and then update the image package based on the updated application package; the target container identifier corresponds to the target container recorded during the first startup. Execute the updated image package to test the data corresponding to the image package.
2. The method according to claim 1, characterized in that, Updating the application package based on the changed data includes: Determine the type of the changed data; In response to the fact that the data type is incremental, incremental compilation is performed based on the incremental data to generate the application package corresponding to the incremental data; Update the application package corresponding to the data test request according to the application package corresponding to the incremental data.
3. The method according to claim 2, characterized in that, The step of updating the application package corresponding to the data test request based on the application package corresponding to the incremental data includes: Determine the first position of the incremental data in the full data corresponding to the data test request; Based on the first position, determine the second position in the application package corresponding to the data test request where the application package corresponding to the incremental data is located; Insert the application package corresponding to the incremental data into the second position to update the application package corresponding to the data test request.
4. The method according to claim 2, characterized in that, Updating the application package based on the changed data includes: In response to the data type being modified data, determine the location of the modified data in the full dataset corresponding to the data test request; Based on the changed data, modify the data at the specified position in the full data, thereby updating the full data; The application package was recompiled and generated based on the updated full data.
5. The method according to claim 1, characterized in that, Updating the image package based on the updated application package includes: The application package in the image package is replaced with the updated application package, and then the updated application package is packaged with the runtime environment in the image package to generate an updated image package.
6. The method according to claim 1, characterized in that, The method further includes: In response to determining that the startup identifier corresponds to the first startup, obtain the full data corresponding to the startup identifier; Compile the full dataset to generate the application package; Package the application package and the preset runtime environment to generate an image package; The runtime environment of the target application corresponding to the application package is created using the image package as a template; The target application is started in the target container corresponding to the runtime environment of the created target application in order to test the data in the image package.
7. The method according to claim 6, characterized in that, Before starting the target application in the target container corresponding to the runtime environment of the created target application, the method further includes: The image package is deployed to the target machine, and the target machine is then identified as the target container.
8. A data testing device, characterized in that, include: The receiving unit is configured to receive data test requests and obtain the corresponding startup identifier; The variable data acquisition unit is configured to, in response to determining that the startup identifier corresponds to a non-first startup, acquire the variable data identifier corresponding to the data test request, and then search for the corresponding variable data from the database based on the location identifier corresponding to the variable data identifier and acquire the corresponding variable data. The first update unit is configured to obtain the application package corresponding to the data test request and update the application package based on the changed data. The step of updating the application package based on the changed data includes: when the type of the changed data is modified data, determining the data in the full data affected by the data modification, and determining the data in the full data affected by the data modification after being affected by the modified data, replacing the data at the corresponding position in the full data with the modified data and the data in the full data affected by the data modification after being affected by the modified data, thereby obtaining updated full data, and compiling the updated full data to obtain the corresponding application package; The second update unit is configured to obtain the target container identifier corresponding to the data test request and the image package corresponding to the target container identifier, and then update the image package based on the updated application package; the target container identifier corresponds to the target container recorded in the first startup record. The test unit is configured to execute the updated image package to test the data corresponding to the image package.
9. The apparatus according to claim 8, characterized in that, The first update unit is further configured to: Determine the type of the changed data; In response to the fact that the data type is incremental, incremental compilation is performed based on the incremental data to generate the application package corresponding to the incremental data; Update the application package corresponding to the data test request according to the application package corresponding to the incremental data.
10. The apparatus according to claim 9, characterized in that, The first update unit is further configured to: Determine the first position of the incremental data in the full data corresponding to the data test request; Based on the first position, determine the second position in the application package corresponding to the data test request where the application package corresponding to the incremental data is located; Insert the application package corresponding to the incremental data into the second position to update the application package corresponding to the data test request.
11. A data testing electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.
12. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Application publishing method, device and equipment and storage medium
CN112650507A
Strategy-based version compilation deployment method and device
CN114489704A