[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN111078256A - Upgrade method, terminal and readable storage medium of automated test environment - Google Patents

Upgrade method, terminal and readable storage medium of automated test environment Download PDF

Info

Publication number
CN111078256A
CN111078256A CN201911315304.6A CN201911315304A CN111078256A CN 111078256 A CN111078256 A CN 111078256A CN 201911315304 A CN201911315304 A CN 201911315304A CN 111078256 A CN111078256 A CN 111078256A
Authority
CN
China
Prior art keywords
version number
updated
test environment
code data
automated test
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.)
Granted
Application number
CN201911315304.6A
Other languages
Chinese (zh)
Other versions
CN111078256B (en
Inventor
马家麒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Pinwei Software Co Ltd
Original Assignee
Guangzhou Pinwei Software Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangzhou Pinwei Software Co Ltd filed Critical Guangzhou Pinwei Software Co Ltd
Priority to CN201911315304.6A priority Critical patent/CN111078256B/en
Publication of CN111078256A publication Critical patent/CN111078256A/en
Application granted granted Critical
Publication of CN111078256B publication Critical patent/CN111078256B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

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

The invention discloses an upgrading method of an automatic test environment, which comprises the following steps: when a test environment is initialized, acquiring a version number to be updated of a target object; acquiring a code data packet according to the version number to be updated, wherein the code data comprises compiled executable codes; and hot loading the code data packet to update the target object. The invention also provides a terminal and a readable storage medium. The upgrading method of the automatic test environment obtains the version number to be updated of the target object to be updated, further obtains the code data packet of the target object to be updated through the version number to be updated, loads the code data packet in a hot mode to enable the code data packet to be instantly loaded and become effective, does not need to compile the test environment of the automatic test framework again, can update the target object without modifying dependent versions or codes at a user side, and achieves the function of upgrading without perception of the user.

Description

自动化测试环境的升级方法、终端及可读存储介质Upgrade method, terminal and readable storage medium of automated test environment

技术领域technical field

本发明涉及软件系统升级技术领域,尤其涉及一种自动化测试环境的升级方法、终端及可读存储介质。The present invention relates to the technical field of software system upgrade, and in particular, to an upgrade method, terminal and readable storage medium of an automated test environment.

背景技术Background technique

自动化测试框架在使用过程中,由于原本存在但并未发现的缺陷及问题,或者存在兼容性问题,或者对接的外部系统频繁更新问题可能导致自动化测试框架无法正常使用。目前,常通过不断地更新自动化测试框架的版本以解决上述存在的问题以实现自动化测试框架的正常使用。然而由于自动化测试框架的版本每更新一次均需要用户下载,以实现更新自动化测试框架,导致用户体验差。During the use of the automated testing framework, due to existing but undiscovered defects and problems, or compatibility issues, or frequent updates of the connected external systems, the automated testing framework may not be used normally. At present, the above-mentioned existing problems are often solved by continuously updating the version of the automated testing framework to realize the normal use of the automated testing framework. However, since the version of the automated testing framework needs to be downloaded by the user every time it is updated, in order to update the automated testing framework, the user experience is poor.

上述内容仅用于辅助理解本发明的技术方案,并不代表承认上述内容是现有技术。The above content is only used to assist the understanding of the technical solutions of the present invention, and does not mean that the above content is the prior art.

发明内容SUMMARY OF THE INVENTION

本发明的主要目的在于提供一种自动化测试环境的升级方法、终端及可读存储介质,旨在解决自动化测试框架的版本更新频繁且均需要依赖用户手动操作以实现更新,用户体验差问题。The main purpose of the present invention is to provide an automatic test environment upgrade method, terminal and readable storage medium, aiming to solve the problem that the version update of the automatic test framework is frequent and requires manual operation of the user to achieve the update, and the user experience is poor.

为实现上述目的,本发明提供一种自动化测试环境的升级方法,所述自动化测试环境的升级方法包括以下步骤:In order to achieve the above object, the present invention provides a method for upgrading an automated test environment, and the method for upgrading the automated test environment includes the following steps:

在初始化测试环境时,获取目标对象的待更新版本号;When initializing the test environment, obtain the version number to be updated of the target object;

根据所述待更新版本号获取代码数据包,其中,代码数据包括已编译的可执行代码;Acquire a code data package according to the to-be-updated version number, wherein the code data includes compiled executable code;

热加载所述代码数据包,以对所述目标对象进行更新。Hot-loading the code package to update the target object.

可选地,获取目标对象的待更新版本号的步骤之前包括:Optionally, before the step of acquiring the to-be-updated version number of the target object, it includes:

获取配置文件;get the configuration file;

根据所述配置文件获取所述目标对象的目标服务器地址;Obtain the target server address of the target object according to the configuration file;

根据所述目标服务器地址从所述目标服务器获取所述代码数据包的待更新版本号。The to-be-updated version number of the code data package is acquired from the target server according to the target server address.

可选地,根据所述待更新版本号获取代码数据包的步骤之前,包括:Optionally, before the step of acquiring the code data package according to the to-be-updated version number, it includes:

获取所述目标对象的代码数据包的当前使用版本号;Obtain the currently used version number of the code data package of the target object;

在所述当前使用版本号与所述待更新版本号不匹配时,执行所述根据所述待更新版本号获取代码数据包的步骤。When the currently used version number does not match the to-be-updated version number, the step of acquiring the code data package according to the to-be-updated version number is performed.

可选地,在所述代码数据包热加载成功时,输出更新成功的提示信息。Optionally, when the hot-loading of the code data package is successful, prompt information indicating that the update is successful is output.

可选地,根据所述待更新版本号获取代码数据包的步骤包括:Optionally, the step of obtaining the code data package according to the to-be-updated version number includes:

根据预设的下载路径访问存储目录;Access the storage directory according to the preset download path;

在所述存储目录已存储有所述待更新版本号的代码数据包时,根据所述待更新版本号获取代码数据包。When the storage directory already stores the code data package of the to-be-updated version number, the code data package is acquired according to the to-be-updated version number.

可选地,根据预设的下载路径访问存储目录的步骤之后包括:Optionally, the step of accessing the storage directory according to the preset download path includes:

在所述存储目录未存储有所述待更新版本号的代码数据包时,根据预设的配置文件获取文件服务器地址;When the storage directory does not store the code data package of the version number to be updated, obtain a file server address according to a preset configuration file;

根据所述文件服务器地址从文件服务器根据所述待更新版本号获取代码数据包。The code data package is obtained from the file server according to the to-be-updated version number according to the file server address.

此外,为实现上述目的,本发明还提供一种终端,终端包括存储器、处理器以及存储在所述存储器里并可在所述处理器上运行的自动化测试环境的升级程序,所述自动化测试环境的升级程序被所述处理器执行时实现如以上所述的自动化测试环境的升级方法的各个步骤。In addition, in order to achieve the above object, the present invention also provides a terminal, the terminal includes a memory, a processor, and an upgrade program of an automated test environment stored in the memory and running on the processor, the automated test environment When the upgrade program is executed by the processor, each step of the upgrade method for the automated test environment as described above is implemented.

此外,为实现上述目的,本发明还提供一种可读存储介质,可读存储介质上存储有自动化测试环境的升级程序,所述自动化测试环境的升级程序被所述处理器执行时实现如以上所述的自动化测试环境的升级方法的各个步骤。In addition, in order to achieve the above object, the present invention also provides a readable storage medium, on which an upgrade program of an automated test environment is stored, and the upgrade program of the automated test environment is executed by the processor as described above. Each step of the method for upgrading the automated test environment.

本发明提出的自动化测试环境的升级方法,通过获取待更新的目标对象的待更新版本号,进而通过待更新版本号获取待更新的目标对象的代码数据包,热加载代码数据包使得代码数据包可以即时性加载即时性生效,无需重新编译自动化测试框架的测试环境,并且无需用户端修改依赖的版本或代码即可实现对目标对象进行更新,实现用户无感知升级功能。The method for upgrading the automated test environment proposed by the present invention obtains the to-be-updated version number of the target object to be updated, and then obtains the code data package of the to-be-updated target object through the to-be-updated version number, and hot-loads the code data package to make the code data package It can be loaded in real time and takes effect immediately, without recompiling the test environment of the automated test framework, and without the need for the user to modify the dependent version or code, the target object can be updated, and the user is not aware of the upgrade function.

附图说明Description of drawings

图1为实现本发明各个实施例的一种终端的硬件结构示意图;1 is a schematic diagram of a hardware structure of a terminal implementing various embodiments of the present invention;

图2为本发明的自动化测试环境的升级方法第一实施例的流程示意图;FIG. 2 is a schematic flowchart of the first embodiment of the method for upgrading an automated test environment according to the present invention;

图3为本发明的自动化测试环境的升级方法第一实施例获取代码数据包前的流程示意图;3 is a schematic flowchart of the first embodiment of the method for upgrading an automated test environment of the present invention before acquiring a code data package;

图4为本发明的自动化测试环境的升级方法第二实施例的流程示意图。FIG. 4 is a schematic flowchart of the second embodiment of the method for upgrading an automated test environment according to the present invention.

本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments.

具体实施方式Detailed ways

应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.

在后续的描述中,使用用于表示元件的诸如“模块”、“部件”或者“单元”的后缀仅为了有利于本发明的说明,其本身没有特定的意义。因此,“模块”、“部件”或者“单元”可以混合地使用。In the following description, suffixes such as "module", "component" or "unit" used to represent elements are used only to facilitate the description of the present invention, and have no specific meaning per se. Thus, "module", "component" or "unit" may be used interchangeably.

终端可以以各种形式来实施。例如,本发明中描述的终端可以包括诸如手机、平板电脑、笔记本电脑以及掌上电脑等终端。The terminal may be implemented in various forms. For example, the terminals described in the present invention may include terminals such as mobile phones, tablet computers, notebook computers, and palmtop computers.

本领域技术人员将理解的是,除了特别用于移动目的元件之外,根据本发明的实施方式的构造也能够应用于固定类型的终端。It will be understood by those skilled in the art that the configurations according to the embodiments of the present invention can also be applied to stationary type terminals, in addition to being particularly used for mobile purpose elements.

请参阅图1,其为实现本发明各个实施例的一种终端的硬件结构示意图,该终端可以包括:存储器101、处理器102、显示单元103以及通讯模块4。本领域技术人员可以理解,图1示出的终端结构并不构成对终端的限定,终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中,存储器101中存储有中控系统以及自动化测试环境的升级程序。处理器102是终端的控制中心,处理器102执行存储在存储器101的内的自动化测试环境的升级程序,以实现本发明的自动化测试环境的升级方法各实施例的步骤。显示单元103包括显示面板,可采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板,用于输出显示自动化测试环境的升级程序被处理器102执行后的更新成功提示信息。通信模块104通过网络协议与目标服务器建立数据通信,以从目标服务器获取代码数据包的待更新版本号;或者,通信模块104通过网络协议与文件服务器建立数据通信,以从文件服务器下载待更新版本号的代码数据包。Please refer to FIG. 1 , which is a schematic diagram of a hardware structure of a terminal implementing various embodiments of the present invention. The terminal may include: a memory 101 , a processor 102 , a display unit 103 , and a communication module 4 . Those skilled in the art can understand that the terminal structure shown in FIG. 1 does not constitute a limitation on the terminal, and the terminal may include more or less components than the one shown, or combine some components, or arrange different components. Among them, the memory 101 stores the upgrade program of the central control system and the automated test environment. The processor 102 is the control center of the terminal, and the processor 102 executes the upgrade program of the automated test environment stored in the memory 101 to implement the steps of each embodiment of the method for upgrading the automated test environment of the present invention. The display unit 103 includes a display panel, which can be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), etc., and is used to output and display the upgrade program of the automated test environment to be processed The update success prompt information after the execution of the device 102 is displayed. The communication module 104 establishes data communication with the target server through the network protocol to obtain the version number to be updated of the code data package from the target server; or, the communication module 104 establishes data communication with the file server through the network protocol to download the version to be updated from the file server. number of code packets.

