CN111767208B - Automatic test method and device - Google Patents

Automatic test method and device Download PDF

Info

Publication number
CN111767208B
CN111767208B CN202010487756.9A CN202010487756A CN111767208B CN 111767208 B CN111767208 B CN 111767208B CN 202010487756 A CN202010487756 A CN 202010487756A CN 111767208 B CN111767208 B CN 111767208B
Authority
CN
China
Prior art keywords
application program
test
testing
determining
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010487756.9A
Other languages
Chinese (zh)
Other versions
CN111767208A (en
Inventor
尹力
柳超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jindi Technology Co Ltd
Original Assignee
Beijing Jindi Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jindi Technology Co Ltd filed Critical Beijing Jindi Technology Co Ltd
Priority to CN202010487756.9A priority Critical patent/CN111767208B/en
Publication of CN111767208A publication Critical patent/CN111767208A/en
Application granted granted Critical
Publication of CN111767208B publication Critical patent/CN111767208B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management

Abstract

The application provides an automatic test method and a device, wherein the method comprises the following steps: receiving parameters for continuous integration, and reading configuration information of an application program according to the parameters; constructing an information file of the application program according to the read configuration information; determining a test task in the configuration information, determining test equipment based on the information file, and sending a test command for the test task to the test equipment; monitoring the testing process of the testing equipment through a preset mobile testing framework, and generating a testing report when the completion of the testing task is monitored; and determining a detection task in the configuration information according to the test report, executing the detection task, and analyzing and determining redundant resources in the application program. The application can effectively improve the test efficiency in the existing IOS development flow and reduce the development cost.

Description

Automatic test method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to an automatic test method and apparatus.
Background
Continuous integration (Continuous Integration, CI) is a software development practice, i.e. team development members often need to integrate their respective jobs, typically at least once a day for each member, meaning that multiple integration may occur per day. Each integration is verified by automated construction, including compilation, release, automated testing, so that integration errors are discovered as soon as possible. Continuous delivery (Continuous Delivery, CD) is a software engineering technique that allows the production process of a software product to be completed in a short period of time to ensure that the software can be stably and continuously maintained in a ready-to-release condition. Its goal is to make the construction, testing and release of software faster and more frequent. This approach may reduce the cost and time of software development, reducing risk.
In the development flow of the existing operating system, application packages are constructed, delivered and deployed manually, on one hand, after the work with long time and high intensity is performed, people easily produce fatigue, the sensitivity to error information such as digit numbers, text display and the like is reduced, and the interface depth of the product is very deep and contains a large amount of display information functions, so that the special test has high regression difficulty, memory leakage is easy to send, and more testing works such as robustness test, weak network test and the like are needed; the UI (User Interface Design, interface design) automatic test can only cover core business logic, and new functions cannot realize automatic test, when a new version of a product is released, the old and old functions are not completely returned due to larger service test amount, and the condition of missing test is easy to occur, so that the process of constructing, delivering and deploying an application package is time-consuming and labor-consuming, communication cost is increased, and an operating system is also enabled to be heavy and slow to develop, and the online accident rate is high.
Disclosure of Invention
The application aims to provide an automatic test method and device for solving the problems of low test efficiency and high development cost in the existing development flow of an operating system.
According to a first aspect of the present application, there is provided an automatic test method comprising:
receiving parameters for continuous integration, and reading configuration information of an application program according to the parameters;
constructing an information file of the application program according to the read configuration information;
determining a test task in the configuration information, determining test equipment based on the information file, and sending a test command for the test task to the test equipment;
monitoring the testing process of the testing equipment through a preset mobile testing framework, and generating a testing report when the completion of the testing task is monitored;
and determining a detection task in the configuration information according to the test report, executing the detection task, and analyzing and determining redundant resources in the application program.
Further, the method of the present application, before the step of receiving the parameter for continuous integration, comprises:
pre-configuring related tasks of the continuous integration and delivery application;
wherein, the related tasks of the continuous integration and delivery application program comprise at least one of engineering configuration tasks, regression testing tasks, user interface testing tasks, pressure testing tasks and code optimization detection tasks;
wherein the parameters of the persistent integration include at least one of an application version information parameter, a remote version control parameter, and a local version control parameter.
Further, according to the method of the present application, the constructing an information file of the application program according to the read configuration information includes:
determining address information and script address information of the application project engineering file according to the read configuration information;
and acquiring project engineering files and script files corresponding to the application program according to the address information and script address information of the project engineering files of the application program, and constructing information files of the application program.
Further, the method of the present application, after the step of constructing the information file of the application program, includes:
determining engineering configuration tasks of the application program according to the read configuration information;
and sending the constructed information file of the application program to a preset storage position through the engineering configuration task, and sending a construction completion notification message.
Further, according to the method of the present application, the test process of the test device is monitored by a predetermined mobile test frame, and when the completion of the test task is monitored, a test report is generated, including:
when receiving the construction completion notification message, monitoring the testing process of the testing equipment through a preset mobile testing framework;
transmitting a control command for testing the running of the application program to a server corresponding to a preset mobile test frame through a preset client library;
controlling and testing the custom operation of the application program based on the control command;
and generating a test report when the test task is monitored to be completed.
The analyzing and determining redundant resources in the application program includes:
determining a resource related code of the application program according to the acquired project engineering file and script file corresponding to the application program;
acquiring a white list of resource names, and searching each resource name to be detected, which is not matched with the white list information, in a resource related code of the application program according to the white list;
determining whether the names of the resources to be detected are redundant resources or not through a preset splicing rule;
wherein the resource-related code includes at least one of a version control code and an item library code.
Further, the method of the present application further includes, if it is determined that the resource name to be detected exists as a redundant resource:
and counting and determining each resource to be detected as the redundant resource, and sending a notification message of completion of counting the redundant resource.
According to a second aspect of the present application, there is provided an automatic test equipment comprising:
the receiving and reading module is used for receiving parameters for continuous integration and reading configuration information of an application program according to the parameters;
the construction module is used for constructing an information file of the application program according to the read configuration information;
the determining and sending module is used for determining a test task in the configuration information, determining test equipment based on the information file and sending a test command aiming at the test task to the test equipment;
the monitoring and generating module is used for monitoring the testing process of the testing equipment through a preset mobile testing framework, and generating a testing report when the completion of the testing task is monitored;
and the execution and analysis module is used for determining a detection task in the configuration information according to the test report, executing the detection task, and analyzing and determining redundant resources in the application program.
Further, the device of the present application includes:
the pre-configuration module is used for pre-configuring related tasks of the continuous integration and delivery application program;
wherein, the related tasks of the continuous integration and delivery application program comprise at least one of engineering configuration tasks, regression testing tasks, user interface testing tasks, pressure testing tasks and code optimization detection tasks;
wherein the parameters of the persistent integration include at least one of an application version information parameter, a remote version control parameter, and a local version control parameter.
Further, the device of the present application, the building module includes:
the first determining unit is used for determining address information and script address information of the application project engineering file according to the read configuration information;
and the acquisition unit is used for acquiring the project engineering file and the script file corresponding to the application program according to the address information and the script address information of the project engineering file of the application program, and constructing the information file of the application program.
Further, the device, the construction module of the present application includes:
the second determining unit is used for determining engineering configuration tasks of the application program according to the read configuration information;
and the first sending unit is used for sending the constructed information file of the application program to a preset storage position through the engineering configuration task and sending a construction completion notification message.
Further, the device of the present application, the monitoring and generating module, includes:
the monitoring unit is used for monitoring the testing process of the testing equipment through a preset mobile testing frame when receiving the construction completion notification message;
the second sending unit is used for sending a control command for testing the operation of the application program to a server corresponding to a preset mobile test frame through a preset client library;
the control unit is used for controlling and testing the custom operation of the application program based on the control command;
and the generating unit is used for generating a test report when the completion of the test task is monitored.
Further, the device of the present application, the execution and analysis module, includes:
a third determining unit, configured to determine a resource-related code of the application according to the acquired project engineering file and script file corresponding to the application;
the acquisition and search unit is used for acquiring a white list of the pre-configured resource names, and searching each resource name to be detected, which is not matched with the white list information, in the resource related code of the application program according to the white list;
a fourth determining unit, configured to determine, according to a predetermined splicing rule, whether each resource name to be detected is a redundant resource;
wherein the resource-related code includes at least one of a version control code and an item library code.
Further, the device of the present application, the fourth determining unit is further configured to
If the existence of the resource name to be detected as the redundant resource is determined, counting the resource to be detected which is determined as the redundant resource, and sending a notification message of completion of the counting of the redundant resource.
According to a third aspect of the present application there is provided a storage medium storing computer program instructions for execution in accordance with the method of the present application.
According to a fourth aspect of the present application there is provided a computing device comprising: a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the computing device to perform the method of the application.
By the automatic test method, the application package is automatically built in the development flow of the operating system, the function test and the engineering optimization detection can be automatically carried out, the custom test scheme is realized, the test efficiency and the development efficiency of the operating system are improved, and the development cost and the on-line accident rate are greatly reduced.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the accompanying drawings in which:
FIG. 1 is a schematic flow chart of a method according to an embodiment of the application;
FIG. 2 is a schematic diagram of an apparatus according to an embodiment of the present application;
FIG. 3 schematically illustrates a block diagram of an electronic device according to an exemplary embodiment of the present disclosure; and
fig. 4 schematically illustrates a schematic diagram of a computer-readable storage medium according to an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be embodied in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the disclosed aspects may be practiced without one or more of the specific details, or with other methods, components, materials, devices, steps, etc. In other instances, well-known structures, methods, devices, implementations, materials, or operations are not shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, or in one or more software-hardened modules, or in different networks and/or processor devices and/or microcontroller devices.
Fig. 1 is a flow chart of an automatic test method according to an embodiment of the application, as shown in fig. 1, the automatic test method according to an embodiment of the application includes:
step S101, receiving parameters for continuous integration, and reading configuration information of an application program according to the parameters.
Step S102, according to the read configuration information, constructing an information file of the application program.
Step S103, determining a test task in the configuration information, determining test equipment based on the information file, and sending a test command for the test task to the test equipment.
Step S104, monitoring the testing process of the testing equipment through a preset mobile testing framework, and generating a testing report when the testing task is monitored to be completed.
Step S105, determining a detection task in the configuration information according to the test report, executing the detection task, and analyzing and determining a redundant resource in the application program.
Wherein, prior to the step of receiving parameters for sustained integration, comprising: pre-configuring related tasks of the continuous integration and delivery application; specifically, the configuration can be performed by using a continuous integration tool, for example, a WEB visualization CI open source tool Jenkins is used, external triggering, timing construction, sequential task execution and other functions can be set, and the configuration flow can be divided into the following steps:
1) The Build Job of the Build application package is added through Jenkins, and the functions of engineering configuration, construction, uploading and the like are automatically realized by configuring a webhook function in a distributed version control system Git of a program for managing file versions, so that the Build Job is triggered when a code is submitted to a branch development. It should be noted that, as those skilled in the art can understand, webhooks is an API (Application Programming Interface, application program interface) concept, which is one of usage formats of the micro service API, and is also called as a reverse API, namely: the front end does not actively send the request and is pushed by the back end completely.
2) The automatic Test Job is added through Jenkins, and when the building Job Build Job is successful, the automatic Test Job is triggered, so that the regression Test of the old function can be automatically realized.
3) And adding Auto Test Job for automatic Test through Jenkins, triggering after the Build Job is successful, and realizing automatic App random operation pressure measurement.
4) And adding an automatic testing task Auto UI Test Job through Jenkins, triggering after the building task Build Job is successful, and testing the random operation UI of the automatic application program.
5) And (3) adding an automatic test App join Job through Jenkins, triggering after the Build Job is successful, and realizing automatic engineering resource and code optimization detection.
Related tasks of the continuous integration and delivery application program comprise engineering configuration tasks, regression testing tasks, user interface testing tasks, pressure testing tasks, code optimization detection tasks and the like; the parameters of the continuous integration include application version information parameters, remote version control parameters, local version control parameters, and the like.
In an exemplary embodiment of the present disclosure, taking an application to an IOS operating system as an example, constructing an information file of the application according to the read configuration information includes: determining address information and script address information of the project engineering file of the application program according to the read configuration information; if the parameters of continuous integration, such as the version of an application program, the version number of the application program, the information of a distributed version control system Git and the like, are transmitted through Jenkins, then, local configuration information is read, engineering configuration tasks of the application program are determined, project files and script files corresponding to the acquired application program are copied into a temporary construction folder according to address information and script address information of the project files of the application program, a main construction script is executed, a private pod library is processed, and engineering construction prepositive operations such as a Git code corresponding to configuration are pulled and extracted; and downloading an engineering certificate, setting engineering according to local configuration information, starting an information file of a built application program by using an xcodebuild tool, automatically uploading the generated information file of the application program such as IPA (iPhone Application, apple application program file format), dSYM (dSYM file refers to a target file with debugging information in an IOS platform) and the like to a preset storage position after the building is successful, and sending a notification message of the completion of the building to a developer. In a specific construction process, single script and multi-configuration packaging are realized through shell (a program written in C language, which is a bridge for users to use Linux). Multiple projects can be built at the same time, and after the completion, the application distribution platform is uploaded, and each resource of the computer is fully utilized to realize automatic construction.
It should be noted that, as those skilled in the art will appreciate, the CocoaPods is a very well-used class library management tool for IOS, and can very conveniently manage and update the third party library used in the project and deliver the public components in the project to it. Those skilled in the art will also appreciate that xcodebuild is a command line tool that can be used to compile, find, analyze, test, etc., various operations on Xcode engineering or workspaces.
In this embodiment, by moving the test framework in advance, monitoring a test process of the test device, and when it is monitored that the test task is completed, generating a test report includes: when receiving the construction completion notification message, monitoring the testing process of the testing equipment through a preset mobile testing framework; transmitting a control command for testing the operation of the application program to a server corresponding to a preset mobile testing framework through a preset client library; controlling the custom operation of the test application program based on the control command; and generating a test report when the test task is monitored to be completed. For example, in the process of implementing the automated regression Test in the present embodiment, the customized automated Test may be implemented by using a solution based on the Test Code of the Python Client in combination with WDA (a mobile terminal Test framework introduced by WebDriverAgent, facebook) and the iPhone Client. Specifically, the xcodebuild tool can be used to compile WebDriverAgent into a specified test device, and a Server is started on a computer to monitor. Then, the control command of the test application program is sent to the WDA Server by using the Python Client through the Http protocol, the WDA Server controls the iPhone mobile phone to realize the self-defining operation by using the XCUITest framework provided by the apple through the WDA Client application running on the device, the classical Server-Client machine, namely the Server-Client machine framework (C/S) is used, the Client side is used for sending a request requset, and the Server side returns a response. When the completion of the test task is monitored, a report of the test result is automatically generated, and a notification message of the completion of the test is sent to a developer.
Because the common app (a cross-platform tool is not used in the process of automated regression testing in this embodiment, it allows testers to write automated test scripts using the same set of APIs on different platforms, such as IOS and Android, and Macaca (which is a complete set of automated test solutions)) and other WDA transit services, mainly because Appium, macaca adds a compatible layer in the communication for implementing the general purpose of IOS and Android multiple platforms, which results in slower speed and even frequent communication failure.
In the process of automatic engineering detection in this embodiment, firstly, determining resource related codes of an application program according to project engineering files and script files corresponding to the obtained application program, for example, copying engineering files and script files of projects corresponding to the application program, obtaining set information such as a Git related code in a configuration file, processing pod and the like, searching information such as picture file names such as a. Png.jpg.jpeg.gif and the like in a non-white list according to a pre-configured white list file, searching and determining all picture names and all character strings in the application program project through the preliminary resource detection, then performing difference set calculation to analyze unused picture resources in the application program project, but the preliminary resource detection still has a certain error, because the situation that the format function Python format is used for splicing exists in the use process of the resource, splicing rules of application program projects are required to be unified, then the un-spliced part is used for searching, not only pictures which are not used really can be analyzed, specifically, all files such as h m mm swift xib storyboard strings c cpp html js json plist css and the like are searched through regular expression matching, all character strings are matched to obtain a resource character string array, then the picture names are traversed to judge whether each picture name exists in the resource character string array, if any picture name exists in the resource character string array, the picture is a useful resource, if not, whether the picture names exist for splicing is continuously judged, for example, the names of the picture names such as rispleC 1, rispleC 2 and the like end in numbers are judged by rispleC, then each resource which is a redundant resource is statistically determined, and sending a notification message of completion of the redundant resource statistics to the developer. Then, the developer can perform code detection according to the statistics result, specifically, based on the detection technology of the fault (Object file displaying tool, system library check on which the IOS application depends) and the macch-o (Mach Object, which is a file format for executable files, object codes, dynamic libraries and kernel dump), extract classlist section and classref section of the executable files through the fault command to form an address difference set of classist and classref, analyze and acquire class names in the difference set, and then detect redundant codes in engineering.
It should be noted that although the steps of the methods of the present disclosure are illustrated in the accompanying drawings in a particular order, this does not require or imply that the steps must be performed in that particular order or that all of the illustrated steps be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
As shown in fig. 2, an embodiment of the present application further provides an automatic testing apparatus, including:
a receiving and reading module 21, configured to receive parameters for continuous integration, and read configuration information of an application program according to the parameters;
a construction module 22, configured to construct an information file of the application program according to the read configuration information;
a determining and sending module 23, configured to determine a test task in the configuration information, determine a test device based on the information file, and send a test command for the test task to the test device;
a monitoring and generating module 24, configured to monitor a testing process of the testing device by using a predetermined mobile testing framework, and generate a testing report when the testing task is monitored to be completed;
and the execution and analysis module 25 is used for determining a detection task in the configuration information according to the test report, executing the detection task, and analyzing and determining redundant resources in the application program.
The apparatus in this embodiment may implement the method embodiment shown in fig. 1, and specific functional implementation is referred to the description in the method embodiment and is not repeated herein.
It should be noted that although several modules or units of the automatic test equipment 200 are mentioned in the detailed description above, this division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
In one embodiment of the application, there is also provided a storage medium storing computer program instructions for execution in accordance with the method of an embodiment of the application.
In one typical configuration of the application, the computing devices each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
In one embodiment of the present application, there is also provided a computing device including: a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the computing device to perform the method of embodiments of the application.
Computer-readable storage media include both non-transitory and non-transitory, removable and non-removable media, and information storage may be implemented by any method or technology. The information may be computer readable instructions, data structures, program devices, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computing device.
In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
Those skilled in the art will appreciate that the various aspects of the application may be implemented as a system, method, or program product. Accordingly, aspects of the application may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 300 according to such an embodiment of the application is described below with reference to fig. 3. The electronic device 300 shown in fig. 3 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present application.
As shown in fig. 3, the electronic device 300 is embodied in the form of a general purpose computing device. Components of electronic device 300 may include, but are not limited to: the at least one processing unit 310, the at least one memory unit 320, a bus 330 connecting the different system components (including the memory unit 320 and the processing unit 310), and a display unit 340.
Wherein the storage unit stores program code that is executable by the processing unit 310 such that the processing unit 310 performs steps according to various exemplary embodiments of the present application described in the above-mentioned "exemplary methods" section of the present specification. For example, the processing unit 310 may perform steps S110 to S140 as shown in fig. 1.
Storage unit 320 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 3201 and/or cache memory 3202, and may further include Read Only Memory (ROM) 3203.
The storage unit 320 may also include a program/utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 330 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 300 may also communicate with one or more external devices 370 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 300, and/or any device (e.g., router, modem, etc.) that enables the electronic device 300 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 350. Also, electronic device 300 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 360. As shown, the network adapter 360 communicates with other modules of the electronic device 300 over the bus 330. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 300, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the various aspects of the application may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the application as described in the "exemplary methods" section of this specification, when said program product is run on the terminal device.
Referring to fig. 4, a program product 400 for implementing the above-described method according to an embodiment of the present application is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Furthermore, the above-described drawings are only schematic illustrations of processes included in the method according to the exemplary embodiment of the present application, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
It should be noted that the present application may be implemented in software and/or a combination of software and hardware, e.g., using Application Specific Integrated Circuits (ASIC), a general purpose computer or any other similar hardware device. In some embodiments, the software program of the present application may be executed by a processor to implement the above steps or functions. Likewise, the software programs of the present application (including associated data structures) may be stored on a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. In addition, some steps or functions of the present application may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
It will be evident to those skilled in the art that the application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the apparatus claims can also be implemented by means of one unit or means in software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.

