Mobile terminal software test method and system based on group control technology

A mobile terminal and technical technology, applied in the field of mobile terminal software testing methods and systems, can solve problems such as unsatisfactory software launch time, long test cycle, low efficiency, etc., achieve efficient and fast testing, improve effective utilization, The effect of saving human resources

Pending Publication Date: 2022-02-18
SICHUAN HONGMEI INTELLIGENT TECH CO LTD
0 Cites 0 Cited by

AI-Extracted Technical Summary

Problems solved by technology

The traditional automated testing solution only supports automated testing of a single mobile terminal, and after a mobile terminal test is completed, manual intervention is required to manually connec...
View more

Method used

It can be understood that group control technology, that is, based on the technology of one-to-many management and operation control realized by Internet carrier, this manual realizes testing one by one to each mobile terminal by debugging bridge tool and airtest tool on jenkins continuous integration platform , that is to realize the automatic switching test of eac...
View more

Abstract

The invention provides a mobile terminal software test method and system based on a group control technology, and the method comprises the steps: after a test item in a jenkins continuous integration platform is triggered by a trigger, executing the following steps: S110, obtaining device IDs of all mobile terminals currently accessed to the jenkins continuous integration platform through a debugging bridge tool, storing the device IDs in a first terminal list, updating the first terminal list according to the device ID in the second terminal list; S120, judging whether the updated first terminal list is empty or not; S121, if the test result is null, ending the test method; and S122, if the first terminal list is not empty, sending one device ID in the updated first terminal list to an airtest tool to enable the airtest tool to run the test case on the mobile terminal corresponding to the device ID, storing the device ID into the second terminal list after the test case is successfully run, emptying the first terminal list, and returning to the step S110. The mobile terminal testing process based on the group control technology is achieved.

Application Domain

Software testing/debugging

Technology Topic

Flip-flopTest case +4

Image

  • Mobile terminal software test method and system based on group control technology
  • Mobile terminal software test method and system based on group control technology
  • Mobile terminal software test method and system based on group control technology

Examples

  • Experimental program(1)

Example Embodiment