基于上述硬件结构,提出本发明的自动化测试环境的升级方法的各个实施例。Based on the above hardware structure, various embodiments of the method for upgrading the automated test environment of the present invention are proposed.

本发明提供一种自动化测试环境的升级方法,请参考图2,图2为本发明的自动化测试环境的升级方法第一实施例的流程示意图。在该实施例中,自动化测试环境的升级方法包括以下步骤:The present invention provides a method for upgrading an automated test environment. Please refer to FIG. 2 , which is a schematic flowchart of a first embodiment of the method for upgrading an automated test environment of the present invention. In this embodiment, the method for upgrading the automated test environment includes the following steps:

步骤S10,在初始化测试环境时,获取目标对象的待更新版本号;Step S10, when initializing the test environment, obtain the version number to be updated of the target object;

步骤S20,根据所述待更新版本号获取代码数据包,其中,代码数据包包括已编译的可执行代码;Step S20, obtaining a code data package according to the to-be-updated version number, wherein the code data package includes compiled executable code;

步骤S30,热加载所述代码数据包,以对所述目标对象进行更新。Step S30, hot loading the code data package to update the target object.

需要说明的是,由于测试环境原本隐藏的缺陷或者问题,或者兼容性问题,或者对接的外系统的部分存在的缺陷以及外系统频繁更新升级问题,测试环境同样需要频繁更新升级以解决上述问题。目标对象指的是测试环境中待更新的功能模块,通过更新测试环境的功能模块以实现测试环境升级。待更新版本号为当前发布的目标对象的最新版本号。其中最新版本号可通过目标对象发布时间的时间戳确定,也可通过版本号的命名规则确定。可以理解的是,为了可以向指定的目标服务器上获取待更新版本号,可以通过修改配置文件实现,其中,配置文件是指包含有网址域名和IP地址对应关系的文件。通过修改配置文件,可以将获取更新版本号的地址修改为目标服务器的IP地址,从而实现向目标服务器获取待更新代码版本号因此,步骤S10中获取目标对象的待更新版本号的步骤之前包括:获取配置文件;根据配置文件获取目标对象的目标服务器地址;根据目标服务器地址从目标服务器获取代码数据包的待更新版本号。It should be noted that due to the original hidden defects or problems of the test environment, or compatibility problems, or defects in the connected external systems, and frequent updates and upgrades of external systems, the test environment also needs to be frequently updated and upgraded to solve the above problems. The target object refers to the functional modules to be updated in the test environment, and the test environment is upgraded by updating the functional modules of the test environment. The version number to be updated is the latest version number of the currently released target object. The latest version number may be determined by the timestamp of the release time of the target object, or may be determined by the naming rule of the version number. It can be understood that, in order to obtain the version number to be updated from the specified target server, it can be achieved by modifying the configuration file, wherein the configuration file refers to a file containing the correspondence between the URL domain name and the IP address. By modifying the configuration file, the address for obtaining the updated version number can be modified to the IP address of the target server, thereby obtaining the version number of the code to be updated from the target server. Therefore, in step S10, the step of obtaining the version number to be updated of the target object includes: Obtain the configuration file; obtain the target server address of the target object according to the configuration file; obtain the to-be-updated version number of the code data package from the target server according to the target server address.