Claims (8)

1. An automatic test method, comprising:
receiving parameters for continuous integration, and reading configuration information of an application program according to the parameters;
according to the read configuration information, constructing an information file of the application program, including:
determining address information and script address information of the application project engineering file according to the read configuration information;
acquiring project engineering files and script files corresponding to the application program according to the address information and script address information of the project engineering files of the application program, and constructing information files of the application program;
determining a test task in the configuration information, determining test equipment based on the information file, and sending a test command for the test task to the test equipment;
monitoring the testing process of the testing equipment through a preset mobile testing framework, and generating a testing report when the completion of the testing task is monitored;
determining a detection task in the configuration information according to the test report, executing the detection task, analyzing and determining redundant resources in the application program, wherein the analyzing and determining the redundant resources in the application program comprises the following steps:
determining a resource related code of the application program according to the acquired project engineering file and script file corresponding to the application program;
acquiring a white list of pre-configured resource names, and searching each resource name to be detected, which is not matched with the white list information, in a resource related code of the application program according to the white list;
determining whether the names of the resources to be detected are redundant resources or not through a preset splicing rule;
wherein the resource-related code includes at least one of a version control code and an item library code.
2. The method of claim 1, comprising, prior to the step of receiving parameters for sustained integration:
pre-configuring related tasks of the continuous integration and delivery application;
wherein, the related tasks of the continuous integration and delivery application program comprise at least one of engineering configuration tasks, regression testing tasks, user interface testing tasks, pressure testing tasks and code optimization detection tasks;
wherein the parameters of the persistent integration include at least one of an application version information parameter, a remote version control parameter, and a local version control parameter.
3. The method according to claim 2, characterized in that after the step of building the information file of the application program, it comprises:
determining engineering configuration tasks of the application program according to the read configuration information;
and sending the constructed information file of the application program to a preset storage position through the engineering configuration task, and sending a construction completion notification message.
4. A method according to claim 3, wherein said listening to the test process of the test device by a predetermined movement of the test frame, when it is detected that the test task is completed, generating a test report comprises:
when receiving the construction completion notification message, monitoring the testing process of the testing equipment through a preset mobile testing framework;
transmitting a control command for testing the running of the application program to a server corresponding to a preset mobile test frame through a preset client library;
controlling and testing the custom operation of the application program based on the control command;
and generating a test report when the test task is monitored to be completed.
5. The method of claim 4, wherein if it is determined that the resource name to be detected exists as a redundant resource, further comprising:
and counting and determining each resource to be detected as the redundant resource, and sending a notification message of completion of counting the redundant resource.
6. An automatic test equipment, comprising:
the receiving and reading module is used for receiving parameters for continuous integration and reading configuration information of an application program according to the parameters;
the construction module is used for constructing an information file of the application program according to the read configuration information, and comprises the following steps:
determining address information and script address information of the application project engineering file according to the read configuration information;
acquiring project engineering files and script files corresponding to the application program according to the address information and script address information of the project engineering files of the application program, and constructing information files of the application program;
the determining and sending module is used for determining a test task in the configuration information, determining test equipment based on the information file and sending a test command aiming at the test task to the test equipment;
the monitoring and generating module is used for monitoring the testing process of the testing equipment through a preset mobile testing framework, and generating a testing report when the completion of the testing task is monitored;
the execution and analysis module is used for determining a detection task in the configuration information according to the test report, executing the detection task, and analyzing and determining redundant resources in the application program, wherein the analysis and determination of the redundant resources in the application program comprises the following steps:
determining a resource related code of the application program according to the acquired project engineering file and script file corresponding to the application program;
acquiring a white list of pre-configured resource names, and searching each resource name to be detected, which is not matched with the white list information, in a resource related code of the application program according to the white list;
determining whether the names of the resources to be detected are redundant resources or not through a preset splicing rule;
wherein the resource-related code includes at least one of a version control code and an item library code.
7. A computer readable storage medium, characterized in that the storage medium stores computer program instructions, which are executed according to the method of any one of claims 1 to 5.
8. A computing device, comprising: a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the computing device to perform the method of any of claims 1 to 5.
CN202010487756.9A 2020-06-02 2020-06-02 Automatic test method and device Active CN111767208B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010487756.9A CN111767208B (en) 2020-06-02 2020-06-02 Automatic test method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010487756.9A CN111767208B (en) 2020-06-02 2020-06-02 Automatic test method and device

