CN116501625A - Application interface testing method and device, testing terminal, server and storage medium - Google Patents

Application interface testing method and device, testing terminal, server and storage medium Download PDF

Info

Publication number
CN116501625A
CN116501625A CN202310394885.7A CN202310394885A CN116501625A CN 116501625 A CN116501625 A CN 116501625A CN 202310394885 A CN202310394885 A CN 202310394885A CN 116501625 A CN116501625 A CN 116501625A
Authority
CN
China
Prior art keywords
test
page
current application
log information
screenshot
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.)
Pending
Application number
CN202310394885.7A
Other languages
Chinese (zh)
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.)
Chongqing Changan Automobile Co Ltd
Original Assignee
Chongqing Changan Automobile 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 Chongqing Changan Automobile Co Ltd filed Critical Chongqing Changan Automobile Co Ltd
Priority to CN202310394885.7A priority Critical patent/CN116501625A/en
Publication of CN116501625A publication Critical patent/CN116501625A/en
Pending legal-status Critical Current

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
    • G06F11/3676Test management for coverage analysis
    • 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
    • G06F11/368Test management for test version control, e.g. updating test cases to a new software version
    • 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
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • 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
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to the technical field of vehicle-mounted central control screens, in particular to an application interface testing method, an application interface testing device, a testing terminal, a server and a storage medium, wherein the method is applied to the testing terminal, and the method comprises the following steps: acquiring a page screenshot, sequentially traversing each operable element on the page screenshot, marking the page screenshot after the operable element is clicked through a preset identification, acquiring log information when clicking, forming a complete operation path through a server by utilizing clicking operations corresponding to all page shots in series through the preset identification, generating a test result of a current application page based on the operation path and/or the log information, judging that the current application page is qualified in test if the test result meets preset conditions, and otherwise judging that the current application page is unqualified in test. Therefore, the problems of difficult script writing, high cost, low coverage of the traversed interface, poor testing effect, poor user experience and the like of interface testing in the related technology are solved.

Description