步骤S20中获取代码数据包的方式包括可通过根据预设的下载路径获取下载或者从预设的服务器上下载。需要说明的是,代码数据包包括已编译的可执行代码,可选地,请参考图3,图3为本发明的自动化测试环境的升级方法第一实施例获取代码数据包前的流程示意图,步骤S20之前包括:The manner of obtaining the code data package in step S20 includes obtaining and downloading according to a preset download path or downloading from a preset server. It should be noted that the code data package includes compiled executable code. Optionally, please refer to FIG. 3. FIG. 3 is a schematic flowchart of the first embodiment of the automatic test environment upgrade method of the present invention before acquiring the code data package. Before step S20, it includes:

步骤S40,获取所述目标对象的代码数据包的当前使用版本号;Step S40, obtains the current version number of the code data package of the target object;

步骤S50,在所述当前使用版本号与所述待更新版本号不匹配时,执行步骤S20。由于初始化测试环境时,均需要获取目标对象的待更新版本,也即获取当前发布的目标对象的最新版本号,以对目标对象进行更新。可以理解的是,只有在目标对象的代码数据包的当前使用版本号与当前发布的最新版本号不匹配时,也即目标对象的当前使用版本号不是最新版本号,则执行根据待更新版本号获取代码数据包的步骤,以实现后续热加载代码数据包的目的。其中,获取目标对象的代码数据包的当前使用版本号可通过预设的下载路径访问存储目录以获取代码数据包的当前使用版本号;或者,通过查询存储目录是否存储有待更新版本号的代码数据包,若否,可直接判断当前使用版本号与当前发布的最新版本号不匹配。Step S50, when the currently used version number does not match the to-be-updated version number, step S20 is executed. When initializing the test environment, it is necessary to obtain the to-be-updated version of the target object, that is, to obtain the latest version number of the currently released target object, so as to update the target object. It can be understood that only when the currently used version number of the code data package of the target object does not match the latest version number currently released, that is, the currently used version number of the target object is not the latest version number, the execution will be executed according to the version number to be updated. The steps to obtain the code data package for the purpose of subsequent hot loading of the code data package. Wherein, to obtain the currently used version number of the code data package of the target object, the storage directory can be accessed through a preset download path to obtain the currently used version number of the code data package; or, by querying whether the storage directory stores the code data of the version number to be updated package, if not, it can be directly judged that the currently used version number does not match the latest version number currently released.