Publications (2)

Publication Number Publication Date
CN111767208A CN111767208A (en) 2020-10-13
CN111767208B true CN111767208B (en) 2023-09-19

Family

ID=72719850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010487756.9A Active CN111767208B (en) 2020-06-02 2020-06-02 Automatic test method and device

Country Status (1)

Country Link
CN (1) CN111767208B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112463618A (en) * 2020-12-04 2021-03-09 斑马网络技术有限公司 Automated testing method, device, medium and equipment
CN113111000B (en) * 2021-04-28 2023-05-12 北京中祥英科技有限公司 Continuous integrated automatic test system and method, electronic equipment and storage medium
CN113127374B (en) * 2021-05-19 2022-05-17 支付宝(杭州)信息技术有限公司 Application program testing method and device applied to iOS equipment
CN113485918A (en) * 2021-06-30 2021-10-08 中国民航信息网络股份有限公司 Test method, test device, electronic equipment and storage medium
CN117155485A (en) * 2023-10-23 2023-12-01 东莞信宝电子产品检测有限公司 Classical Bluetooth automatic test method, system and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107632829A (en) * 2017-08-03 2018-01-26 大唐网络有限公司 A kind of App automation continuous integration systems and method based under iOS system
CN107729243A (en) * 2017-10-12 2018-02-23 上海携程金融信息服务有限公司 API automated testing method, system, equipment and storage medium
CN109542769A (en) * 2018-10-25 2019-03-29 武汉精立电子技术有限公司 A kind of automated testing method of continuous integrating
CN110096425A (en) * 2018-12-10 2019-08-06 厦门市美亚柏科信息股份有限公司 A kind of automated testing method based on QT development mode, device and storage medium
WO2019177998A1 (en) * 2018-03-12 2019-09-19 Headspin, Inc. System to determine performance based on entropy values
CN110795078A (en) * 2019-09-28 2020-02-14 同程网络科技股份有限公司 APP engineering operation system architecture method based on IOS system
CN110851135A (en) * 2019-09-12 2020-02-28 中国平安财产保险股份有限公司 Automatic application program building and uploading method and device, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107632829A (en) * 2017-08-03 2018-01-26 大唐网络有限公司 A kind of App automation continuous integration systems and method based under iOS system
CN107729243A (en) * 2017-10-12 2018-02-23 上海携程金融信息服务有限公司 API automated testing method, system, equipment and storage medium
WO2019177998A1 (en) * 2018-03-12 2019-09-19 Headspin, Inc. System to determine performance based on entropy values
CN109542769A (en) * 2018-10-25 2019-03-29 武汉精立电子技术有限公司 A kind of automated testing method of continuous integrating
CN110096425A (en) * 2018-12-10 2019-08-06 厦门市美亚柏科信息股份有限公司 A kind of automated testing method based on QT development mode, device and storage medium
CN110851135A (en) * 2019-09-12 2020-02-28 中国平安财产保险股份有限公司 Automatic application program building and uploading method and device, computer equipment and storage medium
CN110795078A (en) * 2019-09-28 2020-02-14 同程网络科技股份有限公司 APP engineering operation system architecture method based on IOS system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Kirshan Kumar Luhana等.Streamlining mobile app deployment with Jenkins and Fastlane in the case of Catrobat's pocket code.《2018 IEEE International Conference on Innovative Research and Development (ICIRD)》.2018,1-6. *
基于Jenkins的WPS for iOS的自动构建服务器的设计;穆荣;《科技与创新》;117-118 *

