Software testing method, device, medium and electronic equipment

By creating multiple virtual containers on the container cloud platform and configuring traffic pools, software testing is parallelized, solving the problems of low efficiency and high cost in traditional testing methods, and improving software development efficiency and quality control.

CN114116501BActive Publication Date: 2024-08-23PING AN BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111450759.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2024-08-23
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

Testing efficiency is low and costs are high during the software development process, especially when bank financial products have higher compliance and quality requirements. Traditional testing methods have problems such as long link data structure, difficulty in joint debugging and test communication, and repeated changes in requirements. .

Method used

Create multiple virtual containers on the container cloud platform, configure a corresponding traffic pool for each container, collect and manage traffic data according to preset traffic collection rules, and test the software code in parallel through the traffic input ratio configured in the virtual container. Monitor test scores in real time to ensure that the software reaches the threshold during the verification and production phases before going online or rolling back the code.

Benefits of technology

It improves software testing efficiency, reduces development costs, realizes parallelization of software testing, reduces testing resource investment, and improves software quality control capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114116501B
    Figure CN114116501B
Patent Text Reader

Abstract

The present application belongs to the field of artificial intelligence technology, and specifically relates to a software testing method, a software testing device, a computer-readable medium, and an electronic device. The software testing method comprises: deploying software to be tested at different software development stages in multiple virtual containers of a container cloud platform, respectively, and configuring multiple traffic pools associated with the virtual containers; collecting traffic data related to the software to be tested according to preset traffic collection rules, and saving the collected traffic data to the traffic pool associated with the traffic collection rules; extracting sample data from multiple traffic pools according to the traffic input ratio configured in the virtual container, and inputting the sample data into the software to be tested deployed in the virtual container, so as to update the software code of the software to be tested according to the running results of the software to be tested. The embodiments of the present application can improve software testing efficiency and reduce software development costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of artificial intelligence technology, and specifically relates to a software testing method, a software testing device, a computer-readable medium, and an electronic device. Background Art

[0002] The current software life cycle process, from development to launch, needs to go through R&D code development, self-testing, functional testing, integration testing, system testing, regression testing, business acceptance and other stages. The entire development process requires a lot of human resources. Even so, comprehensive online verification is still required during the software production process, and online events are endless.

[0003] Especially for banking and financial products, compliance and quality requirements are higher, product links are more dependent, long-link data construction in testing, joint debugging testing, communication between tests, confirmation of tests and R&D, and repeated changes of requirements during the testing process have further increased the cost of software development. Summary of the invention

[0004] The purpose of this application is to provide a software testing method, a software testing device, a computer-readable medium and an electronic device, which can at least to some extent overcome the technical problems of low software development efficiency and high cost existing in the related art.

[0005] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0006] According to one aspect of an embodiment of the present application, a software testing method is provided, the method comprising:

[0007] Deploy the software to be tested at different software development stages in multiple virtual containers of the container cloud platform respectively, and configure multiple traffic pools associated with the virtual containers, wherein the traffic pools are used to collect and manage traffic data;

[0008] Collecting traffic data related to the software to be tested according to a preset traffic collection rule, and saving the collected traffic data to a traffic pool associated with the traffic collection rule; the traffic collection rule is used to indicate the traffic collection ratio of different data sources;

[0009] Extracting sample data from the plurality of traffic pools according to the traffic input ratio configured in the virtual container, and inputting the sample data into the software to be tested deployed in the virtual container, so as to update the software code of the software to be tested according to the running result of the software to be tested;

[0010] Performing quality monitoring on the software to be tested after the software code is updated to determine a first test score of the software to be tested in the verification phase, and putting the software to be tested into production when the test score is greater than a first pass threshold;

[0011] Quality monitoring is performed on the software to be tested that is running online to determine a second test score of the software to be tested in the production stage, and when the second test score is less than a second pass threshold, the software code of the software to be tested is restored to a historical software code.

[0012] In some embodiments of the present application, based on the above technical solution, software to be tested at different software development stages is deployed in multiple virtual containers of the container cloud platform, including:

[0013] Create multiple virtual containers corresponding to different software development stages on the container cloud platform;

[0014] Acquire application branch information corresponding to different software development stages, wherein the application branch information is used to represent software functions of the software to be tested;

[0015] Deploying multiple groups of software codes implementing various software functions into the virtual container according to the application branch information;

[0016] The multiple groups of software codes in the virtual container are merged to obtain a merged code including multiple application branches, and the merged code is packaged as software to be tested.

[0017] In some embodiments of the present application, based on the above technical solution, the flow data related to the software to be tested is collected according to the preset flow collection rules, including:

[0018] Performing traffic monitoring on the historical version of the software to be tested that is running online to obtain historical traffic data of the software to be tested;

[0019] Crawling traffic of other software of the same type as the software to be tested to obtain traffic data of competing products of the software to be tested;

[0020] The historical traffic data and competitor traffic data are normalized according to preset traffic collection rules to obtain traffic data related to the software to be tested.

[0021] In some embodiments of the present application, based on the above technical solution, the historical traffic data and the competitive product traffic data are normalized according to the preset traffic collection rules, including:

[0022] The historical traffic data and the competitor traffic data are mixed according to the preset traffic collection rules to obtain the original traffic data;

[0023] Performing desensitization processing on the original traffic data to obtain desensitized data;

[0024] The desensitized data is input into a pre-trained traffic cultivation model, so as to map the desensitized data through the traffic cultivation model to obtain simulated traffic data suitable for the software to be tested.

[0025] In some embodiments of the present application, based on the above technical solution, the flow input ratio configured in the virtual container is negatively correlated with the software development stage corresponding to the virtual container.

[0026] In some embodiments of the present application, based on the above technical solution, quality monitoring is performed on the software to be tested after the software code is updated to determine a first test score of the software to be tested in the verification phase, including:

[0027] Performing quality monitoring on the software to be tested after the software code is updated to obtain monitoring indicators in multiple dimensions, wherein the monitoring indicators include at least one of task coverage, code coverage, number of code releases, or code volume;

[0028] A first test score of the software to be tested in a verification phase is determined according to the monitoring indicators of the multiple dimensions.

[0029] In some embodiments of the present application, based on the above technical solution, the method further includes:

[0030] Obtaining warning thresholds related to monitoring indicators of the multiple dimensions;

[0031] When any monitoring indicator of the software to be tested is lower than the warning threshold, obtaining a target tracking point associated with the monitoring indicator;

[0032] According to the target embedding point, the abnormal code is searched and repaired in each of the virtual containers.

[0033] According to one aspect of an embodiment of the present application, a software testing device is provided, the device comprising:

[0034] A deployment module is configured to deploy the software to be tested at different software development stages in multiple virtual containers of the container cloud platform, and configure multiple traffic pools associated with the virtual containers, wherein the traffic pools are used to collect and manage traffic data;

[0035] A collection module is configured to collect flow data related to the software to be tested according to a preset flow collection rule, and save the collected flow data to a flow pool associated with the flow collection rule; the flow collection rule is used to indicate the flow collection ratio of different data sources;

[0036] An input module is configured to extract sample data from the multiple traffic pools according to the traffic input ratio configured in the virtual container, and input the sample data into the software to be tested deployed in the virtual container, so as to update the software code of the software to be tested according to the running result of the software to be tested;

[0037] A first monitoring module is configured to perform quality monitoring on the software to be tested after the software code is updated to determine a first test score of the software to be tested in a verification phase, and to put the software to be tested into production when the test score is greater than a first pass threshold;

[0038] The second monitoring module is configured to perform quality monitoring on the software to be tested running online to determine a second test score of the software to be tested in the production stage, and when the second test score is less than a second passing threshold, restore the software code of the software to be tested to the historical software code.

[0039] According to one aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the software testing method in the above technical solution is implemented.

[0040] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the software testing method in the above technical solution by executing the executable instructions.

[0041] According to one aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the software testing method in the above technical solution.

[0042] In the technical solution provided in the embodiment of the present application, by creating multiple virtual containers and configuring a corresponding traffic pool for each virtual container, the software to be tested at different development stages in each virtual container can be tested in parallel according to the set traffic ratio, which changes the traditional testing solution in which the next testing stage can only be started after one testing stage is completed, thereby improving software testing efficiency and reducing software development costs.

[0043] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0045] Figure 1 An exemplary system architecture block diagram applying the technical solution of the present application is shown.

[0046] Figure 2 A flowchart of the steps of a software testing method in one embodiment of the present application is shown.

[0047] Figure 3 A flowchart of the steps of deploying the software to be tested in one embodiment of the present application is shown.

[0048] Figure 4 The user interface of the container cloud platform in one embodiment of the present application is shown.

[0049] Figure 5 A flow chart showing the steps of collecting flow data in one embodiment of the present application is shown.

[0050] Figure 6 A flow chart showing the steps of normalizing flow data in one embodiment of the present application is shown.

[0051] Figure 7 A user interface for configuring a traffic pool in one embodiment of the present application is shown.

[0052] Figure 8 A user interface for managing quality access control in one embodiment of the present application is shown.

[0053] Fig. 9 A user interface for managing the production of software to be tested in one embodiment of the present application is shown.

[0054] Fig.10 A structural block diagram of a software testing device provided in an embodiment of the present application is shown.

[0055] Fig.11 A block diagram of a computer system structure of an electronic device suitable for implementing an embodiment of the present application is shown. DETAILED DESCRIPTION

[0056] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.

[0057] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0058] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0059] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0060] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0061] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0062] Figure 1 The exemplary system architecture block diagram applying the technical solution of the present application is schematically shown.

[0063] like Figure 1As shown, the system architecture 100 may include a terminal device 110, a network 120 and a server 130. The terminal device 110 may include various electronic devices such as smart phones, tablet computers, laptops, and desktop computers. The server 130 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. The network 120 may be a communication medium of various connection types that can provide a communication link between the terminal device 110 and the server 130, such as a wired communication link or a wireless communication link.

[0064] According to the implementation requirements, the system architecture in the embodiment of the present application can have any number of terminal devices, networks and servers. For example, the server 130 can be a server group composed of multiple server devices. In addition, the technical solution provided in the embodiment of the present application can be applied to the terminal device 110, can also be applied to the server 130, or can be implemented by the terminal device 110 and the server 130 together, and the present application does not make any special restrictions on this.

[0065] The following is a detailed description of the technical solutions such as the software testing method, software testing device, computer-readable medium, and electronic device provided by the present application in conjunction with specific implementation methods.

[0066] Figure 2 A flowchart showing the steps of a software testing method in an embodiment of the present application is shown. The software testing method can be performed by Figure 1 The terminal device or server shown is executed, and the embodiment of the present application takes the software testing method executed by the server as an example for explanation. Figure 2 As shown, the software testing method may mainly include the following steps S210 to S250.

[0067] Step S210: deploying the software to be tested at different software development stages in multiple virtual containers of the container cloud platform respectively, and configuring multiple traffic pools associated with the virtual containers, where the traffic pools are used to collect and manage traffic data;

[0068] Step S220: collecting traffic data related to the software to be tested according to the preset traffic collection rules, and saving the collected traffic data to a traffic pool associated with the traffic collection rules; the traffic collection rules are used to indicate the traffic collection ratios of different data sources;

[0069] Step S230: extracting sample data from multiple traffic pools according to the traffic input ratio configured in the virtual container, and inputting the sample data into the software to be tested deployed in the virtual container, so as to update the software code of the software to be tested according to the running result of the software to be tested;

[0070] Step S240: performing quality monitoring on the software to be tested after the software code is updated to determine a first test score of the software to be tested in the verification phase, and putting the software to be tested online for production when the test score is greater than a first pass threshold;

[0071] Step S250: Perform quality monitoring on the software to be tested running online to determine a second test score of the software to be tested in the production stage, and restore the software code of the software to be tested to a historical software code when the second test score is less than a second pass threshold.

[0072] In the software testing method provided in the embodiment of the present application, the method in which the next testing phase can only be started after one testing phase is completed in the traditional testing scheme is changed. Specifically, by creating multiple virtual containers and configuring a corresponding traffic pool for each virtual container, the software to be tested at different development stages in each virtual container can be tested in parallel according to the set traffic ratio, thereby improving software testing efficiency and reducing software development costs.

[0073] The following is a detailed description of each method step of the software testing method through application scenarios.

[0074] In step S210, the software to be tested at different software development stages is deployed in multiple virtual containers of the container cloud platform, and multiple traffic pools associated with the virtual containers are configured, where the traffic pools are used to collect and manage traffic data.

[0075] The container cloud platform is a cloud computing platform that is a containerized implementation of a lightweight PaaS (Platform as a Service) platform and is built using technologies such as containers, container scheduling and orchestration, and distribution. The container cloud platform covers various issues involved in the IaaS (Infrastructure as a Service) layer and the PaaS layer of cloud computing from bottom to top, including resource scheduling, service orchestration, application deployment, monitoring logs, configuration management, storage network management, and security. It focuses on realizing the capabilities of application development, application hosting, and application operation and maintenance, allowing enterprises to focus on business logic development, shorten the business iteration and launch cycle, optimize resource utilization, and improve service response efficiency.

[0076] The infrastructure resources of the container cloud platform mainly include hosts, networks, storage resources, etc.

[0077] Host: The computing power of the container cloud platform is provided by nodes. The node types are divided into control nodes and container nodes. The container groups of business applications all run on container nodes. Nodes can be physical machines or virtual machines. The platform can form node clusters of a certain scale according to business needs. The node management of the container cloud platform must meet the enterprise's needs for cluster operation and maintenance monitoring, support real-time viewing of cluster resource usage and node status, and view the CPU and memory consumption, number of container groups and status on any node. It also provides all-round and fine-grained resource monitoring of nodes, such as IOPS (Input / Output Operations PerSecond, the number of read and write operations per second), disk throughput, and network card traffic, so that users can see the resource status of all nodes at a glance.

[0078] Network: The containers of the container cloud platform need to be network isolated or connected. The network management function needs to support the standard container network model and the extended network technology. In this way, rich network functions can be provided to better provide the best network service solutions for business services. Different options vary in terms of network performance, network node scale, etc. The main network solutions include Bridge network mode, Host network mode, Overlay network mode and other solutions. Container scheduling management should support graphical management of the network, reduce the technical difficulty of network configuration, and weaken the dependence on designated hardware manufacturers. In addition, network communication security should support the creation of a secure encrypted network to ensure the security of network communication information.

[0079] Storage: Containers are stateless. When a container crashes and restarts, the files temporarily stored on the disk in the container will be lost. Secondly, when multiple containers are running simultaneously in a container group, files need to be shared between these containers. However, most production business applications are stateful. The container cloud platform solves the storage problem through storage volumes and supports docking with multiple storage solutions, such as Ceph, NFS, glusterfs, etc.

[0080] Figure 3 A flowchart of the steps of deploying the software to be tested in one embodiment of the present application is shown as follows: Figure 3 As shown, based on the above embodiment, the step S210 of deploying the software to be tested at different software development stages in multiple virtual containers of the container cloud platform may include the following steps S310 to S340.

[0081] Step S310: Create multiple virtual containers corresponding to different software development stages on the container cloud platform.

[0082] Figure 4 The user interface of the container cloud platform in one embodiment of the present application is shown as follows: Figure 4As shown, multiple virtual containers 401 are displayed on the user interface, each of which is used to carry a different software testing environment. For example, in the embodiment of the present application, three virtual containers can be created, namely "environment A", "environment B" and "environment C". Each virtual container corresponds to a different software development stage. For example, the software development stage corresponding to environment A is "under construction", the software development stage corresponding to environment B is "under verification", and the software development stage corresponding to environment C is "in production".

[0083] Step S320: Acquire application branch information corresponding to different software development stages, where the application branch information is used to represent software functions of the software to be tested.

[0084] For example, for a social application APP, in the first phase, the main software functions tested include user login, identity authentication, device permission acquisition, address book import, etc. In the second phase, the software functions tested include text communication, voice call, video call, etc., where each software function corresponds to an application branch. Different application branches can be determined in different software development stages.

[0085] Step S330: deploying multiple sets of software codes for implementing various software functions into the virtual container according to the application branch information.

[0086] When deploying the software to be tested into the virtual container, the software codes corresponding to each application branch are deployed into the virtual container in a modular manner. For example, multiple groups of software codes for implementing a part of the software functions are deployed in the virtual container corresponding to the first stage. In the virtual container corresponding to the second stage, in addition to deploying all the software codes of the previous stage, the software codes corresponding to the newly added software functions also need to be deployed.

[0087] Step S340: merging the multiple groups of software codes in the virtual container to obtain a merged code including multiple application branches, and encapsulating the merged code as the software to be tested.

[0088] All modular software codes deployed in the virtual container are merged to obtain corresponding merged codes. Figure 4 As shown, on the user interface of the container cloud platform, by clicking on each virtual container 401, the detailed information 402 of the virtual container can be viewed. For example, when the user clicks on "Environment B", detailed information such as demand, planned production time, quality access control, and traffic pool can be displayed on the user interface. In addition, the application branches 403 deployed in the virtual container can also be displayed on the user interface; for example, the application branches corresponding to environment B that need to be tested and verified include multiple application branches numbered 20068, 20065, 20037, 200073, etc.

[0089] Based on the above method steps, it is possible to deploy multiple virtual containers corresponding to different software development stages on the container cloud platform. Software codes corresponding to different application branches are deployed in each virtual container, thereby realizing parallel testing of multiple software development stages.

[0090] After completing the creation of the virtual container and the deployment of the software code, you can configure the corresponding traffic pool for each virtual container and establish a mapping relationship between each traffic pool and each application branch in the merged code. Each traffic pool can collect and manage traffic data independently. For example, one traffic pool is used to collect traffic data generated by users logging into the software and verifying their identities, and another traffic pool is used to collect traffic data generated by users making voice calls or video calls using the software. Based on the type of traffic data collected by the traffic pool, a mapping relationship between each traffic pool and each application branch can be established to achieve accurate traffic data allocation.

[0091] like Figure 4 As shown, users can adjust the mapping relationship between traffic pools and virtual containers on the container cloud platform as needed, so as to input different types of traffic data into the virtual container. For example, environment A is associated with traffic pool A, environment B is associated with traffic pool B, and environment C is associated with traffic pool C.

[0092] In one embodiment of the present application, when deploying the software to be tested, corresponding quality gate rules can also be configured for each virtual container, and the quality gate rules are used to monitor and manage the software testing progress. The method of configuring the quality gate rules may include, for example: obtaining test indicators of multiple dimensions used to represent the software testing progress, and assigning values ​​to each test indicator to obtain the quality gate rules.

[0093] Test indicators can include task coverage and code coverage, for example. Different values ​​can be assigned to test indicators for different software testing stages to configure different quality gate rules in different testing stages. For example, in the first stage, the task coverage can be configured to be 50% and the code coverage to be 90%. In the second stage, the task coverage can be configured to be 70% and the code coverage to be 80%.

[0094] By configuring multiple traffic pools that have a mapping relationship with application branches, you can collect traffic data that matches the software application branches in a targeted manner, achieve accurate traffic data allocation, and improve the testing effect of software functions. By assigning parameters to test indicators in multiple dimensions, you can effectively control the software testing progress in different testing stages and improve testing efficiency.

[0095] In step S220, traffic data related to the software to be tested is collected according to preset traffic collection rules, and the collected traffic data is saved in a traffic pool associated with the traffic collection rules; the traffic collection rules are used to represent the traffic collection ratio of different data sources.

[0096] Figure 5 A flow chart of the steps of collecting flow data in one embodiment of the present application is shown as follows: Figure 5 As shown, based on the above embodiment, collecting the flow data related to the software to be tested according to the preset flow collection rule in step S220 includes the following steps S510 to S530.

[0097] Step S510: Monitor the flow of the historical version of the software to be tested that is running online to obtain historical flow data of the software to be tested.

[0098] For example, the software to be tested is version 3.0 of a social application APP, and the software currently running online is version 2.0. During the online operation of version 2.0, the business data flow generated by users using the software is first analyzed, and the data that meets the test requirements is selected and pulled from the online operation database to the traffic pool. The pulled data is marked in the traffic pool to obtain historical version data. The marking content may include, for example, information such as data source, data type, corresponding software version, etc. for distinguishing identification and information that needs to be paid attention to in software testing.

[0099] Step S520: crawling the traffic of other software of the same type as the software to be tested to obtain the traffic data of competitors of the software to be tested.

[0100] By using crawler technology, traffic of other software of the same type as the software to be tested can be crawled to obtain competitive product data; for example, if the software to be tested is a social application APP, crawler technology can be used to crawl traffic of other social application APPs to obtain competitive product data generated by other software during online operation.

[0101] A crawler is a program that automatically grabs Internet information. The crawler architecture mainly consists of five parts: scheduler, URL manager, web page downloader, web page parser, and application.

[0102] Scheduler: Equivalent to the CPU of a computer, it is mainly responsible for coordinating the work between the URL manager, downloader, and parser.

[0103] URL manager: includes URL addresses to be crawled and URL addresses that have been crawled, to prevent repeated crawling of URLs and circular crawling of URLs. There are three main ways to implement the URL manager: through memory, database, and cache database.

[0104] Web Downloader: Download a web page by passing in a URL address and converting the web page into a string. The web downloader has urllib2 (Python official basic module) including login, proxy, and cookies, requests (third-party package).

[0105] Web page parser: Parse a web page string to extract useful information according to our requirements, or parse it according to the DOM tree parsing method. Web page parsers include regular expressions (convert web pages into strings and extract valuable information through fuzzy matching. When the document is complex, this method will be very difficult to extract data), html.parser (Python built-in), beautifulsoup (third-party plug-in, you can use Python built-in html.parser for parsing, or you can use lxml for parsing), lxml (third-party plug-in, can parse xml and HTML), html.parser, beautifulsoup and lxml all parse in the DOM tree way.

[0106] Application: An application consisting of useful data extracted from web pages.

[0107] Step S530: normalize the historical traffic data and competitor traffic data according to the preset traffic collection rules to obtain traffic data related to the software to be tested.

[0108] Since different software have certain differences in the type and format of traffic data, after obtaining historical version data and competitor data, the two types of data can be normalized to obtain traffic data with consistent type and unified format.

[0109] Figure 6 FIG. 1 shows a flow chart of the steps of normalizing flow data in one embodiment of the present application. Figure 6 As shown, based on the above embodiments, the normalization of historical traffic data and competitor traffic data according to preset traffic collection rules in step S530 may include the following steps S610 to S630.

[0110] Step S610: Mix historical traffic data and competitor traffic data according to preset traffic collection rules to obtain original traffic data.

[0111] Step S620: desensitize the original traffic data to obtain desensitized data.

[0112] Desensitization refers to the deformation of certain sensitive information through desensitization rules to achieve reliable protection of sensitive privacy data. In the case of customer security data or some commercial sensitive data, real data is transformed and provided for testing without violating system rules. For example, personal information such as ID card number, mobile phone number, card number, customer number, etc. need to be desensitized. Desensitization methods can include data replacement, invalidation, randomization, data offset and data rounding, mask shielding, etc.

[0113] Step S630: input the desensitized data into the pre-trained traffic cultivation model, so as to map the desensitized data through the traffic cultivation model to obtain simulated traffic data suitable for the software to be tested.

[0114] After the desensitized data is mapped by the traffic cultivation model, simulated traffic data can be obtained to simulate real user operations. For example, the desensitized data is mapped to obtain login test data containing login usernames, mobile phone numbers, and verification codes. By mapping the desensitized data obtained through the traffic cultivation model, simulated traffic data that meets both user data security and software testing rules can be obtained.

[0115] By using two data collection sources, historical version data and competitor data, sufficient traffic data can be provided in software testing. For example, in the early stages of software development, since it has not yet been put into online operation, a large amount of competitor data can be used for software testing. In the later stages of software development, a certain amount of historical version data has been accumulated through the online operation of historical versions of software, and the proportion of competitor data in traffic data can be gradually reduced.

[0116] In step S230, sample data is extracted from multiple traffic pools according to the traffic input ratio configured in the virtual container, and the sample data is input into the software to be tested deployed in the virtual container, so as to update the software code of the software to be tested according to the running result of the software to be tested;

[0117] In one embodiment of the present application, the flow input ratio configured in the virtual container is negatively correlated with the software development stage corresponding to the virtual container.

[0118] For example, for virtual containers in the software construction stage, 50% of the sample data is extracted from each traffic pool; for virtual containers in the software verification stage, 30% of the sample data is extracted from each traffic pool; for virtual containers in the software production stage, 20% of the sample data is extracted from each traffic pool. In different software development stages, extracting different proportions of sample data from the traffic pool can meet the testing needs of different development stages. For example, in the software construction stage, with the diversity of software functions as the main verification goal, a large amount of sample data can be extracted to conduct extensive testing of the software to be tested. In the software verification stage or the production stage, with the stability and reliability of the core software functions as the main verification goal, a small amount of sample data can be extracted to conduct concentrated testing of the core software functions.

[0119] Figure 7 FIG. 1 shows a user interface for configuring a flow pool in one embodiment of the present application. Figure 7 As shown, in the flow engine page, the flow pool 701 and the flow collector 702 for collecting flow can be managed. The flow pool 701 can be configured with the flow collector, flow cultivation room and flow valve associated with it. For example, flow pool A is associated with flow collector A, flow collector A is used to collect historical flow data of online operation, and desensitize the collected data; flow pool B is associated with flow collector B, flow collector B is used to collect competitor flow data, and desensitize the collected data.

[0120] The traffic cultivation room is used to perform AI traffic cultivation on the traffic data collected by the traffic collector to obtain data that is suitable for the testing requirements of the software to be tested.

[0121] The flow valve is used to control the ratio of flow data input from the flow pool to each virtual container.

[0122] In step S240, the quality of the software to be tested after the software code is updated is monitored to determine a first test score of the software to be tested in the verification phase, and when the test score is greater than a first pass threshold, the software to be tested is put into production;

[0123] In one embodiment of the present application, a method for quality monitoring of software to be tested after updating the software code includes: performing quality monitoring on the software to be tested after updating the software code to obtain monitoring indicators in multiple dimensions, the monitoring indicators including at least one of task coverage, code coverage, number of code releases or code volume; determining a first test score of the software to be tested in the verification phase based on the monitoring indicators in multiple dimensions.

[0124] By combining monitoring indicators from multiple dimensions, different scoring standards can be formed in different testing stages, allowing for flexible control of software testing progress.

[0125] Figure 8 FIG. 1 shows a user interface for managing quality access control in one embodiment of the present application. Figure 8 As shown in FIG, in the container cloud platform, quality gate rules that match different software to be tested can be adaptively configured. Figure 8 In the user interface shown, you can view and manage the monitoring data of a certain application software V3 version, such as CAT logs, business monitoring volume, SQL data, code coverage, etc. At the same time, you can also view the test indicators and test reports of the application software V2 version, for example, test indicators include task coverage, code coverage, number of code releases, code volume, etc.

[0126] In one embodiment of the present application, when quality monitoring is performed on the software to be tested after the software code is updated, early warning and software repair can also be performed in real time based on the monitoring results. For example, the embodiment of the present application can obtain early warning thresholds related to monitoring indicators of multiple dimensions; when any monitoring indicator of the software to be tested is lower than the early warning threshold, the target tracking point associated with the monitoring indicator is obtained; and the abnormal code is found and repaired in each virtual container according to the target tracking point. Tracking points are to implant N lines of code where statistical data is needed to count the key behaviors of code execution. Using the piling tracking technology, verification logic tracking points are added in the code development process, which can automatically realize business verification, result judgment, and risk reporting.

[0127] In step S250, quality monitoring is performed on the software to be tested running online to determine a second test score of the software to be tested in the production stage, and when the second test score is less than a second pass threshold, the software code of the software to be tested is restored to the historical software code.

[0128] After the R&D verification container passes the test, it is automatically pulled into the production environment and gradually replaces the online application. The production process is automatically monitored and verified. If the verification fails during the production process, the rollback operation is initiated, and there is no one on duty throughout the process.

[0129] Fig. 9 FIG. 1 shows a user interface for managing the production of software to be tested in one embodiment of the present application. Fig. 9 As shown, in this interface, you can view and manage the software to be tested that is waiting for production, in production, and has finished production. In addition, when the score of the software to be tested that is put into production online is too low, you can start a rollback task to restore the software code of the software to be tested.

[0130] The embodiments of the present application target the pain points of R&D and testing in the existing software process, adopt a one-click building block-style test environment to dynamically build simulated traffic test data in real time, and fully automate the verification process (with pre-embedded indicators), so as to achieve intelligent quality control, improve the quality of business production, and improve the timeliness of demand, thereby ultimately achieving unmanned testing process and greatly reducing the investment in testing resources.

[0131] The embodiments of the present application can subvert existing testing methods and concepts and significantly improve energy efficiency from the perspectives of full-link quality control, verification by existence, risk pre-positioning, and left-shift testing through technologies such as AI, BI, and container cloud.

[0132] It should be noted that although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0133] The following introduces an apparatus embodiment of the present application, which can be used to execute the software testing method in the above-mentioned embodiment of the present application. Fig.10 The structural block diagram of the software testing device provided in the embodiment of the present application is schematically shown. Fig.10 As shown, the software testing device 1000 may mainly include:

[0134] The deployment module 1010 is configured to deploy the software to be tested at different software development stages in multiple virtual containers of the container cloud platform, respectively, and configure multiple traffic pools associated with the virtual containers, wherein the traffic pools are used to collect and manage traffic data;

[0135] The collection module 1020 is configured to collect flow data related to the software to be tested according to a preset flow collection rule, and save the collected flow data to a flow pool associated with the flow collection rule; the flow collection rule is used to indicate the flow collection ratio of different data sources;

[0136] The input module 1030 is configured to extract sample data from the multiple traffic pools according to the traffic input ratio configured in the virtual container, and input the sample data into the software to be tested deployed in the virtual container, so as to update the software code of the software to be tested according to the running result of the software to be tested;

[0137] The first monitoring module 1040 is configured to perform quality monitoring on the software to be tested after the software code is updated, so as to determine a first test score of the software to be tested in the verification phase, and to put the software to be tested into production when the test score is greater than a first pass threshold;

[0138] The second monitoring module 1050 is configured to perform quality monitoring on the software to be tested running online to determine a second test score of the software to be tested in the production stage, and when the second test score is less than a second passing threshold, restore the software code of the software to be tested to the historical software code.

[0139] In some embodiments of the present application, based on the above embodiments, the deployment module 1010 includes:

[0140] A container creation module, configured to create a plurality of virtual containers corresponding to different software development stages on the container cloud platform;

[0141] A branch acquisition module is configured to acquire application branch information corresponding to different software development stages, wherein the application branch information is used to represent software functions of the software to be tested;

[0142] A code deployment module, configured to deploy multiple groups of software codes implementing various software functions into the virtual container according to the application branch information;

[0143] The code packaging module is configured to merge the multiple groups of software codes in the virtual container to obtain a merged code including multiple application branches, and to package the merged code into the software to be tested.

[0144] In some embodiments of the present application, based on the above embodiments, the flow data related to the software to be tested is collected according to the preset flow collection rules, including:

[0145] Performing traffic monitoring on the historical version of the software to be tested that is running online to obtain historical traffic data of the software to be tested;

[0146] Crawling traffic of other software of the same type as the software to be tested to obtain traffic data of competing products of the software to be tested;

[0147] The historical traffic data and competitor traffic data are normalized according to preset traffic collection rules to obtain traffic data related to the software to be tested.

[0148] In some embodiments of the present application, based on the above embodiments, the acquisition module 1020 includes:

[0149] A data mixing module is configured to mix the historical traffic data and the competitive product traffic data according to a preset traffic collection rule to obtain original traffic data;

[0150] A data desensitization module is configured to perform desensitization processing on the original traffic data to obtain desensitized data;

[0151] The traffic cultivation module is configured to input the desensitized data into a pre-trained traffic cultivation model, so as to map the desensitized data through the traffic cultivation model to obtain simulated traffic data suitable for the software to be tested.

[0152] In some embodiments of the present application, based on the above embodiments, the flow input ratio configured in the virtual container is negatively correlated with the software development stage corresponding to the virtual container.

[0153] In some embodiments of the present application, based on the above embodiments, the first monitoring module 1040 includes:

[0154] A quality monitoring module is configured to perform quality monitoring on the software to be tested after the software code is updated, and obtain monitoring indicators in multiple dimensions, wherein the monitoring indicators include at least one of task coverage, code coverage, number of code releases, or code volume;

[0155] The score determination module is configured to determine a first test score of the software to be tested in the verification phase according to the monitoring indicators of the multiple dimensions.

[0156] In some embodiments of the present application, based on the above embodiments, the software testing device 1000 further includes:

[0157] A threshold acquisition module is configured to acquire early warning thresholds related to the monitoring indicators of the multiple dimensions;

[0158] A tracking point acquisition module is configured to acquire a target tracking point associated with any monitoring indicator of the software to be tested when the monitoring indicator is lower than the warning threshold;

[0159] The code repair module is configured to search and repair abnormal codes in each of the virtual containers according to the target buried points.

[0160] The specific details of the software testing device provided in each embodiment of the present application have been described in detail in the corresponding method embodiment and will not be repeated here.

[0161] Fig.11 The structure block diagram of a computer system for implementing an electronic device according to an embodiment of the present application is schematically shown.

[0162] It should be noted that Fig.11 The computer system 1100 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0163] like Fig.11As shown, the computer system 1100 includes a central processing unit 1101 (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory 1102 (ROM) or the program loaded from the storage part 1108 to the random access memory 1103 (RAM). Various programs and data required for system operation are also stored in the random access memory 1103. The central processing unit 1101, the read-only memory 1102 and the random access memory 1103 are connected to each other through a bus 1104. An input / output interface 1105 (Input / Output interface, i.e., I / O interface) is also connected to the bus 1104.

[0164] The following components are connected to the input / output interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the input / output interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed so that a computer program read therefrom is installed into the storage section 1108 as needed.

[0165] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1109, and / or installed from the removable medium 1111. When the computer program is executed by the central processor 1101, various functions defined in the system of the present application are executed.

[0166] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0167] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0168] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0169] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.

[0170] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application.

[0171] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A software testing method, characterized in that: include: Deploy the software to be tested at different software development stages in multiple virtual containers of the container cloud platform respectively, and configure multiple traffic pools associated with the virtual containers, wherein the traffic pools are used to collect and manage traffic data; Perform traffic monitoring on historical versions of the software to be tested that are running online to obtain historical traffic data of the software to be tested; perform traffic crawling on online software that is of the same type as the software to be tested to obtain traffic data of competing products of the software to be tested; The historical traffic data and the competitor traffic data are mixed according to the preset traffic collection rules to obtain the original traffic data; Performing desensitization processing on the original traffic data to obtain desensitized data; Input the desensitized data into a pre-trained traffic cultivation model, map the desensitized data through the traffic cultivation model, obtain simulated traffic data adapted to the software to be tested, and save the collected simulated traffic data to a traffic pool associated with the traffic collection rule; the traffic collection rule is used to indicate the traffic collection ratio of different data sources; Extracting sample data from the plurality of traffic pools according to the traffic input ratio configured in the virtual container, and inputting the sample data into the software to be tested deployed in the virtual container, so as to update the software code of the software to be tested according to the running result of the software to be tested; Performing quality monitoring on the software to be tested after the software code is updated to determine a first test score of the software to be tested in the verification phase, and putting the software to be tested online for production when the test score is greater than a first pass threshold; Quality monitoring is performed on the software to be tested that is running online to determine a second test score of the software to be tested in the production stage, and when the second test score is less than a second pass threshold, the software code of the software to be tested is restored to a historical software code.

2. The software testing method according to claim 1, characterized in that: Deploy the software to be tested at different software development stages in multiple virtual containers on the container cloud platform, including: Create multiple virtual containers corresponding to different software development stages on the container cloud platform; Acquire application branch information corresponding to different software development stages, wherein the application branch information is used to represent software functions of the software to be tested; Deploying multiple groups of software codes implementing various software functions into the virtual container according to the application branch information; The multiple groups of software codes in the virtual container are merged to obtain a merged code including multiple application branches, and the merged code is packaged as software to be tested.

3. The software testing method according to claim 1, characterized in that: The flow input ratio configured in the virtual container is negatively correlated with the software development stage corresponding to the virtual container.

4. The software testing method according to claim 1, characterized in that: Performing quality monitoring on the software to be tested after the software code is updated to determine a first test score of the software to be tested in the verification phase includes: Performing quality monitoring on the software to be tested after the software code is updated to obtain monitoring indicators in multiple dimensions, wherein the monitoring indicators include at least one of task coverage, code coverage, number of code releases, or code volume; A first test score of the software to be tested in a verification phase is determined according to the monitoring indicators of the multiple dimensions.

5. The software testing method according to claim 4, characterized in that: The method further comprises: Obtaining warning thresholds related to monitoring indicators of the multiple dimensions; When any monitoring indicator of the software to be tested is lower than the warning threshold, obtaining a target tracking point associated with the monitoring indicator; According to the target embedding point, the abnormal code is searched and repaired in each of the virtual containers.

6. A software testing device, characterized in that: include: A deployment module is configured to deploy the software to be tested at different software development stages in multiple virtual containers of the container cloud platform, and configure multiple traffic pools associated with the virtual containers, wherein the traffic pools are used to collect and manage traffic data; The acquisition module is configured to monitor the flow of the historical version of the software to be tested running online to obtain the historical flow data of the software to be tested; crawl the flow of the software running online of the same type as the software to be tested to obtain the flow data of the competing products of the software to be tested; The historical traffic data and the competitor traffic data are mixed according to the preset traffic collection rules to obtain the original traffic data; Performing desensitization processing on the original traffic data to obtain desensitized data; Input the desensitized data into a pre-trained traffic cultivation model to map the desensitized data through the traffic cultivation model to obtain simulated traffic data adapted to the software to be tested, and save the collected simulated traffic data to a traffic pool associated with the traffic collection rule; The flow collection rule is used to indicate the flow collection ratio of different data sources; An input module is configured to extract sample data from the multiple traffic pools according to the traffic input ratio configured in the virtual container, and input the sample data into the software to be tested deployed in the virtual container, so as to update the software code of the software to be tested according to the running result of the software to be tested; A first monitoring module is configured to perform quality monitoring on the software to be tested after the software code is updated to determine a first test score of the software to be tested in a verification phase, and to put the software to be tested into production when the test score is greater than a first pass threshold; The second monitoring module is configured to perform quality monitoring on the software to be tested running online to determine a second test score of the software to be tested in the production stage, and when the second test score is less than a second passing threshold, restore the software code of the software to be tested to the historical software code.

7. A computer-readable medium, characterized in that The computer readable medium stores a computer program, and when the computer program is executed by a processor, the software testing method according to any one of claims 1 to 5 is implemented.

8. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to enable the electronic device to perform the software testing method according to any one of claims 1 to 5 by executing the executable instructions.