需要说明的是,热加载的基本实现原理如下:对于获取到已编译的可执行代码也即待更新版本号的目标对象的代码数据包,首先通过将代码数据包通过新创建的加载器加载,并将加载器设置为当前运行的线程上下文类加载器;根据预设的配置文件,使测试环境根据线程上下文类加载器进行类反射获取待更新版本号的目标对象的编译文件即代码数据包,以根据加载的编译文件更新测试环境实现对测试环境升级。简单理解,修改后的代码经过动态编译后打包生成代码数据包,通过直接热加载代码数据包,无需重启服务器,初始化测试环境时实现对代码数据包动态加载且加载的代码数据包即时生效。步骤S30之后包括:在代码数据包热加载成功时,输出更新成功的提示信息。可以理解的是,在测试环境初始化时,通过热加载代码数据包时可预先将测试环境初始化的执行日志重定向至console.log文件输出,以便于查看热加载是否成功。其中,提示信息包括但不限于语音提示信息以及文字提示信息。It should be noted that the basic implementation principle of hot loading is as follows: For the code data package of the compiled executable code, that is, the target object whose version number is to be updated, first load the code data package through the newly created loader, Set the loader as the currently running thread context class loader; according to the preset configuration file, make the test environment perform class reflection according to the thread context class loader to obtain the compiled file of the target object whose version number is to be updated, that is, the code data package, The test environment is upgraded by updating the test environment according to the loaded compilation file. It is simple to understand that the modified code is dynamically compiled and then packaged to generate a code data package. By directly hot loading the code data package, there is no need to restart the server. When the test environment is initialized, the code data package is dynamically loaded and the loaded code data package takes effect immediately. After step S30, it includes: when the hot loading of the code data package is successful, outputting a prompt message that the update is successful. It can be understood that when the test environment is initialized, the execution log of the test environment initialization can be redirected to the console.log file in advance when the code data package is hot loaded, so as to check whether the hot loading is successful. The prompt information includes but is not limited to voice prompt information and text prompt information.