[0017] The schemes provided herein will be described below with reference to the drawings.
[0018] In the first aspect, the present invention provides a mobile terminal software test method based on group control technology.
[0019] Such as figure 1 As shown, the method includes: performing the following steps in the Test item in the Jenkins Connection Integration Platform, executing the following steps:
[0020] S110, obtaining the device ID of all mobile terminals currently accessed by the Jenkins continuous integrated platform by the debug bridge tool, store the device ID into the first terminal list, and according to the device ID in the second terminal list The first terminal list is updated; the second terminal list is used to store the device ID of the mobile terminal that has completed the software test;
[0021] Among them, the debug bridge is ADB (full name: Android debug bridge), Android debug bridge is a universal command line tool that allows users to communicate with the simulator instance or connected Android device. It provides conveniences such as installation and debugging applications for various equipment operations, and provides access to UNIX shells (available to various commands on the emulator or connection).
[0022] When implementation, the debug bridge tool is installed on the Jenkins continuous integration platform, and the debug bridge tool enters the preset command (for example, the adb devices command), the debug bridge tool will output the current access Jenkins continuous integrated platform. All mobile terminals of the device ID. Specifically, the debug bridge tool can get the device ID of each mobile terminal of the Jenkins continuous integrated platform through the USB hub tool.
[0023] After obtaining all the device IDs of all mobile terminals of the current access platform through the debug bridge, all device IDs are stored to the first terminal list. In fact, some mobile terminals have completed software testing, so they need to The device ID of the mobile terminal that has completed software test is removed from the first terminal list. Therefore, a second terminal list is also provided in the present invention, and the device ID of the mobile terminal that has completed the test is stored. Therefore, the same device ID in the first terminal list is deleted in the same device ID in the second terminal list, thereby implementing an update to the first terminal list to obtain an apparatus ID of each mobile terminal currently not performing software testing.
[0024] That is, the device ID in the second terminal list is updated in accordance with the device ID in the second terminal list, which may include: the same device in the first terminal list. ID delete.
[0025] S120, determined whether the updated first terminal list is empty;
[0026] S121, if the updated first terminal list is empty, the present test method is ended;
[0027] It will be appreciated that if the updated first terminal list is empty, the device ID of all mobile terminals of the current access platform has been tested, so the test method is ended, and the loop process is overwritten.
[0028] It will be appreciated that the various steps of the present method have eventually realized all of the mobile terminals of the current access platform, so that the entire test method is ended through this step.
[0029] S122, if the updated first terminal list is not empty, send a device ID in the updated first terminal list to the Airtest tool to operate the Airtest tool on the mobile terminal corresponding to the device ID. And in the test case, the device ID is stored in the second terminal list, and the first terminal list is cleared and returned to S110.
[0030] If the updated first terminal list is not empty, then the mobile terminal does not have a software test. At this time, a device ID can be selected from the updated first terminal list, thereby performing the mobile terminal corresponding to the device ID. Software test, in practice, you can select a device ID from the updated first terminal list in order.
[0031] After a device ID is selected, the device ID is sent to the Airtest tool so that the Airtest tool will use the device ID as a parameter that performs scriptization, and the AirTest tool runs test cases on the mobile terminal corresponding to this device ID. Software test, of course, if there is no software to be tested on this mobile terminal, download the software to be tested before running the test case, and then treat the software to test. After the test case is running, you can get the run results of the test case. If the result is successful, the device ID is stored in the second terminal list, and the software test of the mobile terminal corresponding to this device ID is completed, and then returned to S110.
[0032] After completing the software test of a mobile terminal, returns to S110, re-acquire the device ID of each mobile terminal of the current access platform, put each device ID into the first terminal list after emptying, in the first There is one or more device IDs of one or more mobile terminals that have completed software tests, so the first terminal list is updated by the second terminal list, so that only the mobile terminal of the currently not performing software test is preserved in the first terminal list. Device ID.
[0033] When the S110 is returned, S122 may also include:
[0034] After the test case is run, the test report is generated, and the test report is uploaded to the database for saving; determined whether the test case is running successfully, if the test case is run, it will The test report is pushed to the tester.
[0035] That is, after the test case is executed, the corresponding test report can be generated for the execution process of the test example. The test report can include the test data, the results data of the test, thereby sending the test report to the database for saving, so that Subsequent findings are analyzed and problematic. In addition, if the test result fails, the test results can be pushed to the tester by WeChat, SMS, mail, etc., so that the test personnel understand the test situation of the software on each mobile terminal.
[0036] Further, in order to avoid the impact on the test results in addition to the software itself, it is also possible to repeat software testing multiple times, and if the result of multiple repeated tests fails, then determine this mobile terminal. Failure to test.
[0037] It will be appreciated that Jenkins continuous integration platform is required before performing this test method, that is, deploy Jenkins continuous integration tools on the platform, the Jenkins continuous integration tool includes triggers, build steps, and builds after building, including steps and build The rear operation is actually the execution steps of the above test items.
[0038] Among them, the trigger is divided into two types: update trigger mode and timing trigger mode, the update trigger mode for the test software to have a new version of the trigger to trigger the test item, the timing trigger mode The trigger triggers the test item in a preset time interval or at a predetermined time. Enter the above test steps after the Jenkins continuous integration platform is built, and after the trigger method of the trigger is set.
[0039] That is, after the test item is deputched, the test case is run, generate a test report, upload the test report to the database save, and analyze the test report, in the test report, the test report is notified by WeChat or other means . When the process can automatically verify the correctness of the software function on each mobile terminal in the test environment, the process is automatically verified on each mobile terminal of the mobile terminal, and can monitor the operating state of the mobile terminal in the production environment, and timely The alarm, an exception in the production environment and follow up the team to make changes to a certain extent, to a certain extent, to a certain extent, to reduce the negative feedback of the software products.
[0040] Of course, the test case and debug test use case are required before the test project performs each test step. The test case can be used to write and debug with the Airtest tool. The Airtest tool is a graphic identification UI automated test framework that recognizes and connects to the mobile terminal on the current host. After the test is designed, it can be performed according to the steps of the test case. The test case of the mobile terminal includes the declaration of the variable, installs and initiates the mobile application, the target image to be operated, and operates the target image (such as clicking on the image, input character, sliding screen) Wait for operation), compare the results and expectations to determine whether the execution of the test case is successful or not.
[0041] Among them, the prepared test case can override multiple function points of the test software, and then debug the test case. Finally, the test case is performed by entering instructions in the command line.
[0042] The principle of test case execution of mobile terminals based on group-controlled technology is roughly: first using the Python language, from the platform that has already been installed, using the Adb Devices and other instructions to obtain the various mobile terminals of the tool access platform such as USB HUB. Device ID, then store all of the obtained device IDs into the first terminal list. In the initial, no mobile terminal is tested, at which point the second terminal list is empty, selecting a device ID in the first terminal list to pass to the Airtest tool, as an Airtest tool, performing a script-running parameter, Airtest The tool runs the test case in the mobile terminal corresponding to the device ID to get the run. If the result of the test case is failed, the test case can be run multiple times, thereby reducing the failure of the external interference factor, and if multiple operation results fail, the software test of the mobile terminal is considered to fail. If the test is successful, the device ID is stored in the second terminal list, and the step of emptying the first terminal list and returns to the device ID of all mobile terminals of the access platform. This is because the case where the connection abnormality may occur during the test, and the access mobile terminal is increased or decreased, so before each assignment to the Airtest tool, you need to re-acquire the current access platform. All the device IDs of all mobile terminals, and propose the device ID of the mobile terminal that has been tested to obtain the device ID of each mobile terminal that is currently not software test, and then assign a device ID to the Airtest tool. This can improve the success rate of test case execution to some extent.
[0043] In summary, when the test item deployed on the Jenkins continuous integration platform is triggered, first get the device ID of each mobile terminal of the current access platform, then put it into the first terminal list, then use the second terminal list to the first The terminal list is updated. After the update, select one device ID from the first terminal list as the operating parameters of the Airtest, and the Airtest tool performs the specified test case on the mobile terminal corresponding to the device ID. When the test case is successful, it is again Returns the step of getting the device ID of the respective mobile terminals of the current access platform, software testing of the next unsatisfined mobile terminal until all mobile terminals of the current access platform are tested.
[0044] It will be appreciated that group control technology, that is, a pair of multi-managed operation control based on Internet carriers, this specification is implemented on the Jenkins Sustained Integration Platform to achieve a test of each mobile terminal through debugging bridge tool and the Airtest tool. Automatic switching test of each mobile terminal, thereby achieving a mobile terminal testing process based on group control technology. In this way, the effective utilization of automated test tools can be improved, making the test of front-end products more efficient, which can improve the quality and stability of the software product, and save human resources.
[0045] In the specific implementation, in order to increase the processing power of Jenkins continuous integrated platform, you can use multi-level Jenkins to continuously integrate platform, see figure 2 The multi-level JENKINS continuous integration platform includes a main platform installed with Jenkins's continuous integration tools and a multi-grade kiki platform installed with Jenkins continuous integration tools. The main platform communicates with the first server, the first server for use Storage firmware update packets; a preset buffer area is provided on the main platform, which is connected to the primary platform.
[0046] The main platform and sub-platform can be used to handle different services, for example, the main platform acquires all mobile terminals of the access primary platform, stores the device ID into the first terminal list, and according to the second terminal list pair A terminal list is updated; the sub-platform can perform whether or not the updated first terminal list is empty, and various processing steps such as empty and not empty. The main platforms and sub-platforms can provide different services, each with division, thus achieving the entire test process.
[0047] Further, after the test item is triggered by the trigger, and before performing S110, the method further includes firmware update to the multi-level JENKINS continuous integration platform.
[0048] That is, after the firmware update is updated, the test process will be entered, so that the test process can be performed smoothly.
[0049] In the specific implementation, the multi-level Jenkins continuous integrated platform is fixed, and may include: the primary platform sends an update package check request to the first server; the first server is receiving the update. When the package checks the request, the identification information of the platform to be updated is sent to the primary platform; if the primary platform determines the identification information to be updated to the child platform, the sub-platform is used as the target sub-platform, and Notifying the target sub-platform into the firmware update state; the target sub-platform entering the firmware update state backs up the corresponding existing firmware data packet to the preset buffer area of ​​the main platform; in the present After the firmware data package is complete, the primary platform downloads the firmware update packet of the target subline from the first server, and writes the firmware update packet into the target sub-platform to implement the target sub-platform. The firmware update of the platform.
[0050] That is, the main platform requests the first server to check if there is a new firmware update package, the firmware update package may be the firmware update package of the main platform, and it is possible to be a sub-platform firmware update package, these new firmware updates There are some identification information, which is known to know which platform of these firmware updates is the firmware update package. When the first server receives the update package inspection request sent by the main platform, check if there is a new firmware update package on the first server. If there is, send the identity information of the new firmware update package to the main platform. . If not, I will inform the main platform without a new firmware update package. If the primary platform can be determined that the new firmware update packet is present in a sub-platform, the sub-platform is used as the target sub-platform and enters the firmware update state by the target sublay. When the target sublay receives an instruction that enters the firmware update state, enter the firmware update state, and back up the existing firmware packets to the preset buffer of the main platform, implement the backup of existing data. When the existing firmware packet backup of the target sub-platform, the main platform will download the new firmware update package of the target sub-platform from the first server, and then write the downloaded firmware update package to the target sub-platform, implement the firmware renew.
[0051] When the sub-platform is used as the target sub-platform, the method may further include: the main platform controls all sub-platforms on the communication link between the primary platform and the target sub-platform. The activation mode and all sub-platforms other than the communication link are silent mode; corresponding, the method further includes: the primary platform controls the communication link outside of the communication link. All sub-platform exits the silent mode.
[0052] Only those on the link between the target sub-platform and the main platform are activation mode, and other sub-platforms outside the link are silent mode, and the sub-platform in silent mode is not pair even if the instruction is received even if the instruction is received. The command responds, so that the entire multi-level platform can simplify the various platforms on this link, which will not affect other sub-platforms, nor does it receive the impact of other sub-platforms, preventing the instructions from being sent to other children. Error update caused by platforms, improves update reliability and security. image 3 For a simplified communication link.
[0053] After the update of the target sub-platform, the sub-platform on other links can exit the silent mode, so that the activation mode can be normal, and the platform original work can be normal.
[0054] When implementation, the multi-level Jenkins continuous integrated platform is implemented, and it is also possible to include: if the primary platform determines the identification information to determine the to be updated as the main platform, the main platform is from The firmware update package of the primary platform in the first server is downloaded to the preset buffer area, and the main platform is restarted after the download is completed, and the updated program is run after the reboot.
[0055]When the main platform determines the platform that needs to be updated according to the identification information, the main platform can obtain the firmware update package of the main platform from the first server, download it to the preset buffer area, implement the writing of firmware update packages, then The primary platform can be restarted and the updated new program can be run after rebooting, thereby implementing updates to the main platform.
[0056] In the specific implementation, the firmware update packet is written to the target sub-platform to implement firmware updates to the target subline, which may include:
[0057] S1, after writing the firmware update packet into the target sub-platform, the target sub-platform attempts to run the update program, if the update program is successfully run, the target sub-platform to the main platform Send a notification of the update of the target subline.
[0058] That is, after the downloaded firmware update package is written to the target sub-platform, the target sub-platform will try to run the updated program. If it is capable of running, the writing of the firmware update package is successful, at which time the target sub-platform You can send a notification for updated success to the main platform.
[0059] In the specific implementation, if the main platform knows that the target sub-platform is updated, the existing firmware packet before the previous backup can be erased. That is, the method provided by the present invention may further include: If the main platform receives a notification of the target sub-platform update, the existing firmware packet in the preset buffer area is deleted. This avoids the use of excessive memory that uses excessive information to improve the operational efficiency of the entire multi-stage platform.
[0060] Of course, it is also possible to run failure, so it can include the following steps:
[0061] S2, if the update runs fails, the target sub-platform transmits a notification of the target sub-platform update to the primary platform;
[0062] S3, the main platform After receiving the notification of the target sub-platform update failed, if the current download number of the firmware update packet of the target sublay is less than the number of preset times, then downloads the first server again. Firmware Update Pack, write the firmware update package to the target sublay and return S1.
[0063] That is, when the updated program runs, the target subline sends a notification of update failure to the main platform. At this point, the main platform determines whether the current download number of the firmware update package reaches the number of defaults, if not reached the preset The number of times, then the main platform will download firmware update packages from the first server, re-write the firmware update package to the target sub-platform, re-attempt to run and determine if the run is successful, that is, returned to S1.
[0064] The above method can also include:
[0065] If the current download number of the firmware update package of the target sublay reaches the preset number, the main platform is written to the existing firmware data package of the target subline in the preset buffer area. The target sub-platform.
[0066] That is, if the main platform determines that the number of downloads of this firmware update package reaches the number of defaults, it will not continue to download, but will be written back to the target sub-platform backup existing firmware data in the preset buffer. In order to ensure the normal operation of the target sub-platform. That is, in the new program multiple times of successful running, the original program backed up in the main platform will be restored.
[0067] The second aspect provides a mobile terminal software test system based on group control technology, including:
[0068] The module is executed, and the test items used in the Jenkins Connection Integrated Platform are executed after being triggered by the trigger; where the execution module includes:
[0069] The list update unit is configured to execute S110. After obtaining the device ID of all mobile terminals of the Jenkins continuous integrated platform, the debug bridge tool is obtained, and the device ID is stored in the first terminal list and according to the second terminal list. The device ID is updated on the first terminal list; the second terminal list is used to store the device ID of the mobile terminal that has completed the software test;
[0070] The list determination unit is configured to perform S120. If it is determined whether the updated first terminal list is empty; S121, if the updated first terminal list is empty, end the test flow of the test system; S122, if updated first The terminal list is not empty, then transmits one of the device IDs in the updated first terminal list to the Airtest tool to run the test case on the mobile terminal corresponding to the device ID, and run in the test case After success, the device ID is stored in the second terminal list, and the first terminal list is cleared and the S110 is performed in the list update module; wherein the S110 and S120 are more Steps.
[0071] It will be appreciated that the system of the present invention, the explanation, examples, beneficial effects, and the like of the present invention may refer to the corresponding portion in the above method, and details are not described herein again.
[0072] The various embodiments in this specification are described in the process, and the same components are described with each other, and each of the embodiments are respectively illustrated. In particular, for device embodiments, since it is substantially similar to method embodiments, the relatively simple, relevant, referring to the partial description of the method embodiment.
[0073] Those skilled in the art will appreciate that in the above one or more examples, the functions described herein can be implemented with hardware, software, pendant, or any combination thereof. When implementing the software implementation, these functions can be stored in a computer readable medium or transmitted as one or more instructions or code on a computer readable medium.
[0074] In the specific embodiments described above, the objects, technical solutions, and beneficial effects of the present invention will be described in detail, and it is understood that only the above embodiments are intended to limit the invention. The scope of protection, any modification, equivalent replacement, improvement, etc. according to the technical solutions of the present invention, should be included within the scope of the invention.

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.

Similar technology patents

Heat insulation wall tile

InactiveCN104895273AEliminate pollutionImprove effective utilization
Owner:LIUZHOU YITING TRADE

Preparation method of liermian capsule

InactiveCN105456403AImprove effective utilizationOptimizing Process Parameters
Owner:CHENGDU JIUZHITANG JINDING PHARMA

Nodulizing agent for nodular cast iron and preparation method thereof

InactiveCN112501376AReduce burning lossImprove effective utilization
Owner:WUHU GUODING MACHINERY MFG

Classification and recommendation of technical efficacy words

  • Improve effective utilization

Meteorological data analyzing and processing method applied to power system

Owner:EMERGENCY MANAGEMENT CENT OF STATE GRID SHANDONG ELECTRIC POWER

Object multi-mode tracking method based on phased array system radar

ActiveCN106324591AImprove effective utilizationImprove tracking stability
Owner:THE 724TH RES INST OF CHINA SHIPBUILDING IND

Colloidal electrolyte and preparation method thereof

InactiveCN101877419AImprove effective utilizationGood physical and chemical properties
Owner:长兴诺力电源有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products