CN111190825A - Automatic test method, system and robot - Google Patents

Automatic test method, system and robot Download PDF

Info

Publication number
CN111190825A
CN111190825A CN201911385013.4A CN201911385013A CN111190825A CN 111190825 A CN111190825 A CN 111190825A CN 201911385013 A CN201911385013 A CN 201911385013A CN 111190825 A CN111190825 A CN 111190825A
Authority
CN
China
Prior art keywords
test
event
data
case
monitoring
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
CN201911385013.4A
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.)
Ubtech Robotics Corp
Original Assignee
Ubtech Robotics Corp
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 Ubtech Robotics Corp filed Critical Ubtech Robotics Corp
Priority to CN201911385013.4A priority Critical patent/CN111190825A/en
Publication of CN111190825A publication Critical patent/CN111190825A/en
Pending legal-status Critical Current

Links

Images

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/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

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 is applicable to the technical field of software testing, and provides an automatic testing method, an automatic testing system and a robot, wherein the automatic testing method comprises the following steps: obtaining a test case, wherein the test case is compiled based on a preset rule; analyzing the test case to determine a test object and a test event; executing the test event based on the test object to generate test data; monitoring the test process of the test event to generate monitoring data; and generating a test report according to the test data and the monitoring data, analyzing the test case and automatically testing based on the analyzed test event to realize the automatic test of the application program, and generating a corresponding test report according to the monitoring data and the test data through the monitoring test process without compiling a large amount of test codes, thereby effectively reducing the development and maintenance cost and improving the test efficiency.

Description