本实施例公开的技术方案中,通过获取待更新的目标对象的待更新版本号,进而通过待更新版本号获取待更新的目标对象的代码数据包,热加载代码数据包使得代码数据包可以即时性加载即时性生效,无需重新编译自动化测试框架的测试环境,并且无需用户端修改依赖的版本或代码即可实现对目标对象进行更新,实现用户无感知升级功能,同时也能有效避免由于测试环境运行的不稳定而导致测试用例无法正常运行。In the technical solution disclosed in this embodiment, by acquiring the to-be-updated version number of the to-be-updated target object, and then acquiring the to-be-updated version number of the code data package of the to-be-updated target object, hot-loading the code data package enables the code data package to be instantly The automatic loading takes effect immediately, without the need to recompile the test environment of the automated test framework, and without the need for the user to modify the dependent version or code, the target object can be updated, and the user's imperceptible upgrade function can be realized. The operation is unstable and the test case cannot run normally.

基于上述第一实施例提出本发明的第二实施例,请参考图4,图4为本发明的自动化测试环境的升级方法第二实施例的流程示意图。在该实施例中,步骤S20包括:Based on the above-mentioned first embodiment, a second embodiment of the present invention is proposed. Please refer to FIG. 4 , which is a schematic flowchart of the second embodiment of the method for upgrading an automated test environment of the present invention. In this embodiment, step S20 includes:

步骤S21,根据预设的下载路径访问存储目录;Step S21, accessing the storage directory according to a preset download path;

步骤S22,在所述存储目录已存储有所述待更新版本号的代码数据包时,根据所述待更新版本号获取代码数据包;或者,Step S22, when the storage directory has stored the code data package of the to-be-updated version number, obtain the code data package according to the to-be-updated version number; or,

步骤S23,在所述存储目录未存储有所述待更新版本号的代码数据包时,根据预设的配置文件获取文件服务器地址;Step S23, when the storage directory does not store the code data package of the version number to be updated, obtain a file server address according to a preset configuration file;