Application interface testing method and device, testing terminal, server and storage medium
Technical Field
The application relates to the technical field of vehicle-mounted central control screens, in particular to an application interface testing method, an application interface testing device, a testing terminal, a server and a storage medium.
Background
Along with the rapid development of automobile technology, the test tasks of automobile research and development projects are gradually increased, but for the test of application interfaces, a great deal of time and labor cost are required to be input, so that the innovative development of automobile technology is seriously hindered, and the current situation is in need of being solved. The related technology is as follows:
(1) A UI (User Interface) automatic test method and system, test cases and test codes are stored in different files respectively, and the test cases drive the running of the test codes, and the test codes call an API (Application Programming Interface ) provided by a picture positioning tool to perform control positioning in the running process; but require a lot of personnel, time, and effort to write the UI automation script.
(2) The UI random test method and the UI random test device can realize effective random selection of operation objects, enable all elements to be identical in the same page position, have nothing to do with the screen proportion of the elements, have nothing to do with the layout in the center or the edge, have equal triggered opportunities, and realize the true random test; however, since the page elements are clicked randomly, the possibility that the elements cannot be clicked exists, the click coverage is low, and the test effect is affected.
Disclosure of Invention
The application interface testing method, device, testing terminal, server and storage medium are provided to solve the problems of difficult script writing, high cost, low coverage of traversing interfaces, poor testing effect, poor user experience and the like of interface testing in related technologies.
An embodiment of a first aspect of the present application provides an application interface testing method, which is applied to a testing terminal, wherein the method includes the following steps: acquiring a screenshot of a current application page on the test terminal; selecting all the operable elements on the page screenshot in a frame mode, traversing each operable element in sequence, marking the page screenshot after the operable elements are clicked through a preset identification, and acquiring log information when clicking; and uploading all marked page shots and the log information to a server after traversing is finished, wherein the server forms a complete operation path by utilizing clicking operations corresponding to all page shots in series with the preset identification, and generates a test result of the current application page based on the operation path and/or the log information, if the test result meets preset conditions, the current application page is judged to be qualified, otherwise, the current application page is judged to be unqualified.
According to the technical means, the embodiment of the application can effectively improve the coverage of the page test, reduce the omission of the test problem, greatly improve the test effect, simultaneously the page screenshot can effectively present the click effect and service logic of the page, facilitate the user to observe the positioning problem, improve the experience of the user, then generate the operation path based on the preset mark, generate the test result based on one or more of the operation path and the log information, further judge whether the page test is qualified, save the manual click operation path, greatly improve the test efficiency and reduce the test cost.
Optionally, in an embodiment of the present application, the preset identifier of the mark after each operable element is clicked is different, and the preset identifiers are sequentially added to the screenshot according to a preset sequence.
Optionally, in one embodiment of the present application, the traversing each operable element in turn includes: each operable element is traversed in turn using any of breadth-first traversal, depth-first traversal, and custom-starting page traversal.
According to the technical means, the method and the device can traverse the operation elements by using one or more traversal modes of breadth-first, depth-first and custom initial pages, so that the coverage of page testing can be effectively improved, and the testing effect is improved.
Optionally, in one embodiment of the present application, the log information includes one or more of screenshot pages, actionable elements, activities, package names, and times for each traversal.
An embodiment of a second aspect of the present application provides an application interface testing method, where the method is applied to a server, and the method includes the following steps: acquiring a screenshot and log information of a page with a preset mark, which are uploaded by a test terminal after traversing; utilizing the preset identification to connect clicking operations corresponding to all page screenshots in series to form a complete operation path, and generating a test result of the current application page based on the operation path and/or the log information; and if the test result meets the preset condition, judging that the current application page is qualified in test, otherwise, judging that the current application page is unqualified in test.
According to the technical means, the embodiment of the application can form the complete operation path based on the preset identification through the server, generate the test result of the current application page based on one or more of the operation path and the log information, judge the qualification of the result, save the manual clicking operation path, greatly improve the test efficiency and reduce the test cost.
An embodiment of a third aspect of the present application provides an application interface testing device, where the device is applied to a testing terminal, where the device includes: the first acquisition module is used for acquiring a screenshot of a current application page on the test terminal; the preparation module is used for selecting all the operable elements on the page screenshot in a frame mode, traversing each operable element in sequence, marking the page screenshot after the operable elements are clicked through a preset identification, and acquiring log information when clicking; and the test module is used for uploading all marked page shots and the log information to the server after traversing is finished, wherein the server forms a complete operation path by utilizing the click operation corresponding to all page shots connected in series by the preset identification, and generates a test result of the current application page based on the operation path and/or the log information, if the test result meets the preset condition, the current application page is judged to be qualified in test, otherwise, the current application page is judged to be unqualified in test.
Optionally, in one embodiment of the present application, the preparation module is further configured to: each operable element is traversed in turn using any of breadth-first traversal, depth-first traversal, and custom-starting page traversal.
An embodiment of a fourth aspect of the present application provides an application interface testing apparatus, where the apparatus is applied to a server, where the apparatus includes: the second acquisition module is used for acquiring the screenshot and log information of the page with the preset mark, which are uploaded by the test terminal after the traversal is finished; the generating module is used for forming a complete operation path by utilizing clicking operations corresponding to all page screenshots in series with the preset identification, and generating a test result of the current application page based on the operation path and/or the log information; and the judging module is used for judging whether the current application page test is qualified if the test result meets the preset condition, or not judging whether the current application page test is unqualified.
An embodiment of a fifth aspect of the present application provides a test terminal, where a test program is installed on the test terminal, and the application interface test method described in the foregoing embodiment is executed by using the test program.
An embodiment of a sixth aspect of the present application provides a server, including: the front end is used for creating a test task according to a test request of the equipment to be tested, installing a test program to a test terminal according to the test request so as to perform functional test on one or more application interfaces in the test terminal and displaying a test result; the rear end is used for acquiring the webpage screenshot and log information with the preset mark, which are uploaded by the test terminal after the traversal is finished; utilizing the preset identification to connect clicking operations corresponding to all page screenshots in series to form a complete operation path, and generating a test result of the current application page based on the operation path and/or the log information; and if the test result meets the preset condition, judging that the current application page is qualified in test, otherwise, judging that the current application page is unqualified in test.
An embodiment of a seventh aspect of the present application provides a computer-readable storage medium having stored thereon a computer program that is executed by a processor for implementing the application interface testing method as described in the above embodiment.
Therefore, the application has at least the following beneficial effects:
1. according to the method and the device, each operable element in the page screenshot can be traversed in sequence, the preset identification is utilized to mark and acquire log information, the coverage of the page test can be effectively improved, omission of test problems is reduced, the test effect is greatly improved, meanwhile, the page screenshot can effectively show the clicking effect and business logic of the page, the user can observe and position the problems conveniently, experience of the user is improved, then an operation path is generated based on the preset identification, the test result is generated based on one or more of the operation path and the log information, whether the page test is qualified or not is further judged, the manual clicking operation path is saved, the test efficiency is greatly improved, and the test cost is reduced.
2. According to the embodiment of the application, the operation elements can be traversed by using one or more traversal modes in the breadth-first, depth-first and custom initial pages, so that the coverage of page testing can be effectively improved, and the testing effect is improved.
3. According to the embodiment of the application page testing method and device, the complete operation path can be formed through the server based on the preset identification, the testing result of the current application page is generated based on one or more of the operation path and the log information, the qualification of the result is judged, the manual clicking operation path is saved, the testing efficiency is greatly improved, and the testing cost is reduced.
Additional aspects and advantages of the application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
fig. 1 is a flowchart of an application interface testing method based on a test terminal according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for testing a server-based application interface according to an embodiment of the present application;
FIG. 3 is a flowchart of an automatic traversal test of an in-vehicle center control screen application interface according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a depth-first traversal algorithm provided according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a get element and click logic provided in accordance with an embodiment of the present application;
FIG. 6 is a flowchart of the overall operation of the self-lapping application provided in accordance with an embodiment of the present application;
FIG. 7 is a schematic diagram of a development automatic traversal platform provided according to an embodiment of the present application;
FIG. 8 is a diagram of an overall flow architecture for a back end portion of a development automatic traversal platform according to an embodiment of the present application;
FIG. 9 is a schematic diagram of a central control screen for selecting a desired test according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a task list module provided according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a task detail module provided according to an embodiment of the present application;
FIG. 12 is a schematic diagram of a screenshot preview module provided according to an embodiment of the present application;
fig. 13 is an example diagram of an application interface testing device based on a test terminal according to an embodiment of the present application;
fig. 14 is an exemplary diagram of a server-based application interface testing apparatus according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and intended for the purpose of explaining the present application and are not to be construed as limiting the present application.
The following describes an application interface testing method, an application interface testing device, a server and a storage medium according to the embodiments of the present application with reference to the accompanying drawings. Aiming at the problems in the background art, the application provides an application interface testing method by combining a self-grinding App, a rear end and a front end of a testing platform, in the method, automatic traversal testing can be carried out on all application interfaces, ordered traversal is carried out according to simulation of a depth-first traversal algorithm, all applications are automatically traversed, clear App context operation screenshot is provided for testers, wherein a white list and a black list mode is supported when traversing an App of a whole vehicle, an App to-be-tested list (package name) is needed to be set, and appping can test Apps except the black list, and only Apps of the to-be-tested list set in the white list are tested in the white list mode, the effect of App interface element before clicking and after clicking and whether the page presents and business logic are correct can be easily seen through continuous multiple screenshots, and the problem of positioning is convenient to observe, wherein the process does not need to manually click, but the self-grinding App clicks, and the automatic screenshots are reported to a test platform, and then the test effect is checked on the platform manually, so that various operation paths of various Apps are saved from manually clicking, the test efficiency is greatly improved, the test cost is reduced, the income is increased, in addition, the test time can be set through an automatic service, an automatic test task is started at regular time, in-process test data are reported to the test platform, the test result is automatically analyzed, and the income of the test is displayed, such as: crashing, no response, black screen and the like.
Specifically, fig. 1 is a flow chart of an application interface testing method provided in an embodiment of the present application, where the method is applied to a test terminal.
As shown in fig. 1, the application interface testing method includes the following steps:
in step S101, a screenshot of a current application page on the test terminal is obtained.
In this embodiment of the present application, a plurality of methods for obtaining a screenshot of a page, for example, a screenshot is performed by a takescreenhold method of UiAutomation, which is not limited specifically.
In step S102, all the operable elements on the page screenshot are selected in a frame manner, each operable element is traversed in turn, the page screenshot after the operable element is clicked is marked by a preset identification, and log information during clicking is obtained.
The preset identifiers of the marks after each operable element is clicked are different, and the preset identifiers are sequentially added to the page screenshot according to a preset sequence, wherein the preset identifiers can be set according to actual conditions and are not particularly limited.
The log information comprises one or more of screenshot pages, operable elements, activities, package names and time of each traversal.
It can be appreciated that in the embodiment of the application, by traversing each operable element in the page screenshot in sequence and marking and acquiring log information by using the preset identifier, the coverage of the page test can be effectively improved, the omission of the test problem is reduced, the test effect is greatly improved, meanwhile, the clicking effect and business logic of the page can be effectively presented by the page screenshot, the user can observe the positioning problem conveniently, and the experience of the user is improved.
Further, traversing obtains exception logs such as crash, anr and the like through a dumpsys dropbox, and stores the exception logs in a local log file for researching and developing positioning bug, wherein the log file also records information such as page, element, activity, package name, time and the like of each traversal.
Optionally, in one embodiment of the present application, traversing each operable element in turn includes: each operable element is traversed in turn using any of breadth-first traversal, depth-first traversal, and custom-starting page traversal.
It can be appreciated that, in the embodiment of the present application, one or more traversal manners of breadth-first, depth-first and custom initial pages may be used to traverse the operation elements, so that coverage of page testing may be effectively improved, and testing effect may be improved.
Specifically, in the embodiment of the application, the vehicle-mounted central control screen UI traversal is performed through appwalk, three traversal modes are supported, namely breadth-first traversal, depth-first traversal and user-defined initial page traversal, wherein before the traversal starts, the page is firstly subjected to screenshot, red lines are displayed on the screenshot to respectively frame and select each operable element, the number of the mark in the frame is 1 to N, and then after the traversal starts, each time the element is clicked, the element is selected by a scribing frame again, and the element is informed of being just operated, so that the screen capturing mark numbers are connected in series to form a complete operation path, and the service logic relation of the page context can be easily checked.
In step S103, after the traversing is finished, uploading all marked page shots and log information to a server, wherein the server uses a preset identifier to connect clicking operations corresponding to all page shots in series to form a complete operation path, generates a test result of the current application page based on the operation path and/or the log information, and if the test result meets a preset condition, determines that the current application page is qualified, otherwise, determines that the current application page is unqualified.
The preset conditions may be set according to the test conditions, such as breakdown, no response, black screen, etc., and when the above test result appears, it may be determined that the test result is not qualified, which is not limited specifically.
It can be understood that the embodiment of the application can generate the operation path based on the preset identification, and generate the test result based on one or more of the operation path and the log information, so as to judge whether the page test is qualified, save the manual clicking operation path, greatly improve the test efficiency and reduce the test cost.
Further, in the embodiment of the application, after the traversal test is finished, all the screenshots and log files are reported to the test platform, the screenshots in the process of testing the App are displayed through thumbnail image display, and after the single screenshots are unfolded, the marks, the element boxes and the digital identifications are displayed, wherein the picture detail page further comprises the information of the last sheet, the next sheet, the return, the enlargement, the reduction and the like.
According to the application interface testing method provided by the embodiment of the application interface testing method, the coverage of the page test can be effectively improved, the omission of the testing problem is reduced, the testing effect is greatly improved, meanwhile, the page screenshot can effectively present the clicking effect and business logic of the page, the user can observe the positioning problem conveniently, the experience of the user is improved, then the operation path is generated based on the preset identification, the testing result is generated based on one or more of the operation path and the log information, whether the page test is qualified is further judged, the manual clicking operation path is saved, the testing efficiency is greatly improved, and the testing cost is reduced.
Based on the above embodiments, the embodiments of the present application further provide an application interface testing method, where the above embodiments are applied to a testing terminal, the present embodiment is applied to a server, and the present embodiment and the previous embodiment each have emphasis on the description content, and the embodiments may refer to each other for the inexhaustible steps.
As shown in fig. 2, the application interface testing method includes the following steps:
in step S201, a screenshot and log information with a preset identifier, which are uploaded by the test terminal after the traversal is completed, are obtained.
It can be understood that the embodiment of the application can connect the test terminal and the server through the data line, install the self-grinding App, and call the UiDevice and the UiSelector through the App so as to acquire the screenshot and the log information.
In step S202, clicking operations corresponding to all the page shots are connected in series by using the preset identifier to form a complete operation path, and a test result of the current application page is generated based on the operation path and/or log information.
It can be understood that the embodiment of the application can form a complete operation path based on the preset identification through the server, and generate the test result of the current application page based on one or more of the operation path and the log information, so that the manual clicking operation path is saved, the test efficiency is greatly improved, and the test cost is reduced.
In step S203, if the test result meets the preset condition, the current application page test is determined to be qualified, otherwise, the current application page test is determined to be unqualified.
It can be appreciated that the embodiment of the application may compare the test result with the preset condition, so as to determine the qualification thereof.
According to the application interface testing method provided by the embodiment of the application interface testing method, the complete operation path can be formed through the server based on the preset identification, the testing result of the current application page is generated based on one or more of the operation path and the log information, the qualification of the result is judged, the manual clicking operation path is saved, the testing efficiency is greatly improved, and the testing cost is reduced.
The application interface testing method provided by the application is further described through another embodiment, as shown in fig. 2, and the embodiment of the application is mainly used for automatic traversal testing of the vehicle-mounted central control screen application interface, and the method is implemented by using a self-grinding App, a front end, a rear end and a database combination mode, sequentially traversing and capturing images through the App, and reporting the images to a testing platform for storage and display, and comprises the following steps:
firstly, developing a self-grinding App based on an Android system, and simulating a user to click an application interface by using a depth-first traversal algorithm, wherein the depth-first traversal algorithm (Depth First Search, DFS for short) is a classical graph theory algorithm, and starts searching by triggering from a certain node s, continuously searches until all sides of the node are traversed, and after all sides of the node s are traversed, the depth-first traversal algorithm needs to trace back to a precursor node of the node s so as to continuously search other sides of the precursor node.
As shown in fig. 4, for obtaining elements and click logic, in the Main method of the self-grinding App, obtaining current page control elements through UiDevice and UiSelector under the uiAutomation tool package provided by Android, and operating the first element of the current page to click gradually and downwards according to the depth priority traversal sequence, until all interface controls of the path are clicked, and recursively traversing control elements of other nodes, wherein the current traversal is performed to a certain control element while clicking operation, namely a widget. Click method (a method provided by an Android system), then jumping to a next interface, after clicking each time, the self-grinding App can store a screenshot through a takebrowser method of UiAutomation in a vehicle, and then can be uploaded to a test platform for storage and display, and in the test process, the monitoring of crash and an er is realized through a dumps aperture, wherein the whole working flow of the App is as shown in the following specific flowchart 5:
(1) And connecting the tested vehicle-mounted central control screen to the server through a data line.
(2) And installing the self-developed application AppWalking on the vehicle-mounted central control screen through the server.
(3) And executing an adb shell command, and triggering the appwalk installed in the last step to execute a precompiled command.
(4) The actigram of the Framework layer of the Android system calls an Instrumentation instrument to start a self-grinding application AppWalking.
(5) Appwalking calls the UiDevice and the UiSelector, obtains the on-board center control screen interface element control, and uses a depth-first traversal algorithm to perform UI clicking.
(6) When clicking the control element, a takeScreenShot method is called to carry out screenshot, and whether the on-vehicle central control screen application is abnormal or not is monitored in real time.
(7) And reporting the screenshot, the captured abnormal information, the test report, the test process record and the like to a test platform.
Next, as shown in fig. 6, the development of the back end part of the automatic traversing platform in fig. 6 includes creating a library table in advance by using Mysql tool for storing picture information, crash, ANR (Application Not Responding, application no response), log, test report, where the back end develops several services by using Python in combination with a flash frame for receiving test data transmitted from grinding application appwalk, and stores the test data in a corresponding database table according to a module, where the back end program further integrates Jenkins for remotely starting self-grinding application appwalk to perform any of UI automatic traversing, and after the service end development is completed, the service end is deployed on a linux server with Python environment, where, as shown in fig. 7, fig. 7 is a whole flow architecture, and the specific flow is as follows:
(1) The backend program is packaged and deployed on a server, such as a linux server of the Beijing test laboratory.
(2) Device servers (systems, windows, both available) with a python environment are prepared in two places, such as Beijing and Chongqing.
(3) The device management program is deployed on the device server, and is used for collecting and reporting the device information.
(4) And respectively inserting the vehicle-mounted central control screen to be tested on the equipment server node, wherein the aim of the step is to report the information of the central control screen.
(5) As shown in fig. 8, a central control screen to be tested is selected at the test platform end.
(6) Clicking an execution button, creating a task at the moment, triggering a central control screen of a remote equipment node, and executing a test task of UI automatic traversal.
(7) And the vehicle-mounted central control screen starts to execute the UI automatic traversing task.
(8) And reporting the abnormality, report and screenshot generated in the test process to a back-end platform, and respectively storing the abnormality, report and screenshot in a corresponding database table through logic analysis.
As shown in fig. 6, the front end part of the automatic traversing platform in fig. 6 is mainly used for creating a test task and displaying a test process and a test result, wherein technologies used in development include vue.js, elements, node.js and axios, webpack, and meanwhile, the front end adopts axios to asynchronously send post and get requests to the back end of the platform, and the front end content mainly comprises: test task creation, task list, task details, screenshot previews, etc.
As shown in fig. 8, the task creation module content includes: selecting a different city, selecting a device server node, displaying a list on a vehicle-mounted central control screen, a list of tested applications and an execution button.
Wherein, as shown in fig. 9, the task list module contents include: task id, device server IP (Internet Protocol Address ), device IP, project name, task status, start time, end time, run time, view test results, and view test log.
As shown in fig. 10, the task detail module includes: word task id, test application name, application version number, exception information summary, execution status, start time, end time, run duration, view test results, and view test log.
As shown in fig. 11, the content of the screenshot preview module includes: picture creation time, picture content presentation, current picture index, zoom in, zoom out, download, full screen, and close.
In summary, in the UI automation test process of the on-vehicle central control screen interface application, by combining the self-grinding application appwalk with the front end and the rear end of the test platform, the time for a tester to write an automation case script can be saved, the time for maintaining the previous version script case due to version upgrade maintenance is saved from the root, the UI test is traversed according to the depth priority order, the screenshot in the test report is saved according to the context order, the difficulty of test verification is reduced, the labor cost is saved, in addition, compared with the random tool, the appwalk can realize higher page test coverage through orderly traversal, and is closer to the App use path of a real user, and the self-grinding tool in the embodiment of the application can test any App application in the on-vehicle central control screen, so that the test efficiency is also greatly improved.
The application interface testing device according to the embodiment of the application is described with reference to the accompanying drawings.
Fig. 14 is a block schematic diagram of an application interface testing apparatus according to an embodiment of the present application, where the apparatus is applied to a test terminal.
As shown in fig. 14, the application interface test apparatus 10 includes: a first acquisition module 101, a preparation module 102 and a test module 103.
The first acquiring module 101 is configured to acquire a screenshot of a current application page on the test terminal; the preparation module 102 is used for selecting all the operable elements on the page screenshot in a frame mode, traversing each operable element in sequence, marking the page screenshot after the operable element is clicked through a preset identification, and acquiring log information when clicking; and the test module 103 is used for uploading all marked page shots and log information to the server after the traversal is finished, wherein the server forms a complete operation path by utilizing clicking operations corresponding to all page shots in series with preset identifiers, and generates a test result of the current application page based on the operation path and/or the log information, if the test result meets preset conditions, the current application page is judged to be qualified, and otherwise, the current application page is judged to be unqualified.
Optionally, in one embodiment of the present application, the preparation module 102 is further configured to: each operable element is traversed in turn using any of breadth-first traversal, depth-first traversal, and custom-starting page traversal.
It should be noted that the foregoing explanation of the embodiment of the application interface testing method is also applicable to the application interface testing apparatus of this embodiment, and will not be repeated herein.
According to the application interface testing device provided by the embodiment of the application interface testing device, each operable element in the page screenshot can be traversed in sequence, the preset identification is utilized to mark and acquire log information, the coverage of the page test can be effectively improved, the omission of testing problems is reduced, the testing effect is greatly improved, meanwhile, the page screenshot can effectively present the clicking effect and business logic of the page, the user can observe and position the problems conveniently, the experience of the user is improved, then an operation path is generated based on the preset identification, the testing result is generated based on one or more of the operation path and the log information, whether the page test is qualified is judged, the manual clicking operation path is saved, the testing efficiency is greatly improved, and the testing cost is reduced.
Based on the above embodiments, the embodiments of the present application further provide an application interface testing device, where the above embodiments are applied to a testing terminal, the present embodiment is applied to a server, and the present embodiment and the previous embodiment each have emphasis on the description, and the steps of each embodiment may be referred to each other.
As shown in fig. 14, the application interface testing apparatus 20 includes: a second acquisition module 201, a generation module 202 and a judgment module 203.
The second obtaining module 201 is configured to obtain a screenshot and log information with a preset identifier, which are uploaded by the test terminal after the traversal is completed; the generating module 202 is configured to form a complete operation path by using click operations corresponding to all page screenshots connected in series by using a preset identifier, and generate a test result of the current application page based on the operation path and/or log information; and the judging module 203 is configured to judge that the current application page is tested to be qualified if the test result meets the preset condition, or judge that the current application page is tested to be unqualified if the test result does not meet the preset condition.
Secondly, the embodiment of the application also provides a test terminal, wherein a test program is installed on the test terminal, and the application interface test method according to the embodiment is executed by using the test program.
In addition, the embodiment of the application also provides a server, which comprises: front end and back end.
The front end is used for creating a test task according to a test request of the equipment to be tested, installing a test program to the test terminal according to the test request, performing functional test on one or more application interfaces in the test terminal, and displaying a test result; the rear end is used for acquiring the webpage screenshot and log information with the preset mark, which are uploaded by the test terminal after the traversal is finished; utilizing a preset identifier to connect clicking operations corresponding to all page screenshots in series to form a complete operation path, and generating a test result of the current application page based on the operation path and/or log information; if the test result meets the preset condition, judging that the current application page test is qualified, otherwise, judging that the current application page test is unqualified.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor implements the application interface testing method as above.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or N embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "N" is at least two, such as two, three, etc., unless explicitly defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more N executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present application.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the N steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. As with the other embodiments, if implemented in hardware, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable gate arrays, field programmable gate arrays, and the like.
Those of ordinary skill in the art will appreciate that all or part of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, and the program may be stored in a computer readable storage medium, where the program when executed includes one or a combination of the steps of the method embodiments.
Although embodiments of the present application have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the application, and that variations, modifications, alternatives, and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the application.