Also Published As

Publication number Publication date
CN111767208A (en) 2020-10-13

Similar Documents

Publication Publication Date Title
CN111767208B (en) Automatic test method and device
US10841185B2 (en) Platform-integrated IDE
US9846638B2 (en) Exposing method related data calls during testing in an event driven, multichannel architecture
US10824404B2 (en) Methods and systems for uploading a program based on a target network platform
CN108196915B (en) Code processing method and device based on application container engine and storage medium
US10698797B2 (en) Mobile application program testing method, server, terminal, and storage medium
US9268672B1 (en) Automated test case generation for applications
US9280445B2 (en) Logging code generation and distribution
US20150128106A1 (en) Software Builder
US20210311859A1 (en) Orchestration for automated performance testing
US9411711B2 (en) Adopting an existing automation script to a new framework
US10216617B2 (en) Automatically complete a specific software task using hidden tags
CN112527382B (en) Method for deploying pipeline engine system, and method and device for continuous integration
US20200341752A1 (en) Electronic apparatus and method for controlling thereof
US20200050534A1 (en) System error detection
US20220283801A1 (en) Pipeline release validation
US20180275957A1 (en) Assistive technology for code generation using voice and virtual reality
CN111767209A (en) Code testing method, device, storage medium and terminal
CN114661594A (en) Method, apparatus, medium, and program product for automated testing
CN110443034B (en) Risk program file identification method and device, computing equipment and medium
CN111435328B (en) Application testing method and device, electronic equipment and readable storage medium
US20160275002A1 (en) Image capture in application lifecycle management for documentation and support
CN113933627A (en) Method for automatically testing and verifying electronic product and related product
CN115495049A (en) Method and device for constructing project development space required by iOS application
KR20230119548A (en) Method and system for managing source code

Legal Events

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