步骤S24,根据所述文件服务器地址从文件服务器根据所述待更新版本号获取代码数据包。Step S24: Acquire a code data package from the file server according to the file server address according to the to-be-updated version number.

在本实施例中,存储目录为根据预设的下载路径下载存储代码数据包的存储数据空间。需要说明的是,判断存储目录是否已存储待更新版本号的代码数据包可通过比对存储目录中存储代码数据包的存储版本号与待更新版本号是否匹配,若匹配,则表明存储目录已存储待更新版本号的代码数据包,进而根据待更新版本号从存储目录中直接获取代码数据包;若不匹配,则表明存储目录未存储待更新版本号的代码数据包,可通过从预先指定的文件服务器上根据待更新版本号从服务器上下载代码数据包。可以理解的是,为了可以向指定的文件服务器上获取待更新版本号的代码数据包,可以预先通过修改配置文件实现,其中,配置文件是指包含有网址域名和IP地址对应关系的文件。通过修改配置文件,可以将获取代码数据包的地址修改为文件服务器的IP地址,从而实现从文件服务器下载代码数据包。In this embodiment, the storage directory is a storage data space for downloading and storing code data packages according to a preset download path. It should be noted that to determine whether the storage directory has stored the code data package with the version number to be updated, it can be determined by comparing whether the stored version number of the stored code data package in the storage directory matches the version number to be updated. Store the code data package of the version number to be updated, and then directly obtain the code data package from the storage directory according to the version number to be updated; if it does not match, it means that the storage directory does not store the code data package of the version number to be updated. The code data package is downloaded from the server according to the version number to be updated on the file server. It can be understood that, in order to obtain the code data package of the version number to be updated from the designated file server, it can be achieved by modifying the configuration file in advance, wherein the configuration file refers to a file containing the corresponding relationship between the website domain name and the IP address. By modifying the configuration file, the address for obtaining the code data package can be changed to the IP address of the file server, so that the code data package can be downloaded from the file server.

本实施例公开的技术方案中,提供两种方式以根据待更新版本号获取代码数据包,其中,通过预设的下载路径访问存储目录判断是否已下载待更新版本的代码数据包,也即判断存储目录是否存储有发布的最新版本号的代码数据包,只有在预设的下载路径所在的存储目录中未下载存储有代码数据包,从指定的文件服务器上下载待更新版本的代码数据包,可避免重复下载代码数据包浪费资源。In the technical solution disclosed in this embodiment, two ways are provided to obtain the code data package according to the version number to be updated. Among them, access the storage directory through a preset download path to determine whether the code data package of the to-be-updated version has been downloaded, that is, to determine whether the code data package of the to-be-updated version has been downloaded. Whether the storage directory stores the code data package of the latest version number released, only if the code data package is not downloaded and stored in the storage directory where the preset download path is located, the code data package of the to-be-updated version is downloaded from the specified file server, It can avoid wasting resources by repeatedly downloading the code data package.

本发明还提供一种终端,终端包括:存储器、处理器以及存储在存储器并可在处理器上运行的自动化测试环境的升级程序,自动化测试环境的升级程序被处理器执行时实现上述任一实施例中的自动化测试环境的升级方法的步骤。The present invention also provides a terminal. The terminal includes: a memory, a processor, and an upgrade program for an automated test environment stored in the memory and running on the processor. When the upgrade program for the automated test environment is executed by the processor, any one of the above implementations is implemented. The steps in the upgrade method of the automated test environment in the example.

本发明还提供一种计算机可读存储介质,计算机可读存储介质上存储有自动化测试环境的升级程序,自动化测试环境的升级程序被处理器执行时实现上述任一实施例中的自动化测试环境的升级方法的步骤。The present invention also provides a computer-readable storage medium, where an upgrade program of the automated test environment is stored on the computer-readable storage medium, and when the upgrade program of the automated test environment is executed by a processor, the upgrade program of the automated test environment in any of the foregoing embodiments can be implemented. Steps for the upgrade method.

在本发明提供的终端和计算机可读存储介质的实施例中,包含了上述自动化测试环境的升级方法各实施例的全部技术特征,说明书拓展和解释内容与上述自动化测试环境的升级方法的各实施例基本相同,在此不做赘述。In the embodiments of the terminal and the computer-readable storage medium provided by the present invention, all the technical features of the above-mentioned embodiments of the above-mentioned methods for upgrading the automated test environment are included, and the contents of description expansion and explanation and each implementation of the above-mentioned methods for upgrading the automated test environment The examples are basically the same and will not be repeated here.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or system comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or system. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article or system that includes the element.