Claims (10)

1. An application interface testing method, which is characterized in that the method is applied to a testing terminal, wherein the method comprises the following steps:
acquiring a screenshot of a current application page on the test terminal;
selecting all the operable elements on the page screenshot in a frame mode, traversing each operable element in sequence, marking the page screenshot after the operable elements are clicked through a preset identification, and acquiring log information when clicking;
and uploading all marked page shots and the log information to a server after traversing is finished, wherein the server forms a complete operation path by utilizing clicking operations corresponding to all page shots in series with the preset identification, and generates a test result of the current application page based on the operation path and/or the log information, if the test result meets preset conditions, the current application page is judged to be qualified, otherwise, the current application page is judged to be unqualified.
2. The method of claim 1, wherein the preset identity of the mark after each operable element is clicked is different, and the preset identities are sequentially added to the page shots in a preset order.
3. The method of claim 1, wherein traversing each operable element in turn comprises:
each operable element is traversed in turn using any of breadth-first traversal, depth-first traversal, and custom-starting page traversal.
4. The method of claim 1, wherein the log information includes one or more of a screenshot page, an actionable element, an Activity, a package name, and a time for each traversal.
5. An application interface testing method, wherein the method is applied to a server, and the method comprises the following steps:
acquiring a screenshot and log information of a page with a preset mark, which are uploaded by a test terminal after traversing;
utilizing the preset identification to connect clicking operations corresponding to all page screenshots in series to form a complete operation path, and generating a test result of the current application page based on the operation path and/or the log information;
and if the test result meets the preset condition, judging that the current application page is qualified in test, otherwise, judging that the current application page is unqualified in test.
6. An application interface testing device, wherein the device is applied to a testing terminal, and the device comprises:
the first acquisition module is used for acquiring a screenshot of a current application page on the test terminal;
the preparation module is used for selecting all the operable elements on the page screenshot in a frame mode, traversing each operable element in sequence, marking the page screenshot after the operable elements are clicked through a preset identification, and acquiring log information when clicking;
and the test module is used for uploading all marked page shots and the log information to the server after traversing is finished, wherein the server forms a complete operation path by utilizing the click operation corresponding to all page shots connected in series by the preset identification, and generates a test result of the current application page based on the operation path and/or the log information, if the test result meets the preset condition, the current application page is judged to be qualified in test, otherwise, the current application page is judged to be unqualified in test.
7. An application interface testing apparatus, wherein the apparatus is applied to a server, and wherein the apparatus comprises:
the second acquisition module is used for acquiring the screenshot and log information of the page with the preset mark, which are uploaded by the test terminal after the traversal is finished;
the generating module is used for forming a complete operation path by utilizing clicking operations corresponding to all page screenshots in series with the preset identification, and generating a test result of the current application page based on the operation path and/or the log information;
and the judging module is used for judging whether the current application page test is qualified if the test result meets the preset condition, or not judging whether the current application page test is unqualified.
8. A test terminal, wherein a test program is installed on the test terminal, and the application interface test method according to any one of claims 1 to 4 is executed by using the test program.
9. A server, comprising:
the front end is used for creating a test task according to a test request of the equipment to be tested, installing a test program to a test terminal according to the test request so as to perform functional test on one or more application interfaces in the test terminal and displaying a test result;
the rear end is used for acquiring the webpage screenshot and log information with the preset mark, which are uploaded by the test terminal after the traversal is finished; utilizing the preset identification to connect clicking operations corresponding to all page screenshots in series to form a complete operation path, and generating a test result of the current application page based on the operation path and/or the log information; and if the test result meets the preset condition, judging that the current application page is qualified in test, otherwise, judging that the current application page is unqualified in test.
10. A computer readable storage medium having stored thereon a computer program, the program being executable by a processor for implementing the application interface testing method of any of claims 1-5.
CN202310394885.7A 2023-04-13 2023-04-13 Application interface testing method and device, testing terminal, server and storage medium Pending CN116501625A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310394885.7A CN116501625A (en) 2023-04-13 2023-04-13 Application interface testing method and device, testing terminal, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310394885.7A CN116501625A (en) 2023-04-13 2023-04-13 Application interface testing method and device, testing terminal, server and storage medium