Automatic test method, system and robot
Technical Field
The application belongs to the technical field of software testing, and particularly relates to an automatic testing method, an automatic testing system and a robot.
Background
With the rapid development of the intellectualization of the mobile terminal, the application programs with various functions are also diversified, and users tend to assist in various activities such as business, entertainment, life and the like by installing different application programs on the mobile terminal. Since various application programs in the application program market are full of contents and have different qualities, if the application programs are guaranteed to have good market competitiveness, the quality of the application programs needs to be guaranteed firstly, and therefore the application programs are tested before being put into the market. Generally, in the industry, a test code is written based on a test framework to realize the test of an application program, and with the rapid iteration of the versions of the application program, if the test code is written according to the version requirements for each version of the application program, a large amount of test codes need to be written, the development and maintenance costs are very high, and the problem of low test efficiency is also caused.
In summary, the existing test method for the application program has the problems of high development and maintenance cost and low test efficiency.
Disclosure of Invention
The embodiment of the application provides an automatic testing method, an automatic testing device and a robot, and can solve the problems of high development and maintenance cost and low testing efficiency of the existing testing method of an application program.
In a first aspect, an embodiment of the present application provides an automatic testing method, including:
obtaining a test case, wherein the test case is compiled based on a preset rule;
analyzing the test case to determine a test object and a test event;
executing the test event based on the test object to generate test data;
monitoring the test process of the test event to generate monitoring data;
and generating a test report according to the test data and the monitoring data.
In a possible implementation manner of the first aspect, before obtaining a test case, before the test case is written based on a preset rule, the method further includes:
and reading the configuration information and configuring the test environment based on the configuration information.
In a possible implementation manner of the first aspect, the test case includes use case attribute information, operation attribute information, and execution data; analyzing the test case to determine a test object and a test event, including:
determining a test object according to the case attribute information;
and determining the test event according to the case attribute information, the operation attribute information and the execution data.
In a possible implementation manner of the first aspect, the generating test data based on the test object executing the test event includes:
converting the test event into an executable operation according to the action identifier of the test event;
automatically testing the test object based on the executable operation;
and generating test data according to the test result after the test event of the test case is executed.
Further, the converting the test event into an executable operation according to the action identifier of the test event includes:
determining an action identifier of the test event according to the test event;
and searching corresponding executable operation according to the action identifier.
In a possible implementation manner of the first aspect, the generating listening data in the testing process of listening to the test event includes:
monitoring whether errors occur in the test process of the test event;
and if errors in the test process are monitored, recording and feeding back error information.
Further, after generating a test report according to the test data and the interception data, the method further includes:
and outputting the test report to a user.
In a second aspect, an embodiment of the present application provides an automatic test system, including:
the test case obtaining module is used for obtaining a test case, and the test case is compiled based on a preset rule;
the analysis module is used for analyzing the test case to determine a test object and a test event;
the execution module is used for executing the test event based on the test object and generating test data;
the monitoring module is used for monitoring the test process of the test event and generating monitoring data;
and the report module is used for generating a test report according to the test data and the monitoring data.
In a third aspect, the present application provides a robot, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the automatic testing method according to the first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the automatic testing method according to the first aspect.
In a fifth aspect, the present application provides a computer program product, which when run on a robot, causes the robot to perform the automatic testing method according to any one of the first aspect.
It is understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and are not described herein again.
Compared with the prior art, the embodiment of the application has the advantages that: the test case is analyzed, the test event based on the analysis is automatically tested, the automatic test of the application program is realized, the corresponding test report is generated according to the monitoring data and the test data through the monitoring test process, a large amount of test codes do not need to be compiled, the development and maintenance cost can be effectively reduced, and the test efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic hardware structure diagram of a test system to which an automatic test method provided in an embodiment of the present application is applied;
fig. 2 is a schematic diagram of a software architecture of a robot to which an automatic testing method according to an embodiment of the present application is applied;
fig. 3 is a schematic software architecture diagram of a test system to which the automatic test method according to the embodiment is applied;
FIG. 4 is a schematic flow chart illustrating an implementation of an automatic testing method according to an embodiment of the present application;
fig. 5 is a schematic flow chart of the implementation of S103 of the automatic testing method according to another embodiment of the present application;
FIG. 6 is a schematic structural diagram of an automatic test system provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of a robot provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The automatic testing method provided by the embodiment of the application can be applied to robots such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, Augmented Reality (AR)/Virtual Reality (VR) devices, notebook computers, ultra-mobile personal computers (UMPCs), netbooks, Personal Digital Assistants (PDAs), artificial intelligence devices, intelligent robots and the like, and the embodiment of the application does not limit the specific types of execution subjects.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an architecture of a test system to which an automatic test method provided in an embodiment of the present invention is applied, and as shown in fig. 1, the test framework includes a test case module 11, a configuration module 12, a test engine 13, a listener 14, and a report module 15.
In application, the test system may be disposed on an intelligent device such as a robot, and the robot is installed with a test object (i.e., an application program to be tested). The test system can analyze the corresponding test operation according to the test case, and then automatically test the test object, thereby achieving the purpose of automatic test.
The test case module 11 is configured to store a test case text collection written based on a writing rule. The configuration module 12 is configured to configure a test environment, and the configuration module 12 stores a parameter configuration table of each test environment. The test engine 13 is used for analyzing the test cases and performing the serial test, and feeding back the test data. The listener 14 is used to listen to the test procedure. The report module 15 is configured to generate a corresponding test report according to the test data of the test engine 13 and the monitoring result of the monitor 14, and output the test report to a user (a developer, a tester, or the like).
It should be noted that the completion of a robot task or task often depends on various kinds of robot software arranged in the robot, and therefore, the realization of the robot software function is important for the execution of the robot task, and the robot software is tested in order to realize the reliability of the robot software.
Fig. 2 is a software configuration diagram of a robot according to an embodiment of the present application. Taking an operating system of the robot as an Android system as an example, in some embodiments, the Android system is divided into four layers, which are an application layer, an application Framework (FWK) layer, a system layer and a hardware abstraction layer, and the layers communicate with each other through a software interface.
As shown in fig. 2, the application layer may be a series of application packages, which may include short message, calendar, camera, video, navigation, gallery, call, and other applications. In this embodiment, the application program of the application layer may be automatically tested.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application programs of the application layer. The application framework layer may include some predefined functions, such as functions for receiving events sent by the application framework layer.
As shown in FIG. 2, the application framework layers may include a window manager, a resource manager, and a notification manager, among others.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like. The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
The application framework layer may further include:
a viewing system that includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The telephone manager is used for providing a communication function of the robot. Such as management of call status (including on, off, etc.).
The system layer may include a plurality of functional modules. For example: a sensor service module, a physical state identification module, a three-dimensional graphics processing library (such as OpenGL ES), and the like.
The sensor service module is used for monitoring sensor data uploaded by various sensors in a hardware layer and determining the physical state of the robot;
the physical state recognition module is used for analyzing and recognizing user gestures, human faces and the like;
the three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The system layer may further include:
the surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.
The hardware abstraction layer is a layer between hardware and software. The hardware abstraction layer may include a display driver, a camera driver, a sensor driver, etc. for driving the relevant hardware of the hardware layer, such as a display screen, a camera, a sensor, etc.
In this embodiment, as shown in fig. 3, the software architecture of the test system may also be divided into three layers, which are a text layer, a framework layer and a tested layer. The text layer is composed of a test case module 11 and a configuration module 12, the framework layer is composed of a test engine 13, a listener 14 and a reporting module 15, the tested layer is an application layer, and the application layer contains a series of applications (i.e. test objects) used for testing.
Referring to fig. 4, an embodiment of the present application provides an automatic testing method, which is implemented based on the testing framework provided in fig. 1, and the automatic testing method includes:
s101: and acquiring a test case.
Specifically, the test case is written based on a preset rule. The test case is written in advance by a tester or a developer based on the test steps, and can be stored in a text format and stored in a test case module.
Specifically, the test case is compiled by a tester according to a preset compiling rule. The preset writing rule may be a rule for setting the content and the attribute of the test case. For example, a test case written by a setting must include three parts of case attribute information, operation attribute information, and execution data. And the specified use case attribute information must include four attributes of use case name, test version number, package name of the application to be tested and the execution times of the test use case; the operation attribute information must include two attributes of an operation event and the number of cycles, and the like. For example, the test case is written based on a text format, or the test case is written based on an extensible markup Language (XML) format.
Specifically, the preset writing rule may be set according to an analysis requirement of a test engine, and a test case written based on the preset writing rule may be analyzed by the test engine, and a tested application and a test event corresponding to the test case may be analyzed.
Illustratively, the test case is as follows:
<?xml version="1.0"encoding="UTF-8"?>
<testcase name="testcase"version="1.0.0"target="xxx.xx"loop="1">
<step event="swipe"loop="1">
<item>up</item>
</step>
</testcase>
the testcase is test attribute information, and includes four attributes, namely, a case name (name), a test version number (version), a package name (target) of the application under test, and an execution number (loop), where the execution number refers to the number of times that the test case is executed during testing. step is operation attribute information, which includes two attributes of a specific operation event (event) and the number of cycles (loop) of the execution event. Item is the execution data, i.e., the specific execution data of the test event. For example, if the event is a switch, the item is up, down, left, and right (specific sliding direction).
Specifically, the specific process of obtaining the test case may be: the tester directly inputs the written test user into the input device of the robot, and then the test case is automatically loaded by the test engine arranged (or installed) on the framework layer of the robot. In addition, a hook program can be set on a software program of the robot, and once the test case is monitored to be uploaded by a user, the test engine is controlled to load the test case.
Specifically, the test engine may further obtain a test case through the test case module. The tester may input a test instruction including a test object (i.e., an application program to be tested) and an operation performed on the test object through an input unit (e.g., a keyboard, a voice capture module, etc.) of the robot. After receiving the test instruction, the test engine acquires a corresponding test case through the test case module. It should be noted that the writing of the test case is performed based on a preset rule, so that the package name and the operation event of the application to be tested can be used as an index, and the test engine can search and acquire the test case meeting the test instruction from the test case set.
S102: and analyzing the test case to determine a test object and a test event.
Specifically, the test engine can analyze the test case, and further analyze the test event and the test object included in the test case.
Specifically, the test case is written based on a preset writing rule, so that the test engine can analyze information contained in the test case, and determine a test object and a test event corresponding to the test case.
In an embodiment, the test case includes case attribute information, operation attribute information, and execution data, and the step S102 includes:
determining a test object according to the case attribute information;
and determining the test event according to the case attribute information, the operation attribute information and the execution data.
Specifically, the package name of the test object (application under test) can be specified by analyzing the target value, and since the package name of each application is unique and different, specifying the package name of the test object (application under test) corresponds to specifying the test object. By parsing the loop of testcase, the event of step, the loop of step and Item, it is possible to determine the test event, i.e. to determine what operation to perform and the number of times to perform.
S103: and executing the test event based on the test object to generate test data.
Specifically, each event in each test event in the test engine corresponds to an executable operation, and the executable operation can directly act on the test object, that is, the test object can be controlled to execute the corresponding executable operation. When the test engine reads the test event, the test event is automatically converted into executable operation, and then the test of the test object is realized.
Specifically, the test engine may implement operations on the respective applications through operation interfaces of the respective applications. After the test event is converted into executable operation, the test object is operated through the operation interface, so that the test object (the application program to be tested) completes the operation, and then corresponding test data is generated.
The test data includes the test result and all data generated by the test process.
S104: and monitoring the test process of the test event to generate monitoring data.
Specifically, the entire test process of the test event is performed by the listener listening to the test engine. It can be understood that one test case may include a plurality of test events, and there may be a case where an operation fails in a test operation corresponding to each test event. The purpose of setting the monitor is to monitor whether the test process has errors, record error information when the test process has errors, and generate corresponding monitoring data based on the error information. The monitoring data comprises executable operation, execution time, test objects and the like which have errors in the test process.
In one embodiment, the step S104 includes the steps of:
monitoring whether errors occur in the test process of the test event;
and if errors in the test process are monitored, recording and feeding back error information.
Specifically, the listener may monitor a test process in which the test engine executes all test events included in the test case, and record and feed back error information to the test system when an error occurs in the test process. As is exemplary. If the test event is an upward sliding, the test object cannot execute the upward sliding action during the test, that is, the test process is in error. At the moment, the listener records the test event and the test object which have errors in the test process, and then generates corresponding monitoring data based on the error information.
S105: and generating a test report according to the test data and the monitoring data.
Specifically, after all test events included in the test case are executed, the test engine feeds back the test data to the test system, the listener also feeds back the generated monitored data to the test system, and a report module of the test system generates a test report of the test operation based on the test data and the monitored data. And the report module collects the test data and the monitoring data and generates a test report according to a specified format. The above-mentioned specified format can be set according to the actual requirements of the user, and is set for the purpose of high readability, which is not limited herein.
In one embodiment, before obtaining a test case, the test case is written based on a preset rule, the method further includes:
and reading the configuration information and configuring the test environment based on the configuration information.
Specifically, the test environment of the test system is configured through the configuration module, and the configurable test system can be provided according to the test requirement. The configuration module stores a parameter configuration table (i.e., configuration information) of each test environment, and can configure the test environment according to the selection of a user. When the test system is started, the parameter configuration table is read, and an environment which is in accordance with the current development application (test application) is rapidly configured. And after the configuration is finished, reading the test case and starting to perform operation test on the application program to be tested.
Illustratively, the execution statements corresponding to the configuration process are as follows:
<?xml version="1.0"encoding="UTF-8"?>
<testgroup loop=1>
<case>test1</case>
<case>test2</case>
<case>test3</case>
</testgroup>
where test1 represents a parameter configuration table for each test environment.
In one embodiment, after the generating a test report according to the test data and the listening data, the method further includes:
and outputting the test report to a user.
Specifically, after the report module generates the test report, the test report may be displayed through a display unit of the robot. The test report can also be sent to the user by means of mails, short messages and the like. And are not intended to be limiting herein.
According to the automatic testing method provided by the embodiment, the test case is analyzed, the test is automatically performed based on the analyzed test event, the automatic test of the application program is realized, the corresponding test report is generated according to the monitored data and the test data through the monitoring test process, a large amount of test codes are not required to be written, the development and maintenance cost can be effectively reduced, and the test efficiency is improved.
Referring to fig. 5, fig. 5 shows a specific implementation flow of S103 of an automatic testing method according to another embodiment of the present application, and as shown in fig. 5, the difference between this embodiment and the previous embodiment is that S103 includes the following steps:
s201: and converting the test event into an executable operation according to the action identifier of the test event.
Specifically, in the test engine, the event value in each test case text corresponds to one executable operation action.
Specifically, the executable operation corresponding to each test time is determined through predefined action identification. An action identifier corresponding to an event value of each test event is defined in advance, for example, if the action identifier of the swap is set to be a sliding operation, an executable action corresponding to the swap is a sliding operation.
In one embodiment, the step S201 includes the following steps:
determining an action identifier of the test event according to the test event;
and searching corresponding executable operation according to the action identifier.
Specifically, the test engine determines an action identifier of each test event based on each test event in the test case obtained through analysis, and converts the test event into a corresponding executable operation.
S202: automatically testing the test object based on the executable operation.
Specifically, after the executable operation action corresponding to each test event is determined, the test object is operated through the operation interface, so that the application program to be tested completes the operation.
S203: and generating test data according to the test result after the test event of the test case is executed.
Specifically, after all test events of the test case are executed, it is determined that the test is finished, and all data and test results generated in the test process are used to generate corresponding test data.
According to the automatic testing method provided by the embodiment, the testing event is automatically converted into the executable operation through the action identifier, the tested application program is tested based on the executable operation, the automatic testing is realized, the input of testing labor is reduced, the machine is used for automatically executing the testing case and outputting the execution result, and therefore the testing and developing efficiency is improved.
Fig. 7 shows a block diagram of an automatic test system provided in the embodiment of the present application, which corresponds to the automatic test method described in the above embodiment, and only shows a part related to the embodiment of the present application for convenience of description.
Referring to fig. 6, the automatic test system includes a use case acquiring module 101, a parsing module 102, an executing module 103, a monitoring module 104, and a reporting module 105.
The case obtaining module 101 is configured to obtain a test case, where the test case is compiled based on a preset rule;
the analysis module 102 is configured to analyze the test case to determine a test object and a test event;
the execution module 103 is configured to execute the test event based on the test object to generate test data;
the monitoring module 104 is configured to monitor a test process of the test event and generate monitoring data;
the reporting module 105 is configured to generate a test report according to the test data and the monitoring data.
Optionally, the automatic test system further includes a configuration module.
The configuration module is used for reading configuration information and configuring a test environment based on the configuration information.
Optionally, the test case includes case attribute information, operation attribute information, and execution data, and the parsing module 102 includes a first determining unit and a second determining unit.
The first determining unit is used for determining a test object according to the case attribute information;
the second determining unit is used for determining the test event according to the case attribute information, the operation attribute information and the execution data.
Optionally, the execution module 103 includes an action acquisition unit, a test unit, and a data generation unit.
The action acquisition unit is used for converting the test event into executable operation according to the action identifier of the test event;
the test unit is used for automatically testing the test object based on the executable operation;
and the data generation unit is used for generating test data according to the test result after the test event of the test case is executed.
Optionally, the listening module 104 includes a listening unit and a recording unit.
The monitoring unit is used for monitoring whether errors occur in the test process of the test event;
the recording unit is used for recording and feeding back error information if errors in the test process are monitored.
Optionally, the action obtaining unit includes an identifier determining unit and a searching unit.
The identification determining unit is used for determining the action identification of the test event according to the test event;
the searching unit is used for searching corresponding executable operation according to the action identifier.
Optionally, the automatic test system further includes an output module, and the output module is configured to output the test report to a user.
It should be noted that, because the contents of information interaction, execution process, and the like between the modules/units are based on the same concept as that of the method embodiment of the present application, specific functions and technical effects thereof may be referred to specifically in the method embodiment section, and are not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Therefore, the automatic test system provided by the embodiment can also automatically test the application program by analyzing the test case and based on the analyzed test event, and generate a corresponding test report according to the monitored data and the test data by monitoring the test process without compiling a large amount of test codes, thereby effectively reducing the development and maintenance cost and improving the test efficiency.
Fig. 7 is a schematic structural diagram of a robot according to an embodiment of the present application. As shown in fig. 7, the robot 7 of this embodiment includes: at least one processor 70 (only one is shown in fig. 7), a memory 71, and a computer program 72 stored in the memory 71 and executable on the at least one processor 70, wherein the processor 70 implements the steps in any of the above-mentioned embodiments of the method for outputting a pulse per second signal when executing the computer program 72.
The robot may include, but is not limited to, a processor 70, a memory 71. Those skilled in the art will appreciate that fig. 7 is merely an example of the robot 7, and does not constitute a limitation on the robot 7, and may include more or less components than those shown, or combine some of the components, or different components, such as input and output devices, network access devices, etc.
The Processor 70 may be a Central Processing Unit (CPU), and the Processor 70 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 71 may in some embodiments be an internal storage unit of the robot 7, such as a hard disk or a memory of the robot 7. In other embodiments, the memory 71 may also be an external storage device of the robot 7, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the robot 7. Further, the memory 71 may also include both an internal storage unit and an external storage device of the robot 7. The memory 71 is used for storing an operating system, an application program, a Boot Loader (Boot Loader), data, and other programs, such as program codes of the computer programs. The memory 71 may also be used to temporarily store data that has been output or is to be output.
Illustratively, the computer program 72 may be divided into one or more units, which are stored in the memory 71 and executed by the processor 70 to accomplish the present application. The one or more units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 72 in the robot 7. For example, the computer program 72 may be divided into a use case acquiring module, an analyzing module, an executing module, a monitoring module, and a reporting module, and the functions of the modules are as follows:
the test case obtaining module is used for obtaining a test case, and the test case is compiled based on a preset rule;
the analysis module is used for analyzing the test case to determine a test object and a test event;
the execution module is used for executing the test event based on the test object and generating test data;
the monitoring module is used for monitoring the test process of the test event and generating monitoring data;
and the report module is used for generating a test report according to the test data and the monitoring data.
An embodiment of the present application further provides a network device, where the network device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, the processor implementing the steps of any of the various method embodiments described above when executing the computer program.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing device/robot, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), an electrical carrier wave signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. An automatic test method, comprising:
obtaining a test case, wherein the test case is compiled based on a preset rule;
analyzing the test case to determine a test object and a test event;
executing the test event based on the test object to generate test data;
monitoring the test process of the test event to generate monitoring data;
and generating a test report according to the test data and the monitoring data.
2. The automatic test method according to claim 1, wherein before obtaining a test case, the test case being written based on a preset rule, the method further comprises:
and reading the configuration information and configuring the test environment based on the configuration information.
3. The automatic test method of claim 1, wherein the test case includes case attribute information, operation attribute information, and execution data; analyzing the test case to determine a test object and a test event, including:
determining a test object according to the case attribute information;
and determining the test event according to the case attribute information, the operation attribute information and the execution data.
4. The automated testing method of claim 1, wherein said generating test data based on said test object executing said test event comprises:
converting the test event into an executable operation according to the action identifier of the test event;
automatically testing the test object based on the executable operation;
and generating test data according to the test result after the test event of the test case is executed.
5. The automatic test method of claim 1, wherein the listening test process for the test event generates listening data comprising:
monitoring whether errors occur in the test process of the test event;
and if errors in the test process are monitored, recording and feeding back error information.
6. The automated testing method of claim 4, wherein said converting a test event into an executable operation based on an action identification of the test event comprises:
determining an action identifier of the test event according to the test event;
and searching corresponding executable operation according to the action identifier.
7. The automated testing method of any of claims 1 to 6, further comprising, after said generating a test report from said test data and said snoop data:
and outputting the test report to a user.
8. An automatic test system, comprising:
the test case obtaining module is used for obtaining a test case, and the test case is compiled based on a preset rule;
the analysis module is used for analyzing the test case to determine a test object and a test event;
the execution module is used for executing the test event based on the test object and generating test data;
the monitoring module is used for monitoring the test process of the test event and generating monitoring data;
and the report module is used for generating a test report according to the test data and the monitoring data.
9. A robot comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the automatic test method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out an automatic test method according to any one of claims 1 to 7.
CN201911385013.4A 2019-12-28 2019-12-28 Automatic test method, system and robot Pending CN111190825A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911385013.4A CN111190825A (en) 2019-12-28 2019-12-28 Automatic test method, system and robot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911385013.4A CN111190825A (en) 2019-12-28 2019-12-28 Automatic test method, system and robot

Publications (1)

Publication Number Publication Date
CN111190825A true CN111190825A (en) 2020-05-22

Family

ID=70709437

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911385013.4A Pending CN111190825A (en) 2019-12-28 2019-12-28 Automatic test method, system and robot

Country Status (1)

Country Link
CN (1) CN111190825A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111966587A (en) * 2020-08-06 2020-11-20 中国建设银行股份有限公司 Data acquisition method, device and equipment
CN112199284A (en) * 2020-10-10 2021-01-08 广州华多网络科技有限公司 Program automation testing method and corresponding device, equipment and medium
CN112763251A (en) * 2021-01-14 2021-05-07 深圳市杉川机器人有限公司 Mobile robot testing method and device
CN113778847A (en) * 2020-12-03 2021-12-10 北京沃东天骏信息技术有限公司 Test report generation method and device
CN114020623A (en) * 2021-11-04 2022-02-08 上海复深蓝软件股份有限公司 Software testing method, device, equipment and medium based on intelligent identification
CN114721957A (en) * 2022-04-14 2022-07-08 合肥卓讯云网科技有限公司 Software and hardware automatic testing method and device
CN114756474A (en) * 2022-04-27 2022-07-15 苏州睿芯集成电路科技有限公司 Method and device for generating random vector in CPU verification and electronic equipment
US11797423B2 (en) 2020-08-28 2023-10-24 Coupang Corp. Experiment platform engine

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103049371A (en) * 2012-11-07 2013-04-17 青岛海信传媒网络技术有限公司 Testing method and testing device of Android application programs
CN107797919A (en) * 2017-07-24 2018-03-13 平安普惠企业管理有限公司 The method and computing device of a kind of automatic test
CN108614774A (en) * 2018-04-24 2018-10-02 百度在线网络技术(北京)有限公司 Automated testing method and device
CN110018963A (en) * 2019-04-11 2019-07-16 苏州浪潮智能科技有限公司 A kind of test method, system and electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103049371A (en) * 2012-11-07 2013-04-17 青岛海信传媒网络技术有限公司 Testing method and testing device of Android application programs
CN107797919A (en) * 2017-07-24 2018-03-13 平安普惠企业管理有限公司 The method and computing device of a kind of automatic test
CN108614774A (en) * 2018-04-24 2018-10-02 百度在线网络技术(北京)有限公司 Automated testing method and device
CN110018963A (en) * 2019-04-11 2019-07-16 苏州浪潮智能科技有限公司 A kind of test method, system and electronic equipment and storage medium

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111966587A (en) * 2020-08-06 2020-11-20 中国建设银行股份有限公司 Data acquisition method, device and equipment
US11797423B2 (en) 2020-08-28 2023-10-24 Coupang Corp. Experiment platform engine
CN112199284A (en) * 2020-10-10 2021-01-08 广州华多网络科技有限公司 Program automation testing method and corresponding device, equipment and medium
CN113778847A (en) * 2020-12-03 2021-12-10 北京沃东天骏信息技术有限公司 Test report generation method and device
CN112763251A (en) * 2021-01-14 2021-05-07 深圳市杉川机器人有限公司 Mobile robot testing method and device
CN114020623A (en) * 2021-11-04 2022-02-08 上海复深蓝软件股份有限公司 Software testing method, device, equipment and medium based on intelligent identification
CN114721957A (en) * 2022-04-14 2022-07-08 合肥卓讯云网科技有限公司 Software and hardware automatic testing method and device
CN114756474A (en) * 2022-04-27 2022-07-15 苏州睿芯集成电路科技有限公司 Method and device for generating random vector in CPU verification and electronic equipment
CN114756474B (en) * 2022-04-27 2023-07-21 苏州睿芯集成电路科技有限公司 Method and device for generating random vector in CPU verification and electronic equipment

Similar Documents

Publication Publication Date Title
CN111190825A (en) Automatic test method, system and robot
US9268672B1 (en) Automated test case generation for applications
CN104267872A (en) Application program APP information display method and device and mobile terminal
CN115145777B (en) Test method, system, device and storage medium
CN114706633B (en) Preloading method, electronic device and storage medium
CN113626102A (en) Data processing method and device, electronic equipment and storage medium
CN112631618A (en) Application program packaging method, application program testing method, terminal and storage medium
CN115470101A (en) Data testing method and device, computer equipment and storage medium
CN111444453A (en) Page return data processing method and device
CN114048415A (en) Form generation method and device, electronic equipment and computer readable storage medium
CN116339818B (en) Code change type screening method, electronic device and readable storage medium
CN114647548A (en) Log generation method and device
CN112068895B (en) Code configuration method, device, video playing equipment and storage medium
CN115509913A (en) Software automation test method, device, machine readable medium and equipment
CN114968960A (en) Log processing method and device, computer equipment and storage medium
CN113220386A (en) Instrument board publishing method and related equipment
CN115061591A (en) Edge false touch detection method, electronic device and computer-readable storage medium
CN109684525B (en) Document display method and device, storage medium and test equipment
CN114995674A (en) Edge false touch detection method, electronic device and computer readable storage medium
CN115827418A (en) Program debugging method, program backtracking method and related products
CN113778460A (en) Production environment deployment method and device
CN108231130B (en) eMMC test method and device
CN113268221A (en) File matching method and device, storage medium and computer equipment
CN114595449A (en) Safety scanning method and device
CN114077575A (en) Format conversion method, equipment and system for memory snapshot file

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