上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages or disadvantages of the embodiments.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,被控终端,或者网络设备等)执行本发明每个实施例的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present invention can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products are stored in the above storage medium (such as ROM/RAM, magnetic CD, CD), including several instructions to make a terminal device (which may be a mobile phone, a computer, a server, a controlled terminal, or a network device, etc.) to execute the method of each embodiment of the present invention.

以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the description and drawings of the present invention, or directly or indirectly applied in other related technical fields , are similarly included in the scope of patent protection of the present invention.

Claims (8)

1. An upgrading method of an automatic test environment is characterized in that the upgrading method of the automatic test environment comprises the following steps:
when a test environment is initialized, acquiring a version number to be updated of a target object;
acquiring a code data packet according to the version number to be updated, wherein the code data comprises compiled executable codes;
and hot loading the code data packet to update the target object.
2. The method for upgrading an automated test environment according to claim 1, wherein the step of obtaining the version number to be updated of the target object is preceded by:
acquiring a configuration file;
acquiring a target server address of the target object according to the configuration file;
and acquiring the version number to be updated of the code data packet from the target server according to the address of the target server.
3. The method for upgrading an automated test environment according to claim 2, wherein the step of obtaining replacement code packages based on the version number to be updated is preceded by:
acquiring the current use version number of the code data packet of the target object;
and when the current use version number is not matched with the version number to be updated, executing the step of acquiring the code data packet according to the version number to be updated.
4. The method for upgrading an automated test environment according to claim 1, wherein when the code packet is successfully hot-loaded, a prompt message indicating that the update is successful is output.
5. The method for upgrading an automated test environment according to claim 1, wherein the step of obtaining a code packet according to the version number to be updated comprises:
accessing a storage directory according to a preset download path;
and when the code data packet of the version number to be updated is stored in the storage directory, acquiring the code data packet according to the version number to be updated.
6. The method for upgrading an automated test environment according to claim 5, wherein the step of accessing the storage directory according to the predetermined download path is followed by:
when the code data packet of the version number to be updated is not stored in the storage directory, acquiring a file server address according to a preset configuration file;
and acquiring a code data packet from the file server according to the version number to be updated according to the address of the file server.
7. A terminal, characterized in that the terminal comprises: a memory, a processor, and an upgrade program for an automated test environment stored in the memory and executable on the processor, the upgrade program for an automated test environment implementing the steps of the method for upgrading an automated test environment according to any one of claims 1 to 6 when executed by the processor.
8. A readable storage medium, characterized in that the readable storage medium has stored thereon an upgrade program of an automated test environment, which, when executed by the processor, implements the steps of the method for upgrading an automated test environment according to any one of claims 1 to 6.
CN201911315304.6A 2019-12-20 2019-12-20 Upgrading method of automatic test environment, terminal and readable storage medium Active CN111078256B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911315304.6A CN111078256B (en) 2019-12-20 2019-12-20 Upgrading method of automatic test environment, terminal and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911315304.6A CN111078256B (en) 2019-12-20 2019-12-20 Upgrading method of automatic test environment, terminal and readable storage medium

Publications (2)

Publication Number Publication Date
CN111078256A true CN111078256A (en) 2020-04-28
CN111078256B CN111078256B (en) 2024-02-02

Family

ID=70316219

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911315304.6A Active CN111078256B (en) 2019-12-20 2019-12-20 Upgrading method of automatic test environment, terminal and readable storage medium

Country Status (1)