Publications (1)

Publication Number Publication Date
CN116501625A true CN116501625A (en) 2023-07-28

Family

ID=87315936

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310394885.7A Pending CN116501625A (en) 2023-04-13 2023-04-13 Application interface testing method and device, testing terminal, server and storage medium

Country Status (1)

Country Link
CN (1) CN116501625A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117971641A (en) * 2023-11-24 2024-05-03 北京东舟技术股份有限公司 Traversal testing method of application interface and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117971641A (en) * 2023-11-24 2024-05-03 北京东舟技术股份有限公司 Traversal testing method of application interface and electronic equipment

Similar Documents

Publication Publication Date Title
CN108959059B (en) Test method and test platform
US10860407B2 (en) Dynamic error code, fault location, and test and troubleshooting user experience correlation/visualization systems and methods
US20140112154A1 (en) Managing captured network traffic data
CN109918302B (en) Vehicle-mounted automatic testing method and device, vehicle-mounted multimedia system and automobile
CN110888414A (en) Test method for upgrading vehicle controller
CN110659202A (en) Client automatic testing method and device
CN107080945B (en) Method and device for testing artificial intelligence behaviors in game and electronic equipment
CN111290941A (en) Method and device for testing multiple interfaces, computing equipment and medium
CN116501625A (en) Application interface testing method and device, testing terminal, server and storage medium
CN111338931A (en) Buried point testing method, device, equipment and storage medium
CN111124894B (en) Code coverage rate processing method and device and computer equipment
CN111414309A (en) Automatic test method of application program, computer equipment and storage medium
CN111159023A (en) Test method, test device, electronic equipment and computer readable storage medium
CN114141302A (en) Test method of solid state disk and electronic equipment
CN112148616B (en) Performance test management platform
CN113535538B (en) Method, device, electronic equipment and storage medium for automatically testing application full link
CN113126993A (en) Automatic testing method and system applied to vehicle detection software
KR101460860B1 (en) GUI Test apparatus using test scenario model based on states and the method thereof
CN112019404A (en) Method and device for automatically testing FC-AE-1553 communication protocol chip
CN112153375A (en) Front-end performance testing method, device, equipment and medium based on video information
CN114115168A (en) Fault injection test system
CN116719736A (en) Test case generation method and device for testing software interface
CN113806209A (en) Interface testing method, frame, computer device and storage medium
US20160132424A1 (en) Simulating sensors
CN111679924B (en) Reliability simulation method and device for componentized software system and electronic equipment

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