技术领域technical field
本发明属于测试领域,尤其涉及一种自动化测试方法及装置。The invention belongs to the field of testing, in particular to an automatic testing method and device.
背景技术Background technique
为了保证应用程序能够很好的应用于每一款终端设备上,在正式使用之前需要在每一款终端上对应用程序进行测试。目前,在移动终端上测试应用程序的过程中,主要是采用手工测试的方式进行的,需要测试人员在实体的移动终端(例如,手机)上安装待测试的应用程序,并在移动终端上运行安装好的应用程序,完成测试后需要测试人员手工将测试完的应用程序从移动终端上卸载。In order to ensure that the application program can be well applied to each terminal device, the application program needs to be tested on each terminal device before official use. At present, in the process of testing application programs on mobile terminals, it is mainly carried out by manual testing, which requires testers to install the application programs to be tested on physical mobile terminals (such as mobile phones) and run them on the mobile terminals. After the installed application program is tested, the tester needs to manually uninstall the tested application program from the mobile terminal.
现有技术中在移动终端上测试应用程序的方法存在以下弊端:通常测试人员只有一款型号的移动终端,而待测试的应用程序需要在多款移动终端上进行测试,因此需要租用或借用大量的移动终端设备,导致测试不方便,租用移动终端时提高测试成本;手工测试本身存在由于测试的人员不同会出现不同的现象,导致测试重现比较困难;更突出的问题是,在测试过程中手工测试工作量较大,而且测试工作比较枯燥,浪费人力和测试人员的时间。The method for testing application programs on mobile terminals in the prior art has the following disadvantages: usually testers only have one type of mobile terminal, and the application program to be tested needs to be tested on multiple mobile terminals, so it is necessary to rent or borrow a large number of mobile terminals. mobile terminal equipment, which makes the test inconvenient and increases the test cost when renting a mobile terminal; the manual test itself has different phenomena due to different test personnel, which makes it difficult to reproduce the test; the more prominent problem is that during the test process The workload of manual testing is relatively large, and the testing work is relatively boring, which wastes manpower and testers' time.
发明内容Contents of the invention
本发明为解决上述现有技术中存在的技术问题提供一种自动化测试的方法及装置。The present invention provides an automatic testing method and device for solving the above-mentioned technical problems in the prior art.
本发明提供的一种自动化测试方法包括以下步骤:A kind of automated testing method provided by the invention comprises the following steps:
步骤S1:测试主机启动虚拟移动终端,并通过所述虚拟移动终端启动所述虚拟移动终端中的测试服务代理;Step S1: the test host starts a virtual mobile terminal, and starts a test service agent in the virtual mobile terminal through the virtual mobile terminal;
步骤S2:所述测试主机接收到来自所述测试服务代理的安装应用程序的通知时,获取应用程序的安装包,将所述应用程序的安装包发送给所述虚拟移动终端;根据所述应用程序的安装包的名称组织安装指令,并向所述虚拟移动终端发送安装指令,通过所述虚拟移动终端执行所述安装指令在所述虚拟移动终端上根据所述应用程序的安装包安装所述应用程序,并接收到来自所述虚拟移动终端预设的安装成功的信息;Step S2: When the test host receives the application installation notification from the test service agent, it obtains the application installation package, and sends the application installation package to the virtual mobile terminal; according to the application The name of the installation package of the program organizes the installation instruction, and sends the installation instruction to the virtual mobile terminal, executes the installation instruction through the virtual mobile terminal, and installs the application on the virtual mobile terminal according to the installation package of the application program. application program, and receive preset information from the virtual mobile terminal that the installation is successful;
步骤S3:所述测试主机通知所述测试服务代理在所述虚拟移动终端上对所述应用程序进行测试;Step S3: the test host notifies the test service agent to test the application program on the virtual mobile terminal;
步骤S4:所述测试主机接收到所述测试服务代理完成对所述应用程序的测试通知时,确定完成在所述虚拟移动终端上对所述应用程序的测试;Step S4: When the test host receives the notification that the test service agent completes the test of the application program, it determines that the test of the application program on the virtual mobile terminal is completed;
所述方法还包括:The method also includes:
步骤A0:所述测试服务代理执行启动操作;Step A0: the test service agent executes a startup operation;
步骤A1:所述测试服务代理通知所述测试主机在所述虚拟移动终端上安装应用程序;Step A1: the test service agent notifies the test host to install the application program on the virtual mobile terminal;
步骤A2:所述测试服务代理接收到所述测试主机的测试应用程序通知时,在所述虚拟移动终端上启动所述应用程序,当监控所述应用程序在所述虚拟移动终端上完成运行时,通知所述测试主机完成在所述虚拟移动终端上对所述应用程序的测试。Step A2: When the test service agent receives the test application notification from the test host, it starts the application on the virtual mobile terminal, and monitors that the application is running on the virtual mobile terminal , notifying the test host to complete the test of the application program on the virtual mobile terminal.
本发明提供的一种自动化测试装置包括测试主机和测试服务代理;An automated testing device provided by the present invention includes a testing host and a testing service agent;
所述测试主机包括:The test hosts include:
启动模块:用于启动虚拟移动终端,并通过所述虚拟移动终端启动所述虚拟移动终端中的测试服务代理;Starting module: used to start a virtual mobile terminal, and start a test service agent in the virtual mobile terminal through the virtual mobile terminal;
第一接收模块,用于接收来自所述测试服务代理的安装应用程序的通知;A first receiving module, configured to receive a notification from the test service agent to install the application;
获取模块,用于当所述第一接收模块接收到来自所述测试服务代理的安装应用程序的通知时,获取应用程序的安装包;An acquisition module, configured to acquire an installation package of an application when the first receiving module receives a notification of installing the application from the test service agent;
第一发送模块,用于将所述获取模块获取的所述应用程序的安装包发送给所述虚拟移动终端;A first sending module, configured to send the installation package of the application acquired by the acquiring module to the virtual mobile terminal;
组织模块,用于根据所述获取模块获取的所述应用程序的安装包的名称组织安装指令;An organization module, configured to organize installation instructions according to the name of the installation package of the application acquired by the acquisition module;
安装模块,用于向所述虚拟移动终端发送所述组织模块组织的所述安装指令,通过所述虚拟移动终端执行所述安装指令在所述虚拟移动终端上根据所述应用程序的安装包安装所述应用程序,并接收来自所述虚拟移动终端预设的安装成功的信息;An installation module, configured to send the installation instruction organized by the organization module to the virtual mobile terminal, execute the installation instruction on the virtual mobile terminal according to the installation package of the application program through the virtual mobile terminal Described application program, and receives the message that installs successfully from the preset of described virtual mobile terminal;
第一通知模块,用于所述安装模块接收到来自所述虚拟移动终端预设的安装成功的信息时,通知所述测试服务代理在所述虚拟移动终端上对所述应用程序进行测试;The first notification module is used for notifying the test service agent to test the application program on the virtual mobile terminal when the installation module receives preset information about successful installation from the virtual mobile terminal;
第二接收模块,用于接收所述测试服务代理完成对所述应用程序的测试通知;The second receiving module is configured to receive a notification that the test service agent completes the test of the application program;
确定完成模块,用于所述第二接收模块接收到所述测试服务代理完成对所述应用程序的测试通知时,确定完成在所述虚拟移动终端上对所述应用程序的测试;The determination completion module is used for determining that the test of the application program on the virtual mobile terminal is completed when the second receiving module receives the notification that the test service agent has completed the test of the application program;
所述测试服务代理包括:The test service agent includes:
执行模块,用于执行启动操作;an execution module, configured to perform a startup operation;
第二通知模块,用于当所述执行模块执行启动操作之后,通知所述测试主机在所述虚拟移动终端上安装应用程序;The second notification module is used to notify the test host to install the application program on the virtual mobile terminal after the execution module executes the startup operation;
第三接收模块,用于接收所述测试主机的测试应用程序通知;The third receiving module is used to receive the test application notification of the test host;
测试启动模块,用于所述第三接收模块接收到所述测试主机的测试应用程序通知时,在所述虚拟移动终端上启动所述应用程序;A test starting module, configured to start the application on the virtual mobile terminal when the third receiving module receives the test application notification from the test host;
监控模块,用于所述测试启动模块在所述虚拟移动终端上启动所述应用程序之后,监控所述应用程序在所述虚拟移动终端上运行;The monitoring module is used for monitoring the application program running on the virtual mobile terminal after the test starting module starts the application program on the virtual mobile terminal;
第三通知模块,用于当所述监控模块监控所述应用程序在所述虚拟移动终端上完成运行时,通知所述测试主机完成在所述虚拟移动终端上对所述应用程序的测试。The third notification module is configured to notify the test host to complete the test of the application program on the virtual mobile terminal when the monitoring module monitors that the application program finishes running on the virtual mobile terminal.
本发明与现有技术相比的有益效果是:本发明提供的测试方法及装置,测试主机通过虚拟移动终端测试应用程序,不用租用大量的实体移动终端进行测试,降低测试成本、提高测试的便捷性;可以重复同样的测试,使测试结果可以重现;测试主机自动进行测试,大大减少测试人员的工作量,节省时间和劳动力。Compared with the prior art, the beneficial effect of the present invention is: the test method and device provided by the present invention, the test host can test the application program through the virtual mobile terminal, and there is no need to rent a large number of physical mobile terminals for testing, which reduces the test cost and improves the convenience of the test The same test can be repeated, so that the test results can be reproduced; the test host automatically performs the test, greatly reducing the workload of testers, saving time and labor.
附图说明Description of drawings
图1所示为本发明实施1中自动化测试方法中测试主机操作方法的流程图;Fig. 1 shows the flow chart of the test host operating method in the automatic test method in the implementation of 1 of the present invention;
图2所示为本发明实施例1中自动化测试方法中测试服务代理操作方法的流程图;Fig. 2 shows the flowchart of the test service agent operation method in the automated test method in Embodiment 1 of the present invention;
图3所示为发明实施例2中自动化测试方法中测试主机操作方法的流程图;Fig. 3 shows the flowchart of the test host operating method in the automated test method in the embodiment of the invention 2;
图4所示为本发明中实施例2中测试主机获取工程源码并对工程源码进行编译的方法流程图;Fig. 4 shows the flow chart of the method for the test host to obtain the project source code and compile the project source code in Embodiment 2 of the present invention;
图5所示为本发明实施例2中测试主机启动当前虚拟移动终端的方法流程图;Fig. 5 shows the flow chart of the method for the test host to start the current virtual mobile terminal in Embodiment 2 of the present invention;
图6所示为本发明实施例2中测试主机启动当前虚拟移动终端的另一种方法流程图;Fig. 6 shows another kind of method flow chart that test main frame starts current virtual mobile terminal in the embodiment 2 of the present invention;
图7所示为本发明实施例2中测试主机发布测试结果的方法流程图;Fig. 7 shows the flow chart of the method for the test host to release test results in Embodiment 2 of the present invention;
图8所示为本发明实施例2中自动化测试方法的虚拟移动终端操作方法的流程图;FIG. 8 is a flowchart of a virtual mobile terminal operating method of an automated testing method in Embodiment 2 of the present invention;
图9所示为本发明实施例3中自动化测试方法的测试主机操作方法的流程图;FIG. 9 is a flow chart of the test host operating method of the automated test method in Embodiment 3 of the present invention;
图10所示为本发明实施例3中自动化测试方法的测试服务代理操作方法的流程图;FIG. 10 is a flow chart of the test service agent operating method of the automated test method in Embodiment 3 of the present invention;
图11所示为本发明实施例4中自动化测试装置的模块框图。Fig. 11 is a block diagram showing the modules of the automatic testing device in Embodiment 4 of the present invention.
具体实施方式detailed description
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。In order to make the object, technical solution and advantages of the present invention clearer, the implementation manner of the present invention will be further described in detail below in conjunction with the accompanying drawings.
实施例1Example 1
本实施例提供一种自动化测试的方法,测试主机的操作方法如图1所示,包括:This embodiment provides a method for automated testing, the operation method of the test host is shown in Figure 1, including:
步骤R1:测试主机启动虚拟移动终端,并通过虚拟移动终端启动虚拟移动终端中的测试服务代理;Step R1: the test host starts the virtual mobile terminal, and starts the test service agent in the virtual mobile terminal through the virtual mobile terminal;
步骤R2:测试主机接收到来自测试服务代理的安装应用程序的通知时,获取应用程序的安装包,将应用程序的安装包发送给虚拟移动终端;根据应用程序的安装包的名称组织安装指令,并向虚拟移动终端发送安装指令,通过虚拟移动终端执行安装指令在虚拟移动终端上根据应用程序的安装包安装应用程序,并接收到来自虚拟移动终端预设的安装成功的信息;Step R2: When the test host receives the notification of installing the application program from the test service agent, obtain the installation package of the application program, and send the installation package of the application program to the virtual mobile terminal; organize the installation instructions according to the name of the installation package of the application program, And send an installation instruction to the virtual mobile terminal, execute the installation instruction through the virtual mobile terminal to install the application program on the virtual mobile terminal according to the installation package of the application program, and receive preset information from the virtual mobile terminal that the installation is successful;
步骤R3:测试主机通知测试服务代理在虚拟移动终端上对应用程序进行测试;Step R3: the test host notifies the test service agent to test the application program on the virtual mobile terminal;
步骤R4:测试主机接收到测试服务代理完成对应用程序的测试通知时,确定完成在虚拟移动终端上对应用程序的测试;Step R4: When the test host receives the notification that the test service agent completes the test of the application program, it determines to complete the test of the application program on the virtual mobile terminal;
如图2所示,测试服务代理的操作方法包括:As shown in Figure 2, the operation method of the test service proxy includes:
步骤A0:测试服务代理执行启动操作;Step A0: The test service agent executes the startup operation;
步骤A1:测试服务代理通知测试主机在虚拟移动终端上安装应用程序;Step A1: the test service agent notifies the test host to install the application program on the virtual mobile terminal;
步骤A2:测试服务代理接收到测试主机的测试应用程序通知时,在虚拟移动终端上启动应用程序,当监控应用程序在虚拟移动终端上完成运行时,通知测试主机完成在虚拟移动终端上对应用程序的测试。Step A2: When the test service agent receives the test application notification from the test host, it starts the application on the virtual mobile terminal, and when the monitoring application finishes running on the virtual mobile terminal, it notifies the test host to complete the application on the virtual mobile terminal. Program testing.
可选地,上述步骤R1中,测试主机启动虚拟移动终端,具体为:测试主机根据配置文件中虚拟移动终端的名称组织启动指令,通过自身的模拟管理器执行启动指令启动虚拟移动终端。Optionally, in the above step R1, the test host starts the virtual mobile terminal, specifically: the test host organizes the start command according to the name of the virtual mobile terminal in the configuration file, and executes the start command through its own simulation manager to start the virtual mobile terminal.
本实发明中,测试主机中的配置文件在测试之前由服务器下发给测试主机。具体的服务器下发配置文件,以及客户端将测试任务提交给服务器的方法参考实施例2中步骤S0—步骤S1。In the present invention, the configuration file in the test host is sent to the test host by the server before the test. For the specific method for the server to deliver the configuration file and the client to submit the test task to the server, refer to step S0-step S1 in Embodiment 2.
本发明中,当测试主机中的模拟管理器没有启动时,上述步骤R1中,测试主机通过自身的模拟管理器执行启动指令启动虚拟移动终端之前,还包括:测试主机根据自身的配置文件中记载的模拟管理器路径启动自身的模拟管理器。In the present invention, when the simulation manager in the test host is not started, in the above step R1, before the test host executes the startup command through its own simulation manager to start the virtual mobile terminal, it also includes: the test host according to its own configuration file. The mock manager path starts its own mock manager.
具体地,上述测试主机根据自身的配置文件中记载的模拟管理器路径启动模拟管理器,具体为:测试主机根据预设的配置文件路径找到自身的配置文件,根据配置文件中记载的模拟管理器路径启动模拟管理器。Specifically, the above-mentioned test host starts the simulation manager according to the simulation manager path recorded in its own configuration file, specifically: the test host finds its own configuration file according to the preset configuration file path, and according to the simulation manager recorded in the configuration file path to start the simulation manager.
进一步地,步骤R1之前,还包括:Further, before step R1, it also includes:
步骤R10:测试主机通过自身的模拟管理器根据测试主机中的配置文件设置共享目录;Step R10: the test host sets the shared directory according to the configuration file in the test host through its own simulation manager;
更进一步地,步骤R10中,测试主机通过自身的模拟管理器根据测试主机中的配置文件设置共享目录之前,还包括:测试主机启动自身的模拟管理器。Furthermore, in step R10, before the test host sets the shared directory according to the configuration file in the test host through its own simulation manager, it further includes: the test host starts its own simulation manager.
本实发明中,测试主机通过模拟管理器根据测试主机中的配置文件设置共享目录之后直接关闭模拟管理器,当执行步骤R1时再启动模拟管理器,也可以不关闭模拟管理器,执行步骤R1时不用再次启动模拟管理器。In the present invention, the test host directly closes the simulation manager after setting the shared directory according to the configuration file in the test host through the simulation manager, and then starts the simulation manager when step R1 is executed, or does not close the simulation manager, and executes step R1 without starting the simulation manager again.
相应地,上述步骤R2中,测试主机接收到来自测试服务代理的安装应用程序的通知,具体为:测试主机读取配置文件中的执行标志,执行标志为安装应用程序状态;Correspondingly, in the above step R2, the test host receives the notification of installing the application program from the test service agent, specifically: the test host reads the execution flag in the configuration file, and the execution flag is the state of installing the application program;
上述步骤R3具体为:测试主机将配置文件中的执行标志更新为开始测试状态;The above step R3 is specifically: the test host updates the execution flag in the configuration file to the state of starting the test;
上述步骤R4具体为:测试主机读取配置文件中的执行标志,当执行标志为完成测试状态时,确定完成在虚拟移动终端上对应用程序的测试;Above-mentioned step R4 is specifically: the test host reads the execution flag in the configuration file, and when the execution flag is the completion of the test state, it is determined to complete the test of the application program on the virtual mobile terminal;
上述步骤A1具体为:测试服务代理根据共享目录读取配置文件,将配置文件中的执行标志更新为安装应用程序状态;The above step A1 is specifically: the test service agent reads the configuration file according to the shared directory, and updates the execution flag in the configuration file to the state of installing the application program;
上述步骤A2中,测试服务代理接收测试主机的测试应用程序通知,具体为:测试服务代理根据共享目录读取配置文件中的执行标志,执行标志为开始测试状态;In the above step A2, the test service agent receives the test application notification of the test host, specifically: the test service agent reads the execution flag in the configuration file according to the shared directory, and the execution flag is the state of starting the test;
上述步骤A2中,测试服务代理通知测试主机完成在虚拟移动终端上对应用程序的测试,具体为:测试服务代理根据共享目录读取配置文件,将配置文件中的执行标志设置为完成测试状态。In the above step A2, the test service agent notifies the test host to complete the test of the application program on the virtual mobile terminal, specifically: the test service agent reads the configuration file according to the shared directory, and sets the execution flag in the configuration file to complete the test state.
可选地,上述步骤R1中,测试主机启动虚拟移动终端,具体为:测试主机根据预设的虚拟移动终端路径启动虚拟移动终端;Optionally, in the above step R1, the test host starts the virtual mobile terminal, specifically: the test host starts the virtual mobile terminal according to the preset path of the virtual mobile terminal;
相应地,上述步骤R2中,测试主机接收到来自测试服务代理的安装应用程序的通知,具体为:测试主机接收到来自测试服务代理的预设的安装状态值;Correspondingly, in the above step R2, the test host receives the notification of installing the application program from the test service agent, specifically: the test host receives the preset installation status value from the test service agent;
上述步骤R3具体为:测试主机向测试服务代理发送预设的开始测试状态值;The above step R3 is specifically: the test host sends a preset start test status value to the test service agent;
上述步骤R4具体为:测试主机接收到来自测试服务代理的预设的完成测试状态值时,确定完成在虚拟移动终端上对应用程序的测试;The above step R4 is specifically: when the test host receives the preset test completion status value from the test service agent, it is determined to complete the test of the application program on the virtual mobile terminal;
上述步骤A1具体为:测试服务代理向测试主机发送预设的安装状态值;The above step A1 specifically includes: the test service agent sends a preset installation status value to the test host;
上述步骤A2中,测试服务代理接收测试主机的测试应用程序通知,具体为:测试服务代理接收测试主机发送预设的开始测试状态值;In the above step A2, the test service agent receives the test application notification from the test host, specifically: the test service agent receives the preset start test status value sent by the test host;
上述步骤A2中,测试服务代理通知测试主机完成在虚拟移动终端上对应用程序的测试,具体为:测试服务代理向测试主机发送预设的完成测试状态值。In the above step A2, the test service agent notifies the test host to complete the test of the application program on the virtual mobile terminal, specifically: the test service agent sends a preset test completion status value to the test host.
可选地,上述步骤R1之后,步骤R2之前,还包括:Optionally, after the above step R1 and before step R2, further include:
步骤H1:测试主机将应用程序记录发送给测试服务代理;应用程序记录在测试之前为预设的初始值;Step H1: The test host sends the application record to the test service agent; the application record is a preset initial value before the test;
相应地,上述步骤R2具体为:测试主机接收到来自测试服务代理的安装应用程序的通知时,根据应用程序记录获取当前待测试的应用程序名称,根据当前待测试的应用程序名称获取当前应用程序的安装包,将当前应用程序的安装包发送给虚拟移动终端;根据当前应用程序的安装包的名称组织当前安装指令,并向虚拟移动终端发送当前安装指令,通过虚拟移动终端执行当前安装指令在虚拟移动终端上根据当前应用程序的安装包安装当前应用程序,并接收到来自虚拟移动终端预设的安装成功的信息;Correspondingly, the above step R2 specifically includes: when the test host receives the notification of installing the application program from the test service agent, obtain the name of the current application program to be tested according to the application program record, and obtain the name of the current application program according to the name of the current application program to be tested The installation package of the current application program is sent to the virtual mobile terminal; the current installation instruction is organized according to the name of the installation package of the current application program, and the current installation instruction is sent to the virtual mobile terminal, and the current installation instruction is executed through the virtual mobile terminal. Install the current application program on the virtual mobile terminal according to the installation package of the current application program, and receive preset information from the virtual mobile terminal that the installation is successful;
上述步骤R3具体为:测试主机通知测试服务代理在虚拟移动终端上对当前应用程序进行测试;The above step R3 is specifically: the test host notifies the test service agent to test the current application program on the virtual mobile terminal;
上述步骤R4具体为:测试主机接收到来自测试服务代理的完成对当前应用程序的测试通知时,判断在预设时间内是否接收到来自测试服务代理的完成对所有待测试应用程序测试的通知,是则确定完成在虚拟移动终端上对所有预设的待测试的应用程序的测试;否则根据应用程序记录更新对待测试应用程序的第一记录,执行步骤R2;The above step R4 is specifically: when the test host receives a notification from the test service agent to complete the test of the current application program, determine whether it has received a notification from the test service agent to complete the test of all applications to be tested within a preset time, If yes, it is determined that the test of all preset application programs to be tested is completed on the virtual mobile terminal; otherwise, the first record of the application program to be tested is updated according to the application program record, and step R2 is performed;
上述步骤A0之后还包括:After the above step A0, it also includes:
步骤W1:测试服务代理接收来自测试主机的应用程序记录;Step W1: the test service agent receives the application record from the test host;
步骤A2之后,还包括:After step A2, also include:
步骤A3:测试服务代理根据接收的应用程序记录判断是否具有待测试的应用程序,是则根据接收的应用程序记录更新对待测试应用程序的第二记录,执行步骤A1;否则执行步骤A4;Step A3: The test service agent judges whether there is an application program to be tested according to the received application program record, and if so, updates the second record of the application program to be tested according to the received application program record, and executes step A1; otherwise, executes step A4;
步骤A4:测试服务代理通知测试主机完成在虚拟移动终端上对所有待测试应用程序的测试;Step A4: the test service agent notifies the test host to complete the test of all the application programs to be tested on the virtual mobile terminal;
上述步骤A2具体为:测试服务代理接收到测试主机的测试应用程序通知时,在虚拟移动终端上启动当前应用程序,当监控当前应用程序在虚拟移动终端上完成运行时,通知测试主机完成在虚拟移动终端上对当前应用程序的测试,执行步骤A3。The above-mentioned step A2 is specifically: when the test service agent receives the test application notification from the test host, it starts the current application on the virtual mobile terminal, and when monitoring the current application on the virtual mobile terminal, it notifies the test host to complete To test the current application program on the mobile terminal, execute step A3.
具体地,上述步骤H1具体为:测试主机将配置文件中应用程序记录发送给测试服务代理;本实施例中,在服务器将配置文件下发给测试主机,测试主机执行测试之前,配置文件中的应用程序记录为服务器设置的初始值;Specifically, the above step H1 is specifically: the test host sends the application record in the configuration file to the test service agent; in this embodiment, before the server sends the configuration file to the test host, before the test host executes the test, the The application records the initial value set for the server;
相应地,上述步骤R1之前,还包括:测试主机通过模拟管理器根据测试主机中的配置文件设置共享目录;Correspondingly, before the above step R1, it also includes: the test host sets the shared directory according to the configuration file in the test host through the simulation manager;
上述步骤R2中,测试主机接收到来自测试服务代理的安装应用程序的通知,具体为:测试主机读取配置文件中执行标志为安装应用程序状态;In the above step R2, the test host receives the notification of installing the application program from the test service agent, specifically: the test host reads the execution flag in the configuration file as the state of installing the application program;
上述步骤R3具体为:测试主机将配置文件中执行标志更新为开始测试状态;The above step R3 is specifically: the test host updates the execution flag in the configuration file to the state of starting the test;
上述步骤R4中,测试主机接收来自测试服务代理的完成对当前应用程序的测试通知,具体为:测试主机读取配置文件中的完成标志为完成当前应用程序的测试状态;In the above step R4, the test host receives a notification from the test service agent to complete the test of the current application, specifically: the test host reads the completion flag in the configuration file to complete the test status of the current application;
上述步骤R4中,测试主机在预设时间内判断是否接收到来自测试服务代理的完成对所有待测试应用程序测试的通知,具体为:测试主机在预设时间内判断配置文件中的执行标志是否为完成对所有待测试应用程序的测试状态;In the above step R4, the test host judges within the preset time whether it has received a notification from the test service agent to complete the test of all the application programs to be tested, specifically: the test host judges within the preset time whether the execution flag in the configuration file is To complete the testing status of all applications under test;
上述步骤A1具体为:测试服务代理根据共享目录读取配置文件,将配置文件中的执行标志更新为安装应用程序状态The above step A1 is specifically: the test service agent reads the configuration file according to the shared directory, and updates the execution flag in the configuration file to the state of installing the application program
上述步骤A2中,测试服务代理接收测试主机的测试应用程序通知,具体为:测试服务代理根据共享目录读取配置文件中的执行标志为开始测试状态;In the above step A2, the test service agent receives the test application notification of the test host, specifically: the test service agent reads the execution flag in the configuration file according to the shared directory to start the test state;
上述步骤A2中,测试服务代理通知测试主机完成对当前应用程序的测试,具体为:测试服务代理根据共享目录读取配置文件,将配置文件中成标志更新为完成当前应用程序的测试状态;In the above step A2, the test service agent notifies the test host to complete the test of the current application program, specifically: the test service agent reads the configuration file according to the shared directory, and updates the successful flag in the configuration file to complete the test status of the current application program;
上述步骤A4具体为:测试服务代理根据共享目录读取配置文件,将配置文件中的执行标志更新为完成对所有待测试应用程序的测试状态。The above step A4 specifically includes: the test service agent reads the configuration file according to the shared directory, and updates the execution flag in the configuration file to complete the testing status of all the application programs to be tested.
或者具体地,上述步骤H1具体为:测试主机将预设的应用程序记录发送给测试服务代理;本实施例中,在测试主机执行测试之前,将应用程序记录设置为初始值;Or specifically, the above step H1 specifically includes: the test host sends the preset application record to the test service agent; in this embodiment, before the test host executes the test, the application record is set as an initial value;
上述步骤R2中,测试主机接收到来自测试服务代理的安装应用程序的通知,具体为:测试主机接收到来自测试服务代理的预设的安装状态值;In the above step R2, the test host receives the notification of installing the application program from the test service agent, specifically: the test host receives the preset installation status value from the test service agent;
上述步骤R3具体为:测试主机向测试服务代理发送预设的开始测试状态值;The above step R3 is specifically: the test host sends a preset start test status value to the test service agent;
上述步骤R4中,测试主机接收来自测试服务代理的完成对当前应用程序的测试通知,具体为:测试主机接收来自所述测试服务代理的预设的完成测试状态值;In the above step R4, the test host receives from the test service agent the completion of the test notification for the current application program, specifically: the test host receives the preset test completion status value from the test service agent;
上述步骤R4中,测试主机在预设时间内判断是否接收到来自测试服务代理的完成对所有待测试应用程序测试的通知,具体为:测试主机在预设时间内判断是否接收到来自测试服务代理预设的完成对所有待测试应用程序的状态值;In the above step R4, the test host judges within the preset time whether it has received the notification from the test service agent that it has completed the testing of all the application programs to be tested, specifically: the test host judges within the preset time whether it has received the notification from the test service agent. Preset completed state values for all applications under test;
上述步骤A1具体为:测试服务代理向测试主机发送预设的安装状态值;The above step A1 specifically includes: the test service agent sends a preset installation status value to the test host;
上述步骤A2中,测试服务代理接收测试主机的测试应用程序通知,具体为:测试服务代理接收来自测试主机预设的开始测试状态值;In the above step A2, the test service agent receives the test application notification from the test host, specifically: the test service agent receives the preset start test status value from the test host;
上述步骤A2中,测试服务代理通知测试主机完成对当前应用程序的测试,具体为:测试服务代理向测试主机发送完成当前应用程序测试的状态值;In the above step A2, the test service agent notifies the test host to complete the test of the current application program, specifically: the test service agent sends the status value of completing the current application test to the test host;
上述步骤A4具体为:测试服务代理向测试主机发送完成对所有待测试应用程序测试的状态值。The above-mentioned step A4 specifically includes: the testing service agent sends the status value of completing the testing of all the application programs to be tested to the testing host.
具体地,上述应用程序记录包括应用程序数量、应用程序名称编号和当前应用程序名称编号;当前应用程序名称编号的初始值与第一个测试的应用程序名称编号值相同;Specifically, the above-mentioned application program record includes the number of applications, the application program name number and the current application program name number; the initial value of the current application program name number is the same as the value of the first tested application program name number;
相应地,上述步骤R2中,测试主机根据应用程序记录获取当前待测试的应用程序名称,具体为:测试主机根据当前应用程序名称编号获取当前待测试的应用程序名称;Correspondingly, in the above step R2, the test host obtains the current application program name to be tested according to the application program record, specifically: the test host obtains the current application program name to be tested according to the current application program name number;
上述步骤R4中,测试主机根据应用程序记录更新对待测试应用程序的第一记录,具体为:测试主机根据应用程序名称编号更新当前应用程序名称编号;In the above step R4, the test host updates the first record of the application to be tested according to the application record, specifically: the test host updates the current application name number according to the application name number;
上述步骤A3具体为:测试服务代理根据接收的当前应用程序名称编号和接收的应用程序数量判断是否具有待测试的应用程序,是则根据接收的应用程序名称编号更新接收的当前应用程序名称编号,返回步骤A1;否则执行步骤A4。The above step A3 is specifically: the test service agent judges whether there is an application program to be tested according to the received current application program name number and the number of received applications, and if so, updates the received current application program name number according to the received application program name number, Return to step A1; otherwise, go to step A4.
或者具体地,上述应用程序记录包括应用程序数量和应用程序名称编号;Or specifically, the above-mentioned application record includes the number of applications and the number of application names;
相应地,上述步骤H1中,还包括:测试主机根据应用程序数量和应用程序名称编号设置第二索引值的初始值;Correspondingly, in the above step H1, it also includes: the test host sets the initial value of the second index value according to the number of applications and the number of application names;
步骤R2中,测试主机根据应用程序记录获取当前待测试的应用程序名称,具体为:测试主机根据第二索引值和应用程序名称编号获取当前待测试的应用程序名称;In step R2, the test host obtains the current application program name to be tested according to the application program record, specifically: the test host obtains the current application program name to be tested according to the second index value and the application program name number;
步骤R4中,测试主机根据应用程序记录更新对待测试应用程序的第一记录,具体为:测试主机根据应用程序名称编号更新第二索引值;In step R4, the test host updates the first record of the application to be tested according to the application record, specifically: the test host updates the second index value according to the application name number;
步骤W1中,还包括:测试服务代理根据接收的应用程序名称编号和应用程序数量设置第一索引值的初始值;In step W1, it also includes: the test service agent sets the initial value of the first index value according to the received application name number and the number of applications;
步骤A3具体为:测试服务代理根据第一索引值和接收的应用程序名称编号判断是否具有待测试的应用程序,是则更新第一索引值,返回步骤A1;否则执行步骤A4。Step A3 is specifically: the test service agent judges whether there is an application program to be tested according to the first index value and the received application program name number, if yes, update the first index value, and return to step A1; otherwise, execute step A4.
可选地,本实施例方法中,上述步骤R1之前,还包括:Optionally, in the method of this embodiment, before the above step R1, it also includes:
步骤R0:测试主机根据虚拟移动终端的记录判断是否具有待测试的虚拟移动终端,是则执行步骤R1,否则结束;虚拟移动终端的记录在执行测试之前为预设的初始值;Step R0: the test host judges whether there is a virtual mobile terminal to be tested according to the record of the virtual mobile terminal, if yes, execute step R1, otherwise end; the record of the virtual mobile terminal is a preset initial value before performing the test;
相应地,上述步骤R1具体为:测试主机根据虚拟移动终端的记录启动当前虚拟移动终端,并通过当前虚拟移动终端启动虚拟移动终端中的测试服务代理;Correspondingly, the above-mentioned step R1 is specifically: the test host starts the current virtual mobile terminal according to the record of the virtual mobile terminal, and starts the test service agent in the virtual mobile terminal through the current virtual mobile terminal;
上述测试主机确定完成在虚拟移动终端上对应用程序的测试之后,还包括:After the above-mentioned test host confirms that the test of the application program on the virtual mobile terminal is completed, it also includes:
步骤R5:测试主机关闭当前虚拟移动终端,更新虚拟移动终端的记录,执行步骤R0。Step R5: The test host closes the current virtual mobile terminal, updates the record of the virtual mobile terminal, and executes step R0.
具体地,上述虚拟移动终端的记录包括当前虚拟移动终端编号、虚拟移动终端数量;Specifically, the record of the above-mentioned virtual mobile terminal includes the number of the current virtual mobile terminal and the number of virtual mobile terminals;
相应地,上述步骤R0具体为:测试主机根据当前虚拟移动终端编号、虚拟移动终端数量判断是否具有待测试的虚拟移动终端,是则执行步骤R1,否则结束;Correspondingly, the above step R0 is specifically: the test host judges whether there is a virtual mobile terminal to be tested according to the current virtual mobile terminal number and the number of virtual mobile terminals, if yes, execute step R1, otherwise end;
上述测试主机根据虚拟移动终端的记录启动当前虚拟移动终端,具体为:测试主机根据当前虚拟移动终端编号启动虚拟移动终端;The above-mentioned test host starts the current virtual mobile terminal according to the record of the virtual mobile terminal, specifically: the test host starts the virtual mobile terminal according to the current virtual mobile terminal number;
上述步骤R5中,测试主机更新虚拟移动终端的记录,具体为:测试主机更新当前虚拟移动终端编号。In the above step R5, the test host updates the record of the virtual mobile terminal, specifically: the test host updates the number of the current virtual mobile terminal.
或者具体地,上述虚拟移动终端的记录包括当前虚拟移动终端编号、虚拟移动终端数量;Or specifically, the record of the above-mentioned virtual mobile terminal includes the number of the current virtual mobile terminal and the number of virtual mobile terminals;
相应地,上述步骤R0之前,还包括:Correspondingly, before the above step R0, it also includes:
步骤L1:测试主机根据当前虚拟移动终端编号和虚拟移动终端数量设置第三索引值的初始值;Step L1: The test host sets the initial value of the third index value according to the current virtual mobile terminal number and the number of virtual mobile terminals;
上述步骤R0具体为:测试主机根据当前虚拟移动终端编号和第三索引值判断是否具有待测试的虚拟移动终端,是则执行步骤R1,否则结束;The above step R0 is specifically: the test host judges whether there is a virtual mobile terminal to be tested according to the current virtual mobile terminal number and the third index value, if yes, execute step R1, otherwise end;
上述步骤R1中,测试主机根据虚拟移动终端的记录启动当前虚拟移动终端,具体为:测试主机根据第三索引值和当前虚拟移动终端编号启动当前虚拟移动终端;In the above step R1, the test host starts the current virtual mobile terminal according to the record of the virtual mobile terminal, specifically: the test host starts the current virtual mobile terminal according to the third index value and the current virtual mobile terminal number;
上述步骤R5中,测试主机更新虚拟移动终端的记录,具体为:测试主机更新第三索引值以及当前虚拟移动终端编号。In the above step R5, the test host updates the record of the virtual mobile terminal, specifically: the test host updates the third index value and the current virtual mobile terminal number.
具体地,上述虚拟移动终端的记录具体为预设的虚拟移动终端记录,或者为测试主机的配置文件中记录的虚拟移动终端记录。Specifically, the above virtual mobile terminal record is specifically a preset virtual mobile terminal record, or a virtual mobile terminal record recorded in a configuration file of the test host.
可选地,上述步骤R2中,测试主机获取应用程序的安装包,具体为:测试主机根据预设的待测试应用程序名称获取应用程序的安装包;或者,测试主机获取应用程序的安装包,具体为:测试主机读取自身的配置文件中待测试的应用程序名称,根据应用程序名称获取应用程序的安装包。Optionally, in the above step R2, the test host obtains the installation package of the application, specifically: the test host obtains the installation package of the application according to the preset name of the application to be tested; or, the test host obtains the installation package of the application, Specifically: the test host reads the name of the application program to be tested in its own configuration file, and obtains the installation package of the application program according to the application program name.
可选地,上述步骤R1之后、步骤R2之前,还包括:测试主机通知测试服务代理准备测试;Optionally, after the above step R1 and before the step R2, it also includes: the test host notifies the test service agent to prepare for the test;
相应地,上述步骤A0之后、步骤A1之前,还包括:测试服务代理判断是否接收到来自测试主机的准备测试通知;Correspondingly, after the above-mentioned step A0 and before the step A1, it also includes: the test service agent judges whether the test preparation notification from the test host is received;
上述步骤A1具体为:测试服务代理接收到自测试主机的准备测试通知时,通知测试主机在虚拟移动终端上安装应用程序。The above step A1 specifically includes: when the test service agent receives the test preparation notification from the test host, it notifies the test host to install the application program on the virtual mobile terminal.
可选地,本发明中,测试主机读取配置文件之前,需要根据预设的配置文件路径找到配置文件。Optionally, in the present invention, before the test host reads the configuration file, it needs to find the configuration file according to the preset configuration file path.
本发明提供的测试方法,测试主机通过虚拟移动终端测试应用程序,不用租用大量的实体移动终端进行测试,降低测试成本、提高测试的便捷性;可以重复同样的测试,使测试结果可以重现;测试主机自动进行测试,大大减少测试人员的工作量,节省时间和劳动力。测试多个应用程序和多个虚拟移动终端时,一个虚拟移动终端测试多个应用程序时可以自动执行对多个应用程序的测试,测试多个虚拟移动终端时可以自动执行对多个虚拟移动终端的测试,这种自动测试的方法在很大程度上提高了测试便捷性、节省劳动力。In the test method provided by the present invention, the test host uses the virtual mobile terminal to test the application program, without renting a large number of physical mobile terminals for testing, which reduces the test cost and improves the convenience of the test; the same test can be repeated, so that the test results can be reproduced; The test host automatically conducts tests, greatly reducing the workload of testers, saving time and labor. When testing multiple applications and multiple virtual mobile terminals, one virtual mobile terminal can automatically perform tests on multiple applications when testing multiple applications, and can automatically perform tests on multiple virtual mobile terminals when testing multiple virtual mobile terminals. This method of automatic testing greatly improves the convenience of testing and saves labor.
实施例2Example 2
本实施例提供一种自动化测试的方法,测试主机的操作方法,如图3所示,包括:This embodiment provides a method for automated testing, the operation method of the test host, as shown in Figure 3, including:
步骤S1:测试主机接收到来自服务器数据库的配置文件,将配置文件放入预设目录下。Step S1: The test host receives the configuration file from the server database, and puts the configuration file into a preset directory.
配置文件中包括测试任务,测试任务包括一个或多个待测试的应用程序名称、一个或多个待测试的虚拟移动终端名称。The configuration file includes test tasks, and the test tasks include the names of one or more application programs to be tested, and the names of one or more virtual mobile terminals to be tested.
具体地,预设目录具体为测试主机执行测试程序时,测试程序所在的当前路径。Specifically, the preset directory is specifically the current path where the test program is located when the test host executes the test program.
进一步具体地,测试程序运行的当前路径具体为测试程序安装的路径。例如,用户在测试程序运行之前将所运行的测试程序安装到测试主机的预设目录下。Further specifically, the current path where the test program runs is specifically the path where the test program is installed. For example, the user installs the running test program into a preset directory of the test host before running the test program.
进一步地,在步骤S1之前,还包括:Further, before step S1, it also includes:
步骤S0:客户端配置测试任务和测试主机地址,将测试任务和测试主机地址发送给服务器数据库;服务器数据库根据测试任务生成配置文件,将配置文件根据测试主机地址发给测试主机,并将测试任务加入服务器数据库的任务表中。其中,测试任务包括待测试的应用程序和待测试的虚拟移动终端。Step S0: The client configures the test task and the address of the test host, and sends the test task and the address of the test host to the server database; the server database generates a configuration file according to the test task, sends the configuration file to the test host according to the address of the test host, and sends the test task Added to the task table of the server database. Wherein, the test task includes the application program to be tested and the virtual mobile terminal to be tested.
具体地,测试用户在客户端上选择需要测试的应用程序、待测试的虚拟移动终端和测试主机地址,确定提交之后,客户端将用户选择的测试任务(测试任务包括需要测试的应用程序和待测试的虚拟移动终端)和测试主机地址发送给服务器数据库。Specifically, the test user selects the application program to be tested, the virtual mobile terminal to be tested, and the address of the test host on the client, and after confirming the submission, the client will select the test task (the test task includes the application program to be tested and the test task to be tested). Tested virtual mobile terminal) and the test host address are sent to the server database.
测试用户选择的测试任务中包括一个或多个待测试的应用程序、一个或多个待测试的虚拟移动终端。The test task selected by the test user includes one or more application programs to be tested and one or more virtual mobile terminals to be tested.
步骤S2:测试主机判断配置文件中待测试应用程序的数量是否大于0,是则执行步骤S3,否则发布测试结果。Step S2: The test host judges whether the number of application programs to be tested in the configuration file is greater than 0, if yes, execute step S3, otherwise release the test result.
步骤S3:测试主机读取配置文件中待测试应用程序名称,根据待测试应用程序名称获取待测试的应用程序工程源码,将待测试的应用程序工程源码放入指定的目录下的文件中,并对待测试的应用程序工程源码进行编译生成待测试的应用程序的安装包。Step S3: The test host reads the name of the application to be tested in the configuration file, obtains the source code of the application project to be tested according to the name of the application to be tested, puts the source code of the application project to be tested into a file under the specified directory, and The source code of the application program to be tested is compiled to generate the installation package of the application program to be tested.
本发明中,测试主机读取配置文件中待测试应用程序名称,具体为:测试主机根据预设的测试文件路径找到配置文件,读取配置文件中待测试应用程序名称。In the present invention, the test host reads the name of the application program to be tested in the configuration file, specifically: the test host finds the configuration file according to the preset test file path, and reads the name of the application program to be tested in the configuration file.
具体地,测试主机根据待测试应用程序名称获取待测试的应用程序工程源码具体为:测试主机根据待测试应用程序名称从SVN服务器中下载待测试的应用程序工程源码;或者测试主机根据待测试应用程序名称从自身预设目录下的文件中获取待测试的应用程序工程源码。Specifically, the test host obtains the source code of the application project to be tested according to the name of the application program to be tested as follows: the test host downloads the source code of the application program project to be tested from the SVN server according to the name of the application program to be tested; The program name obtains the project source code of the application program to be tested from the files in its own preset directory.
步骤S4:测试主机判断配置文件中待测试的虚拟移动终端的数量是否大于0,是则执行步骤S5,否则发布测试结果。Step S4: The test host judges whether the number of virtual mobile terminals to be tested in the configuration file is greater than 0, if yes, execute step S5, otherwise release the test result.
例如,待测试的Android OS的个数:OSNUM=5。Android OS为安卓操作系统的虚拟移动终端,OSNUM=5表示虚拟移动终端的数量为5。For example, the number of Android OS to be tested: OSNUM=5. Android OS is a virtual mobile terminal of the Android operating system, and OSNUM=5 indicates that the number of virtual mobile terminals is five.
步骤S5:测试主机根据配置文件中虚拟移动终端的记录判断是否具有待测试的虚拟移动终端,是则执行步骤S6,否则发布测试结果。Step S5: The test host judges whether there is a virtual mobile terminal to be tested according to the record of the virtual mobile terminal in the configuration file, and if yes, executes step S6; otherwise, releases the test result.
步骤S6:测试主机根据虚拟移动终端的记录启动当前虚拟移动终端,将配置文件中执行标志更新为准备测试状态。Step S6: The test host activates the current virtual mobile terminal according to the record of the virtual mobile terminal, and updates the execution flag in the configuration file to the ready-to-test state.
例如,配置文件中的执行标志初始值为空,执行标志准备测试状态的值为0。For example, the initial value of the execution flag in the configuration file is empty, and the value of the execution flag ready to test state is 0.
步骤S7:测试主机向当前虚拟移动终端发送连接指令,根据当前虚拟移动终端返回的数据判断是否与当前虚拟移动终端成功建立连接,是则执行步骤S8,否则执行步骤S13。Step S7: The test host sends a connection command to the current virtual mobile terminal, and judges whether the connection with the current virtual mobile terminal is successfully established according to the data returned by the current virtual mobile terminal, if yes, execute step S8, otherwise, execute step S13.
具体地,当前虚拟移动终端返回的数据为预设的成功信息时执行步骤S8,当前虚拟移动终端返回的数据不是预设的成功信息时,执行步骤S13。Specifically, step S8 is executed when the data returned by the current virtual mobile terminal is the preset success information, and step S13 is executed when the data returned by the current virtual mobile terminal is not the preset success information.
步骤S8:测试主机判断当前虚拟移动终端是否将配置文件中的执行标志设置为安装应用程序的状态,是则执行步骤S9,否则继续判断。Step S8: The test host judges whether the current virtual mobile terminal has set the execution flag in the configuration file to the state of installing the application program, if yes, execute step S9, otherwise continue to judge.
例如,执行标志设置为安装应用程序的状态值为1。For example, the execute flag is set to a status value of 1 for the installed application.
可选地,步骤S8中测试主机判断虚拟移动终端没有将执行标志设置为安装应用程序的状态时,继续判断之前,还包括:Optionally, when the test host in step S8 judges that the virtual mobile terminal does not set the execution flag to the state of installing the application program, before continuing to judge, it also includes:
步骤S80:测试主机等待预设时间。例如,预设时间为5秒钟。Step S80: The test host waits for a preset time. For example, the preset time is 5 seconds.
进一步可选地,步骤S80之后、继续判断之前,还包括:Further optionally, after step S80 and before continuing to judge, further include:
步骤S81:测试主机判断是否超时,是则执行步骤S15,否则等待预设时间执行步骤S8。Step S81: The test host judges whether it is overtime, if yes, execute step S15, otherwise wait for the preset time and execute step S8.
具体地,测试主机判断是否超时,具体为:测试主机判断成功建立连接之后或测试主机更新应用程序记录之后到当前时间是否超过预设时间。例如,预设的时间为5分钟。Specifically, the test host judges whether it is timed out, specifically: the test host judges whether the current time exceeds the preset time after the connection is successfully established or after the test host updates the application program record. For example, the preset time is 5 minutes.
步骤S9:测试主机根据配置文件中应用程序记录获取当前待测试的应用程序名称,根据当前待测试的应用程序名称获取当前应用程序的安装包,并将当前应用程序的安装包发送给当前虚拟移动终端,根据当前应用程序的安装包的名称组织当前安装指令,并向当前虚拟移动终端发送当前安装指令,通过当前虚拟移动终端执行当前安装指令在当前虚拟移动终端上根据当前应用程序的安装包安装当前应用程序,并接收到来自当前虚拟移动终端预设的安装成功的信息。Step S9: The test host obtains the name of the current application to be tested according to the application record in the configuration file, obtains the installation package of the current application according to the name of the current application to be tested, and sends the installation package of the current application to the current virtual mobile The terminal organizes the current installation instruction according to the name of the installation package of the current application program, and sends the current installation instruction to the current virtual mobile terminal, executes the current installation instruction through the current virtual mobile terminal and installs it according to the installation package of the current application program on the current virtual mobile terminal The current application program, and receives information from the preset installation success of the current virtual mobile terminal.
本实施例中,测试主机没有接收到来自当前虚拟移动终端当前预设的安装成功的信息时执行步骤S15。In this embodiment, step S15 is executed when the test host does not receive information about successful installation currently preset from the current virtual mobile terminal.
具体地,测试主机根据当前待测试的应用程序名称获取当前应用程序的安装包,具体为:测试主机根据当前待测试的应用程序名称从预设目录下的文件中获取当前应用程序的安装包。Specifically, the test host obtains the installation package of the current application according to the name of the current application to be tested, specifically: the test host obtains the installation package of the current application from files in a preset directory according to the name of the current application to be tested.
具体地,测试主机将当前应用程序的安装包发送给所述虚拟移动终端,具体为:测试主机将当前应用程序的安装包发送到当前虚拟移动终端指定的路径下。Specifically, the test host sends the installation package of the current application program to the virtual mobile terminal, specifically: the test host sends the installation package of the current application program to the path specified by the current virtual mobile terminal.
步骤S10:测试主机将配置文件中的执行标志更新为开始测试状态。Step S10: The test host updates the execution flag in the configuration file to the state of starting the test.
例如,执行标志的开始测试状态的值为2。For example, the value of the start test state of the execute flag is 2.
步骤S11:测试主机根据配置文件中的完成测试标志判断虚拟移动终端是否完成对当前应用程序的测试,是则执行步骤S12,否则继续判断。Step S11: The test host judges whether the virtual mobile terminal has completed the test of the current application program according to the completed test flag in the configuration file, if yes, execute step S12, otherwise continue to judge.
具体地,测试主机判断虚拟移动终端是否将配置文件中的完成测试标志complete设置为1,是则执行步骤S12,否则继续判断。Specifically, the test host judges whether the virtual mobile terminal has set the complete test flag complete in the configuration file to 1, if yes, execute step S12, otherwise continue to judge.
本实施例中,完成测试标志complete的初始值为-1,或为空。In this embodiment, the initial value of the complete test flag complete is -1, or is empty.
可选地,步骤S11中测试主机判断虚拟移动终端没有完成当前应用程序之后,继续判断之前,还包括:Optionally, after the test host judges that the virtual mobile terminal has not completed the current application program in step S11, before continuing to judge, it also includes:
步骤S110:测试主机等待预设时间。例如,预设时间为5秒钟。Step S110: The test host waits for a preset time. For example, the preset time is 5 seconds.
进一步可选地,步骤S110之后、继续判断之前,还包括:Further optionally, after step S110 and before continuing to judge, further include:
步骤S111:测试主机判断是否超时,是则执行步骤S15,否则继续判断。Step S111: The test host judges whether it is timed out, if yes, execute step S15, otherwise continue to judge.
具体地,测试主机判断是否超时,具体为:测试主机判断虚拟移动终端第一次判断没有完成当前应用程序之后到当前时间是否超过预设的时间。例如,预设的时间段为5分钟。Specifically, the test host judges whether it is timed out, specifically: the test host judges whether the current time exceeds the preset time after the first judgment of the virtual mobile terminal that the current application program has not been completed. For example, the preset time period is 5 minutes.
步骤S12:测试主机判断在预设时间内当前虚拟移动终端是否将执行标志更新为完成对所有待测试应用程序测试的状态,是则执行步骤S13,否则执行步骤S15。Step S12: The test host judges whether the current virtual mobile terminal has updated the execution flag to complete the testing of all the application programs to be tested within the preset time, if yes, execute step S13, otherwise execute step S15.
例如,预设时间为1分钟。例如,执行标志的完成对所有待测试应用程序测试的状态值为3。For example, the preset time is 1 minute. For example, completion of the execution flag has a status value of 3 for all application tests under test.
具体地,步骤S12具体包括:Specifically, step S12 specifically includes:
步骤S121:测试主机判断当前虚拟移动终端是否将执行标志的值更新为3,是则执行步骤S13,否则执行步骤S122;Step S121: the test host judges whether the current virtual mobile terminal updates the value of the execution flag to 3, if yes, execute step S13, otherwise execute step S122;
步骤S122:测试主机判断是否超时,是则执行步骤S15,否则执行步骤S123;Step S122: The test host judges whether it has timed out, if yes, execute step S15, otherwise execute step S123;
步骤S123:测试主机等待预设子时间,判断当前虚拟移动终端是否将执行标志的值更新为3,是则执行步骤S13,否则执行步骤S122。例如,预设子时间为5秒钟。Step S123: The test host waits for a preset sub-time, and judges whether the current virtual mobile terminal has updated the value of the execution flag to 3, if yes, execute step S13, otherwise, execute step S122. For example, the preset sub-time is 5 seconds.
步骤S13:测试主机整理日志文件,并将日志文件放入预设目录下。Step S13: The test host organizes the log files, and puts the log files into a preset directory.
具体地,测试整理日志文件,具体为:测试主机根据测试的所有的应用程序名称、测试时间、当前虚拟移动终端以及测试结果生成日志文件。Specifically, the test organizes the log files, specifically: the test host generates log files according to all tested application program names, test time, current virtual mobile terminal and test results.
步骤S14:测试主机关闭当前虚拟移动终端,更新虚拟移动终端的记录,执行步骤S5。Step S14: the test host closes the current virtual mobile terminal, updates the record of the virtual mobile terminal, and executes step S5.
步骤S15:测试主机更新对待测试应用程序的第一记录,执行步骤S8。Step S15: The test host updates the first record of the application program to be tested, and executes step S8.
本实施例中,当测试主机获取应用程序源码为从SVN服务器下载时,如图4所示,上述步骤S3中测试主机根据待测试应用程序名称获取待测试的应用程序工程源码,将待测试的应用程序工程源码放入预设目录下的文件中,并对待测试的应用程序工程源码进行编译生成应用程序的安装包,具体包括以下步骤:In this embodiment, when the test host obtains the application program source code from the SVN server, as shown in Figure 4, in the above step S3, the test host obtains the source code of the application program project to be tested according to the name of the application program to be tested, and downloads the application program source code to be tested. The application project source code is put into the file in the preset directory, and the application project source code to be tested is compiled to generate the installation package of the application program, which specifically includes the following steps:
步骤101:测试主机根据预设目录组织下载路径。Step 101: The test host organizes download paths according to preset directories.
步骤102:测试主机读取配置文件中待测试应用程序名称,根据预设的svn服务器地址从svn服务器上将与待测试应用程序名称对应的工程源码下载到下载路径的文件中。Step 102: The test host reads the name of the application to be tested in the configuration file, and downloads the project source code corresponding to the name of the application to be tested from the svn server to the file in the download path according to the preset svn server address.
本实施例步骤102中,测试主机将配置文件中所有待测试应用程序名称对应的工程源码全部下载到下载路径的文件中。优选地,在下载路径的文件中的每个应用程序的工程源码放到对应的子文件,每个子文件的名称与对应的应用程序名称匹配。In step 102 of this embodiment, the test host downloads all the project source codes corresponding to the names of the application programs to be tested in the configuration file to the file in the download path. Preferably, the project source code of each application program in the file in the download path is put into a corresponding sub-file, and the name of each sub-file matches the name of the corresponding application program.
例如,当配置文件中的应用程序名称为ePass3000GM,并且是.Jar格式时,测试主机组织的下载路径为:G:CASE_Code\ePass3000GM\libs;For example, when the application name in the configuration file is ePass3000GM and it is in .Jar format, the download path of the test host organization is: G:CASE_Code\ePass3000GM\libs;
当配置文件中的应用程序名称为ePass3000GM,并且是.SO格式时,测试主机组织的下载路径为:G:CASE_Code\ePass3000GM\libs\armeabi。When the application name in the configuration file is ePass3000GM and is in .SO format, the download path of the test host organization is: G:CASE_Code\ePass3000GM\libs\armeabi.
步骤103:测试主机设置环境变量。Step 103: setting environment variables on the test host.
具体地,测试主机设置环境变量具体为测试主机设置JDK的安装路径JAVA_HOME和类路径classpath。Specifically, the test host sets the environment variable to specifically set the JDK installation path JAVA_HOME and the class path classpath for the test host.
步骤104:测试主机删除预设目录下的临时文件。Step 104: The test host deletes the temporary files in the preset directory.
预设目录下的临时文件中包括class、dex等类型的文件。例如,临时文件为temp文件,temp文件中包括class、dex等类型的文件。The temporary files in the default directory include class, dex and other types of files. For example, the temporary file is a temp file, and the temp file includes files of types such as class and dex.
步骤105:测试主机根据配置文件中待测试应用程序记录设置应用程序的编译记录的初始值。Step 105: The test host sets the initial value of the compilation record of the application according to the record of the application program to be tested in the configuration file.
例如,应用程序的编译记录的初始值设置为与配置文件中第一个待测试应用程序名称编号相同。For example, the initial value of the compilation record of the application is set to be the same as the number of the name of the first application under test in the configuration file.
本实施例中,应用程序记录包括应用程序名称编号和应用程序数量。In this embodiment, the application program record includes application program name number and application program quantity.
步骤106:测试主机根据应用程序的编译记录和应用程序记录判断是否具有待编译的应用程序,是则执行步骤107,否则完成编译。Step 106: The test host judges whether there is an application program to be compiled according to the compilation record of the application program and the application program record, if yes, execute step 107, otherwise complete the compilation.
可选地,测试主机判断应用程序的编译记录是否超出应用程序数量,是则执行步骤107,否则完成编译。Optionally, the test host judges whether the compilation record of the application program exceeds the number of application programs, if yes, execute step 107, otherwise complete the compilation.
步骤107:测试主机根据配置文件中应用程序记录和应用程序的编译记录读取配置文件中当前待编译的应用程序名称。Step 107: The test host reads the name of the application currently to be compiled in the configuration file according to the application record and the compilation record of the application in the configuration file.
具体地,测试主机读取配置文件中应用程序名称编号,将与编译记录值相同的应用程序名称编号的值对应的应用程序名称作为当前待编译的应用程序名称。Specifically, the test host reads the application program name number in the configuration file, and uses the application program name corresponding to the value of the application program name number that is the same as the compilation record value as the current application program name to be compiled.
例如,应用程序编译记录的值为1时,测试主机将应用程序的记录中应用程序名称编号CASE1对应的应用程序名称为AesArtAudioPass2000作为当前待编译的应用程序名称。For example, when the value of the application program compilation record is 1, the test host takes the application program name corresponding to the application program name number CASE1 in the application program record as AesArtAudioPass2000 as the current application program name to be compiled.
步骤108:测试主机根据当前待编译的应用程序名称读取配置文件中当前待编译的应用程序的文件名称。Step 108: The test host reads the file name of the current application program to be compiled in the configuration file according to the name of the current application program to be compiled.
例如,当前待编译的应用程序名称为AesArtAudioPass2000时,读取的当前待编译的应用程序文件的名称为AesArtAudioPass2000.apk。For example, when the name of the current application program to be compiled is AesArtAudioPass2000, the name of the read current application program file to be compiled is AesArtAudioPass2000.apk.
步骤109:测试主机根据当前待编译的应用程序名称和下载路径组织当前编译路径。Step 109: The test host organizes the current compiling path according to the current application program name and download path to be compiled.
具体地,测试主机在当前应用程序的下载路径中指定其中一个文件夹或新建一个文件夹为作为当前编译文件夹,并将当前待编译的应用程序名称作为编译文件夹的名称,根据编译文件夹组织当前编译路径。Specifically, the test host designates one of the folders in the download path of the current application or creates a new folder as the current compilation folder, and uses the name of the current application to be compiled as the name of the compilation folder. Organize the current compilation path.
步骤110:测试主机根据当前待编译的应用程序名称将下载路径的文件中当前应用程序的工程源码放在组织的当前编译路径下。Step 110: The test host puts the project source code of the current application program in the file in the download path under the organization's current compilation path according to the name of the current application program to be compiled.
具体地,测试主机将下载路径的文件中与当前待编译的应用程序名称对应的当前应用程序的工程源码放在组织的编译路径下的文件夹中。Specifically, the test host puts the project source code of the current application program corresponding to the name of the current application program to be compiled in the file in the download path into a folder under the compilation path of the organization.
步骤111:测试主机根据当前编译路径下的文件生成当前应用程序的安装包。Step 111: The test host generates the installation package of the current application program according to the files in the current compilation path.
具体地,步骤111具体包括:Specifically, step 111 specifically includes:
步骤a1:测试主机执行aapt指令,将当前编译路径下的资源文件生成R.JAVA文件。Step a1: The test host executes the aapt command to generate the R.JAVA file from the resource file under the current compilation path.
步骤a2:测试主机执行javac指令,根据R.JAVA文件和工程源码的JAVA文件生成Class文件。Step a2: The test host executes the javac command, and generates a Class file according to the R.JAVA file and the JAVA file of the project source code.
步骤a3:测试主机执行dx指令,将Class文件转换成dex文件。Step a3: The test host executes the dx command to convert the Class file into a dex file.
步骤a4:测试主机执行apkbuilder指令生成当前应用程序的安装包。Step a4: The test host executes the apkbuilder command to generate the installation package of the current application.
具体地,应用程序的安装包具体为apk文件。Specifically, the installation package of the application program is specifically an apk file.
步骤112:测试主机在预设目录下生成当前安装包文件夹,将当前应用程序的安装包拷贝到当前安装包文件夹中。Step 112: The test host generates a current installation package folder in a preset directory, and copies the current application installation package to the current installation package folder.
步骤113:测试主机更新应用程序的编译记录,执行步骤106。Step 113: The test host updates the compilation record of the application program, and executes Step 106.
本实施例中,当测试主机获取应用程序源码为从本地数据库中获取时,直接使用本地数据库中编译好的应用程序的安装包。In this embodiment, when the test host obtains the source code of the application program from the local database, it directly uses the installation package of the application program compiled in the local database.
本实施例中,如图5所示,测试主机根据配置文件中虚拟移动终端的记录启动当前虚拟移动终端的方法包括以下步骤:In this embodiment, as shown in Figure 5, the method that the test host starts the current virtual mobile terminal according to the record of the virtual mobile terminal in the configuration file includes the following steps:
步骤201:测试主机根据配置文件中记载的模拟管理器的路径启动模拟管理器,并对模拟管理器进行初始化;Step 201: the test host starts the simulation manager according to the path of the simulation manager recorded in the configuration file, and initializes the simulation manager;
例如,测试主机根据配置文件中记载的模拟管理器的路径C:\Program Files\Genymobile\Genymotion\player.exe启动模拟管理器。For example, the test host starts the simulation manager according to the path C:\Program Files\Genymobile\Genymotion\player.exe of the simulation manager recorded in the configuration file.
步骤202:测试主机创建模拟管理器对象。Step 202: The test host creates a simulation manager object.
步骤203:测试主机接收模拟管理器返回的状态值,根据状态值判断是否成功创建模拟管理器对象,是则执行步骤204,否则打印错误信息。Step 203: The test host receives the status value returned by the simulation manager, and judges whether the simulation manager object is successfully created according to the status value, if yes, execute step 204, otherwise print an error message.
具体地,测试主机接收模拟管理器返回的状态值,具体为模拟管理器对象创建完之后返回的状态值,判断返回的状态值是否为预设的成功状态值,是则执行步骤204,否则打印错误信息。Specifically, the test host receives the status value returned by the simulation manager, specifically the status value returned after the simulation manager object is created, and judges whether the returned status value is a preset success status value, if yes, execute step 204, otherwise print error message.
例如,预设的成功状态值为0,当测试主机接收的状态值为0时,创建对象成功,否则创建模拟管理器对象失败。For example, the preset success status value is 0, and when the status value received by the test host is 0, the creation of the object is successful; otherwise, the creation of the simulation manager object fails.
步骤204:测试主机根据配置文件中虚拟移动终端的记录读取配置文件中当前虚拟移动终端的名称。Step 204: The test host reads the name of the current virtual mobile terminal in the configuration file according to the record of the virtual mobile terminal in the configuration file.
步骤205:测试主机将当前虚拟移动终端名称转换成模拟管理器支持的预设字符串。Step 205: The test host converts the name of the current virtual mobile terminal into a preset character string supported by the simulation manager.
步骤206:测试主机通过模拟管理器对象根据预设的字符串创建当前虚拟移动终端的任务对象。Step 206: The test host creates the task object of the current virtual mobile terminal according to the preset character string through the simulation manager object.
具体地,测试主机调用模拟管理器对象中的函数根据预设的字符串创建当前虚拟移动终端的任务对象。Specifically, the test host invokes a function in the simulation manager object to create a task object of the current virtual mobile terminal according to a preset character string.
步骤207:测试主机根据模拟管理器返回的状态值判断是否成功创建当前虚拟移动终端的任务对象,是则执行步骤208,否则打印错误信息。Step 207: The test host determines whether the task object of the current virtual mobile terminal is successfully created according to the status value returned by the simulation manager, if yes, execute step 208, otherwise print an error message.
具体地,测试主机判断模拟管理器返回的状态值是否为预设值,是则执行步骤208,否则打印错误信息。例如,预设值为0,获取的状态值为0时,创建成功,否则失败。Specifically, the test host judges whether the status value returned by the simulation manager is a preset value, if yes, execute step 208, otherwise print an error message. For example, the preset value is 0, and when the obtained status value is 0, the creation is successful, otherwise it fails.
步骤208:测试主机从当前虚拟移动终端的任务对象中获取当前虚拟移动终端标识。Step 208: The test host obtains the identifier of the current virtual mobile terminal from the task object of the current virtual mobile terminal.
步骤209:测试主机根据模拟管理器返回的状态值判断是否成功获取移动终端的标识,是则执行步骤210,否则打印错误信息。Step 209: The test host judges whether the identification of the mobile terminal is obtained successfully according to the status value returned by the simulation manager, if yes, execute step 210, otherwise print an error message.
具体地,测试主机判断模拟管理器返回的状态值是否为预设值,是则执行步骤210,否则打印错误信息。例如,预设值为0,当测试主机接收到模拟管理器返回的状态值为0时,则成功获取虚拟移动终端的标识。Specifically, the test host judges whether the status value returned by the simulation manager is a preset value, if yes, execute step 210, otherwise, print an error message. For example, the preset value is 0, and when the test host receives the status value returned by the simulation manager as 0, the identification of the virtual mobile terminal is successfully acquired.
步骤210:测试主机根据当前虚拟移动终端的标识启动当前虚拟移动终端。Step 210: The test host activates the current virtual mobile terminal according to the identifier of the current virtual mobile terminal.
进一步地,测试主机启动当前虚拟移动终端后,会显示当前虚拟移动终端的图像。Further, after the test host starts the current virtual mobile terminal, it will display the image of the current virtual mobile terminal.
步骤211:测试主机根据当前虚拟移动终端的任务对象返回的状态值判断是否成功启动当前虚拟移动终端,是则执行步骤212,否则打印错误信息。Step 211: The test host judges whether the current virtual mobile terminal is successfully activated according to the status value returned by the task object of the current virtual mobile terminal, if yes, execute step 212, otherwise print an error message.
具体地,测试主机判断当前虚拟移动终端的任务对象返回的状态值是否为预设值,是则执行步骤212,否则打印错误信息。例如,预设值为0,测试主机接收到当前虚拟移动终端的任务对象返回的值为0时,成功启动当前虚拟移动终端。Specifically, the test host judges whether the status value returned by the task object of the current virtual mobile terminal is a preset value, if yes, execute step 212, otherwise print an error message. For example, the preset value is 0, and when the test host receives a value of 0 returned by the task object of the current virtual mobile terminal, the current virtual mobile terminal is successfully activated.
步骤212:测试主机等待当前虚拟移动终端完全启动。Step 212: The test host waits for the current virtual mobile terminal to fully start.
具体地,测试主机接收到当前虚拟移动终端返回预设的完全启动的状态值时,当前虚拟移动终端完全启动;或者,测试主机等待预设时间后,当前虚拟移动终端完全启动。Specifically, when the test host receives the preset fully activated status value returned by the current virtual mobile terminal, the current virtual mobile terminal is fully activated; or, after the test host waits for a preset time, the current virtual mobile terminal is fully activated.
本实施例中,测试主机接收到当前虚拟移动终端返回的完全启动的状态值后,将配置文件中的执行标志更新为准备测试状态。本实施例中,配置文件中的执行标志初始值为-1或者为空,执行标志为准备测试状态的值为0。In this embodiment, after receiving the fully activated state value returned by the current virtual mobile terminal, the test host updates the execution flag in the configuration file to the ready-to-test state. In this embodiment, the initial value of the execution flag in the configuration file is -1 or empty, and the value of the execution flag is 0 in the ready-to-test state.
可选地,如图6所示,本实施例中,测试主机启动当前虚拟移动终端的方法,还可以为:Optionally, as shown in Figure 6, in this embodiment, the method for the test host to start the current virtual mobile terminal can also be:
步骤301:测试主机读取配置文件中模拟管理器的路径,根据模拟管理器的路径启动模拟管理器。Step 301: The test host reads the path of the simulation manager in the configuration file, and starts the simulation manager according to the path of the simulation manager.
例如,配置文件中模拟管理器的路径为C:\Program Files\Genymobile\Genymotion\player.exe。For example, the emulation manager path in the configuration file is C:\Program Files\Genymobile\Genymotion\player.exe.
步骤302:测试主机根据虚拟移动终端的记录读取配置文件中当前虚拟移动终端的名称。Step 302: The test host reads the name of the current virtual mobile terminal in the configuration file according to the record of the virtual mobile terminal.
步骤303:测试主机根据当前虚拟移动终端名称组织启动指令,通过模拟管理器执行启动指令启动当前虚拟移动终端。Step 303: The test host organizes the startup instructions according to the name of the current virtual mobile terminal, and executes the startup instructions through the simulation manager to start the current virtual mobile terminal.
步骤304:测试主机等待当前移动终端完全启动。Step 304: The test host waits for the current mobile terminal to be completely started.
具体地,测试主机接收到当前虚拟移动终端返回的状态值时,当前虚拟移动终端完全启动;或者,测试主机等待预设时间后,当前虚拟移动终端完全启动。Specifically, when the test host receives the status value returned by the current virtual mobile terminal, the current virtual mobile terminal is fully activated; or, after the test host waits for a preset time, the current virtual mobile terminal is fully activated.
本实施例中,测试主机接收到当前虚拟移动终端返回的完全启动的状态值后,将配置文件中的执行标志更新为准备测试状态。In this embodiment, after receiving the fully activated state value returned by the current virtual mobile terminal, the test host updates the execution flag in the configuration file to the ready-to-test state.
如图7所示,本实施例中,测试主机发布测试结果的方法包括以下步骤:As shown in Figure 7, in this embodiment, the method for the test host to publish the test results includes the following steps:
步骤401:测试主机获取预设目录下日志文件的名称,并将获取的日志文件的名称记录到服务器数据库表中。Step 401: The test host obtains the name of the log file in the preset directory, and records the obtained name of the log file into the server database table.
具体地,获取预设目录下所有的日志文件的名称,并将所有日志文件的名称记录到服务器数据库表中。Specifically, the names of all log files in the preset directory are obtained, and the names of all log files are recorded in the server database table.
步骤402:测试主机执行更新SQL语句,更新服务器数据库中的任务表。Step 402: the test host executes an update SQL statement to update the task table in the server database.
具体地,将任务表中的完成的状态进行更新。Specifically, the completed status in the task table is updated.
步骤403:测试主机判断是否成功执行更新SQL语句,是则执行步骤404,否则打印错误信息。Step 403: The test host judges whether the update SQL statement is successfully executed, and if yes, executes Step 404, otherwise prints an error message.
具体地,测试主机判断是否接收服务器返回的预设值。例如预设值为0,接收到服务器返回的值为0时,成功执行更新SQL语句。Specifically, the test host judges whether to receive the preset value returned by the server. For example, the default value is 0, and when the value returned by the server is 0, the update SQL statement is successfully executed.
步骤404:测试主机执行查询SQL语句,获取任务表中已完成的任务信息。Step 404: The test host executes the query SQL statement to obtain the completed task information in the task table.
步骤405:测试主机判断是否成功执行查询SQL语句,是则执行步骤407,否则打印错误信息。Step 405: The test host judges whether the query SQL statement is successfully executed, if yes, execute step 407, otherwise print an error message.
服务器返回0时成功。具体地,测试主机判断是否接收服务器返回的查询成功的预设值,是则执行步骤406,否则打印错误信息。The server returns 0 on success. Specifically, the test host judges whether to receive the preset value of query success returned by the server, if yes, execute step 406, otherwise print an error message.
步骤406:测试主机执行插入SQL语句,将获取的完成的任务信息插入到服务器数据库的结果表中。Step 406: The test host executes the insert SQL statement, and inserts the obtained completed task information into the result table of the server database.
具体地,根据配置文件中服务器数据库的地址将完成的任务信息发送给服务器数据库,并将完成的任务信息插入到服务器数据库的结果表中。Specifically, the completed task information is sent to the server database according to the address of the server database in the configuration file, and the completed task information is inserted into the result table of the server database.
例如,配置文件中服务器数据库的地址为:192.168.1.107。For example, the address of the server database in the configuration file is: 192.168.1.107.
步骤407:测试主机判断是否成功将完成的任务信息插入到结果表中,是则执行步骤408,否则打印错误信息。Step 407: The test host determines whether the completed task information is successfully inserted into the result table, if yes, execute step 408, otherwise print an error message.
具体地,测试主机判断是否接收到服务器返回预设的插入成功状态值,是则执行步骤408,否则打印错误信息。Specifically, the test host judges whether it has received the preset insertion success status value returned by the server, if yes, execute step 408, otherwise print an error message.
步骤408:测试主机执行删除SQL语句,删除服务器数据任务表中已完成的任务。Step 408: The test host executes the delete SQL statement to delete the completed tasks in the server data task table.
步骤409:测试主机判断是否成功删除任务表中已完成的任务,是则执行步骤410,否则打印错误信息。Step 409: The test host judges whether the completed tasks in the task table are successfully deleted, if yes, execute step 410, otherwise print an error message.
具体地,测试主机判断是否接收到服务器返回预设的删除成功状态值,是则执行步骤410,否则打印错误信息。Specifically, the test host judges whether it has received a preset deletion success status value returned by the server, if yes, execute step 410, otherwise, print an error message.
步骤410:测试主机根据服务器数据库表中日志文件的名称将预设目录下的日志文件上传到服务器数据库的结果表中。Step 410: The test host uploads the log files in the preset directory to the result table of the server database according to the names of the log files in the server database table.
本实施例中,上述SQL是结构化查询语言(Structured Query Language)的简称,基本的SQL语句包括记录的查询语句、删除语句、修改语句和插入语句。In this embodiment, the above-mentioned SQL is an abbreviation of Structured Query Language, and basic SQL statements include recorded query statements, deletion statements, modification statements, and insertion statements.
可选地,上述步骤S5中,测试主机根据配置文件中虚拟移动终端的记录判断是否具有待测试的虚拟移动终端,具体为:Optionally, in the above step S5, the test host judges whether there is a virtual mobile terminal to be tested according to the record of the virtual mobile terminal in the configuration file, specifically:
测试主机判断配置文件中当前虚拟移动终端编号是否超出配置文件中记录的虚拟移动终端数量,是则不具有待测试的虚拟移动终端,否则具有待测试的虚拟移动终端;The test host judges whether the current virtual mobile terminal number in the configuration file exceeds the number of virtual mobile terminals recorded in the configuration file, if yes, there is no virtual mobile terminal to be tested, otherwise there is a virtual mobile terminal to be tested;
上述步骤204中,测试主机根据配置文件中虚拟移动终端的记录读取配置文件中当前虚拟移动终端的名称,具体为:测试主机根据配置文件中虚拟移动终端编号和配置文件中当前虚拟移动终端编号获取当前虚拟移动终端的名称。In the above step 204, the test host reads the name of the current virtual mobile terminal in the configuration file according to the record of the virtual mobile terminal in the configuration file, specifically: the test host reads the name of the current virtual mobile terminal in the configuration file according to the virtual mobile terminal number in the configuration file and the current virtual mobile terminal number in the configuration file Get the name of the current virtual mobile terminal.
例如,当前虚拟移动终端编号为0时,将配置文件中编号为OSNUM0对应的虚拟移动终端的名称HTC One X-4.2.2-API 17-720x1280作为当前虚拟移动终端的名称。For example, when the number of the current virtual mobile terminal is 0, the name of the virtual mobile terminal corresponding to the number OSNUM0 in the configuration file is HTC One X-4.2.2-API 17-720x1280 as the name of the current virtual mobile terminal.
相应地,上述步骤S14中,测试主机更新虚拟移动终端的记录,具体为:测试主机更新配置文件中当前虚拟移动终端编号;Correspondingly, in the above step S14, the test host updates the record of the virtual mobile terminal, specifically: the test host updates the current virtual mobile terminal number in the configuration file;
上述测试主机根据虚拟移动终端的记录读取配置文件中当前虚拟移动终端的名称,具体为:测试主机将配置文件中与当前虚拟移动终端编号对应的虚拟移动终端的名称作为当前虚拟移动终端的名称;The above test host reads the name of the current virtual mobile terminal in the configuration file according to the record of the virtual mobile terminal, specifically: the test host uses the name of the virtual mobile terminal corresponding to the current virtual mobile terminal number in the configuration file as the name of the current virtual mobile terminal ;
本实施例中,配置文件中当前虚拟移动终端编号的初始值与配置文件中记录的第一个待测试的虚拟移动终端的编号相对应。In this embodiment, the initial value of the current virtual mobile terminal number in the configuration file corresponds to the number of the first virtual mobile terminal to be tested recorded in the configuration file.
可选地,上述步骤S5之前,还包括:测试主机设置第三索引值的初始值,第三索引值根据配置文件中虚拟移动终端的记录设置为初始值;Optionally, before the above step S5, it also includes: the test host sets the initial value of the third index value, and the third index value is set as the initial value according to the record of the virtual mobile terminal in the configuration file;
相应地,上述步骤S5中,测试主机根据虚拟移动终端的记录判断是否具有待测试的虚拟移动终端,具体为:测试主机判断第三索引值是否超出配置文件中记录的虚拟移动终端数量,是则不具有待测试的虚拟移动终端,否则具有待测试的虚拟移动终端。Correspondingly, in the above step S5, the test host judges whether there is a virtual mobile terminal to be tested according to the record of the virtual mobile terminal, specifically: the test host judges whether the third index value exceeds the number of virtual mobile terminals recorded in the configuration file, and if so There is no virtual mobile terminal to be tested, otherwise there is a virtual mobile terminal to be tested.
上述步骤204具体为:测试主机根据配置文件中虚拟移动终端编号和第三索引值获取当前虚拟移动终端的名称。The above step 204 specifically includes: the test host acquires the name of the current virtual mobile terminal according to the virtual mobile terminal number and the third index value in the configuration file.
例如,第三索引值为0时,将配置文件中编号为OSNUM0对应的虚拟移动终端的名称HTC One X-4.2.2-API 17-720x1280作为当前虚拟移动终端的名称。For example, when the third index value is 0, the name of the virtual mobile terminal HTC One X-4.2.2-API 17-720x1280 corresponding to the number OSNUM0 in the configuration file is used as the name of the current virtual mobile terminal.
上述步骤S14中,测试主机更新虚拟移动终端的记录,具体为:测试主机更新第三索引值;In the above step S14, the test host updates the record of the virtual mobile terminal, specifically: the test host updates the third index value;
上述测试主机根据虚拟移动终端的记录读取配置文件中当前虚拟移动终端的名称,具体为:测试主机将配置文件中与第三索引值对应的虚拟移动终端的名称作为当前虚拟移动终端的名称。The test host reads the name of the current virtual mobile terminal in the configuration file according to the record of the virtual mobile terminal, specifically: the test host uses the name of the virtual mobile terminal corresponding to the third index value in the configuration file as the name of the current virtual mobile terminal.
本实施例中,配置文件中虚拟移动终索引值的初始值与配置文件中记录的第一个待测试的虚拟移动终端的编号相对应。In this embodiment, the initial value of the index value of the virtual mobile terminal in the configuration file corresponds to the number of the first virtual mobile terminal to be tested recorded in the configuration file.
例如,配置文件中虚拟移动终端的记录如下:For example, the record of the virtual mobile terminal in the configuration file is as follows:
待测试Android OS的个数:OSNUM=5;The number of Android OS to be tested: OSNUM=5;
待测试Android OS的name:The name of the Android OS to be tested:
OSNAME0=HTC One X-4.2.2-API 17-720x1280;OSNAME0=HTC One X-4.2.2-API 17-720x1280;
OSNAME1="Samsung Galaxy S6-6.0.0-API 23-1440x2560";OSNAME1="Samsung Galaxy S6-6.0.0-API 23-1440x2560";
OSNAME2="Google Nexus S-2.3.7-API 10-480x800";OSNAME2="Google Nexus S-2.3.7-API 10-480x800";
OSNAME3="Sony Xperia S-2.3.7-API 10-720x1280";OSNAME3="Sony Xperia S-2.3.7-API 10-720x1280";
OSNAME4="Motorola Moto X-4.4.4-API 19-720x1280";OSNAME4="Motorola Moto X-4.4.4-API 19-720x1280";
当第三索引值为0时,启动与第三索引值相同的虚拟移动终端的编号OSNAME0所对应的虚拟移动终端HTC One X-4.2.2-API 17-720x1280。When the third index value is 0, start the virtual mobile terminal HTC One X-4.2.2-API 17-720x1280 corresponding to the number OSNAME0 of the virtual mobile terminal that is the same as the third index value.
可选地,应用程序记录包括应用程序数量和当前应用程序名称编号;Optionally, the application record includes application number and current application name number;
相应地,上述步骤S9中,测试主机根据配置文件中应用程序的记录获取配置文件中当前待测试的应用程序名称,具体为:测试主机将配置文件中与当前应用程序名称编号对应的应用程序名称作为当前应用程序名称;Correspondingly, in the above step S9, the test host obtains the name of the application program currently to be tested in the configuration file according to the record of the application program in the configuration file, specifically: the test host obtains the application program name corresponding to the current application program name number in the configuration file as the current application name;
相应地,上述步骤S15中,测试主机更新对待测试应用程序的第一记录,具体为:测试主机更新配置文件中当前应用程序名称编号;Correspondingly, in the above step S15, the test host updates the first record of the application to be tested, specifically: the test host updates the current application name number in the configuration file;
本实施例中,当前应用程名称序编号的初始值与配置文件中记录的第一个待测试应用程序的编号相对应。In this embodiment, the initial value of the program number of the current application program corresponds to the number of the first application program to be tested recorded in the configuration file.
可选地,应用程序记录包括应用程序数量和当前应用程序名称编号;Optionally, the application record includes application number and current application name number;
相应地,上述步骤S7之后、步骤S8之前,还包括:测试主机根据配置文件中应用程序记录设置第二索引值的初始值;优选地,第二索引值的初始值与第一个测试的应用程序名称编号值相同。Correspondingly, after the above step S7 and before step S8, it also includes: the test host sets the initial value of the second index value according to the application record in the configuration file; preferably, the initial value of the second index value is consistent with the application of the first test The program name number value is the same.
例如,配置文件中记录的待测试应用程序如下:For example, the application under test recorded in the configuration file is as follows:
SUM=2;SUM=2;
CASE0=AesArtAudioPass2000.apk;CASE0 = AesArtAudioPass2000.apk;
CASE1=AesStdAudioPass2000.apk;CASE1 = AesStdAudioPass2000.apk;
其中,SUM=2代表有两个待测试的应用程序,CASE0和CASE1为两个待测试应用程序名称编号,AesArtAudioPass2000.apk和AesStdAudioPass2000.apk分别为编号CASE0、编号为CASE1的两个待测试应用程序安装包的名称。Among them, SUM=2 means that there are two applications to be tested, CASE0 and CASE1 are the names and numbers of the two applications to be tested, AesArtAudioPass2000.apk and AesStdAudioPass2000.apk are the two applications to be tested with numbers CASE0 and CASE1 respectively The name of the installation package.
当配置文件中第一个应用程序名称编号为NAME0时,测试主机将第二索引值的初始值为0。When the first application name number in the configuration file is NAME0, the test host sets the initial value of the second index value to 0.
上述步骤S9中,测试主机根据配置文件中应用程序的记录获取当前待测试的应用程序名称,具体为:测试主机将配置文件中与第二索引值对应的应用程序名称作为当前待测试应用程序名称。In the above step S9, the test host obtains the current application program name to be tested according to the application program record in the configuration file, specifically: the test host uses the application program name corresponding to the second index value in the configuration file as the current application program name to be tested .
具体地,测试主机根据当前待测试的应用程序名称获取当前应用程序的安装包,具体为:测试主机根据当前待测试的应用程序名称从预设目录下获取当前应用程序的安装包。Specifically, the testing host acquires the installation package of the current application according to the name of the current application to be tested, specifically: the testing host acquires the installation package of the current application from a preset directory according to the name of the current application to be tested.
例如,第二索引值为0时,测试主机将配置文件中应用程序编号的值与第二索引值相同的编号CASE0对应的应用程序名称AesArtAudioPass2000.apk作为当前应用程序名称,根据当前应用程序名称AesArtAudioPass2000.apk从预设目录下获取当前应用程序的安装包。For example, when the second index value is 0, the test host uses the application name AesArtAudioPass2000.apk corresponding to the number CASE0 whose application number is the same as the second index value in the configuration file as the current application name, according to the current application name AesArtAudioPass2000 .apk obtains the installation package of the current application from the preset directory.
上述步骤S15中,测试主机更新对待测试应用程序的第一记录,具体为:测试主机更新第二索引值。In the above step S15, the test host updates the first record of the application program to be tested, specifically: the test host updates the second index value.
本实施例中,待测试的应用程序为可以为签名应用程序、加密应用程序等。In this embodiment, the application program to be tested may be a signature application program, an encryption application program, and the like.
可选地,上述测试主机根据配置文件中待测试虚拟移动终端的编号设置第三索引值,具体为:测试主机将第三索引值的初始值设置为与配置文件中虚拟移动终端第一个编号的值相同;例如,当配置文件中第一个虚拟移动终端的编号为OSNAME0时,测试主机将虚拟移动终端索引值的初始值为0;Optionally, the above test host sets the third index value according to the number of the virtual mobile terminal to be tested in the configuration file, specifically: the test host sets the initial value of the third index value as the first number of the virtual mobile terminal in the configuration file The values are the same; for example, when the number of the first virtual mobile terminal in the configuration file is OSNAME0, the test host sets the initial value of the index value of the virtual mobile terminal to 0;
相应地,步骤S14中,测试主机更新第三索引值,具体为:测试主机将第三索引值加一;Correspondingly, in step S14, the test host updates the third index value, specifically: the test host adds one to the third index value;
上述测试主机判断第三索引值是否超出配置文件中记录的虚拟移动终端数量具体为:测试主机判断第三索引值是否大于配置文件中记录的虚拟移动终端数量,是则不具有待测试的虚拟移动终端,否则具有待测试的虚拟移动终端。The above test host judges whether the third index value exceeds the number of virtual mobile terminals recorded in the configuration file as follows: the test host judges whether the third index value is greater than the number of virtual mobile terminals recorded in the configuration file, if yes, there is no virtual mobile terminal to be tested terminal, otherwise there is a virtual mobile terminal to be tested.
可选地,上述测试主机根据配置文件中待测试虚拟移动终端的编号设置虚拟移动终端索引值,具体为:测试主机将虚拟移动终端索引值的初始值设置为与配置文件中虚拟移动终端的数量的值相同;Optionally, the above test host sets the virtual mobile terminal index value according to the number of the virtual mobile terminal to be tested in the configuration file, specifically: the test host sets the initial value of the virtual mobile terminal index value to be equal to the number of virtual mobile terminals in the configuration file have the same value;
例如,配置文件中记录的待测试应用程序的数量OSNUM=5时,测试主机将虚拟移动终端索引值的初始值设置为5。For example, when the number of applications to be tested recorded in the configuration file OSNUM=5, the test host sets the initial value of the index value of the virtual mobile terminal to 5.
相应地,步骤S14中,测试主机更新第三索引值,具体为:测试主机将第三索引值减一;Correspondingly, in step S14, the test host updates the third index value, specifically: the test host decreases the third index value by one;
上述测试主机判断第三索引值是否超出配置文件中记录的虚拟移动终端数量具体为:测试主机判断第三索引值是否小于0,是则不具有待测试的虚拟移动终端,否则具有待测试的虚拟移动终端。The above-mentioned test host judges whether the third index value exceeds the number of virtual mobile terminals recorded in the configuration file as follows: the test host judges whether the third index value is less than 0, if yes, there is no virtual mobile terminal to be tested, otherwise there is a virtual mobile terminal to be tested mobile terminal.
本实施例中,虚拟移动终端可以具体为模拟不同型号的移动终端的安卓操作系统或者其他操作系统。例如,模拟小米手机1、小米手机2等移动终端的安卓系统。In this embodiment, the virtual mobile terminal may specifically be an Android operating system or other operating systems that simulate different types of mobile terminals. For example, simulate the Android system of mobile terminals such as Mi Phone 1 and Mi Phone 2.
本实施例中,如图8所示,测试主机启动当前虚拟移动终端后,虚拟移动终端执行的步骤包括:In this embodiment, as shown in FIG. 8, after the test host starts the current virtual mobile terminal, the steps performed by the virtual mobile terminal include:
步骤H1:当前虚拟移动终端接收到开机事件并启动自身的测试服务代理,测试服务代理执行启动操作。Step H1: The current virtual mobile terminal receives a power-on event and starts its own test service agent, and the test service agent performs a start operation.
具体地,步骤S6中,测试主机启动当前虚拟移动终端后,当前虚拟移动终端接收到开机事件并启动自身的测试服务代理。Specifically, in step S6, after the test host activates the current virtual mobile terminal, the current virtual mobile terminal receives a power-on event and activates its own test service agent.
步骤H2:当前虚拟移动终端接收来自测试主机的连接指令,并返回连接指令的应答数据。Step H2: The current virtual mobile terminal receives the connection instruction from the test host, and returns the response data of the connection instruction.
步骤H3:测试服务代理判断测试主机是否将执行标志更新为准备测试状态,是则执行步骤H4,否则继续判断。Step H3: The test service agent judges whether the test host has updated the execution flag to the ready-to-test state, if yes, execute step H4, otherwise continue to judge.
可选地,步骤H3中当前虚拟移动终端判断测试主机没有将执行标志更新为准备测试状态之后,继续判断之前,还包括:Optionally, after the current virtual mobile terminal judges that the test host does not update the execution flag to the ready-to-test state in step H3, before continuing to judge, it also includes:
步骤H31:测试服务代理等待预设时间。例如,预设时间为5秒钟。Step H31: The test service agent waits for a preset time. For example, the preset time is 5 seconds.
可选地,执行步骤H31之后、执行步骤H3之前,还包括:Optionally, after performing step H31 and before performing step H3, further include:
步骤H32:测试服务代理判断是否超时,是则结束,否则执行步骤H31。Step H32: The test service agent judges whether it is timed out, if yes, end, otherwise execute step H31.
具体地,测试服务代理判断是否超时,具体为:测试服务代理判断从执行启动操作之后到当前时间是否超过预设的时间段。例如,预设的时间段为5分钟。Specifically, the test service agent judges whether it times out, specifically: the test service agent judges whether the current time exceeds a preset time period after the start operation is performed. For example, the preset time period is 5 minutes.
步骤H4:测试服务代理根据应用程序的记录判断是否具有待测试的应用程序,是则执行步骤H5,否则执行步骤H10。Step H4: The test service agent judges whether there is an application program to be tested according to the application program record, if yes, execute step H5, otherwise execute step H10.
步骤H5:测试服务代理将执行标志更新为安装应用程序状态。Step H5: The test service agent updates the execution flag to the installed application state.
例如,测试服务代理将执行标志的值更新为1。For example, the test service agent updates the value of the execution flag to 1.
步骤H6:测试服务代理判断测试主机是否将执行标志更新为开始测试状态,是则执行步骤H7,否则继续判断。Step H6: The test service agent judges whether the test host has updated the execution flag to start the test state, if yes, execute step H7, otherwise continue to judge.
可选地,步骤H6中测试服务代理判断测试主机没有将执行标志更新为开始测试状态之后,在继续判断之前,还包括:Optionally, after the test service agent judges that the test host does not update the execution flag to start the test state in step H6, before continuing to judge, it also includes:
步骤H61:测试服务代理等待预设时间。例如,预设时间为5秒钟。Step H61: The test service agent waits for a preset time. For example, the preset time is 5 seconds.
进一步可选地,步骤H61之后、继续判断之前,还包括:Further optionally, after step H61 and before continuing to judge, further include:
步骤H62:测试服务代理判断是否超时,是则结束,否则执行步骤H6。Step H62: The test service agent judges whether it is timed out, if yes, end, otherwise execute step H6.
具体地,测试服务代理判断是否超时,具体为:测试服务代理判断从将执行标志更新为安装应用程序状态到当前时间是否超过预设的时间段。例如,预设的时间段为5分钟。Specifically, the test service agent judges whether it is timed out, specifically: the test service agent judges whether the current time from updating the execution flag to the state of installing the application program exceeds a preset time period. For example, the preset time period is 5 minutes.
步骤H7:测试服务代理启动预设目录下的当前应用程序,根据共享目录读取配置文件,将配置文件中的完成标志更新为完成当前应用程序的测试状态。Step H7: The test service agent starts the current application program in the preset directory, reads the configuration file according to the shared directory, and updates the completion flag in the configuration file to complete the test status of the current application program.
例如,测试服务代理将配置文件中的完成标志更新为完成当前应用程序的测试状态具体为:测试服务代理将完成标志complete设置为0。本实施例中,complete初始值为-1或空。For example, the test service agent updates the completion flag in the configuration file to complete the test status of the current application, specifically: the test service agent sets the completion flag complete to 0. In this embodiment, the initial value of complete is -1 or empty.
步骤H8:测试服务代理在预设时间内判断是否完成对当前应用程序的测试,是则执行步骤H9,否则执行步骤H4。Step H8: The test service agent judges whether the test of the current application program is completed within a preset time, if yes, execute step H9, otherwise execute step H4.
具体地,步骤H8具体包括:Specifically, step H8 specifically includes:
步骤H81:测试服务代理等待预设时间,判断当前虚拟移动终端是否将完成待当前应用程序的测试,是则执行步骤H9,否则执行步骤H82。例如,预设子时间为5秒钟。Step H81: The test service agent waits for a preset time, and judges whether the current virtual mobile terminal will complete the test of the current application program, if yes, execute step H9, otherwise, execute step H82. For example, the preset sub-time is 5 seconds.
步骤H82:测试服务代理判断是否超时,是则执行步骤H4,否则执行步骤H81;Step H82: The test service agent judges whether it is overtime, if yes, execute step H4, otherwise execute step H81;
具体地,测试服务代理判断当前虚拟移动终端是否完成对当前应用程序的测试,具体为:测试服务代理获取任务列表中正在运行的程序名称,通过枚举的方式判断获取的程序名称中是否具有与当前应用程序名称相匹配的名称,是则还没有完成对当前应用程序的测试,否则完成对当前应用程序的测试。Specifically, the test service agent judges whether the current virtual mobile terminal has completed the test of the current application program, specifically: the test service agent obtains the name of the running program in the task list, and judges whether the obtained program name has the same If the current application name matches the name, the test of the current application has not been completed, otherwise the test of the current application has been completed.
进一步地,步骤H82中当前虚拟移动终端判定超时,则执行步骤H4之前,还包括:测试服务代理更新应用程序的记录。Further, in step H82, when the current virtual mobile terminal determines that it is timed out, before executing step H4, the method further includes: testing the record of the service agent updating the application program.
步骤H9:测试服务代理根据共享目录读取配置文件,将配置文件中完成标志更新为安装应用程序状态,并更新应用程序的记录,执行步骤H4。Step H9: The test service agent reads the configuration file according to the shared directory, updates the completed flag in the configuration file to the state of installing the application program, and updates the record of the application program, and executes step H4.
例如,测试服务代理将配置文件中完成标志更新为安装应用程序状态,具体为:测试服务代理将配置文件中完成标志更新为安装应用程序状态当前虚拟移动终端将完成标志complete更新为1。For example, the test service agent updates the completed flag in the configuration file to the state of installing the application program, specifically: the test service agent updates the completed flag in the configuration file to the state of installing the application program. The current virtual mobile terminal updates the complete flag to 1.
可选地,测试服务代理在预设时间内判断是否完成对当前应用程序的测试时,还包括:当前虚拟移动终端卸载当前应用程序。Optionally, when the test service agent judges whether to complete the test of the current application program within the preset time, it also includes: the current virtual mobile terminal uninstalls the current application program.
步骤H10:测试服务代理根据共享目录读取配置文件,将配置文件中的执行标志更新为完成对所有应用程序的测试。Step H10: The test service agent reads the configuration file according to the shared directory, and updates the execution flag in the configuration file to finish testing all applications.
例如,测试服务代理根据共享目录读取配置文件,将配置文件中的执行标志更新为3。For example, the test service agent reads the configuration file according to the shared directory, and updates the execution flag in the configuration file to 3.
可选地,应用程序记录包括当前应用程序的编号、应用程序编号和待测试的应用程序数量;Optionally, the application record includes the number of the current application, the application number and the number of applications to be tested;
相应地,上述步骤H4中,测试服务代理根据应用程序的记录判断是否具有待测试的应用程序,具体为:测试服务代理判断当前应用程序的编号是否超出待测试应用程序的数量,是则不具有待测试的应用程序,否则具有待测试的应用程序。Correspondingly, in the above-mentioned step H4, the test service agent judges whether there is an application program to be tested according to the record of the application program, specifically: the test service agent judges whether the serial number of the current application program exceeds the number of the application program to be tested, if yes, it does not have An application under test, otherwise has an application under test.
进一步具体地,测试服务代理判断待测试应用程序名称编号中是否具有当前应用程序名称编号相同的编号,是则具有待测试的应用程序,否则不具有待测试的应用程序。例如,配置文件中记录的待测试应用程序如下:More specifically, the test service agent judges whether the number of the application program to be tested has the same number as the current application program name number, if yes, it has the application program to be tested, otherwise it does not have the application program to be tested. For example, the application under test recorded in the configuration file is as follows:
SUM=2;SUM=2;
CASE0=AesArtAudioPass2000.apk;CASE0 = AesArtAudioPass2000.apk;
CASE1=AesStdAudioPass2000.apk;CASE1 = AesStdAudioPass2000.apk;
CURROSID=0CURROSID=0
其中,SUM=2代表有两个待测试的应用程序,CASE0和CASE1为两个待测试应用程序名称编号,AesArtAudioPass2000.apk和AesStdAudioPass2000.apk分别为编号CASE0、编号为CASE1的两个待测试应用程序名称,当前应用程序CURROSID的名称编号为0,与待测应用程序的编号CASE0相同,即具有待测试的应用程序。Among them, SUM=2 means that there are two applications to be tested, CASE0 and CASE1 are the names and numbers of the two applications to be tested, AesArtAudioPass2000.apk and AesStdAudioPass2000.apk are the two applications to be tested with numbers CASE0 and CASE1 respectively Name, the name number of the current application CURROSID is 0, which is the same as the number CASE0 of the application to be tested, that is, there is an application to be tested.
或者,进一步具体地,测试服务代理判断当前应用程序名称编号是否超出待测试的应用程序数量,是则不具有待测试的应用程序,否则具有待测试的应用程序;Or, further specifically, the test service agent judges whether the current application name number exceeds the number of applications to be tested, if yes, there is no application to be tested, otherwise there is an application to be tested;
上述步骤H9中,测试服务代理更新应用程序的记录,具体为:测试服务代理更新当前应用程序名称编号。In the above step H9, the test service agent updates the record of the application program, specifically: the test service agent updates the name number of the current application program.
具体地,上述测试服务代理判断当前应用程序名称编号是否超出待测试的应用程序数量,具体为:测试服务代理判断当前应用程序名称编号是否大于应用程序数量,是则不具有待测试的应用程序,否则具有待测试的应用程序;相应地,上述测试服务代理更新当前应用程序名称编号,具体为:测试服务代理将当前应用程序名称编号的值加一;上述当前应用程序名称编号的初始值为0。Specifically, the above test service agent judges whether the current application name number exceeds the number of applications to be tested, specifically: the test service agent judges whether the current application name number is greater than the number of applications, if yes, there is no application program to be tested, Otherwise, there is an application program to be tested; correspondingly, the above-mentioned test service agent updates the current application program name number, specifically: the test service agent adds one to the value of the current application program name number; the initial value of the above-mentioned current application program name number is 0 .
或者,具体地,上述测试服务代理判断当前应用程序名称编号是否超出待测试的应用程序数量,具体为:测试服务代理判断当前应用程序名称编号是否小于0,是则不具有待测试的应用程序,否则具有待测试的应用程序;相应地,上述测试服务代理更新当前应用程序名称编号,具体为:测试服务代理将当前应用程序名称编号的值减一;上述当前应用程序名称编号的初始值为应用程序数量。Or, specifically, the above-mentioned test service agent judges whether the number of the current application name exceeds the number of applications to be tested, specifically: the test service agent judges whether the number of the current application name is less than 0, if yes, there is no application to be tested, Otherwise, there is an application program to be tested; correspondingly, the above-mentioned test service agent updates the current application program name number, specifically: the test service agent decreases the value of the current application program name number by one; the initial value of the above-mentioned current application program name number is application number of programs.
可选地,上述应用程序的记录包括应用程序的数量和应用程序名称编号;Optionally, the record of the above-mentioned application program includes the number of the application program and the application program name number;
上述步骤H4之前还包括:测试服务代理设置第一索引值的初始值;具体地,将第一索引值根据配置文件中应用程序的记录设置为初始值;Before the above step H4, it also includes: the test service agent sets the initial value of the first index value; specifically, sets the first index value as the initial value according to the record of the application program in the configuration file;
相应地,上述步骤H4中,测试服务代理根据应用程序的记录判断是否具有待测试的应用程序,具体为:测试服务代理判断第一索引值是否超出应用程序的数量,是则不具有待测试的应用程序,否则具有待测试的应用程序。Correspondingly, in the above step H4, the test service agent judges whether there is an application program to be tested according to the record of the application program, specifically: the test service agent judges whether the first index value exceeds the number of application programs, if yes, there is no application program to be tested application, otherwise has the application under test.
上述步骤H9中,测试服务代理更新应用程序的记录,具体为:测试服务代理更新第一索引值。In the above step H9, the test service agent updates the record of the application program, specifically: the test service agent updates the first index value.
具体地,上述测试服务代理更新第一索引值,具体为:测试服务代理将第一索引值加一。相应地,上述步骤H4中,测试服务代理判断第一索引值是否超出应用程序的数量,具体为:测试服务代理判断第一索引值是大于应用程序的数量,是则不具有待测试的应用程序,否则具有待测试的应用程序。相应地,第一索引值的初始值为0。Specifically, the above-mentioned test service agent updates the first index value, specifically: the test service agent adds one to the first index value. Correspondingly, in the above step H4, the test service agent judges whether the first index value exceeds the number of applications, specifically: the test service agent judges whether the first index value is greater than the number of applications, if yes, there is no application program to be tested , otherwise has the application under test. Correspondingly, the initial value of the first index value is 0.
或者具体地,述测试服务代理更新第一索引值,具体为:测试服务代理将第一索引值减一。相应地,上述步骤H4中,测试服务代理判断第一索引值是否超出应用程序的数量,具体为:测试服务代理判断第一索引值是小于0,是则不具有待测试的应用程序,否则具有待测试的应用程序。相应地,第一索引值的初始值为应用程序数量的值。Or specifically, the test service agent updating the first index value specifically includes: the test service agent subtracts one from the first index value. Correspondingly, in the above step H4, the test service agent judges whether the first index value exceeds the number of applications, specifically: the test service agent judges that the first index value is less than 0, if yes, there is no application program to be tested, otherwise there is The application under test. Correspondingly, the initial value of the first index value is the value of the application program number.
可选地,本实施例上述方法中,上述步骤S8之前还包括:测试主机将配置文件中的应用程序记录发送给测试服务代理。Optionally, in the above method of this embodiment, before the above step S8, the method further includes: the test host sends the application record in the configuration file to the test service agent.
相应地,上述步骤H4之前还包括:测试服务代理接收来自测试主机的应用程序记录。Correspondingly, before the above step H4, it also includes: the test service agent receives the application program record from the test host.
实施例3Example 3
本实施例提供一种自动化测试的方法,应用于测试主机和虚拟移动终端的测试服务代理,如图9所示,测试主机的操作步骤包括:This embodiment provides a method for automated testing, which is applied to the test service agent of the test host and the virtual mobile terminal. As shown in FIG. 9, the operation steps of the test host include:
步骤501:测试主机启动虚拟移动终端,并通过虚拟移动终端启动虚拟移动终端中的测试服务代理。Step 501: The test host starts a virtual mobile terminal, and starts a test service agent in the virtual mobile terminal through the virtual mobile terminal.
具体地,测试主机启动虚拟移动终端,具体为:测试主机根据预设的虚拟移动终端路径启动虚拟移动终端。Specifically, the test host activates the virtual mobile terminal, specifically: the test host activates the virtual mobile terminal according to a preset path of the virtual mobile terminal.
或者,具体地,测试主机启动虚拟移动终端,具体为:测试主机根据预设的模拟管理器路径启动模拟管理器,通过模拟管理器启动虚拟移动终端。Or, specifically, the test host starts the virtual mobile terminal, specifically: the test host starts the simulation manager according to the preset simulation manager path, and starts the virtual mobile terminal through the simulation manager.
步骤502:测试主机接收到来自测试服务代理的预设的安装状态值,获取应用程序的安装包,将应用程序的安装包发送给虚拟移动终端;根据应用程序的安装包的名称组织安装指令,并向虚拟移动终端发送安装指令,通过虚拟移动终端执行安装指令实现在虚拟移动终端上根据应用程序的安装包安装应用程序,并接收到来自虚拟移动终端预设的安装成功的信息。Step 502: The test host receives the preset installation status value from the test service agent, obtains the installation package of the application program, and sends the installation package of the application program to the virtual mobile terminal; organizes the installation instructions according to the name of the installation package of the application program, And send an installation instruction to the virtual mobile terminal, execute the installation instruction through the virtual mobile terminal to install the application program on the virtual mobile terminal according to the installation package of the application program, and receive preset information from the virtual mobile terminal that the installation is successful.
步骤503:测试主机向测试服务代理发送预设的开始测试状态值。Step 503: The test host sends a preset test start status value to the test service agent.
步骤504:测试主机接收到来自测试服务代理的预设的完成测试状态值时,确定完成在虚拟移动终端上对应用程序的测试。Step 504: When the test host receives the preset test completion status value from the test service agent, it determines that the test of the application program on the virtual mobile terminal is completed.
如图10所示,虚拟移动终端中测试服务代理的操作步骤包括:As shown in Figure 10, the operation steps of testing the service agent in the virtual mobile terminal include:
步骤601:测试服务代理执行启动操作。Step 601: The test service agent executes the startup operation.
具体地,测试主机启动当前虚拟移动终端启动自身的测试服务代理之后,测试服务代理执行启动操作。Specifically, after the test host starts the current virtual mobile terminal to start its own test service agent, the test service agent performs a start operation.
步骤602:测试服务代理向测试主机发送预设的安装状态值。Step 602: The test service agent sends a preset installation status value to the test host.
步骤603:测试服务代理接收到所述测试主机发送的预设的开始测试状态值时,在虚拟移动终端上启动应用程序,当监控应用程序在虚拟移动终端上完成运行时,向测试主机发送预设的完成测试状态值。Step 603: When the test service agent receives the preset start test status value sent by the test host, it starts the application program on the virtual mobile terminal, and when the monitoring application program finishes running on the virtual mobile terminal, it sends a pre-set test status value to the test host. Set the completed test status value.
可选地,本实施例中上述步骤501之后、步骤502之前,还包括:Optionally, after step 501 and before step 502 in this embodiment, further include:
步骤H1:测试主机将应用程序记录发送给测试服务代理;应用程序记录在测试之前为预设的初始值;Step H1: The test host sends the application record to the test service agent; the application record is a preset initial value before the test;
相应地,上述步骤502具体为:测试主机接收到来自测试服务代理的预设的安装状态值时,根据应用程序记录获取当前待测试的应用程序名称,根据当前待测试的应用程序名称获取当前应用程序的安装包,将当前应用程序的安装包发送给虚拟移动终端;根据当前应用程序的安装包的名称组织当前安装指令,并向虚拟移动终端发送当前安装指令,通过虚拟移动终端执行当前安装指令在虚拟移动终端上根据当前应用程序的安装包安装当前应用程序,并接收到来自虚拟移动终端预设的安装成功的信息;Correspondingly, the above step 502 specifically includes: when the test host receives the preset installation status value from the test service agent, obtain the name of the current application program to be tested according to the application program record, and obtain the name of the current application program according to the name of the current application program to be tested. The installation package of the program, sends the installation package of the current application program to the virtual mobile terminal; organizes the current installation instruction according to the name of the installation package of the current application program, and sends the current installation instruction to the virtual mobile terminal, and executes the current installation instruction through the virtual mobile terminal Install the current application program on the virtual mobile terminal according to the installation package of the current application program, and receive preset information from the virtual mobile terminal that the installation is successful;
上述步骤503具体为:测试主机向测试服务代理发送预设的开始测试状态值通知测试服务代理在虚拟移动终端上对当前应用程序进行测试;The above step 503 is specifically: the test host sends a preset start test status value to the test service agent to notify the test service agent to test the current application program on the virtual mobile terminal;
上述步骤504具体为:测试主机接收到来自测试服务代理的预设的完成测试状态值时,判断在预设时间内是否接收到来自测试服务代理的完成对所有待测试应用程序测试的通知,是则确定完成在虚拟移动终端上对所有预设的待测试的应用程序的测试;否则根据应用程序记录更新对待测试应用程序的第一记录,执行步骤502;The above-mentioned step 504 is specifically: when the test host receives the preset completion test status value from the test service agent, judge whether it has received a notification from the test service agent to complete the test of all application programs to be tested within the preset time, yes Then it is determined that the test of all preset application programs to be tested is completed on the virtual mobile terminal; otherwise, the first record of the application program to be tested is updated according to the application program record, and step 502 is performed;
具体地,步骤504中测试主机在预设时间内判断是否接收到来自测试服务代理的完成对所有待测试应用程序测试的通知,具体为:测试主机在预设时间内判断是否接收到来自测试服务代理的预设的完成对所有待测试应用程序测试的状态值。Specifically, in step 504, the test host judges within a preset time whether it has received a notification from the test service agent to complete the testing of all application programs to be tested, specifically: the test host judges within a preset time whether it has received a notification from the test service agent. The agent's default completion status value for all application tests under test.
上述步骤601之后还包括:After the above step 601, it also includes:
步骤W1:测试服务代理接收来自测试主机的应用程序记录;Step W1: the test service agent receives the application record from the test host;
步骤603之后,还包括:After step 603, it also includes:
步骤604:测试服务代理根据接收的应用程序记录判断是否具有待测试的应用程序,是则根据接收的应用程序记录更新对待测试应用程序的第二记录,执行步骤602;否则执行步骤605;Step 604: The test service agent judges whether there is an application program to be tested according to the received application program record, and if so, updates the second record of the application program to be tested according to the received application program record, and executes step 602; otherwise, executes step 605;
步骤605:测试服务代理通知测试主机完成对所有待测试应用程序的测试;Step 605: the test service agent notifies the test host to complete the test of all applications to be tested;
具体地,步骤605具体为:测试服务代向测试主机发送预设的完成对所有待测试应用程序测试的状态值。Specifically, step 605 is as follows: the test service agent sends a preset status value of completing the test of all the application programs to be tested to the test host.
上述步骤603具体为:测试服务代理接收到测试主机发送的开始测试状态值时,在虚拟移动终端上启动当前应用程序,监控当前应用程序在虚拟移动终端上完成运行时,向测试主机发送预设的完成测试状态值,执行步骤604。The above step 603 is specifically: when the test service agent receives the start test status value sent by the test host, it starts the current application program on the virtual mobile terminal, and when the monitoring current application program finishes running on the virtual mobile terminal, it sends a preset test to the test host. If the test status value is completed, go to step 604.
具体地,上述应用程序记录包括应用程序数量、应用程序名称编号和当前应用程序名称编号;当前应用程序名称编号的初始值与第一个测试的应用程序名称编号值相同;Specifically, the above-mentioned application program record includes the number of applications, the application program name number and the current application program name number; the initial value of the current application program name number is the same as the value of the first tested application program name number;
相应地,上述步骤502中,测试主机根据应用程序记录获取当前待测试的应用程序名称,具体为:测试主机根据当前应用程序名称编号获取当前待测试的应用程序名称;Correspondingly, in the above step 502, the test host obtains the name of the application program currently to be tested according to the application program record, specifically: the test host obtains the name of the application program currently to be tested according to the number of the current application program name;
上述步骤504中,测试主机根据应用程序记录更新对待测试应用程序的第一记录,具体为:测试主机根据应用程序名称编号更新当前应用程序名称编号;In the above step 504, the test host updates the first record of the application to be tested according to the application record, specifically: the test host updates the current application name number according to the application name number;
上述步骤604具体为:测试服务代理根据接收的当前应用程序名称编号和接收的应用程序数量判断是否具有待测试的应用程序,是则根据接收的应用程序名称编号更新接收的当前应用程序名称编号,返回步骤602;否则执行步骤605。The above step 604 is specifically: the test service agent judges whether there is an application program to be tested according to the received current application program name number and the number of received applications, and if so, updates the received current application program name number according to the received application program name number, Return to step 602; otherwise, execute step 605.
或者,具体地,上述应用程序记录还可以具体包括应用程序数量和应用程序名称编号;Or, specifically, the above application record may also specifically include the number of applications and the number of application names;
相应地,上述步骤H1中,还包括:测试主机根据应用程序数量和应用程序名称编号设置第二索引值的初始值;Correspondingly, in the above step H1, it also includes: the test host sets the initial value of the second index value according to the number of applications and the number of application names;
上述步骤502中,测试主机根据应用程序记录获取当前待测试的应用程序名称,具体为:测试主机根据第二索引值和应用程序名称编号获取当前待测试的应用程序名称;In the above step 502, the test host obtains the current application program name to be tested according to the application program record, specifically: the test host obtains the current application program name to be tested according to the second index value and the application program name number;
上述步骤504中,测试主机根据应用程序记录更新对待测试应用程序的第一记录,具体为:测试主机根据应用程序名称编号更新第二索引值;In the above step 504, the test host updates the first record of the application to be tested according to the application record, specifically: the test host updates the second index value according to the application name number;
上述步骤W1中,还包括:测试服务代理根据接收的应用程序名称编号和应用程序数量设置第一索引值的初始值;In the above step W1, it also includes: the test service agent sets the initial value of the first index value according to the received application name number and the number of applications;
上述步骤604具体为:测试服务代理根据第一索引值和接收的应用程序名称编号判断是否具有待测试的应用程序,是则更新第一索引值,返回步骤602;否则执行步骤605。The above step 604 specifically includes: the test service agent judges whether there is an application to be tested according to the first index value and the received application name number, if yes, updates the first index value, and returns to step 602; otherwise, executes step 605.
可选地,上述步骤501之前,还包括:Optionally, before the above step 501, it also includes:
步骤500:测试主机根据虚拟移动终端的记录判断是否具有待测试的虚拟移动终端,是则执行步骤501,否则结束;虚拟移动终端的记录在执行测试之前为预设的初始值;Step 500: the test host judges whether there is a virtual mobile terminal to be tested according to the record of the virtual mobile terminal, if so, execute step 501, otherwise end; the record of the virtual mobile terminal is a preset initial value before performing the test;
步骤501具体为:测试主机根据虚拟移动终端的记录启动当前虚拟移动终端,并通过当前虚拟移动终端启动虚拟移动终端中的测试服务代理;Step 501 is specifically: the test host starts the current virtual mobile terminal according to the record of the virtual mobile terminal, and starts the test service agent in the virtual mobile terminal through the current virtual mobile terminal;
测试主机确定完成在虚拟移动终端上对应用程序的测试之后,还包括:After the test host confirms that the application program is tested on the virtual mobile terminal, it also includes:
步骤505:测试主机关闭当前虚拟移动终端,更新虚拟移动终端的记录,执行步骤500。Step 505: the test host closes the current virtual mobile terminal, updates the record of the virtual mobile terminal, and executes step 500.
具体地,上述虚拟移动终端的记录包括当前虚拟移动终端编号、虚拟移动终端数量;Specifically, the record of the above-mentioned virtual mobile terminal includes the number of the current virtual mobile terminal and the number of virtual mobile terminals;
步骤500具体为:测试主机根据当前虚拟移动终端编号、虚拟移动终端数量判断是否具有待测试的虚拟移动终端,是则执行步骤501,否则结束;Step 500 is specifically: the test host judges whether there is a virtual mobile terminal to be tested according to the current virtual mobile terminal number and the number of virtual mobile terminals, if yes, execute step 501, otherwise end;
上述测试主机根据虚拟移动终端的记录启动当前虚拟移动终端,具体为:测试主机根据当前虚拟移动终端编号启动虚拟移动终端;The above-mentioned test host starts the current virtual mobile terminal according to the record of the virtual mobile terminal, specifically: the test host starts the virtual mobile terminal according to the current virtual mobile terminal number;
上述步骤505中,测试主机更新虚拟移动终端的记录,具体为:测试主机更新当前虚拟移动终端编号。In the above step 505, the test host updates the record of the virtual mobile terminal, specifically: the test host updates the number of the current virtual mobile terminal.
或者,具体地,上述虚拟移动终端的记录包括当前虚拟移动终端编号、虚拟移动终端数量;Or, specifically, the record of the above-mentioned virtual mobile terminal includes the number of the current virtual mobile terminal and the number of virtual mobile terminals;
相应地,上述步骤500之前,还包括:Correspondingly, before the above step 500, it also includes:
步骤L1:测试主机根据当前虚拟移动终端编号和虚拟移动终端数量设置第三索引值的初始值;Step L1: The test host sets the initial value of the third index value according to the current virtual mobile terminal number and the number of virtual mobile terminals;
上述步骤500具体为:测试主机根据当前虚拟移动终端编号和第三索引值判断是否具有待测试的虚拟移动终端,是则执行步骤501,否则结束;The above-mentioned step 500 is specifically: the test host judges whether there is a virtual mobile terminal to be tested according to the current virtual mobile terminal number and the third index value, if yes, execute step 501, otherwise end;
上述步骤501中,测试主机根据虚拟移动终端的记录启动当前虚拟移动终端,具体为:测试主机根据第三索引值和当前虚拟移动终端编号启动当前虚拟移动终端;In the above step 501, the test host starts the current virtual mobile terminal according to the record of the virtual mobile terminal, specifically: the test host starts the current virtual mobile terminal according to the third index value and the current virtual mobile terminal number;
上述步骤505中,测试主机更新虚拟移动终端的记录,具体为:测试主机更新第三索引值以及当前虚拟移动终端编号。In the above step 505, the test host updates the record of the virtual mobile terminal, specifically: the test host updates the third index value and the current virtual mobile terminal number.
具体地,上述虚拟移动终端的记录具体为预设的虚拟移动终端记录。Specifically, the above-mentioned virtual mobile terminal record is specifically a preset virtual mobile terminal record.
可选地,上述步骤502中,测试主机获取应用程序的安装包,具体为:测试主机根据预设的待测试应用程序名称获取应用程序的安装包;或者,测试主机读取自身的配置文件中待测试的应用程序名称,根据应用程序名称获取应用程序的安装包。Optionally, in the above step 502, the test host obtains the installation package of the application program, specifically: the test host obtains the installation package of the application program according to the preset name of the application program to be tested; or, the test host reads the configuration file in its own The name of the application to be tested, and the installation package of the application is obtained according to the application name.
可选地,上述步骤501之后、步骤502之前,还包括:测试主机通知测试服务代理准备测试;Optionally, after the above step 501 and before step 502, it also includes: the test host notifies the test service agent to prepare for the test;
相应地,上述步骤601之后、步骤602之前,还包括:测试服务代理判断是否接收到来自测试主机的准备测试通知;Correspondingly, after the above-mentioned step 601 and before the step 602, it also includes: the test service agent judges whether the test preparation notification from the test host is received;
上述步骤602具体为:测试服务代理接收到自测试主机的准备测试通知时,通知测试主机在虚拟移动终端上安装应用程序。The above step 602 specifically includes: when the test service agent receives the test preparation notification from the test host, it notifies the test host to install the application program on the virtual mobile terminal.
可选地,本实施例上述步骤501中,测试主机启动当前虚拟移动终端的方法包括以下步骤:Optionally, in the above step 501 of this embodiment, the method for the test host to start the current virtual mobile terminal includes the following steps:
步骤1:测试主机根据预设的模拟管理器的路径启动模拟管理器,并对模拟管理器进行初始化;Step 1: The test host starts the simulation manager according to the path of the preset simulation manager, and initializes the simulation manager;
例如,测试预设的模拟管理器的路径C:\Program Files\Genymobile\Genymotion\player.exe启动模拟管理器。For example, the path C:\Program Files\Genymobile\Genymotion\player.exe of the simulation manager of the test preset starts the simulation manager.
步骤2:测试主机创建模拟管理器对象。Step 2: The test host creates a mock manager object.
步骤3:测试主机接收模拟管理器返回的状态值,根据状态值判断是否成功创建模拟管理器对象,是则执行步骤4,否则打印错误信息。Step 3: The test host receives the status value returned by the simulation manager, and judges whether the simulation manager object is successfully created according to the status value, if yes, execute step 4, otherwise print an error message.
具体地,测试主机接收模拟管理器返回的状态值,具体为模拟管理器对象创建完之后返回的状态值,判断返回的状态值是否为预设的成功状态值,是则执行步骤4,否则打印错误信息。Specifically, the test host receives the status value returned by the simulation manager, specifically the status value returned after the simulation manager object is created, and judges whether the returned status value is the preset success status value, if yes, execute step 4, otherwise print error message.
例如,预设的成功状态值为0,当测试主机接收的状态值为0时,创建对象成功,否则创建模拟管理器对象失败。For example, the preset success status value is 0, and when the status value received by the test host is 0, the creation of the object is successful; otherwise, the creation of the simulation manager object fails.
步骤4:测试主机根据配置文件中虚拟移动终端的记录读取配置文件中当前虚拟移动终端的名称。Step 4: The test host reads the name of the current virtual mobile terminal in the configuration file according to the record of the virtual mobile terminal in the configuration file.
步骤5:测试主机将当前虚拟移动终端名称转换成模拟管理器支持的预设字符串。Step 5: The test host converts the name of the current virtual mobile terminal into a preset character string supported by the simulation manager.
步骤6:测试主机通过模拟管理器对象根据预设的字符串创建当前虚拟移动终端的任务对象。Step 6: The test host creates the task object of the current virtual mobile terminal according to the preset character string through the simulation manager object.
具体地,测试主机调用模拟管理器对象中的函数根据预设的字符串创建当前虚拟移动终端的任务对象。Specifically, the test host invokes a function in the simulation manager object to create a task object of the current virtual mobile terminal according to a preset character string.
步骤7:测试主机根据模拟管理器返回的状态值判断是否成功创建当前虚拟移动终端的任务对象,是则执行步骤8,否则打印错误信息。Step 7: The test host judges whether the task object of the current virtual mobile terminal is successfully created according to the status value returned by the simulation manager, if yes, execute step 8, otherwise print an error message.
具体地,测试主机判断模拟管理器返回的状态值是否为预设值,是则执行步骤8,否则打印错误信息。例如,预设值为0,获取的状态值为0时,创建成功,否则失败。Specifically, the test host judges whether the status value returned by the simulation manager is a preset value, if yes, execute step 8, otherwise print an error message. For example, the preset value is 0, and when the obtained status value is 0, the creation is successful, otherwise it fails.
步骤8:测试主机从当前虚拟移动终端的任务对象中获取当前虚拟移动终端标识。Step 8: The test host obtains the identifier of the current virtual mobile terminal from the task object of the current virtual mobile terminal.
步骤9:测试主机根据模拟管理器返回的状态值判断是否成功获取移动终端的标识,是则执行步骤10,否则打印错误信息。Step 9: The test host judges whether the identification of the mobile terminal is successfully obtained according to the status value returned by the simulation manager, if yes, execute step 10, otherwise print an error message.
具体地,测试主机判断模拟管理器返回的状态值是否为预设值,是则执行步骤10,否则打印错误信息。例如,预设值为0,当测试主机接收到模拟管理器返回的状态值为0时,则成功获取虚拟移动终端的标识。Specifically, the test host judges whether the status value returned by the simulation manager is a preset value, if yes, execute step 10, otherwise print an error message. For example, the preset value is 0, and when the test host receives the status value returned by the simulation manager as 0, the identification of the virtual mobile terminal is successfully obtained.
步骤10:测试主机根据当前虚拟移动终端的标识启动当前虚拟移动终端。Step 10: The test host activates the current virtual mobile terminal according to the identifier of the current virtual mobile terminal.
进一步地,测试主机启动当前虚拟移动终端后,会显示当前虚拟移动终端的图像。Further, after the test host starts the current virtual mobile terminal, it will display the image of the current virtual mobile terminal.
步骤11:测试主机根据当前虚拟移动终端的任务对象返回的状态值判断是否成功启动当前虚拟移动终端,是则执行步骤212,否则打印错误信息。Step 11: The test host judges whether the current virtual mobile terminal is successfully activated according to the status value returned by the task object of the current virtual mobile terminal, if yes, execute step 212, otherwise print an error message.
具体地,测试主机判断当前虚拟移动终端的任务对象返回的状态值是否为预设值,是则执行步骤12,否则打印错误信息。例如,预设值为0,测试主机接收到当前虚拟移动终端的任务对象返回的值为0时,成功启动当前虚拟移动终端。Specifically, the test host judges whether the status value returned by the task object of the current virtual mobile terminal is a preset value, if yes, execute step 12, otherwise print an error message. For example, the preset value is 0, and when the test host receives a value of 0 returned by the task object of the current virtual mobile terminal, the current virtual mobile terminal is successfully activated.
步骤12:测试主机等待当前虚拟移动终端完全启动。Step 12: The test host waits for the current virtual mobile terminal to fully start.
具体地,测试主机接收到当前虚拟移动终端返回预设的完全启动的状态值时,当前虚拟移动终端完全启动;或者,测试主机等待预设时间后,当前虚拟移动终端完全启动。Specifically, when the test host receives the preset fully activated status value returned by the current virtual mobile terminal, the current virtual mobile terminal is fully activated; or, after the test host waits for a preset time, the current virtual mobile terminal is fully activated.
或者,可选地,本实施例上述步骤501中,测试主机启动当前虚拟移动终端的方法包括以下步骤:Or, optionally, in the above step 501 of this embodiment, the method for the test host to start the current virtual mobile terminal includes the following steps:
步骤1-1:测试主机根据模拟管理器的路径启动模拟管理器。Step 1-1: The test host starts the simulation manager according to the path of the simulation manager.
例如,模拟管理器的路径为C:\Program Files\Genymobile\Genymotion\player.exe。For example, the emulation manager path is C:\Program Files\Genymobile\Genymotion\player.exe.
步骤1-2:测试主机根据虚拟移动终端的记录读取配置文件中当前虚拟移动终端的名称。Step 1-2: The test host reads the name of the current virtual mobile terminal in the configuration file according to the record of the virtual mobile terminal.
步骤1-3:测试主机根据当前虚拟移动终端名称组织启动指令,通过模拟管理器执行启动指令启动当前虚拟移动终端。Steps 1-3: The test host organizes the startup instructions according to the name of the current virtual mobile terminal, and executes the startup instructions through the simulation manager to start the current virtual mobile terminal.
步骤1-4:测试主机等待当前移动终端完全启动。Steps 1-4: The test host waits for the current mobile terminal to fully start.
具体地,测试主机接收到当前虚拟移动终端返回的状态值时,当前虚拟移动终端完全启动;或者,测试主机等待预设时间后,当前虚拟移动终端完全启动。Specifically, when the test host receives the status value returned by the current virtual mobile terminal, the current virtual mobile terminal is fully activated; or, after the test host waits for a preset time, the current virtual mobile terminal is fully activated.
本实施例中,测试主机接收到当前虚拟移动终端返回的完全启动的状态值后,将配置文件中的执行标志更新为准备测试状态。In this embodiment, after receiving the fully activated state value returned by the current virtual mobile terminal, the test host updates the execution flag in the configuration file to the ready-to-test state.
可选地,上述步骤501之前还包括:测试主机根据应用程序的记录判断是否具有待测试的应用程序,是则执行步骤501,否则发布测试结果。Optionally, before step 501, the test host may determine whether there is an application to be tested according to the record of the application, if yes, perform step 501, otherwise release the test result.
可选地,上述步骤501之前还包括:测试主机根据虚拟移动终端的记录判断是否具有待测试的虚拟移动终端,是则执行步骤501,否则发布测试结果。Optionally, before step 501, the test host may determine whether there is a virtual mobile terminal to be tested according to the record of the virtual mobile terminal, if yes, perform step 501, otherwise release the test result.
本实施例中,上述步骤500中测试主机判断没有待测试的虚拟移动终端时,还包括:测试主机发布测试结果。具体的,本实施例中测试主机发布测试结果的方法参考实施例2中步骤401-步骤410,在此不再赘述。In this embodiment, when the test host determines in step 500 that there is no virtual mobile terminal to be tested, it further includes: the test host publishes the test result. Specifically, for the method for the test host to release the test results in this embodiment, refer to step 401 to step 410 in embodiment 2, and details are not repeated here.
可选地,上述步骤501之前还包括:测试主机根据预设的待测试应用程序记录中的待测试应用程序名称获取待测试应用程序的应用程序工程源码,将待测试的应用程序工程源码放入预设目录下的文件中,并对待测试的应用程序工程源码进行编译生成待测试的应用程序的安装包,具体包括以下步骤:Optionally, before the above step 501, it also includes: the test host obtains the application engineering source code of the application to be tested according to the name of the application to be tested in the preset application to be tested record, and puts the engineering source code of the application to be tested into files in the preset directory, and compile the source code of the application program to be tested to generate the installation package of the application program to be tested, specifically including the following steps:
步骤101:测试主机根据预设目录组织下载路径。Step 101: The test host organizes download paths according to preset directories.
步骤102:测试主机读取预设的待测试应用程序记录中待测试应用程序名称,根据预设的svn服务器地址从svn服务器上将与待测试应用程序名称对应的工程源码下载到下载路径的文件中。Step 102: the test host reads the name of the application to be tested in the preset application to be tested record, and downloads the project source code corresponding to the name of the application to be tested from the svn server to the file in the download path according to the preset svn server address middle.
本实施例步骤102中,测试主机将预设的待测试应用程序记录中所有待测试应用程序名称对应的工程源码全部下载到下载路径的文件中。优选地,在下载路径的文件中的每个应用程序的工程源码放到对应的子文件,每个子文件的名称与对应的应用程序名称匹配。In step 102 of this embodiment, the test host downloads all the project source codes corresponding to the names of the application programs to be tested in the preset application program records to be tested to the file in the download path. Preferably, the project source code of each application program in the file in the download path is put into a corresponding sub-file, and the name of each sub-file matches the name of the corresponding application program.
例如,当配置文件中的应用程序名称为ePass3000GM,并且是.Jar格式时,测试主机组织的下载路径为:G:CASE_Code\ePass3000GM\libs;For example, when the application name in the configuration file is ePass3000GM and it is in .Jar format, the download path of the test host organization is: G:CASE_Code\ePass3000GM\libs;
当预设的待测试应用程序记录中的应用程序名称为ePass3000GM,并且是.SO格式时,测试主机组织的下载路径为:When the application name in the preset application record to be tested is ePass3000GM and is in .SO format, the download path of the test host organization is:
G:CASE_Code\ePass3000GM\libs\armeabi。G:CASE_Code\ePass3000GM\libs\armeabi.
步骤103:测试主机设置环境变量。Step 103: setting environment variables on the test host.
具体地,测试主机设置环境变量具体为测试主机设置JDK的安装路径JAVA_HOME和类路径classpath。Specifically, the test host sets the environment variable to specifically set the JDK installation path JAVA_HOME and the class path classpath for the test host.
步骤104:测试主机删除预设目录下的临时文件。Step 104: The test host deletes the temporary files in the preset directory.
预设目录下的临时文件中包括class、dex等类型的文件。例如,临时文件为temp文件,temp文件中包括class、dex等类型的文件。The temporary files in the default directory include class, dex and other types of files. For example, the temporary file is a temp file, and the temp file includes files of types such as class and dex.
步骤105:测试主机根据预设的待测试应用程序记录中待测试应用程序记录设置应用程序的编译记录的初始值。Step 105: The test host sets the initial value of the compilation record of the application program according to the preset application program records to be tested.
例如,应用程序的编译记录的初始值设置为与预设的待测试应用程序记录中第一个待测试应用程序名称编号相同。For example, the initial value of the compilation record of the application is set to be the same as the number of the name of the first application to be tested in the preset application to be tested record.
本实施例中,应用程序记录包括应用程序名称编号和应用程序数量。In this embodiment, the application program record includes application program name number and application program quantity.
步骤106:测试主机根据应用程序的编译记录和应用程序记录判断是否具有待编译的应用程序,是则执行步骤107,否则完成编译。Step 106: The test host judges whether there is an application program to be compiled according to the compilation record of the application program and the application program record, if yes, execute step 107, otherwise complete the compilation.
可选地,测试主机判断应用程序的编译记录是否超出应用程序数量,是则执行步骤107,否则完成编译。Optionally, the test host judges whether the compilation record of the application program exceeds the number of application programs, if yes, execute step 107, otherwise complete the compilation.
步骤107:测试主机根据预设的待测试应用程序记录中应用程序记录和应用程序的编译记录读取配置文件中当前待编译的应用程序名称。Step 107: The test host reads the name of the current application program to be compiled in the configuration file according to the application program record and the application program compilation record in the preset application program records to be tested.
具体地,测试主机读取预设的待测试应用程序记录中应用程序名称编号,将与编译记录值相同的应用程序名称编号的值对应的应用程序名称作为当前待编译的应用程序名称。Specifically, the test host reads the application name number in the preset application-to-be-tested record, and uses the application name corresponding to the value of the application name number that is the same as the compilation record value as the current application name to be compiled.
例如,应用程序编译记录的值为1时,测试主机将应用程序的记录中应用程序名称编号CASE1对应的应用程序名称为AesArtAudioPass2000作为当前待编译的应用程序名称。For example, when the value of the application program compilation record is 1, the test host takes the application program name corresponding to the application program name number CASE1 in the application program record as AesArtAudioPass2000 as the current application program name to be compiled.
步骤108:测试主机根据当前待编译的应用程序名称读取预设的待测试应用程序记录中当前待编译的应用程序的文件名称。Step 108: The test host reads the file name of the current application to be compiled in the preset application to be tested record according to the name of the current application to be compiled.
例如,当前待编译的应用程序名称为AesArtAudioPass2000时,读取的当前待编译的应用程序文件的名称为AesArtAudioPass2000.apk。For example, when the name of the current application program to be compiled is AesArtAudioPass2000, the name of the read current application program file to be compiled is AesArtAudioPass2000.apk.
步骤109:测试主机根据当前待编译的应用程序名称和下载路径组织当前编译路径。Step 109: The test host organizes the current compiling path according to the current application program name and download path to be compiled.
具体地,测试主机在当前应用程序的下载路径中指定其中一个文件夹或新建一个文件夹为作为当前编译文件夹,并将当前待编译的应用程序名称作为编译文件夹的名称,根据编译文件夹组织当前编译路径。Specifically, the test host designates one of the folders in the download path of the current application or creates a new folder as the current compilation folder, and uses the name of the current application to be compiled as the name of the compilation folder. Organize the current compilation path.
步骤110:测试主机根据当前待编译的应用程序名称将下载路径的文件中当前应用程序的工程源码放在组织的当前编译路径下。Step 110: The test host puts the project source code of the current application program in the file in the download path under the organization's current compilation path according to the name of the current application program to be compiled.
具体地,测试主机将下载路径的文件中与当前待编译的应用程序名称对应的当前应用程序的工程源码放在组织的编译路径下的文件夹中。Specifically, the test host puts the project source code of the current application program corresponding to the name of the current application program to be compiled in the file in the download path into a folder under the compilation path of the organization.
步骤111:测试主机根据当前编译路径下的文件生成当前应用程序的安装包。Step 111: The test host generates the installation package of the current application program according to the files in the current compilation path.
具体地,步骤111具体包括:Specifically, step 111 specifically includes:
步骤a1:测试主机执行aapt指令,将当前编译路径下的资源文件生成R.JAVA文件。Step a1: The test host executes the aapt command to generate the R.JAVA file from the resource file under the current compilation path.
步骤a2:测试主机执行javac指令,根据R.JAVA文件和工程源码的JAVA文件生成Class文件。Step a2: The test host executes the javac command, and generates a Class file according to the R.JAVA file and the JAVA file of the project source code.
步骤a3:测试主机执行dx指令,将Class文件转换成dex文件。Step a3: The test host executes the dx command to convert the Class file into a dex file.
步骤a4:测试主机执行apkbuilder指令生成当前应用程序的安装包。Step a4: The test host executes the apkbuilder command to generate the installation package of the current application.
具体地,应用程序的安装包具体为apk文件。Specifically, the installation package of the application program is specifically an apk file.
步骤112:测试主机在预设目录下生成当前安装包文件夹,将当前应用程序的安装包拷贝到当前安装包文件夹中。Step 112: The test host generates a current installation package folder in a preset directory, and copies the current application installation package to the current installation package folder.
步骤113:测试主机更新应用程序的编译记录,执行步骤106。Step 113: The test host updates the compilation record of the application program, and executes Step 106.
本实施例中,当测试主机获取应用程序源码为从本地数据库中获取时,直接使用本地数据库中编译好的应用程序的安装包。In this embodiment, when the test host obtains the source code of the application program from the local database, it directly uses the installation package of the application program compiled in the local database.
实施例4Example 4
本实施例提供一种自动化测试的装置,包括测试主机和测试服务代理,如图11所示:This embodiment provides a device for automated testing, including a test host and a test service agent, as shown in Figure 11:
测试主机包括:Test hosts include:
启动模块11,用于启动虚拟移动终端,并通过虚拟移动终端启动虚拟移动终端中的测试服务代理;Starting module 11 is used to start the virtual mobile terminal, and starts the test service agent in the virtual mobile terminal by the virtual mobile terminal;
第一接收模块12,用于接收来自测试服务代理的安装应用程序的通知;The first receiving module 12 is used for receiving the notification of installing the application program from the test service agent;
具体地,第一接收模块12,具体用于启动模块11用于启动虚拟移动终端,并通过虚拟移动终端启动虚拟移动终端中的测试服务代理之后,接收来自测试服务代理的安装应用程序的通知;Specifically, the first receiving module 12 is specifically used for starting the module 11 to start the virtual mobile terminal, and after starting the test service agent in the virtual mobile terminal through the virtual mobile terminal, receives a notification from the installation application program of the test service agent;
获取模块13,用于当第一接收模块12接收到来自测试服务代理的安装应用程序的通知时,获取应用程序的安装包;The obtaining module 13 is used to obtain the installation package of the application program when the first receiving module 12 receives the notification of the installation application program from the test service agent;
第一发送模块14,用于将获取模块13获取的应用程序的安装包发送给虚拟移动终端;The first sending module 14 is used to send the installation package of the application program obtained by the obtaining module 13 to the virtual mobile terminal;
组织模块15,用于根据获取模块13获取的应用程序的安装包的名称组织安装指令;The organization module 15 is used to organize the installation instructions according to the name of the installation package of the application obtained by the acquisition module 13;
安装模块16,用于向虚拟移动终端发送组织模块15组织的安装指令,通过虚拟移动终端执行安装指令在虚拟移动终端上根据应用程序的安装包安装应用程序,并接收来自虚拟移动终端预设的安装成功的信息;The installation module 16 is used to send the installation instruction organized by the organization module 15 to the virtual mobile terminal, execute the installation instruction on the virtual mobile terminal according to the installation package of the application program on the virtual mobile terminal, and receive preset information from the virtual mobile terminal Information about successful installation;
第一通知模块17,用于安装模块16接收到来自虚拟移动终端预设的安装成功的信息时,通知测试服务代理在虚拟移动终端上对应用程序进行测试;The first notification module 17 is used to notify the test service agent to test the application program on the virtual mobile terminal when the installation module 16 receives the preset installation success information from the virtual mobile terminal;
第二接收模块18,用于接收测试服务代理完成对应用程序的测试通知;The second receiving module 18 is used to receive the test notification that the test service agent completes the application program;
具体地,第二接收模块18,具体用于第一通知模块17通知测试服务代理在虚拟移动终端上对应用程序进行测试之后,接收测试服务代理完成对应用程序的测试通知;Specifically, the second receiving module 18 is specifically used for the first notification module 17 to notify the test service agent to receive a notification that the test service agent completes the application test after the application is tested on the virtual mobile terminal;
确定完成模块19,用于第二接收模块18接收到测试服务代理完成对应用程序的测试通知时,确定完成在虚拟移动终端上对应用程序的测试;Determine the completion module 19, when the second receiving module 18 receives the test notification that the test service agent completes the application program, it is determined to complete the test of the application program on the virtual mobile terminal;
测试服务代理包括:Test service agents include:
执行模块21,用于执行启动操作;An execution module 21, configured to perform a startup operation;
第二通知模块22,用于当执行模块21执行启动操作之后,通知测试主机在虚拟移动终端上安装应用程序;The second notification module 22 is used to notify the test host to install the application program on the virtual mobile terminal after the execution module 21 executes the startup operation;
第三接收模块23,用于接收测试主机的测试应用程序通知;The third receiving module 23 is configured to receive the test application notification of the test host;
测试启动模块24,用于第三接收模块23接收到测试主机的测试应用程序通知时,在虚拟移动终端上启动应用程序;Test start module 24, when the third receiving module 23 receives the test application notification of the test host, start the application on the virtual mobile terminal;
监控模块25,用于测试启动模块24在虚拟移动终端上启动应用程序之后,监控应用程序在虚拟移动终端上运行;Monitoring module 25 is used for testing after starting module 24 starts application program on virtual mobile terminal, and monitoring application program runs on virtual mobile terminal;
第三通知模块26,用于当监控模块25监控应用程序在虚拟移动终端上完成运行时,通知测试主机完成在虚拟移动终端上对应用程序的测试。The third notification module 26 is used for notifying the test host to complete the test of the application program on the virtual mobile terminal when the monitoring module 25 monitors that the application program finishes running on the virtual mobile terminal.
可选地,上述启动模块11具体用于:根据配置文件中虚拟移动终端的名称组织启动指令,通过测试主机中的模拟管理器执行启动指令启动虚拟移动终端。进一步地,上述测试主机还包括配置模块;Optionally, the above startup module 11 is specifically configured to organize the startup instructions according to the names of the virtual mobile terminals in the configuration file, and execute the startup instructions through the simulation manager in the test host to start the virtual mobile terminal. Further, the above test host also includes a configuration module;
配置模块,用于通过测试主机中的模拟管理器根据测试主机中的配置文件设置共享目录;The configuration module is used to set the shared directory according to the configuration file in the test host through the simulation manager in the test host;
相应地,上述第一接收模块12,具体用于读取配置文件中的执行标志;Correspondingly, the above-mentioned first receiving module 12 is specifically configured to read the execution flag in the configuration file;
上述获取模块13,具体用于当第一接收模块12读取配置文件中的执行标志为安装应用程序状态时,获取应用程序的安装包;The above-mentioned acquisition module 13 is specifically used to acquire the installation package of the application program when the first receiving module 12 reads the execution flag in the configuration file as the state of installing the application program;
上述第一通知模块17,具体用于安装模块16接收到来自虚拟移动终端预设的安装成功的信息时,将配置文件中的执行标志更新为开始测试状态;The above-mentioned first notification module 17 is specifically used for updating the execution flag in the configuration file to the start test state when the installation module 16 receives the preset installation success information from the virtual mobile terminal;
上述第二接收模块18,具体用于读取配置文件中的执行标志;The above-mentioned second receiving module 18 is specifically used to read the execution flag in the configuration file;
上述确定完成模块19,具体用于当第二接收模块18读取配置文件中的执行标志为完成测试状态时,确定完成在虚拟移动终端上对应用程序的测试;The above-mentioned determination completion module 19 is specifically used to determine that the test of the application program on the virtual mobile terminal is completed when the second receiving module 18 reads the execution flag in the configuration file to complete the test state;
上述第二通知模块22,具体用于当执行模块21执行启动操作之后,根据共享目录读取配置文件,将配置文件中的执行标志更新为安装应用程序状态;The above-mentioned second notification module 22 is specifically used to read the configuration file according to the shared directory after the execution module 21 executes the startup operation, and update the execution flag in the configuration file to the state of installing the application program;
上述第三接收模块23,具体用于根据共享目录读取配置文件中的执行标志;The above-mentioned third receiving module 23 is specifically used to read the execution flag in the configuration file according to the shared directory;
上述测试启动模块2411,具体用于当第三接收模块23根据共享目录读取配置文件中的执行标志为开始测试状态时,在虚拟移动终端上启动应用程序;The above test start module 2411 is specifically used to start the application program on the virtual mobile terminal when the third receiving module 23 reads the execution flag in the configuration file according to the shared directory to start the test state;
上述第三通知模块26,具体用于监控模块25监控应用程序在虚拟移动终端上完成运行时,根据共享目录读取配置文件,将配置文件中的执行标志设置为完成测试状态。The above-mentioned third notification module 26 is specifically used for the monitoring module 25 to read the configuration file according to the shared directory when the monitoring application program finishes running on the virtual mobile terminal, and set the execution flag in the configuration file to the completion test state.
或者,上述启动模块11,还可以具体用于根据预设的虚拟移动终端路径启动虚拟移动终端,并通过所述虚拟移动终端启动所述虚拟移动终端中的测试服务代理;Alternatively, the above starting module 11 may also be specifically configured to start a virtual mobile terminal according to a preset virtual mobile terminal path, and start a test service agent in the virtual mobile terminal through the virtual mobile terminal;
相应地,上述第一接收模块12,具体用于接收来自测试服务代理的预设的安装状态值;Correspondingly, the above-mentioned first receiving module 12 is specifically configured to receive the preset installation status value from the test service agent;
上述第一通知模块17,具体用于安装模块16接收到来自虚拟移动终端预设的安装成功的信息时,向测试服务代理发送预设的开始测试状态值;The above-mentioned first notification module 17 is specifically used for sending the preset start test status value to the test service agent when the installation module 16 receives the preset installation success information from the virtual mobile terminal;
上述第二接收模块18,具体用于接收来自测试服务代理的预设的完成测试状态值;The above-mentioned second receiving module 18 is specifically used to receive the preset test completion status value from the test service agent;
上述确定完成模块19,具体用于第二接收模块18接收到来自测试服务代理的预设的完成测试状态值时,确定完成在虚拟移动终端上对应用程序的测试;The above-mentioned determining completion module 19 is specifically used when the second receiving module 18 receives the preset completion test status value from the test service agent to determine that the test of the application program on the virtual mobile terminal is completed;
上述第二通知模块22,具体用于当执行模块21执行启动操作之后,向测试主机发送预设的安装状态值;The above-mentioned second notification module 22 is specifically used to send a preset installation status value to the test host after the execution module 21 executes the startup operation;
上述第三接收模块23,具体用于接收测试主机发送预设的开始测试状态值;The above-mentioned third receiving module 23 is specifically used to receive the preset start test status value sent by the test host;
上述测试启动模块2411,具体用于当第三接收模块23接收到测试主机发送的预设的开始测试状态值时,在虚拟移动终端上启动应用程序;The above test start module 2411 is specifically used to start the application program on the virtual mobile terminal when the third receiving module 23 receives the preset start test state value sent by the test host;
上述第三通知模块26,具体用于当监控模块25监控应用程序在虚拟移动终端上完成运行时,向测试主机发送预设的完成测试状态值。The above-mentioned third notification module 26 is specifically configured to send a preset test completion status value to the test host when the monitoring module 25 monitors that the application program finishes running on the virtual mobile terminal.
可选地,上述测试主机还包括第一保存模块、第二发送模块、第一判断模块和第一更新模块;上述测试服务代理还包括第四接收模块、第二判断模块、第二更新模块和第四通知模块;Optionally, the above-mentioned test host also includes a first saving module, a second sending module, a first judging module and a first updating module; the above-mentioned testing service agent also includes a fourth receiving module, a second judging module, a second updating module and The fourth notification module;
第一保存模块,用于保存应用程序记录;a first saving module, configured to save application program records;
第二发送模块,用于启动模块11通过虚拟移动终端启动虚拟移动终端中的测试服务代理之后,将第一保存模块保存的应用程序记录发送给测试服务代理;应用程序记录在测试之前为预设的初始值;The second sending module is used for starting module 11 after starting the test service agent in the virtual mobile terminal by the virtual mobile terminal, and the application record saved by the first saving module is sent to the test service agent; the application record is preset before the test initial value;
相应地,上述获取模块13,具体用于当第一接收模块12接收到来自测试服务代理的安装应用程序的通知时,根据第一保存模块保存的应用程序记录获取当前待测试的应用程序名称,根据当前待测试的应用程序名称获取当前应用程序的安装包;Correspondingly, the above-mentioned obtaining module 13 is specifically configured to obtain the name of the current application program to be tested according to the application program record saved by the first saving module when the first receiving module 12 receives a notification of installing the application program from the test service agent, Obtain the installation package of the current application according to the name of the current application to be tested;
上述第一发送模块14,具体用于将获取模块13获取的当前应用程序的安装包发送给虚拟移动终端;The above-mentioned first sending module 14 is specifically used to send the installation package of the current application program obtained by the obtaining module 13 to the virtual mobile terminal;
上述组织模块15,具体用于根据当前应用程序的安装包的名称组织当前安装指令;The above organization module 15 is specifically used to organize the current installation instructions according to the name of the installation package of the current application;
上述安装模块16,具体用于向虚拟移动终端发送组织模块15组织的当前安装指令,通过虚拟移动终端执行当前安装指令在虚拟移动终端上根据当前应用程序的安装包安装当前应用程序,并接收来自虚拟移动终端预设的安装成功的信息;The above-mentioned installation module 16 is specifically used to send the current installation instruction organized by the organization module 15 to the virtual mobile terminal, execute the current installation instruction on the virtual mobile terminal according to the installation package of the current application program on the virtual mobile terminal, and receive information from Information about successful installation preset by the virtual mobile terminal;
上述第一通知模块17,具体用于安装模块16接收到来自虚拟移动终端预设的安装成功的信息时,通知测试服务代理在虚拟移动终端上对当前应用程序进行测试;The above-mentioned first notification module 17 is specifically used to notify the test service agent to test the current application program on the virtual mobile terminal when the installation module 16 receives the preset installation success information from the virtual mobile terminal;
上述第二接收模块18,具体用于接收来自测试服务代理的完成对当前应用程序的测试通知;还用于接收来自测试服务代理的完成对所有待测试应用程序测试的通知;The above-mentioned second receiving module 18 is specifically used to receive a notification from the test service agent to complete the test of the current application program; it is also used to receive a notification from the test service agent to complete the test of all application programs to be tested;
上述第一判断模块,用于第二接收模块18接收到来自测试服务代理的完成对当前应用程序的测试通知时,判断第二接收模块18在预设时间内是否接收到来自测试服务代理的完成对所有待测试应用程序测试的通知;The above-mentioned first judging module is used to judge whether the second receiving module 18 has received the completion notification from the testing service agent within the preset time when the second receiving module 18 receives the completion notification of the current application program from the testing service agent. Notification of all pending application tests;
第一更新模块,用于第一判断模块判断第二接收模块18在预设时间内没有接收到来自测试服务代理的完成对所有待测试应用程序测试的通知时,根据第一保存模块保存的应用程序记录更新对待测试应用程序的第一记录;The first updating module is used for the first judging module to judge that when the second receiving module 18 has not received the notification from the test service agent to complete the testing of all application programs to be tested within the preset time, according to the application saved by the first saving module The program record updates the first record of the application to be tested;
上述第一接收模块12,还用于第一更新模块根据第一保存模块保存的应用程序记录更新对待测试应用程序的第一记录之后,接收来自测试服务代理的安装应用程序的通知;The above-mentioned first receiving module 12 is also used for the first update module to receive a notification of installing the application from the test service agent after the first update module updates the first record of the application to be tested according to the application record saved by the first saving module;
第四接收模块,用于执行模块21执行启动操作之后,接收来自测试主机的应用程序记录;The fourth receiving module is used to receive the application program record from the test host after the execution module 21 executes the startup operation;
上述测试启动模块2411,具体用于第三接收模块23接收到测试主机的测试应用程序通知时,在虚拟移动终端上启动当前应用程序;The above-mentioned test start module 2411 is specifically used for starting the current application program on the virtual mobile terminal when the third receiving module 23 receives the test application program notification from the test host;
上述监控模块25,具体用于测试启动模块2411在虚拟移动终端上启动当前应用程序之后,监控当前应用程序在虚拟移动终端上运行;The above-mentioned monitoring module 25 is specifically used to monitor the operation of the current application program on the virtual mobile terminal after the test startup module 2411 starts the current application program on the virtual mobile terminal;
上述第三通知模块26,具体用于当监控模块25监控当前应用程序在虚拟移动终端上完成运行时,通知测试主机完成在虚拟移动终端上对当前应用程序的测试;The above-mentioned third notification module 26 is specifically used to notify the test host to complete the test of the current application program on the virtual mobile terminal when the monitoring module 25 monitors that the current application program is running on the virtual mobile terminal;
第二判断模块,用于第三通知模块26通知测试主机完成对当前应用程序的测试之后,根据第四接收模块接收的应用程序记录判断是否具有待测试的应用程序;The second judging module is used for the third notification module 26 to notify the test host to complete the test of the current application program, and judge whether there is an application program to be tested according to the application program record received by the fourth receiving module;
第二更新模块,用于第二判断模块判断结果为具有待测试的应用程序时,根据第四接收模块接收的应用程序记录更新对待测试应用程序的第二记录;The second updating module is used for updating the second record of the application to be tested according to the application record received by the fourth receiving module when the second judging module judges that there is an application to be tested;
上述第二通知模块22,还用于第二更新模块根据第四接收模块接收的应用程序记录更新对待测试应用程序的第二记录之后,通知测试主机在虚拟移动终端上安装应用程序;The above-mentioned second notification module 22 is also used for notifying the test host to install the application program on the virtual mobile terminal after the second update module updates the second record of the application program to be tested according to the application program record received by the fourth receiving module;
第四通知模块,用于第二判断模块判断结果为不具有待测试的应用程序时,通知测试主机完成在虚拟移动终端上对所有待测试应用程序的测试。The fourth notification module is used for notifying the test host to complete the testing of all the application programs to be tested on the virtual mobile terminal when the second determination module determines that there is no application program to be tested.
具体地,上述第一保存模块保存的应用程序记录包括应用程序数量、应用程序名称编号和当前应用程序名称编号;当前应用程序名称编号的初始值与第一个测试的应用程序名称编号值相同;Specifically, the application program records saved by the above-mentioned first saving module include the number of applications, the application program name number and the current application program name number; the initial value of the current application program name number is the same as the value of the first tested application program name number;
相应地,上述获取模块13,具体用于当第一接收模块12接收到来自测试服务代理的安装应用程序的通知时,根据当前应用程序名称编号获取当前待测试的应用程序名称,根据当前待测试的应用程序名称获取当前应用程序的安装包;Correspondingly, the above-mentioned obtaining module 13 is specifically used to obtain the current application program name to be tested according to the current application program name number when the first receiving module 12 receives the notification of installing the application program from the test service agent, and obtain the current application program name to be tested according to the current application program name number. The application name to get the installation package of the current application;
上述第一更新模块,具体用于第一判断模块判断第二接收模块18在预设时间内没有接收到来自测试服务代理的完成对所有待测试应用程序测试的通知时,根据第一保存模块保存的应用程序名称编号更新当前应用程序名称编号;The above-mentioned first update module is specifically used when the first judging module judges that the second receiving module 18 has not received a notification from the test service agent to complete the testing of all application programs to be tested within a preset time, and saves the data according to the first saving module. The application name number of the update current application name number;
上述第二判断模块,具体用于第三通知模块26通知测试主机完成对当前应用程序的测试之后,根据第四接收模块接收的当前应用程序名称编号和接收的应用程序数量判断是否具有待测试的应用程序;The above-mentioned second judging module is specifically used for the third notification module 26 to notify the test host to complete the test of the current application program, and judge whether there is an application program to be tested according to the current application program name number and the number of received application programs received by the fourth receiving module. application;
上述第二更新模块,具体用于第二判断模块判断结果为具有待测试的应用程序时,根据第四接收模块接收的应用程序名称编号更新接收模块接收的当前应用程序名称编号。The above-mentioned second updating module is specifically used for updating the current application program name number received by the receiving module according to the application program name number received by the fourth receiving module when the second judging module judges that there is an application program to be tested.
或者,上述第一保存模块保存的应用程序记录包括应用程序数量和应用程序名称编号;相应地,上述测试主机还包括第一设置模块,上述测试服务代理还包括第二设置模块;Or, the application record saved by the first saving module includes the number of applications and the number of the application name; correspondingly, the above-mentioned test host also includes a first setting module, and the above-mentioned test service agent also includes a second setting module;
第一设置模块,用于根据第一保存模块保存的应用程序数量和应用程序名称编号设置第二索引值的初始值;The first setting module is used to set the initial value of the second index value according to the number of applications stored by the first storage module and the number of application programs;
上述获取模块13,具体用于当第一接收模块12接收到来自测试服务代理的安装应用程序的通知时,根据第二索引值和应用程序名称编号获取当前待测试的应用程序名称,根据当前待测试的应用程序名称获取当前应用程序的安装包;The above acquisition module 13 is specifically used to obtain the current application program name to be tested according to the second index value and the application program name number when the first receiving module 12 receives the notification of the installation application program from the test service agent, and according to the current application program name to be tested. The name of the tested application gets the installation package of the current application;
上述第一更新模块,具体用于第一判断模块在预设时间内判断第二接收模块18没有接收到来自测试服务代理的完成对所有待测试应用程序测试的通知时,根据第一保存模块保存的应用程序名称编号更新第二索引值;The above-mentioned first updating module is specifically used when the first judging module judges that the second receiving module 18 has not received a notification from the test service agent to complete the testing of all application programs to be tested within the preset time, and saves the data according to the first saving module. update the second index value of the application name number;
第二设置模块,用于根据第四接收模块接收的应用程序名称编号和应用程序数量设置第一索引值的初始值;The second setting module is used to set the initial value of the first index value according to the application name number and the number of applications received by the fourth receiving module;
上述第二判断模块,具体用于第三通知模块26通知测试主机完成对当前应用程序的测试之后,根据第一索引值和第四接收模块接收的应用程序名称编号判断是否具有待测试的应用程序;The above-mentioned second judging module is specifically used for judging whether there is an application program to be tested according to the first index value and the application program name number received by the fourth receiving module after the third notification module 26 notifies the test host to complete the test of the current application program ;
上述第二更新模块,具体用于第二判断模块判断结果为具有待测试的应用程序时,根据第四接收模块接收的应用程序名称编号更新第一索引值。The above-mentioned second updating module is specifically used for updating the first index value according to the application program name number received by the fourth receiving module when the second judging module judges that there is an application program to be tested.
可选地,上述测试主机还可以包括第二保存模块、第三判断模块、关闭模块和第三更新模块;Optionally, the above test host may also include a second saving module, a third judging module, a closing module and a third updating module;
第二保存模块,用于保存虚拟移动终端的记录;虚拟移动终端的记录在执行测试之前为预设的初始值;The second saving module is used to save the record of the virtual mobile terminal; the record of the virtual mobile terminal is a preset initial value before performing the test;
第三判断模块,用于根据第二保存模块保存的虚拟移动终端的记录判断是否具有待测试的虚拟移动终端;The third judging module is used to judge whether there is a virtual mobile terminal to be tested according to the record of the virtual mobile terminal saved by the second saving module;
相应地,上述启动模块11,具体用于当第三判断模块判断结果为具有待测试的虚拟移动终端时,启动当前虚拟移动终端,并通过当前虚拟移动终端启动虚拟移动终端中的测试服务代理;Correspondingly, the above-mentioned starting module 11 is specifically used to start the current virtual mobile terminal when the third judging module judges that there is a virtual mobile terminal to be tested, and start the test service agent in the virtual mobile terminal through the current virtual mobile terminal;
关闭模块,用于确定完成模块19确定完成在虚拟移动终端上对应用程序的测试之后,关闭当前虚拟移动终端;Closing module is used to determine that after module 19 completes the test of the application program on the virtual mobile terminal, close the current virtual mobile terminal;
第三更新模块,用于确定完成模块19确定完成在虚拟移动终端上对应用程序的测试之后,更新虚拟移动终端的记录。The third update module is configured to update the record of the virtual mobile terminal after the completion module 19 determines that the test of the application program on the virtual mobile terminal is completed.
具体地,上述第二保存模块保存的虚拟移动终端的记录包括当前虚拟移动终端编号、虚拟移动终端数量;Specifically, the record of the virtual mobile terminal saved by the second saving module includes the current virtual mobile terminal number and the number of virtual mobile terminals;
相应地,上述第三判断模块,具体用于根据第二保存模块保存的当前虚拟移动终端编号、虚拟移动终端数量判断是否具有待测试的虚拟移动终端;Correspondingly, the above-mentioned third judging module is specifically used to judge whether there is a virtual mobile terminal to be tested according to the current virtual mobile terminal number and the number of virtual mobile terminals saved by the second saving module;
上述启动模块11,具体用于当第三判断模块判断结果为具有待测试的虚拟移动终端时,根据当前虚拟移动终端编号启动当前虚拟移动终端,并通过当前虚拟移动终端启动虚拟移动终端中的测试服务代理;The above starting module 11 is specifically used to start the current virtual mobile terminal according to the current virtual mobile terminal number when the third judging module judges that there is a virtual mobile terminal to be tested, and start the test in the virtual mobile terminal through the current virtual mobile terminal service agent;
上述第三更新模块,具体用于确定完成模块19确定完成在虚拟移动终端上对应用程序的测试之后,更新第二保存模块保存的当前虚拟移动终端编号。The above-mentioned third update module is specifically used to update the current virtual mobile terminal number saved by the second saving module after the completion module 19 determines that the test of the application program on the virtual mobile terminal is completed.
或者,上述第二保存模块保存的虚拟移动终端的记录还可以具体包括当前虚拟移动终端编号、虚拟移动终端数量;相应地,上述测试主机还包括第三设置模块;Or, the record of the virtual mobile terminal saved by the second saving module may also specifically include the current virtual mobile terminal number and the number of virtual mobile terminals; correspondingly, the above-mentioned test host also includes a third setting module;
第三设置模块,用于根据第二保存模块保存的当前虚拟移动终端编号和虚拟移动终端数量设置第三索引值的初始值;The third setting module is used to set the initial value of the third index value according to the current virtual mobile terminal number and the number of virtual mobile terminals saved by the second saving module;
上述第三判断模块,具体用于根据第三保存模块保存的当前虚拟移动终端编号和第三设置模块设置的第三索引值判断是否具有待测试的虚拟移动终端;The above-mentioned third judging module is specifically used to judge whether there is a virtual mobile terminal to be tested according to the current virtual mobile terminal number saved by the third saving module and the third index value set by the third setting module;
上述启动模块11,具体用于根据第三设置模块设置的第三索引值和第二保存模块保存的当前虚拟移动终端编号启动当前虚拟移动终端;The above-mentioned starting module 11 is specifically used to start the current virtual mobile terminal according to the third index value set by the third setting module and the current virtual mobile terminal number saved by the second saving module;
上述第三更新模块,具体用于更新第三设置模块设置的第三索引值以及第二保存模块保存的当前虚拟移动终端编号。The above-mentioned third updating module is specifically used to update the third index value set by the third setting module and the current virtual mobile terminal number saved by the second saving module.
具体地,上述第二保存模块具体用于保存预设的虚拟移动终端记录;或者,上述第二保存模块具体用于读取上述测试主机的配置文件中记录的虚拟移动终端记录。Specifically, the second saving module is specifically configured to save the preset virtual mobile terminal record; or, the second saving module is specifically configured to read the virtual mobile terminal record recorded in the configuration file of the test host.
可选地,上述测试主机还包括第三保存模块和第二读取模块;Optionally, the test host also includes a third storage module and a second reading module;
第三保存模块,用于保存预设的待测试的应用程序名称;The third saving module is used to save the preset name of the application program to be tested;
第二读取模块,用于读取测试主机中配置文件中待测试的应用程序名称;The second reading module is used to read the name of the application program to be tested in the configuration file in the test host;
相应地,上述获取模块13,具体用于当第一接收模块12接收到来自测试服务代理的安装应用程序的通知时,根据第三保存模块保存的预设的待测试应用程序名称获取应用程序的安装包;或者具体用于当第一接收模块12接收到来自测试服务代理的安装应用程序的通知时,根据第二读取模块读取的应用程序名称获取应用程序的安装包。Correspondingly, the above-mentioned acquiring module 13 is specifically used to acquire the name of the application program according to the preset application program name to be tested saved by the third saving module when the first receiving module 12 receives a notification of installing the application program from the test service agent. The installation package; or specifically for obtaining the installation package of the application according to the name of the application read by the second reading module when the first receiving module 12 receives a notification of installing the application from the test service agent.
可选地,上述测试主机还包括第五通知模块;测试服务代理还包括第五接收模块和第四判断模;Optionally, the test host also includes a fifth notification module; the test service agent also includes a fifth receiving module and a fourth judging module;
第五通知模块,用于启动模块11启动虚拟移动终端,并通过虚拟移动终端启动虚拟移动终端中的测试服务代理之后,通知测试服务代理准备测试;The 5th notification module is used for starting module 11 to start the virtual mobile terminal, and after starting the test service agent in the virtual mobile terminal by the virtual mobile terminal, notify the test service agent to prepare for testing;
第五接收模块,用于接收来自测试主机的准备测试通知;The fifth receiving module is used to receive the test preparation notification from the test host;
第四判断模块,用于执行模块21执行启动操作之后,判断第五接收模块是否接收到来自测试主机的准备测试通知;The fourth judging module is used to judge whether the fifth receiving module has received a test preparation notification from the test host after the execution module 21 executes the startup operation;
相应地,上述第二通知模块22,具体用于第四判断模块判断第五接收模块接收到来自测试主机的准备测试通知时,通知测试主机在虚拟移动终端上安装应用程序。Correspondingly, the above-mentioned second notification module 22 is specifically used for the fourth judgment module to notify the test host to install the application program on the virtual mobile terminal when the fourth judgment module judges that the fifth receiving module has received the test preparation notification from the test host.
本发明与现有技术相比的有益效果是:本发明提供的测试装置,测试主机通过虚拟移动终端测试应用程序,不用租用大量的实体移动终端进行测试,降低测试成本、提高测试的便捷性;可以重复同样的测试,使测试结果可以重现;测试主机自动进行测试,大大减少测试人员的工作量,节省时间和劳动力。测试多个应用程序和多个虚拟移动终端时,一个虚拟移动终端测试多个应用程序时可以自动执行对多个应用程序的测试,测试多个虚拟移动终端时可以自动执行对多个虚拟移动终端的测试,这种自动测试的方法在很大程度上提高了测试便捷性、节省劳动力。Compared with the prior art, the beneficial effect of the present invention is: the test device provided by the present invention, the test host can test the application program through the virtual mobile terminal, without renting a large number of physical mobile terminals for testing, which reduces the test cost and improves the convenience of the test; The same test can be repeated, so that the test results can be reproduced; the test host automatically performs the test, which greatly reduces the workload of testers and saves time and labor. When testing multiple applications and multiple virtual mobile terminals, one virtual mobile terminal can automatically perform tests on multiple applications when testing multiple applications, and can automatically perform tests on multiple virtual mobile terminals when testing multiple virtual mobile terminals. This method of automatic testing greatly improves the convenience of testing and saves labor.
以上,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present invention, and should cover all Within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710315581.1ACN107220174B (en) | 2017-05-08 | 2017-05-08 | Automatic testing method and device |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710315581.1ACN107220174B (en) | 2017-05-08 | 2017-05-08 | Automatic testing method and device |
| Publication Number | Publication Date |
|---|---|
| CN107220174Atrue CN107220174A (en) | 2017-09-29 |
| CN107220174B CN107220174B (en) | 2020-01-03 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710315581.1AExpired - Fee RelatedCN107220174B (en) | 2017-05-08 | 2017-05-08 | Automatic testing method and device |
| Country | Link |
|---|---|
| CN (1) | CN107220174B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109918287A (en)* | 2019-01-16 | 2019-06-21 | 平安普惠企业管理有限公司 | APP upgrading test method, apparatus, computer equipment and storage medium |
| CN110221926A (en)* | 2019-05-27 | 2019-09-10 | 中国电建集团华东勘测设计研究院有限公司 | A kind of induced joint pours the isolation management of computing method of progress emulation |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130263090A1 (en)* | 2012-03-30 | 2013-10-03 | Sony Online Entertainment Llc | System and method for automated testing |
| CN104978263A (en)* | 2014-04-09 | 2015-10-14 | 腾讯科技(深圳)有限公司 | Mobile terminal application program test method and mobile terminal application program test system |
| CN106294102A (en)* | 2015-05-20 | 2017-01-04 | 腾讯科技(深圳)有限公司 | The method of testing of application program, client, server and system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130263090A1 (en)* | 2012-03-30 | 2013-10-03 | Sony Online Entertainment Llc | System and method for automated testing |
| CN104978263A (en)* | 2014-04-09 | 2015-10-14 | 腾讯科技(深圳)有限公司 | Mobile terminal application program test method and mobile terminal application program test system |
| CN106294102A (en)* | 2015-05-20 | 2017-01-04 | 腾讯科技(深圳)有限公司 | The method of testing of application program, client, server and system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109918287A (en)* | 2019-01-16 | 2019-06-21 | 平安普惠企业管理有限公司 | APP upgrading test method, apparatus, computer equipment and storage medium |
| CN110221926A (en)* | 2019-05-27 | 2019-09-10 | 中国电建集团华东勘测设计研究院有限公司 | A kind of induced joint pours the isolation management of computing method of progress emulation |
| CN110221926B (en)* | 2019-05-27 | 2021-11-16 | 中国电建集团华东勘测设计研究院有限公司 | Isolation calculation management method for high arch dam pouring progress simulation |
| Publication number | Publication date |
|---|---|
| CN107220174B (en) | 2020-01-03 |
| Publication | Publication Date | Title |
|---|---|---|
| CN105657191B (en) | Application increment upgrading method and system based on Android system | |
| CN101876940B (en) | Automatic test method and device | |
| CN102426531B (en) | An intelligent terminal, an application updating system and an updating method thereof | |
| WO2011127845A2 (en) | Method, system and terminal for system update between mobile communication terminals | |
| CN110096424B (en) | Test processing method and device, electronic equipment and storage medium | |
| CN103714287B (en) | Method and device for obtaining temporary Root authority | |
| CN104699616A (en) | Method, device and system for testing application | |
| CN104679534A (en) | System application installation package loading processing method, device and terminal | |
| JP2007128522A (en) | System and method for representing system capabilities as software packages in software package management system | |
| JP2004158012A (en) | System and method for software application management | |
| CN113051088B (en) | Program loading method, device, equipment and computer readable medium | |
| CN110908670A (en) | Method and device for automatically publishing service | |
| CN102541596A (en) | Operating system upgrading method and device | |
| CN103559065A (en) | Method and system for OTA (Over-the-Air Technology) upgrade | |
| CN110597544A (en) | Software system upgrading method and device | |
| CN113900693A (en) | Firmware upgrading method, device and system, electronic equipment and storage medium | |
| CN113434158A (en) | User-defined management method, device, equipment and medium for big data component | |
| CN102447732A (en) | Method for intelligent configuration of host computer embedded environment during BMC (Baseboard Management Controller) development | |
| CN106909480A (en) | A kind of embedded system cross debugging method and apparatus | |
| WO2017041499A1 (en) | Software upgrade method and system, and computer-readable storage medium | |
| CN112052037A (en) | An application software development method, device, equipment and medium | |
| CN107220174B (en) | Automatic testing method and device | |
| CN115248700A (en) | A method and system for automatically building a mobile installation package for a product code | |
| CN113961257B (en) | A server operating system activation automatic detection method, system and storage medium | |
| CN104036193A (en) | Local cross-domain vulnerability detection method and device for application program |
| 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 | ||
| CF01 | Termination of patent right due to non-payment of annual fee | Granted publication date:20200103 | |
| CF01 | Termination of patent right due to non-payment of annual fee |