Country Link
CN (1) CN111078256B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112199110A (en) * 2020-10-16 2021-01-08 上海睿成软件有限公司 Restart-free operation and maintenance upgrading method, system, device and medium
CN114490307A (en) * 2020-11-12 2022-05-13 腾讯科技(深圳)有限公司 Unit testing method, device and storage medium
CN114500281A (en) * 2022-01-13 2022-05-13 上海钧正网络科技有限公司 System, method and device for configuring mobile terminal

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105068852A (en) * 2015-09-22 2015-11-18 普元信息技术股份有限公司 System and method for realizing Java class on-line hot updating in cloud computing environment
US20170147324A1 (en) * 2015-11-20 2017-05-25 Google Inc. Dynamic update of an application in compilation and deployment with cold-swapping
US20170214568A1 (en) * 2014-07-23 2017-07-27 Huawei Technologies Co., Ltd. Terminal upgrade method and related device
CN107908421A (en) * 2017-09-29 2018-04-13 北京创鑫旅程网络技术有限公司 The method and device of software code versions management and issue
CN107992404A (en) * 2016-10-26 2018-05-04 中兴通讯股份有限公司 A kind of Software Automatic Testing Method and device
CN108647037A (en) * 2018-04-28 2018-10-12 新疆熙菱信息技术股份有限公司 Automatically dispose method and system based on shell scripts
CN108664267A (en) * 2018-04-09 2018-10-16 上海瀚银信息技术有限公司 A kind of code automatic packaging system
CN108762787A (en) * 2018-05-31 2018-11-06 康键信息技术(深圳)有限公司 Software repair, device, computer equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170214568A1 (en) * 2014-07-23 2017-07-27 Huawei Technologies Co., Ltd. Terminal upgrade method and related device
CN105068852A (en) * 2015-09-22 2015-11-18 普元信息技术股份有限公司 System and method for realizing Java class on-line hot updating in cloud computing environment
US20170147324A1 (en) * 2015-11-20 2017-05-25 Google Inc. Dynamic update of an application in compilation and deployment with cold-swapping
CN107992404A (en) * 2016-10-26 2018-05-04 中兴通讯股份有限公司 A kind of Software Automatic Testing Method and device
CN107908421A (en) * 2017-09-29 2018-04-13 北京创鑫旅程网络技术有限公司 The method and device of software code versions management and issue
CN108664267A (en) * 2018-04-09 2018-10-16 上海瀚银信息技术有限公司 A kind of code automatic packaging system
CN108647037A (en) * 2018-04-28 2018-10-12 新疆熙菱信息技术股份有限公司 Automatically dispose method and system based on shell scripts
CN108762787A (en) * 2018-05-31 2018-11-06 康键信息技术(深圳)有限公司 Software repair, device, computer equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112199110A (en) * 2020-10-16 2021-01-08 上海睿成软件有限公司 Restart-free operation and maintenance upgrading method, system, device and medium
CN114490307A (en) * 2020-11-12 2022-05-13 腾讯科技(深圳)有限公司 Unit testing method, device and storage medium
CN114490307B (en) * 2020-11-12 2024-08-02 腾讯科技(深圳)有限公司 Unit testing method and device and storage medium
CN114500281A (en) * 2022-01-13 2022-05-13 上海钧正网络科技有限公司 System, method and device for configuring mobile terminal

Also Published As

Publication number Publication date
CN111078256B (en) 2024-02-02

Similar Documents

Publication Publication Date Title
CN108027741B (en) File processing method, device, terminal and storage medium based on patch upgrade
EP3128421B1 (en) Method, device, and system for achieving java application installation by cloud compilation
CN111090452B (en) Service environment switching method and computer readable storage medium
US20150100955A1 (en) Method and System for Updating Software
CN105786538B (en) software upgrading method and device based on android system
US8161474B2 (en) Diagnostic information preservation during installations of over the air update of wireless handset software
US20040243993A1 (en) Electronic device supporting multiple update agents
CN111078256A (en) Upgrade method, terminal and readable storage medium of automated test environment
WO2004072773A2 (en) Electronic device supporting multiple update agents
CN112189187A (en) Extensibility of unified platform
CN110851151B (en) Method, device, terminal, server and storage medium for pre-installing application
US20150067668A1 (en) Installation engine and package format
CN107844306A (en) Restorative procedure, device, storage medium and the terminal of application program
CN110765394A (en) So file loading method and device, storage medium and terminal equipment
CN110837383B (en) Application installation-free upgrading method and device
CN112965690A (en) UI resource dynamic updating method and device, storage medium and electronic equipment
CN108334360A (en) Method, apparatus, storage medium and the computer equipment of application program dynamic load
CN108681460A (en) A method for upgrading a plug-in and an electronic terminal
CN112486509A (en) Jar package assembly heat deployment method and system
CN114706772A (en) Installation environment detection method, device, equipment and storage medium
CN113791795A (en) Plug-in installation method, device, system, equipment and storage medium
CN113867756A (en) Software upgrading method, terminal equipment and readable storage medium
CN106325924B (en) A kind of electronic program guides heat update system and method
CN114168169B (en) Microcode updating method, device, equipment and storage medium
US12118090B2 (en) Zero-day patching within an entity's secure network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant