WO2019153458A1 - 应用程序更新测试方法、装置、终端设备及存储介质 - Google Patents
应用程序更新测试方法、装置、终端设备及存储介质 Download PDFInfo
- Publication number
- WO2019153458A1 WO2019153458A1 PCT/CN2018/081120 CN2018081120W WO2019153458A1 WO 2019153458 A1 WO2019153458 A1 WO 2019153458A1 CN 2018081120 W CN2018081120 W CN 2018081120W WO 2019153458 A1 WO2019153458 A1 WO 2019153458A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- switch
- function
- function module
- module
- application
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Definitions
- the present application relates to the field of software testing, and in particular, to an application update test method, apparatus, terminal device, and storage medium.
- the application provides an application update test method, device, terminal device and storage medium, so as to solve the problem that the function module corresponding to some requirements needs to be rolled back to the previous version when the current application is updated.
- the application provides an application update testing method, including:
- the switch corresponding to the target function module is the new function switch, turning off the new function switch, and closing a corresponding target function module in the application program to update the application program;
- the switch corresponding to the target function module is the optimized function switch, turning off the optimization function switch, and opening an original function switch corresponding to the original function module of the previous version corresponding to the target function module, to update The application.
- the application provides an application update testing device, including:
- the function switch configuration module is configured to configure a new function switch or an optimization function switch for each new function module in the application, and configure a raw function switch for each original function module;
- a running result obtaining module configured to execute each functional module in the application whose switch state is an open state, and obtain a running result of each functional module
- a target function determining module configured to determine whether the running result has an abnormality, and determine a function module whose running result is abnormal, as a target function module;
- a first switch processing module configured to: if the switch corresponding to the target function module is the new function switch, turn off the new function switch, and close a corresponding target function module in the application to update the application ;
- a second switch processing module configured to: if the switch corresponding to the target function module is the optimized function switch, turn off the optimization function switch, and open an original function module of a previous version corresponding to the target function module Corresponding original function switches to update the application.
- the present application provides a terminal device including a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, the processor implementing the following steps when executing the computer readable instructions:
- the switch corresponding to the target function module is the new function switch, turning off the new function switch, and closing a corresponding target function module in the application program to update the application program;
- the switch corresponding to the target function module is the optimized function switch, turning off the optimization function switch, and opening an original function switch corresponding to the original function module of the previous version corresponding to the target function module, To update the application.
- the application provides one or more non-transitory readable storage media storing computer readable instructions, such as one or more, when executed by one or more processors
- the processor performs the following steps:
- the switch corresponding to the target function module is the new function switch, turning off the new function switch, and closing a corresponding target function module in the application program to update the application program;
- the switch corresponding to the target function module is the optimized function switch, turning off the optimization function switch, and opening an original function switch corresponding to the original function module of the previous version corresponding to the target function module, To update the application.
- Embodiment 1 is a flowchart of an application update test method provided in Embodiment 1;
- FIG. 2 is a specific schematic view of step S10 of Figure 1;
- FIG. 3 is a specific schematic view of step S30 of Figure 1;
- FIG. 4 is a specific schematic view of step S32 of Figure 3;
- Embodiment 5 is a schematic block diagram of an application update test apparatus provided in Embodiment 2;
- FIG. 6 is a schematic diagram of a terminal device provided in Embodiment 4.
- FIG. 1 shows a flow chart of an application update test method in this embodiment.
- the application update test method is applied to the terminal device for performing an update test on the application installed on the terminal device, so as to effectively solve the problem that a certain part of the requirement is encountered when the application is updated based on production requirements and goes online. Only all requirements can be rolled back to the previous version, resulting in the application of all requirements can only be postponed online.
- the application update test method includes the following steps:
- the original function module is a functional module that has been developed and tested online.
- the new function module is a functional module developed based on the user's newly added requirements. This new addition includes new feature requirements and/or optimized feature requirements.
- the new feature requirements are the need for users to add features that were not previously available to the original functional modules.
- Optimizing functional requirements is a requirement for users to further optimize the original functional modules.
- a function module is a code module in an application that implements a function.
- the new function switch is a switch for controlling whether a new function module corresponding to the new function requirement can be operated; if it can be operated, the running state of the new function switch is an open state; if it cannot be operated, the running state of the new function switch is Is off state.
- the optimization function switch is used to control whether the new function module corresponding to the optimization function requirement can operate; if it can run, the operation state of the new function switch is an open state, and vice versa.
- the original function switch is a switch for controlling whether the original function module can operate; if the original function switch is in an open state, the corresponding original function module can be operated in the test process, and if the original function switch is off, then The corresponding original function module cannot be run during this test.
- a new function switch or an optimization function switch is configured for each new function module in the application, that is, a new function switch is configured for the new function module corresponding to the new function requirement, or a new function corresponding to the optimization function requirement is added.
- the module configuration optimizes the function switch.
- the original function switch is configured for each original function module to provide technical support for subsequent acquisition of the operation result of each function module.
- the switch status of each new function module's corresponding switch (including the new function switch or the optimized function switch) is set to the open state by default, so that the corresponding new one can be run during the subsequent test. Added function module.
- the original function module needs to be tested during the application update test, it needs to set its corresponding original function switch to be on. Otherwise, if the application update test does not require testing the corresponding original function.
- the module sets the switch state of its corresponding original function switch to the off state.
- step S10 the application update test method further includes the following steps:
- the switch state of the new function switch or the optimization function switch corresponding to the newly added function module is set to an open state
- the original function switch of the original function template of the previous version corresponding to the newly added function module is set to the off state.
- the application update test method further includes the following steps:
- the switch states of each function switch are represented in the form of key-value pairs, and the switch states of all function switches are stored in the application's configuration file or database.
- the switch state of the storage function switch has the following two modes: one is a database storage mode, and the other is a configuration file storage mode.
- the configuration files in the application update test method are generally managed using files in the properties format, but are not limited to files in this format.
- the Properties file can be handled using a script.
- the properties file is a configuration file, which is mainly used to express configuration information.
- the file type is *.properties, and the format is a text file.
- the switch table when the database storage function switch mode is adopted, the switch table is pre-stored in the database, the switch table includes a key and a value field corresponding to the function module, and one piece of data in the switch table represents a function switch.
- adding a switch only one function switch data is added; when the switch is deleted, the data of the corresponding switch name is deleted; when the switch state is modified, the value of the corresponding switch name is changed (ie, the switch value).
- the database storage method can also be maintained by using the function of one page. For example, in a switch data queried in the database, the key is search.user.switch, the value is on, and the switch needs to change the value of the function switch to off. It can be understood that the function switch corresponding to each function model is named after the function ID and is easy to maintain.
- the database or the configuration file reads the current time of the system as the update time of the new function switch, the optimization function switch or the original function switch.
- the switch state is placed in the cache and the cache is refreshed periodically.
- the configuration file saves the function switch the update time of the configuration file is checked every 10s. If it is greater than the last update time, the value in the configuration file is flushed to the cache for use.
- the database saves the switch state it checks whether the data of the database is updated every 1s. If it is greater than the last update time, query the data in the switch table and flush the data to the cache to achieve the purpose of periodically updating the switch state. .
- the switch state includes an open state and a closed state. Specifically, each function module in the application whose switch state is the open state is run to obtain the running result of each function module. It can be understood that the switch whose switch state is open in the application includes the original function switch, the new function switch and the optimization function switch, and correspondingly, the corresponding function module includes the original function module and the newly added function module.
- the running result includes the abnormal state and the normal state, and the running result is recorded in the running log to provide technical support for subsequent analysis of the running result.
- the running result is an abnormal state, which refers to a state in which the application fails to run or the running result of the program is inconsistent with the expected output result.
- the normal state refers to a state in which the running of the program is successful and the obtained running result is consistent with the expected output result.
- S30 Determine whether there is an abnormality in the running result, and determine a function module whose operation result is abnormal, and determine the target function module.
- the target function module is a function module in which the operation result is abnormal. Specifically, it is determined whether there is an abnormality in the running result. If there is an abnormality, the application program has a function module that runs abnormally during the update test, and the function module that runs the abnormality is determined as the target function module, and is provided for the subsequent processing abnormal function module. stand by.
- all the function modules in the application whose switch state is open are the function modules that need to be tested during the application update test.
- the operation result of each function module may be normal. Or abnormal state. If the running result is normal, it means that the corresponding function module in the application can run normally without further debugging. Correspondingly, if the running result is abnormal, it indicates that the corresponding function module in the application cannot run normally, and further debugging is required. Therefore, the function module whose operation result is abnormal needs to be set as the target function module, so that the subsequent function module is based on the target function module. Perform analytical processing.
- determining whether the operation result has an abnormality includes: performing the following steps: determining whether there is a function module whose operation result is abnormal, and if yes, executing a function module that is a result of the operation result being abnormal, and determining the step of the target function module (ie, executing Step S30); if not, the application test is successful. In this embodiment, if the application test is successful, and the successfully tested application is promoted and used.
- the switch corresponding to the target function module is a new function switch
- the new function switch is turned off, and the corresponding target function module in the application is closed, even if the updated application does not run the abnormal target function when the program is running.
- the module which is a new function module that isolates the abnormality and corresponds to the new function switch. It can be understood that if the switch corresponding to the target function module is a new function switch, it indicates that the target function module is a function module developed based on the new function requirement, and if the target function module exists in the application update test In case of exception, the new function switch and the corresponding target function module need to be closed, so that the updated application will no longer run the target application with abnormality when it is next run.
- the bank system fails to be returned when the bank system is called for payment in Alipay
- the payment function in Alipay may be abnormal (that is, the feedback data is not received for a long time).
- the target function module (payment function) is turned off, so that the local system can quickly recover after encountering an abnormality, and the isolation is abnormal.
- the switch corresponding to the target function module is an optimized function switch
- the optimization function switch is turned off, and the original function switch corresponding to the original function module of the previous version corresponding to the target function module is opened to isolate the abnormality and the optimization function.
- the corresponding function module corresponding to the switch, and the updated application includes the original function module of the previous version corresponding to the target function module, and the updated application program does not run the abnormal target function module when the program is running
- the original function module of the previous version is run. Since the original function module is a function module for testing the online function, it can effectively ensure that the updated application can be put on time without affecting the running effect. Understandably, if there is an abnormality in the target function module, the new function switch and the corresponding target function module need to be closed, so that the updated application does not run the target application with abnormality in the next run.
- a corresponding function switch is configured by each function module in the application. Then, only each function module whose switch state is open in the application is run, and the running result of each function module is obtained, so as to determine the target function module based on the running result. If the switch corresponding to the target function module is a new function switch, the new function switch and the corresponding target function module are turned off to isolate the target function module corresponding to the abnormal new function switch, thereby achieving the purpose of quickly updating the application. If the switch corresponding to the target function module is an optimized function switch, the optimization function switch is turned off to isolate the target function module corresponding to the abnormal function switch, and the original function module corresponding to the previous version corresponding to the target function module is opened.
- the original function switch only rolls back the target function module corresponding to the part of the optimization function switch with the abnormality to the previous version, so as to achieve the purpose of quickly updating the application, and ensure that the updated application does not have an abnormal function module and does not delete it.
- the original function saves development costs and improves development efficiency.
- step S10 a new function switch or an optimization function switch is configured for each newly added function module in the application, which specifically includes the following steps:
- S11 Acquire target requirements, which include target function ID and demand type.
- the target requirement is the requirement that the developer will review the user's demand and obtain the approval after the approval.
- the target function ID is a unique identifier for identifying a function to be implemented, and the target function ID corresponds to a function module.
- the types of requirements include new feature requirements and optimization feature requirements.
- the new function requirement refers to the requirement that the user adds the function that was not previously available on the basis of the original function module.
- the optimization function requirement refers to the user's need for further optimization of the original function module.
- the code of the pre-written function module in the database is searched, the new function module corresponding to the target function ID is obtained, and the requirement type corresponding to the newly added function module is determined based on the database.
- the requirement type of the newly added function module may be a new function requirement, or may be an optimization function requirement.
- the new function requirement refers to the requirement that the user adds the function that was not previously available on the basis of the original function module.
- the requirement type corresponding to the newly added function module is a new function requirement
- the new function module is configured with a new function switch, so that when the abnormality judgment condition of the new function requirement is determined to be abnormal, the new function module may be abnormal. By turning off the new function switch, you can quickly isolate the new function modules with abnormalities.
- the optimization function requirement refers to the user's need for further optimization of the original function module.
- the optimization function switch is configured for the new function module, so that the abnormality judgment condition based on the optimization function requirement determines that the new function module has an abnormality, By turning off the optimization function switch, it is possible to quickly isolate the new function module with abnormality and roll back to the original function module of the previous version.
- the target requirement includes the target function ID and the requirement type, so as to obtain the corresponding new function module based on the target function ID, and then determine the requirement type corresponding to the newly added function module;
- the new function module is configured with a new function switch; if the demand type is an optimization function requirement, the new function module is configured with an optimization function switch to implement different types of new function modules of different demand types.
- the switch can process different types of switches based on different abnormality determination conditions for subsequent processing exceptions, so as to achieve fast isolation abnormality.
- step S30 it is determined whether there is an abnormality in the running result, and specifically includes the following steps:
- the expected result is the expected output of the developer's predefined functional modules.
- the abnormality judgment conditions of the newly added function modules corresponding to different types of function switches are different. Specifically, the output result of the newly added function module corresponding to the new function switch is obtained and it is determined whether the output result is within the expected result. If the output result is not within the expected result, the operation result of the newly added function module is abnormal.
- the user name of the login module has a character limit of 8.
- the expected result for the login module is that if the character length of the user name entered by the user is greater than 8, a warning message is displayed; and when the login module is run, if the user enters the user name If the character length is greater than 8, but there is no warning message, the login module is considered to be abnormal.
- the preset index is an index that the developer sets based on user requirements to reflect system performance.
- the third-party performance testing tool is used to test the optimized function module, so as to obtain the comprehensive index of the newly added function module corresponding to the optimized function switch. If the comprehensive index is smaller than the preset index, the operation result of the newly added function module is abnormal, so that different abnormality determination conditions are used for different types of function switches to determine the abnormality, so as to isolate the functional module that is abnormal during the running process, thereby quickly Update the app.
- the output result of the newly added function module corresponding to the new function switch is determined. If the output result is not within the expected result, the operation result of the newly added function module is abnormal. Or, obtain the comprehensive index of the newly added function module corresponding to the optimization function switch. If the comprehensive index is smaller than the preset index, the operation result of the newly added function module is abnormal, so as to implement different abnormality determination conditions for different types of switches to judge An exception to isolate an application module that has an exception during the run, thereby quickly updating the application.
- step S32 the comprehensive index of the newly added function module corresponding to the optimized function switch is obtained, and if the comprehensive index is smaller than the preset index, the operation result of the newly added function module is The exception includes the following steps:
- the running state parameter is a parameter for reflecting the system performance of the terminal device in which the application is installed.
- the operational status parameters include, but are not limited to, response time, CPU utilization, and network traffic. Specifically, the operational status parameters can be tested and obtained using a third-party performance testing tool such as LoadRunner. LoadRunner, a load testing tool that tests system behavior and performance, measures end-to-end performance and diagnoses application and system bottleneck performance.
- S322 Calculate at least one operating state parameter by using a weighting calculation formula, and obtain a comprehensive index of the newly added function module.
- corresponding weights are set in advance for each operating state parameter.
- N a*q/Q+b*y/Y+c*l/L.
- the function module corresponding to the function optimization switch passes, that is, the operation result of the corresponding new function module is normal, and the corresponding function optimization switch can be opened to The new function module is carried in the updated application.
- the function module corresponding to the optimized function switch does not pass, that is, the operation result of the corresponding new function module is abnormal, and the function module will not pass.
- the new function module rolls back to the original function module of the previous version.
- At least one operating state parameter is obtained by running a new function module corresponding to the optimized function switch, and then at least one operating state parameter is calculated by using a weighting calculation formula, and a comprehensive index of the newly added function module is obtained to determine the system. Whether the performance optimization meets the user's needs and improves the user experience.
- the original function switch is first configured for each original function module. Then, by obtaining the target requirement, the target requirement includes the target function ID and the requirement type, so as to obtain the corresponding new function module based on the target function ID, and then judge the demand type corresponding to the newly added function module; if the demand type is new For functional requirements, a new function switch is configured for the new function module; if the demand type is an optimization function requirement, an optimization function switch is configured for the new function module, so as to set different types of switches for the new function modules of different demand types. For subsequent processing exceptions, different types of switches can be handled based on different abnormality determination conditions to achieve the purpose of quickly isolating the abnormality.
- each function module whose switch state is in an open state is run, and the running result of each function module is obtained, so as to judge the output result of the new function module corresponding to the new function switch, if the output result is not within the expected result.
- the operation result of the new function module is abnormal.
- obtain the comprehensive index of the newly added function module corresponding to the optimization function switch If the comprehensive index is smaller than the preset index, the operation result of the newly added function module is abnormal, so as to implement different abnormality determination conditions for different types of switches to judge Abnormal, determine the target function module.
- the switch corresponding to the target function module is a new function switch
- the new function switch and the corresponding target function module are turned off to isolate the target function module corresponding to the abnormal new function switch, thereby achieving the purpose of quickly updating the application.
- the switch corresponding to the target function module is an optimized function switch
- the optimization function switch is turned off to isolate the target function module corresponding to the abnormal function switch, and the original function module corresponding to the previous version corresponding to the target function module is opened.
- the original function switch only rolls back the previous version of the target function module corresponding to the part of the optimized function switch that has the abnormality, so as to achieve the purpose of quickly updating the application, and ensure that the updated application does not have abnormal function modules and will not be deleted. Its original features save development costs and improve development efficiency.
- FIG. 5 is a schematic block diagram showing an application update test apparatus corresponding to the application update test method in the first embodiment.
- the application update testing device includes a function switch configuration module 10, a running result obtaining module 20, a target function determining module 30, a first switch processing module 40, a second switch processing module 50, and a switch state configuration module 60. And a switch state storage module 70.
- the function and implementation of the function switch configuration module 10, the operation result acquisition module 20, the target function determination module 30, the first switch processing module 40, the second switch processing module 50, the switch state configuration module 60, and the switch state storage module 70 are implemented.
- the steps corresponding to the application update test method in the first embodiment are one-to-one correspondence. To avoid redundancy, the present embodiment will not be described in detail.
- the function switch configuration module 10 is configured to configure a new function switch or an optimization function switch for each new function module in the application, and configure the original function switch for each original function module.
- the operation result obtaining module 20 is configured to execute each function module in the application whose switch state is an open state, and obtain a running result of each function module.
- the target function determining module 30 is configured to determine whether there is an abnormality in the running result, and determine a function module whose operation result is abnormal, as the target function module.
- the first switch processing module 40 is configured to: if the switch corresponding to the target function module is a new function switch, close the new function switch, and close the corresponding target function module in the application to update the application.
- the second switch processing module 50 is configured to: if the switch corresponding to the target function module is an optimized function switch, turn off the optimization function switch, and open the original function switch corresponding to the original function module of the previous version corresponding to the target function module, Update the app.
- the function switch configuration module 10 includes a target demand acquisition unit 11, a new function module acquisition unit 12, a first requirement type processing unit 13, and a second demand type processing unit 14.
- the target requirement obtaining unit 11 is configured to acquire a target requirement, where the target requirement includes a target function ID and a requirement type.
- the new function module acquiring unit 12 is configured to acquire a corresponding new function module based on the target function ID.
- the first demand type processing unit 13 is configured to configure a new function switch for the new function module when the demand type is a new function requirement.
- the second requirement type processing unit 14 is configured to configure an optimization function switch for the newly added function module, if the requirement type is an optimization function requirement.
- the target function determining module 30 includes a first result processing unit 31 and a second result processing unit 32.
- the first result processing unit 31 is configured to obtain an output result of the newly added function module corresponding to the new function switch. If the output result is not within the expected result, the operation result of the newly added function module is abnormal. or,
- the second result processing unit 32 is configured to obtain a comprehensive index of the newly added function module corresponding to the optimized function switch. If the comprehensive index is smaller than the preset index, the operation result of the newly added function module is abnormal.
- the second result processing unit 32 includes an operation state parameter acquisition unit 321 and a comprehensive index acquisition unit 322.
- the operation state parameter obtaining unit 321 is configured to run a new function module corresponding to the optimization function switch, and acquire at least one operation state parameter.
- the comprehensive index obtaining unit 322 is configured to calculate at least one operating state parameter by using a weighting calculation formula, and obtain a comprehensive index of the newly added function module.
- the target function determining module 30 is configured to determine whether there is a function module whose operation result is abnormal, and if yes, execute a function module that is a result of the abnormal operation, and determine the target function module. If it does not exist, the application test is successful.
- the application update test device further includes a switch state configuration module 60 and a switch state storage module 70.
- the switch state configuration module 60 is configured to configure a new function switch corresponding to the newly added function module or an open switch state of the switch function state of the optimized function switch, and the original function switch of the original function template of the previous version corresponding to the newly added function module Set to off.
- the switch state storage module 70 is configured to represent the switch state of each function switch in the form of a key value pair, and store the switch states of all the function switches in a configuration file or a database of the application. ,
- This embodiment provides one or more non-volatile readable storage media having computer readable instructions stored thereon.
- the one or more non-transitory readable storage mediums storing computer readable instructions, when executed by one or more processors, causing one or more processors to perform application updates in embodiment 1. Test methods, to avoid repetition, will not be described here.
- the computer readable instructions when executed by the processor, the function of each module/unit in the application update test device in Embodiment 2 is implemented. To avoid repetition, details are not described herein again.
- non-volatile readable storage media storing computer readable instructions may comprise: any entity or device capable of carrying the computer readable instruction code, a recording medium, a USB flash drive, a mobile hard drive, Disk, optical disk, computer memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier signals, and telecommunications signals.
- FIG. 6 is a schematic diagram of a terminal device according to an embodiment of the present application.
- the terminal device 80 of this embodiment includes a processor 81, a memory 82, and computer readable instructions 83 stored in the memory 82 and operable on the processor 81.
- the processor 81 executes the computer readable instructions 83
- the steps of the respective application update test methods in the above-described Embodiment 1 are implemented, such as steps S10 to S50 shown in FIG.
- the processor 81 executes the computer readable instructions 83
- the functions of the various modules/units of the above-described devices in Embodiment 2 are implemented, such as the functions of the modules 10 to 70 shown in FIG.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Stored Programmes (AREA)
Abstract
本申请公开一种应用程序更新测试方法、装置、终端设备及存储介质。该应用程序更新测试方法包括:给应用程序中的每一新增功能模块配置新功能开关或优化功能开关,并给每一原始功能模块配置原始功能开关;运行应用程序中开关状态为打开状态的每一功能模块,获取每一功能模块的运行结果;将运行结果为异常的功能模块,确定为目标功能模块;若目标功能模块对应的开关为优化功能开关,则关闭优化功能开关,并打开与目标功能模块相对应的上一版本的原始功能模块对应的原始功能开关,以更新应用程序。该应用程序更新测试方法可在生产功能上线时,对应用程序进行测试,以隔离异常,实现快速更新应用程序的目的,节省成本,提高效率。
Description
本申请以2018年2月7日提交的申请号为201810121972.4,名称为“应用程序更新测试方法、装置、终端设备及存储介质”的中国发明专利申请为基础,并要求其优先权。
本申请涉及软件测试领域,尤其涉及一种应用程序更新测试方法、装置、终端设备及存储介质。
随着信息时代的迅速发展,越来越多的线下需求转移到线上需求,即通过特定的应用程序进行业务的交互,以节省人力或者迎合客户的需求。在应用程序的开发过程中,由于用户的需求日益增多,为了满足用户的需求,需进一步升级应用程序,以使应用程序中增加用于实现新需求的新的功能模块或者对原有的功能模块进行修改。当前开发人员基于用户的需求更新应用程序时,可能会遇到某一部分需求对应的功能模块出现问题时,只有将全部需求对应的功能模块回滚至上一版本,由开发人员重新调试并上线,导致最终的应用程序延期上线,影响应用程序的推广应用,而且其过程导致开发人员的任务量繁重,耗费人力且加大生产成本。
发明内容
本申请提供一种应用程序更新测试方法、装置、终端设备及存储介质,以解决当前应用程序更新时,部分需求对应的功能模块出现问题时需回滚至上一版本所存在的问题。
第一方面,本申请提供一种应用程序更新测试方法,包括:
给应用程序中的每一新增功能模块配置新功能开关或优化功能开关,并给每一原始功能模块配置原始功能开关;
运行所述应用程序中开关状态为打开状态的每一功能模块,获取每一功能模块的运行结果;
判断所述运行结果是否存在异常,并将运行结果为异常的功能模块,确定为目标功能 模块;
若所述目标功能模块对应的开关为所述新功能开关,则关闭所述新功能开关,关闭所述应用程序中对应的目标功能模块,以更新所述应用程序;
若所述目标功能模块对应的开关为所述优化功能开关,则关闭所述优化功能开关,并打开与所述目标功能模块相对应的上一版本的原始功能模块对应的原始功能开关,以更新所述应用程序。
第二方面,本申请提供一种应用程序更新测试装置,包括:
功能开关配置模块,用于给应用程序中的每一新增功能模块配置新功能开关或优化功能开关,并给每一原始功能模块配置原始功能开关;
运行结果获取模块,用于运行所述应用程序中开关状态为打开状态的每一功能模块,获取每一功能模块的运行结果;
目标功能确定模块,用于判断所述运行结果是否存在异常,并将运行结果为异常的功能模块,确定为目标功能模块;
第一开关处理模块,用于若所述目标功能模块对应的开关为所述新功能开关,则关闭所述新功能开关,关闭所述应用程序中对应的目标功能模块,以更新所述应用程序;
第二开关处理模块,用于若所述目标功能模块对应的开关为所述优化功能开关,则关闭所述优化功能开关,并打开与所述目标功能模块相对应的上一版本的原始功能模块对应的原始功能开关,以更新所述应用程序。
第三方面,本申请提供一种终端设备,包括存储器、处理器以及存储在存储器中并可在处理器上运行的计算机可读指令,处理器执行计算机可读指令时实现如下步骤:
给应用程序中的每一新增功能模块配置新功能开关或优化功能开关,并给每一原始功能模块配置原始功能开关;
运行所述应用程序中开关状态为打开状态的每一功能模块,获取每一功能模块的运行结果;
判断所述运行结果是否存在异常,并将运行结果为异常的功能模块,确定为目标功能模块;
若所述目标功能模块对应的开关为所述新功能开关,则关闭所述新功能开关,关闭所述应用程序中对应的目标功能模块,以更新所述应用程序;
若所述目标功能模块对应的开关为所述优化功能开关,则关闭所述优化功能开关,并打开与所述目标功能模块相对应的上一版本的所述原始功能模块对应的原始功能开关,以 更新所述应用程序。
第四方面,本申请提供一个或多个存储有计算机可读指令的非易失性可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
给应用程序中的每一新增功能模块配置新功能开关或优化功能开关,并给每一原始功能模块配置原始功能开关;
运行所述应用程序中开关状态为打开状态的每一功能模块,获取每一功能模块的运行结果;
判断所述运行结果是否存在异常,并将运行结果为异常的功能模块,确定为目标功能模块;
若所述目标功能模块对应的开关为所述新功能开关,则关闭所述新功能开关,关闭所述应用程序中对应的目标功能模块,以更新所述应用程序;
若所述目标功能模块对应的开关为所述优化功能开关,则关闭所述优化功能开关,并打开与所述目标功能模块相对应的上一版本的所述原始功能模块对应的原始功能开关,以更新所述应用程序。
本申请的一个或多个实施例的细节在下面的附图及描述中提出。本申请的其他特征和优点将从说明书、附图以及权利要求书变得明显。
为了更清楚地说明本申请的技术方案,下面将对本申请的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是实施例1中提供的应用程序更新测试方法的一流程图;
图2是图1中步骤S10的一具体示意图;
图3是图1中步骤S30的一具体示意图;
图4是图3中步骤S32的一具体示意图;
图5是实施例2中提供的应用程序更新测试装置的一原理框图;
图6是实施例4中提供的终端设备的一示意图。
下面将结合本申请中的附图,对本申请中的技术方案进行清楚、完整地描述,显然, 所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
实施例1
图1示出本实施例中应用程序更新测试方法的流程图。该应用程序更新测试方法应用在终端设备中,用于对安装在该终端设备上的应用程序进行更新测试,以有效解决当前基于生产需求更新应用程序并上线时,遇到某一部分需求出现问题而只能将全部需求回滚至上一版本,导致所有需求对应的应用程序只能延期上线的问题。如图1所示,该应用程序更新测试方法包括如下步骤:
S10:给应用程序中的每一新增功能模块配置新功能开关或优化功能开关,并给每一原始功能模块配置原始功能开关。
其中,原始功能模块是目前已经开发并测试上线的功能模块。新增功能模块是基于用户新增加的需求进行开发形成的功能模块。该新增加的需求包括新功能需求和/或优化功能需求。新功能需求为用户在原始功能模块的基础上增加之前没有的功能的需求。优化功能需求是用户对原始功能模块进一步优化的需求。功能模块是指应用程序中用于实现某一功能的代码模块。新功能开关是用于控制新功能需求对应的新增功能模块能否运行的开关;若能运行,则该新功能开关的运行状态为打开状态;若不能运行,则该新功能开关的运行状态为关闭状态。优化功能开关用于控制优化功能需求对应的新增功能模块能否运行的开关;若能运行,则该新功能开关的运行状态为打开状态,反之则为关闭状态。原始功能开关是用于控制原始功能模块能否运行的开关;若原始功能开关为打开状态,则其对应的原始功能模块能在本次测试过程运行,反之,若原始功能开关为关闭状态,则其对应的原始功能模块不能在本次测试过程运行。
具体地,给应用程序中的每一新增功能模块配置新功能开关或优化功能开关,即给新功能需求对应的新增功能模块配置新功能开关,或者,给优化功能需求对应的新增功能模块配置优化功能开关。并给每一原始功能模块配置原始功能开关,为后续获取每一功能模块的运行结果提供技术支持。一般而言,在应用程序更新测试过程中,每一新增功能模块对应的开关(包括新功能开关或优化功能开关)的开关状态默认设置为打开状态,以便在后续测试过程中运行相应的新增功能模块。相应地,若原始功能模块需要在本次应用程序更新测试过程中被测试,则需设置其对应的原始功能开关为打开状态,反之,若本次应用程序更新测试中不需求测试相应的原始功能模块,则将其对应的原始功能开关的开关状态 设置为关闭状态。
进一步地,在步骤S10之后,该应用程序更新测试方法还包括如下步骤:
配置新增功能模块对应的新功能开关或优化功能开关的开关状态为打开状态,并将与新增功能模块相对应的上一版本的原始功能模板的原始功能开关设置为关闭状态。
具体地,配置新增功能模块对应的新功能开关或优化功能开关的开关状态为打开状态,并将与新增功能模块相对应的上一版本的原始功能模板的原始功能开关设置为关闭状态,以使在应用程序进行测试时,执行开关状态为打开状态的功能模块,保证应用程序更新测试过程中能够运行所有新增功能模块,以保证对所有新增功能模块进行测试的过程。
进一步地,该应用程序更新测试方法还包括如下步骤:
以键值对形式表示每一功能开关的开关状态,并将所有功能开关的开关状态存储在应用程序的配置文件或数据库中。
具体地,存储功能开关的开关状态有如下两种方式:一是数据库存储方式,二是配置文件存储方式。
其中,当采用配置文件存储功能开关的方式,一般以功能模块对应的开关名=开关值(键值对)的形式存放在配置文件中,一行表示一个功能开关,每行格式为:key=value(开关值),该开关值包括on/off或true/false;新增开关时只需将开关名=开关值增加一行;删除开关时只需删除对应开关名所在行;修改开关状态只需修改对应开关名的value值。该应用程序更新测试方法中的配置文件一般使用properties格式的文件来管理,但也不限于该格式的文件。Properties文件可以使用脚本方式来处理。其中,properties文件是一种配置文件,主要用于表达配置信息,文件类型为*.properties,格式为文本文件,文件的内容是格式是"键=值"的格式,操作很方便。
其中,当采用数据库存储功能开关的方式时,数据库中会预先存储开关表,该开关表包括与功能模块对应的key和value字段,开关表中的一条数据表示一个功能开关。新增开关时只需增加一条功能开关的数据;删除开关时删除对应开关名的数据;修改开关状态时修改对应开关名的value值(即开关值)。数据库存储方式也可采用一个页面的功能来进行维护。例如:数据库中查询到的一个开关数据中,key为search.user.switch,value是on,关闭开关只需要将该功能开关的value更改为off即可。可以理解地,每个功能模型对应的功能开关的命名是以功能ID命名的,易于维护。
本实施例中,当需要修改新增功能模块或者原始功能模块对应的开关状态时,数据库或配置文件会读取系统当前时间作为新功能开关、优化功能开关或者原始功能开关的更新 时间。当运行应用程序时,将开关状态存放于缓存中,定时刷新缓存。若是配置文件保存功能开关的方式,则每隔10s检查一次配置文件的更新时间,如果大于上次更新时间,则将配置文件中的值刷新到缓存中,以便使用。若是数据库保存开关状态的方式,则每隔1s检查数据库的数据是否有更新,如果大于上次的更新时间,查询开关表中的数据,将数据刷新到缓存中,以达到定时更新开关状态的目的。
S20:运行应用程序中开关状态为打开状态的每一功能模块,获取每一功能模块的运行结果。
其中,开关状态包括打开状态和关闭状态。具体地,运行应用程序中开关状态为打开状态的每一功能模块,以获取每一功能模块的运行结果。可以理解地,应用程序中开关状态为打开状态的开关即包括原始功能开关,也包括新功能开关和优化功能开关,相应地,其对应的功能模块包括原始功能模块和新增功能模块。该运行结果包括异常状态和正常状态,将运行结果记录到运行日志中,为后续对运行结果进行分析提供技术支持。其中,运行结果为异常状态是指应用程序运行失败或者程序运行结果与预期输出结果不一致的状态,正常状态是指程序运行成功且得到的运行结果与预期输出结果一致的状态。
S30:判断运行结果是否存在异常,并将运行结果为异常的功能模块,确定为目标功能模块。
其中,目标功能模块是运行结果存在异常的功能模块。具体地,判断运行结果是否存在异常,若存在异常则说明该应用程序在更新测试过程中存在运行异常的功能模块,将该运行异常的功能模块确定为目标功能模块,为后续处理异常功能模块提供支持。
可以理解地,应用程序中所有开关状态为打开状态的功能模块均为本次应用程序更新测试过程中需要进行测试的功能模块,在更新测试过程中每一功能模块的运行结果均可能是正常状态或异常状态。若运行结果为正常状态,则说明该应用程序中对应的功能模块能够正常运行,无需进一步调试。相应地,若运行结果为异常状态,则说明该应用程序中对应的功能模块无法正常运行,需进一步调试,因此需将运行结果为异常的功能模块设置为目标功能模块,以便后续基于目标功能模块进行分析处理。
具体地,判断运行结果是否存在异常,具体包括如下步骤:判断是否存在运行结果为异常的功能模块,若存在,则执行将运行结果为异常的功能模块,确定为目标功能模块的步骤(即执行步骤S30);若不存在,则应用程序测试成功。本实施例中,若应用程序测试成功,并将测试成功的应用程序推广使用。
S40:若目标功能模块对应的开关为新功能开关,则关闭新功能开关,关闭应用程序 中对应的目标功能模块,以更新应用程序。
具体地,若目标功能模块对应的开关为新功能开关,则关闭新功能开关,并将应用程序中对应的目标功能模块关闭,即使更新的应用程序在程序运行时不运行该存在异常的目标功能模块,从而起到隔离异常的与新功能开关相对应的新增功能模块。可以理解地,若该目标功能模块对应的开关为新功能开关,则说明该目标功能模块是基于新功能需求进行开发形成的功能模块,在本次应用程序更新测试时,若该目标功能模块存在异常,则需关闭新功能开关和对应的目标功能模块,以使更新的应用程序在下次运行时不再运行存在异常的目标应用程序。例如,在如在支付宝中调用银行系统进行付款时,如果银行系统出现故障,长时间不返回数据可能导致支付宝中的付款功能出现系统异常(即长时间接收不到反馈数据),则将该异常的目标功能模块(付款功能)关闭,以使本地系统遇到异常后能够快速恢复,隔离异常。
S50:若目标功能模块对应的开关为优化功能开关,则关闭优化功能开关,并打开与目标功能模块相对应的上一版本的原始功能模块对应的原始功能开关,以更新应用程序。
具体地,若目标功能模块对应的开关为优化功能开关,则关闭优化功能开关,并打开与目标功能模块相对应的上一版本的原始功能模块对应的原始功能开关,以隔离异常的与优化功能开关相对应的目标功能模块,并使得更新后的应用程序包含与目标功能模块相对应的上一版本的原始功能模块,在该更新后的应用程序在程序运行时不运行该异常的目标功能模块,而运行上一版本的原始功能模块,由于原始功能模块是测试上线的功能模块,可有效保证更新后的应用程序可准时上线而不影响运行效果。可以理解地,若目标功能模块存在异常,则需关闭新功能开关和对应的目标功能模块,以使更新的应用程序在下次运行时不再运行存在异常的目标应用程序。
本申请提供的应用程序更新测试方法中,通过给应用程序中的每一功能模块配置对应的功能开关。然后,只运行应用程序中开关状态为打开状态的每一功能模块,获取每一功能模块的运行结果,以便基于运行结果,确定目标功能模块。若目标功能模块对应的开关为新功能开关,则关闭新功能开关和对应的目标功能模块,以隔离存在异常的新功能开关对应的目标功能模块,实现快速更新应用程序的目的。若目标功能模块对应的开关为优化功能开关,则关闭优化功能开关,以隔离存在异常的优化功能开关对应的目标功能模块,并打开与目标功能模块相对应的上一版本的原始功能模块对应的原始功能开关,只将存在异常的部分优化功能开关对应的目标功能模块回滚至上一版本,实现快速更新应用程序的目的,并保证更新后的应用程序不存在异常的功能模块且不会删除其原有的功能,节省开 发成本,提高开发效率。
在一具体实施方式中,如图2所示,步骤S10中,即给应用程序中的每一新增功能模块配置新功能开关或优化功能开关,具体包括如下步骤:
S11:获取目标需求,目标需求包括目标功能ID和需求类型。
其中,目标需求是开发人员对用户所提出的需求进行审核,并在审核通过后得到的需求。目标功能ID是用于识别所要实现的功能的唯一标识,该目标功能ID与功能模块相对应。需求类型包括新功能需求和优化功能需求。其中,新功能需求是指用户在原始功能模块的基础上增加之前没有的功能的需求。优化功能需求是指用户对原始功能模块进一步优化的需求。
S12:基于目标功能ID,获取对应的新增功能模块。
具体地,基于目标功能ID,查找数据库中预先编写好的功能模块的代码,获取与目标功能ID对应的新增功能模块,并基于数据库确定新增功能模块对应的需求类型。本实施例中,新增功能模块的需求类型可能为新功能需求,也可能为优化功能需求。
S13:若需求类型为新功能需求,则给新增功能模块配置新功能开关。
其中,新功能需求是指用户在原始功能模块的基础上增加之前没有的功能的需求。具体地,若新增功能模块对应的需求类型为新功能需求,则给新增功能模块配置新功能开关,以便后续基于新功能需求的异常判断条件判定出该新增功能模块存在异常时,可通过关闭新功能开关,以达到快速隔离存在异常的新增功能模块的目的。
S14:若需求类型为优化功能需求,则给新增功能模块配置优化功能开关。
其中,优化功能需求是指用户对原始功能模块进一步优化的需求。具体地,若新增功能模块对应的需求类型为优化功能需求,则给新增功能模块配置优化功能开关,以便后续基于优化功能需求的异常判断条件判定出该新增功能模块存在异常时,可通过关闭优化功能开关,以达到快速隔离存在异常的新增功能模块并回滚到上一版本的原始功能模块的目的。
本实施例中,通过获取目标需求,目标需求包括目标功能ID和需求类型,以便基于目标功能ID,获取对应的新增功能模块,然后对新增功能模块对应的需求类型进行判断;若需求类型为新功能需求,则给新增功能模块配置新功能开关;若需求类型为优化功能需求,则给新增功能模块配置优化功能开关,以实现给不同需求类型的新增功能模块设置不同类型的开关,为后续处理异常时,能够基于不同的异常判定条件来处理不同类型的开关,以达到快速隔离异常的目的。
在一具体实施方式中,如图3所示,步骤S30中,即判断运行结果是否存在异常,具体包括如下步骤:
S31:获取新功能开关对应的新增功能模块的输出结果,若输出结果不在预期结果内,则新增功能模块的运行结果为异常。
其中,预期结果是开发人员预先定义的功能模块的预期输出结果。本实施例中,不同类型的功能开关所对应的新增功能模块的异常判断条件不同。具体地,获取新功能开关对应的新增功能模块的输出结果并判断该输出结果是否在预期结果内,若输出结果不在预期结果内,则新增功能模块的运行结果为异常。例如,登录模块的用户名的字符限制为8,对于登录模块的预期结果为若用户输入的用户名的字符长度大于8,则提示警告信息;而在运行登录模块时,若用户输入的用户名的字符长度大于8,但没有提示警告信息,则认为该登录模块出现异常。
S32:获取优化功能开关对应的新增功能模块的综合指数,若综合指数小于预设指数,则将新增功能模块的运行结果为异常。
其中,预设指数是开发人员基于用户需求设定的反映系统性能的指数。具体地,在程序运行过程中,采用第三方性能测试工具对优化功能模块进行测试,以便获取优化功能开关对应的新增功能模块的综合指数。若综合指数小于预设指数,则新增功能模块的运行结果为异常,以实现对不同类型的功能开关采用不同的异常判定条件来判断异常,以隔离运行过程中出现异常的功能模块,从而快速更新应用程序。
本实施例中,通过对获取新功能开关对应的新增功能模块的输出结果进行判断,若输出结果不在预期结果内,则新增功能模块的运行结果为异常。或者,获取优化功能开关对应的新增功能模块的综合指数,若综合指数小于预设指数,则新增功能模块的运行结果为异常,以实现对不同类型的开关采用不同的异常判定条件来判断异常,以隔离运行过程中出现异常的功能模块,从而快速更新应用程序。
在一具体实施方式中,如图4所示,步骤S32中,即获取优化功能开关对应的新增功能模块的综合指数,若综合指数小于预设指数,则将新增功能模块的运行结果为异常,具体包括如下步骤:
S321:运行优化功能开关对应的新增功能模块,获取至少一个运行状态参数。
其中,运行状态参数是用于反映安装该应用程序的终端设备的系统性能的参数。该运行状态参数包括但不限于响应时间、CPU利用率和网络流量等。具体地,运行状态参数可以采用第三方性能测试工具(如LoadRunner)进行测试并获取。LoadRunner,是一种测试 系统行为和性能的负载测试工具,该工具能够测量端对端的性能、诊断出应用程序及系统瓶颈的性能。
S322:采用加权计算公式对至少一个运行状态参数进行计算,获取新增功能模块的综合指数。
具体地,预先为每一运行状态参数设置相应的权重。采用公式N=a*q/Q+b*y/Y+c*l/L计算每一新增功能模块的综合指数。其中,a为响应时间对应的权重、b为CPU利用率对应的权重、c为网络流量对应的权重,q为响应时间,Q为预设响应时间,y为CPU利用率,Y为预设CPU利用率,l为网络流量,L为预设网络流量。当计算出的新增功能模块的综合指数大于预设综合指数时,功能优化开关对应的功能模块通过,即其对应的新增功能模块的运行结果为正常,可打开对应的功能优化开关,以使更新的应用程序中携带该新增功能模块。反之,若计算出的新增功能模块的综合指数不大于预设综合指数时,优化功能开关对应的功能模块不通过,即其对应的新增功能模块的运行结果为异常,则将不通过的新增功能模块回滚至上一版本的原始功能模块。本实施例中,只需将运行结果为异常状态的优化功能开关对应的新址功能模块回滚到上一版本的原始功能模块,而无需将所有新增功能模块回滚至上一版本,其他需求正常上线,节省人力成本和生产成本。
本实施例中,通过运行优化功能开关对应的新增功能模块,获取至少一个运行状态参数,然后采用加权计算公式对至少一个运行状态参数进行计算,获取新增功能模块的综合指数,以判断系统的性能优化是否满足用户需求,提升用户体验度。
本实施例中,先给每一原始功能模块配置原始功能开关。然后,通过获取目标需求,该目标需求包括目标功能ID和需求类型,以便基于目标功能ID,获取对应的新增功能模块,然后对新增功能模块对应的需求类型进行判断;若需求类型为新功能需求,则给新增功能模块配置新功能开关;若需求类型为优化功能需求,则给新增功能模块配置优化功能开关,以实现给不同需求类型的新增功能模块设置不同类型的开关,为后续处理异常时,能够基于不同的异常判定条件来处理不同类型的开关,以达到快速隔离异常的目的。然后,运行应用程序中开关状态为打开状态的每一功能模块,获取每一功能模块的运行结果,以便对新功能开关对应的新增功能模块的输出结果进行判断,若输出结果不在预期结果内,则新增功能模块的运行结果为异常。或者,获取优化功能开关对应的新增功能模块的综合指数,若综合指数小于预设指数,则新增功能模块的运行结果为异常,以实现对不同类型的开关采用不同的异常判定条件来判断异常,确定目标功能模块。若目标功能模块对应的开关为 新功能开关,则关闭新功能开关和对应的目标功能模块,以隔离存在异常的新功能开关对应的目标功能模块,实现快速更新应用程序的目的。若目标功能模块对应的开关为优化功能开关,则关闭优化功能开关,以隔离存在异常的优化功能开关对应的目标功能模块,并打开与目标功能模块相对应的上一版本的原始功能模块对应的原始功能开关,只将存在异常的部分优化功能开关对应的目标功能模块回滚其上一版本,实现快速更新应用程序的目的,并保证更新后的应用程序不存在异常的功能模块且不会删除其原有的功能,节省开发成本,提高开发效率。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请的实施过程构成任何限定。
实施例2
图5示出与实施例1中应用程序更新测试方法一一对应的应用程序更新测试装置的原理框图。如图5所示,该应用程序更新测试装置包括功能开关配置模块10、运行结果获取模块20、目标功能确定模块30、第一开关处理模块40、第二开关处理模块50、开关状态配置模块60和开关状态存储模块70。其中,功能开关配置模块10、运行结果获取模块20、目标功能确定模块30、第一开关处理模块40、第二开关处理模块50、开关状态配置模块60和开关状态存储模块70的实现功能与实施例1中应用程序更新测试方法对应的步骤一一对应,为避免赘述,本实施例不一一详述。
功能开关配置模块10,用于给应用程序中的每一新增功能模块配置新功能开关或优化功能开关,并给每一原始功能模块配置原始功能开关。
运行结果获取模块20,用于运行应用程序中开关状态为打开状态的每一功能模块,获取每一功能模块的运行结果。
目标功能确定模块30,用于判断运行结果是否存在异常,并将运行结果为异常的功能模块,确定为目标功能模块。
第一开关处理模块40,用于若目标功能模块对应的开关为新功能开关,则关闭新功能开关,关闭应用程序中对应的目标功能模块,以更新应用程序。
第二开关处理模块50,用于若目标功能模块对应的开关为优化功能开关,则关闭优化功能开关,并打开与目标功能模块相对应的上一版本的原始功能模块对应的原始功能开关,以更新应用程序。
优选地,功能开关配置模块10包括目标需求获取单元11、新增功能模块获取单元12、第一需求类型处理单元13和第二需求类型处理单元14。
目标需求获取单元11,用于获取目标需求,目标需求包括目标功能ID和需求类型。
新增功能模块获取单元12,用于基于目标功能ID,获取对应的新增功能模块。
第一需求类型处理单元13,用于需求类型为新功能需求,则给新增功能模块配置新功能开关。
第二需求类型处理单元14,用于需求类型为优化功能需求,则给新增功能模块配置优化功能开关。
优选地,目标功能确定模块30包括第一结果处理单元31和第二结果处理单元32。
第一结果处理单元31,用于获取新功能开关对应的新增功能模块的输出结果,若输出结果不在预期结果内,则新增功能模块的运行结果为异常。或者,
第二结果处理单元32,用于获取优化功能开关对应的新增功能模块的综合指数,若综合指数小于预设指数,则新增功能模块的运行结果为异常。
优选地,第二结果处理单元32包括运行状态参数获取单元321和综合指数获取单元322。
运行状态参数获取单元321,用于运行优化功能开关对应的新增功能模块,获取至少一个运行状态参数。
综合指数获取单元322,用于采用加权计算公式对至少一个运行状态参数进行计算,获取新增功能模块的综合指数。
优选地,目标功能确定模块30,用于判断是否存在运行结果为异常的功能模块,若存在,则执行将运行结果为异常的功能模块,确定为目标功能模块的步骤。若不存在,则应用程序测试成功。
优选地,该应用程序更新测试装置还包括开关状态配置模块60和开关状态存储模块70。
开关状态配置模块60,用于配置新增功能模块对应的新功能开关或优化功能开关的开关状态为打开状态,并将与新增功能模块相对应的上一版本的原始功能模板的原始功能开关设置为关闭状态。
开关状态存储模块70,用于以键值对形式表示每一功能开关的开关状态,并将所有功能开关的开关状态存储在应用程序的配置文件或数据库中。、
实施例3
本实施例提供一个或多个存储有计算机可读指令的非易失性可读存储介质。该一个或 多个存储有计算机可读指令的非易失性可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行实施例1中应用程序更新测试方法,为避免重复,这里不再赘述。或者,该计算机可读指令被处理器执行时实现实施例2中应用程序更新测试装置中各模块/单元的功能,为避免重复,这里不再赘述。
可以理解地,一个或多个存储有计算机可读指令的非易失性可读存储介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号和电信信号等。
实施例4
图6是本申请一实施例提供的终端设备的示意图。如图6所示,该实施例的终端设备80包括:处理器81、存储器82以及存储在存储器82中并可在处理器81上运行的计算机可读指令83。处理器81执行计算机可读指令83时实现上述实施例1中各个应用程序更新测试方法的步骤,例如图1所示的步骤S10至S50。或者,处理器81执行计算机可读指令83时实现实施例2中上述各装置各个模块/单元的功能,例如图5所示模块10至70的功能。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。
Claims (20)
- 一种应用程序更新测试方法,其特征在于,包括:给应用程序中的每一新增功能模块配置新功能开关或优化功能开关,并给每一原始功能模块配置原始功能开关;运行所述应用程序中开关状态为打开状态的每一功能模块,获取每一功能模块的运行结果;判断所述运行结果是否存在异常,并将运行结果为异常的功能模块,确定为目标功能模块;若所述目标功能模块对应的开关为所述新功能开关,则关闭所述新功能开关,关闭所述应用程序中对应的目标功能模块,以更新所述应用程序;若所述目标功能模块对应的开关为所述优化功能开关,则关闭所述优化功能开关,并打开与所述目标功能模块相对应的上一版本的所述原始功能模块对应的原始功能开关,以更新所述应用程序。
- 如权利要求1所述的应用程序更新测试方法,其特征在于,所述给应用程序中的每一新增功能模块配置新功能开关或优化功能开关,包括:获取目标需求,所述目标需求包括目标功能ID和需求类型;基于所述目标功能ID,获取对应的新增功能模块;若所述需求类型为新功能需求,则给所述新增功能模块配置新功能开关;若所述需求类型为优化功能需求,则给所述新增功能模块配置优化功能开关。
- 如权利要求1所述的应用程序更新测试方法,其特征在于,所述判断所述运行结果是否存在异常,包括:获取新功能开关对应的新增功能模块的输出结果,若所述输出结果不在预期结果内,则所述新增功能模块的运行结果为异常;或者,获取优化功能开关对应的新增功能模块的综合指数,若所述综合指数小于预设指数,则所述新增功能模块的运行结果为异常。
- 如权利要求3所述的应用程序更新测试方法,其特征在于,所述获取优化功能开关对应的新增功能模块的综合指数,包括:运行优化功能开关对应的新增功能模块,获取至少一个运行状态参数;采用加权计算公式对至少一个所述运行状态参数进行计算,获取所述新增功能模块的 综合指数。
- 如权利要求1所述的应用程序更新测试方法,其特征在于,所述判断所述运行结果是否存在异常,包括:判断是否存在运行结果为异常的功能模块,若存在,则执行所述将运行结果为异常的功能模块,确定为目标功能模块的步骤;若不存在,则所述应用程序测试成功。
- 如权利要求1所述的应用程序更新测试方法,其特征在于,所述应用程序更新测试方法还包括:配置所述新增功能模块对应的新功能开关或优化功能开关的开关状态为打开状态;并将与所述新增功能模块相对应的上一版本的原始功能模板的原始功能开关设置为关闭状态。
- 如权利要求1所述的应用程序更新测试方法,其特征在于,所述应用程序更新测试方法还包括:以键值对形式表示每一功能开关的开关状态,并将所有功能开关的开关状态存储在所述应用程序的配置文件或数据库中。
- 一种应用程序更新测试装置,其特征在于,包括:功能开关配置模块,用于给应用程序中的每一新增功能模块配置新功能开关或优化功能开关,并给每一原始功能模块配置原始功能开关;运行结果获取模块,用于运行所述应用程序中开关状态为打开状态的每一功能模块,获取每一功能模块的运行结果;目标功能确定模块,用于判断所述运行结果是否存在异常,并将运行结果为异常的功能模块,确定为目标功能模块;第一开关处理模块,用于若所述目标功能模块对应的开关为所述新功能开关,则关闭所述新功能开关,关闭所述应用程序中对应的目标功能模块,以更新所述应用程序;第二开关处理模块,用于若所述目标功能模块对应的开关为所述优化功能开关,则关闭所述优化功能开关,并打开与所述目标功能模块相对应的上一版本的原始功能模块对应的原始功能开关,以更新所述应用程序。
- 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:给应用程序中的每一新增功能模块配置新功能开关或优化功能开关,并给每一原始功 能模块配置原始功能开关;运行所述应用程序中开关状态为打开状态的每一功能模块,获取每一功能模块的运行结果;判断所述运行结果是否存在异常,并将运行结果为异常的功能模块,确定为目标功能模块;若所述目标功能模块对应的开关为所述新功能开关,则关闭所述新功能开关,关闭所述应用程序中对应的目标功能模块,以更新所述应用程序;若所述目标功能模块对应的开关为所述优化功能开关,则关闭所述优化功能开关,并打开与所述目标功能模块相对应的上一版本的所述原始功能模块对应的原始功能开关,以更新所述应用程序。
- 如权利要求9所述的计算机设备,其特征在于,所述给应用程序中的每一新增功能模块配置新功能开关或优化功能开关,包括:获取目标需求,所述目标需求包括目标功能ID和需求类型;基于所述目标功能ID,获取对应的新增功能模块;若所述需求类型为新功能需求,则给所述新增功能模块配置新功能开关;若所述需求类型为优化功能需求,则给所述新增功能模块配置优化功能开关。
- 如权利要求9所述的计算机设备,其特征在于,所述判断所述运行结果是否存在异常,包括:获取新功能开关对应的新增功能模块的输出结果,若所述输出结果不在预期结果内,则所述新增功能模块的运行结果为异常;或者,获取优化功能开关对应的新增功能模块的综合指数,若所述综合指数小于预设指数,则所述新增功能模块的运行结果为异常。
- 如权利要求11所述的计算机设备,其特征在于,所述获取优化功能开关对应的新增功能模块的综合指数,包括:运行优化功能开关对应的新增功能模块,获取至少一个运行状态参数;采用加权计算公式对至少一个所述运行状态参数进行计算,获取所述新增功能模块的综合指数。
- 如权利要求9所述的计算机设备,其特征在于,所述判断所述运行结果是否存在异常,包括:判断是否存在运行结果为异常的功能模块,若存在,则执行所述将运行结果为异常的 功能模块,确定为目标功能模块的步骤;若不存在,则所述应用程序测试成功。
- 如权利要求9所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还实现如下步骤:配置所述新增功能模块对应的新功能开关或优化功能开关的开关状态为打开状态;并将与所述新增功能模块相对应的上一版本的原始功能模板的原始功能开关设置为关闭状态。所述处理器执行所述计算机可读指令时还实现如下步骤:以键值对形式表示每一功能开关的开关状态,并将所有功能开关的开关状态存储在所述应用程序的配置文件或数据库中。
- 一个或多个存储有计算机可读指令的非易失性可读存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:给应用程序中的每一新增功能模块配置新功能开关或优化功能开关,并给每一原始功能模块配置原始功能开关;运行所述应用程序中开关状态为打开状态的每一功能模块,获取每一功能模块的运行结果;判断所述运行结果是否存在异常,并将运行结果为异常的功能模块,确定为目标功能模块;若所述目标功能模块对应的开关为所述新功能开关,则关闭所述新功能开关,关闭所述应用程序中对应的目标功能模块,以更新所述应用程序;若所述目标功能模块对应的开关为所述优化功能开关,则关闭所述优化功能开关,并打开与所述目标功能模块相对应的上一版本的所述原始功能模块对应的原始功能开关,以更新所述应用程序。
- 如权利要求15所述的非易失性可读存储介质,其特征在于,所述给应用程序中的每一新增功能模块配置新功能开关或优化功能开关,包括:获取目标需求,所述目标需求包括目标功能ID和需求类型;基于所述目标功能ID,获取对应的新增功能模块;若所述需求类型为新功能需求,则给所述新增功能模块配置新功能开关;若所述需求类型为优化功能需求,则给所述新增功能模块配置优化功能开关。
- 如权利要求15所述的非易失性可读存储介质,其特征在于,所述判断所述运行结果是否存在异常,包括:获取新功能开关对应的新增功能模块的输出结果,若所述输出结果不在预期结果内,则所述新增功能模块的运行结果为异常;或者,获取优化功能开关对应的新增功能模块的综合指数,若所述综合指数小于预设指数,则所述新增功能模块的运行结果为异常。
- 如权利要求17所述的非易失性可读存储介质,其特征在于,所述获取优化功能开关对应的新增功能模块的综合指数,包括:运行优化功能开关对应的新增功能模块,获取至少一个运行状态参数;采用加权计算公式对至少一个所述运行状态参数进行计算,获取所述新增功能模块的综合指数。
- 如权利要求15所述的非易失性可读存储介质,其特征在于,所述判断所述运行结果是否存在异常,包括:判断是否存在运行结果为异常的功能模块,若存在,则执行所述将运行结果为异常的功能模块,确定为目标功能模块的步骤;若不存在,则所述应用程序测试成功。
- 如权利要求15所述的非易失性可读存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:配置所述新增功能模块对应的新功能开关或优化功能开关的开关状态为打开状态;并将与所述新增功能模块相对应的上一版本的原始功能模板的原始功能开关设置为关闭状态。所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:以键值对形式表示每一功能开关的开关状态,并将所有功能开关的开关状态存储在所述应用程序的配置文件或数据库中。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810121972.4 | 2018-02-07 | ||
| CN201810121972.4A CN108509212B (zh) | 2018-02-07 | 2018-02-07 | 应用程序更新测试方法、装置、终端设备及存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2019153458A1 true WO2019153458A1 (zh) | 2019-08-15 |
Family
ID=63374538
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/081120 Ceased WO2019153458A1 (zh) | 2018-02-07 | 2018-03-29 | 应用程序更新测试方法、装置、终端设备及存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN108509212B (zh) |
| WO (1) | WO2019153458A1 (zh) |
Families Citing this family (18)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109471647B (zh) * | 2018-11-06 | 2022-02-22 | 北京字节跳动网络技术有限公司 | 一种数据的更新方法、装置、电子设备及可读介质 |
| CN109683944B (zh) * | 2018-11-16 | 2024-05-07 | 平安科技(深圳)有限公司 | 应用功能开关管理方法、装置、设备及可读存储介质 |
| CN110275701B (zh) * | 2019-06-19 | 2023-05-23 | 网易传媒科技(北京)有限公司 | 数据处理方法、装置、介质和计算设备 |
| CN110764835B (zh) * | 2019-09-18 | 2024-01-26 | 平安科技(深圳)有限公司 | 应用环境的文件配置方法、装置、计算机设备和存储介质 |
| CN110780904B (zh) * | 2019-10-28 | 2026-02-24 | 深圳前海微众银行股份有限公司 | 一种应用更新方法及装置 |
| CN111159030B (zh) * | 2019-12-24 | 2022-02-18 | 联想(北京)有限公司 | 一种程序测试的方法、装置、设备和存储介质 |
| CN111240756B (zh) * | 2019-12-31 | 2023-05-16 | 西安翔腾微电子科技有限公司 | 一种图形功能的处理模式可配置的应用程序的执行方法 |
| CN111831628A (zh) * | 2020-07-28 | 2020-10-27 | 中国平安财产保险股份有限公司 | 系统运维监控方法、装置、电子设备及存储介质 |
| CN112783540A (zh) * | 2020-12-31 | 2021-05-11 | 北京百度网讯科技有限公司 | 更新应用程序中业务数据的方法及装置、电子设备和介质 |
| CN113032037B (zh) * | 2021-02-19 | 2023-03-10 | 视若飞信息科技(上海)有限公司 | 一种动态配置chromium功能模块的方法、装置及电子设备 |
| CN112965910B (zh) * | 2021-03-19 | 2024-06-21 | 携程旅游信息技术(上海)有限公司 | 自动化回归测试方法、装置、电子设备、存储介质 |
| CN113885838A (zh) * | 2021-10-22 | 2022-01-04 | 平安银行股份有限公司 | 功能开关自动生成方法、装置、设备及存储介质 |
| CN114113975B (zh) * | 2021-11-03 | 2025-04-22 | 海光信息技术股份有限公司 | 芯片的测试方法及装置 |
| CN114036032A (zh) * | 2022-01-10 | 2022-02-11 | 北京搜狐互联网信息服务有限公司 | 一种实时程序的监控方法及装置 |
| CN116932019A (zh) * | 2022-03-31 | 2023-10-24 | 北京字节跳动网络技术有限公司 | 功能更新方法、装置及存储介质 |
| CN115002190B (zh) * | 2022-05-27 | 2024-06-21 | 努比亚技术有限公司 | 一种功能配置文件调控方法、设备及计算机可读存储介质 |
| CN115130105B (zh) * | 2022-07-22 | 2025-11-21 | 济南浪潮数据技术有限公司 | 一种程序异常行为的检测方法、系统、设备及存储介质 |
| CN115408031B (zh) * | 2022-09-29 | 2023-09-05 | 北京亚控科技发展有限公司 | 应用的更新方法及相关设备 |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105653338A (zh) * | 2015-12-30 | 2016-06-08 | 广东欧珀移动通信有限公司 | 一种应用的更新方法及装置 |
| CN105786502A (zh) * | 2016-02-26 | 2016-07-20 | 成都雅骏新能源汽车科技股份有限公司 | 一种调度式嵌入式应用软件架构及其实现方法 |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106201552A (zh) * | 2016-07-22 | 2016-12-07 | 北京智能管家科技有限公司 | 一种软件升级方法、客户端、服务器及系统 |
-
2018
- 2018-02-07 CN CN201810121972.4A patent/CN108509212B/zh active Active
- 2018-03-29 WO PCT/CN2018/081120 patent/WO2019153458A1/zh not_active Ceased
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105653338A (zh) * | 2015-12-30 | 2016-06-08 | 广东欧珀移动通信有限公司 | 一种应用的更新方法及装置 |
| CN105786502A (zh) * | 2016-02-26 | 2016-07-20 | 成都雅骏新能源汽车科技股份有限公司 | 一种调度式嵌入式应用软件架构及其实现方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108509212B (zh) | 2021-06-25 |
| CN108509212A (zh) | 2018-09-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2019153458A1 (zh) | 应用程序更新测试方法、装置、终端设备及存储介质 | |
| US10496532B1 (en) | Automatically reconfiguring a performance test environment | |
| US10430324B2 (en) | System and method for automated intelligent mobile application testing | |
| CN108923997B (zh) | 一种基于python的云服务节点自动测试方法及装置 | |
| CN115604086B (zh) | 监控报警故障自愈方法、装置、设备、介质和程序产品 | |
| CN110457154A (zh) | 异常服务处理方法及装置、存储介质、通信终端 | |
| CN115114284A (zh) | 一种表变更处理方法及系统 | |
| WO2021114676A1 (zh) | 一种硬盘预测模型的更新方法、装置、设备及介质 | |
| JP2016099857A (ja) | 不正プログラム対策システムおよび不正プログラム対策方法 | |
| US11861214B2 (en) | Memory device forensics and preparation | |
| CN110990285B (zh) | 一种ui自动化测试方法及装置 | |
| CN112965910A (zh) | 自动化回归测试方法、装置、电子设备、存储介质 | |
| CN111857744A (zh) | 一种超融合系统的安装方法、系统、设备以及介质 | |
| CN116185993A (zh) | 数据迁移方法以及装置 | |
| CN107291610A (zh) | 测试用例管理方法及装置 | |
| CN111427777B (zh) | 一种sol测试的方法、系统、设备以及介质 | |
| CN108804886A (zh) | 一种带外管理系统的用户信息管理方法及装置 | |
| JP6516343B2 (ja) | アプリケーションユーザーインターフェース自動テスト方法、電子装置、システム及び記憶媒体 | |
| CN110968569A (zh) | 数据库的管理方法、数据库的管理装置及存储介质 | |
| CN110059072A (zh) | 基于存储过程的数据迁移监控方法、系统、设备及介质 | |
| US20210397527A1 (en) | Self-healing computing device | |
| CN117130987B (zh) | 一种大规模无人机集群的飞控管理方法 | |
| CN106293897B (zh) | 组件自动化调度系统 | |
| EP4254191A1 (en) | Method and apparatus of implementing high availability of cluster virtual machine | |
| CN120821632B (zh) | 指标监控的方法、装置、设备、介质和产品 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18904803 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 02.11.2020) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18904803 Country of ref document: EP Kind code of ref document: A1 |