CN112100080B - Control testing method and device, terminal equipment and computer readable storage medium - Google Patents

Control testing method and device, terminal equipment and computer readable storage medium Download PDF

Info

Publication number
CN112100080B
CN112100080B CN202011207004.9A CN202011207004A CN112100080B CN 112100080 B CN112100080 B CN 112100080B CN 202011207004 A CN202011207004 A CN 202011207004A CN 112100080 B CN112100080 B CN 112100080B
Authority
CN
China
Prior art keywords
test
data
test case
result
framework
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011207004.9A
Other languages
Chinese (zh)
Other versions
CN112100080A (en
Inventor
伍伟锋
关瑷健
庄宝珊
李海荣
陈永辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Xuanwu Wireless Technology Co Ltd
Original Assignee
Guangzhou Xuanwu Wireless Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Xuanwu Wireless Technology Co Ltd filed Critical Guangzhou Xuanwu Wireless Technology Co Ltd
Priority to CN202011207004.9A priority Critical patent/CN112100080B/en
Publication of CN112100080A publication Critical patent/CN112100080A/en
Application granted granted Critical
Publication of CN112100080B publication Critical patent/CN112100080B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/3688Test management for test execution, e.g. scheduling of test suites
    • 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/3692Test management for test results analysis

Abstract

The invention discloses a control testing method, a control testing device, terminal equipment and a computer readable storage medium, wherein the method comprises the following steps: traversing the obtained test data through a python test Framework to generate a test case corresponding to a test script which can be identified based on a Robot Framework test tool; controlling the Robot Framework testing tool to be connected to a mobile terminal through an Apdium service, and enabling the mobile terminal to start a monitoring program and an application program to be tested; and executing the test case through the monitoring program and the application program to be tested to obtain a test result, and writing the test result back to the test data or generating a test report according to the test result. According to the control testing method provided by the invention, the application control automatic test of the data and keyword dual-drive testing model is realized through Python, Apium and Robot Framework testing tools, so that the control test is not restricted by manpower resources, the manpower and time cost of the test is reduced, and the testing efficiency, the test version coverage rate and the accuracy of the result are improved.

Description

Control testing method and device, terminal equipment and computer readable storage medium
Technical Field
The invention relates to the technical field of application testing, in particular to a control testing method, a control testing device, terminal equipment and a computer readable storage medium.
Background
At present, a control test for a mobile terminal application needs to be based on a control protocol, and a tester configures a corresponding test form for function verification according to the basic attributes of each control. For example, after a new version App is created every day or before an App store for putting the new version App on shelf is built, a configured test form needs to be manually executed in the App by a tester, all functions of each control are tested, test problems exist are recorded by using Excel, and a test report is written to complete a test task and ensure the release quality of a product. However, the method relying on manual configuration of the test form and manual testing often has the following problems: firstly, because the application program version is frequently released and the testing resources are limited, all versions cannot be covered by depending on manual testing, and the testing content is incomplete; secondly, the manual configuration of the test form takes a long time, so that the functional test cannot be performed in time, the efficiency is low, and the test contents are complicated, so that the conditions of test missing and test error are easy to occur, and the accuracy of the test result is influenced; thirdly, the test needs to depend on the personal experience of the testers, the unified standard is not available, the accuracy of the test result is difficult to grasp, the result display is often incomplete, and the test condition is difficult to grasp comprehensively.
Disclosure of Invention
The invention aims to provide a control testing method, a control testing device, terminal equipment and a computer readable storage medium.
In order to overcome the defects in the prior art, an embodiment of the present invention provides a control testing method, including:
traversing the obtained test data through a python test Framework to generate a test case corresponding to a test script which can be identified based on a Robot Framework test tool;
controlling the Robot Framework testing tool to be connected to a mobile terminal through an Apdium service, and enabling the mobile terminal to start a monitoring program and an application program to be tested;
and executing the test case through the monitoring program and the application program to be tested to obtain a test result, and writing the test result back to the test data or generating a test report according to the test result.
Further, the step of generating a test script and a test case which can be recognized by a Robot Framework test tool through traversing the obtained test data through the python test Framework includes:
respectively generating test cases which can be identified by a Robot Framework test tool according to the operation types of the execution tests, wherein the test cases comprise a first test case, a second test case and a third test case;
carrying out parameterization processing on the parameters of the test case to obtain a parameter corresponding relation; the parameters comprise list names, test form names, operation types and expected results;
circularly reading the received data of the test file list by taking a file as a unit, and assigning the test case data in the test file list to the parameters of the test case according to the parameter corresponding relation to obtain a complete test case chain;
writing the test case chain into the Robot Framework test tool, modifying through the python test Framework, and emptying the current test case chain data after the modification is completed.
Further, the test file list is a list in an Excel format.
Further, the content of the test file list includes:
the first line and the second line are respectively a primary form name and a secondary form name in the application program to be tested; the third row is the parameter name; the fourth row to the tail of the list act on the test case data; the parameter names include caseNO, control _ type, title, caseNAM, except _ result, submit _ value, is _ value, actual _ result and message.
Further, the writing back the test result to the test data includes:
defining a global list through a Robot Framework test tool, and storing a file name and a test result corresponding to a currently executed test case to the global list after the execution of each test case in the test cases is finished;
after the execution of all test cases is finished, controlling a Python test framework to acquire data of the global list;
traversing the test result in the data of the global list, reading the page number of the table according to the name of the table where the current test result is located, locating the row position according to the caseNO, and writing the test result into the actual _ result and the message column line by line.
Further, the generating a test report according to the test result includes:
marking each test case of the test cases according to a specific format, and storing a marking result to the test report; and a process for the preparation of a coating,
after the test of each test case is finished, generating a test sub report respectively; and after all the test cases are tested, combining the sub-reports to generate a test report, and deleting the sub-reports.
Further, the control testing method further comprises the steps of regularly constructing a testing task through a preset time interval in a packaging platform, and automatically packaging the application program to be tested.
An embodiment of the present invention further provides a control testing apparatus, including:
the test data traversing unit is used for traversing the acquired test data through the python test Framework to generate a test script which can be identified based on a Robot Framework test tool and a corresponding test case;
the test program starting unit is used for controlling the Robot Framework test tool to be connected to the mobile terminal through the Apdium service and enabling the mobile terminal to start a monitoring program and an application program to be tested;
and the test result generating unit is used for executing the test case through the monitoring program and the application program to be tested to obtain a test result, and writing the test result back to the test data or generating a test report according to the test result.
An embodiment of the present invention further provides a computer terminal device, including:
one or more processors;
a memory coupled to the processor for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a control testing method as in any above.
The embodiment of the invention also provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the control testing method described in any one of the above.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
1) the method comprises the steps of maintaining test data through Excel, automatically generating a test case based on the Excel data, and separating the test data from a test script through data driving test so as to reduce maintenance cost.
2) The tester does not need a large amount of codes, and drives the mobile phone to complete various operations by means of the keywords packaged by the Apium, thereby greatly reducing the access threshold.
3) The user-defined keyword packaging is realized through a Robot Framework test tool, natural language programming is approached, and the difficulty of realizing automatic test is reduced.
4) The test report is generated by means of a Robot Framework test tool, so that the self-definition of the test report can be conveniently realized, and the workload of data acquisition, format processing and the like of the test report can be greatly reduced.
5) The full process automation of App program packaging, installation, test execution, test report output and test result display is realized, manual zero intervention is performed in the whole process, and the test cost is greatly reduced.
Drawings
Fig. 1 is a schematic flowchart of a control testing method according to an embodiment of the present invention;
FIG. 2 is a flowchart of the steps for a python test framework to read test data according to one embodiment of the present invention;
FIG. 3 is a list of test scripts that a Robot Framework can recognize, according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating steps provided by an embodiment of the present invention for converting test data into test cases;
FIG. 5 is a flowchart illustrating steps of a control testing method according to an embodiment of the present invention to execute a test script;
FIG. 6 is a flowchart of steps provided by an embodiment of the present invention to write test conclusions and test reports to corresponding test tasks;
fig. 7 is a schematic structural diagram of a control testing apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be understood that the step numbers used herein are for convenience of description only and are not intended as limitations on the order in which the steps are performed.
It is to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
The terms "comprises" and "comprising" indicate the presence of the described 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.
The term "and/or" refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1, an embodiment of the present invention provides a control testing method, including:
s10, traversing the obtained test data through the python test Framework to generate a test case corresponding to a test script which can be identified based on a Robot Framework test tool;
in this step, firstly, a tester needs to obtain test data, the test data is usually designed by a technician, the content of an application program to be tested is designed, and usually in the form of a test data table, an Excel table is usually used, wherein a flow of the obtained test data is traversed through a python test Framework, and a test script and a test case which can be recognized by a Robot Framework test tool are generated, as shown in fig. 2: a tester designs Excel-based test data, reads the data one by one through a python test Framework, converts the format of the data into a test case corresponding to a test script which can be identified by a Robot Framework test tool, stores the converted data into a test script file of the Robot Framework, judges whether the current test case is the last one or not after the execution of the storage step is finished, if so, the data traversal is finished, and if not, the data reading is continued until all the test cases in the data are read. Wherein, fig. 3 shows the identification of the test script recognizable by the Robot Framework test tool.
Referring to fig. 4, in the embodiment of the present invention, step S10 further includes the following sub-steps:
s201, respectively generating test cases which can be identified by a Robot Framework test tool according to the operation types of the execution test, wherein the test cases comprise a first test case, a second test case and a third test case;
s202, carrying out parameterization processing on parameters of the test case to obtain a parameter corresponding relation; the parameters comprise list names, test form names, operation types and expected results;
s203, circularly reading the received data of the test file list by taking a file as a unit, and assigning the test case data in the test file list to the parameters of the test case according to the corresponding relation of the parameters to obtain a complete test case chain;
s204, writing the test case chain into the Robot Framework test tool, modifying through the python test Framework, and emptying the current test case chain data after the modification is completed.
In this embodiment, it can be understood that a process of converting data in Excel into a test case in Robot Framework by a python test Framework is as follows:
1) according to the operation type of the execution test, three test cases which can be identified by a Robot Framework are designed in a Python test Framework, wherein the test cases are respectively as follows: the method comprises the steps of a first test case executed by a first-time entering form, a test case executed in an intermediate process, and a last test case of a current test form, wherein the last test case is usually used for submitting operation. And parameterization processing is used for all the sheet names, test form names, operation types, expected results and the like in the test model.
2) And receiving a test Excel file list transmitted by the Robot Framework, and circularly reading the file list by taking the file as a unit. A plurality of test data tables are established in Excel, and a python test framework traverses line by line from the first sheet of the Excel file. In the present embodiment, when the test data table based on Excel is designed, there is usually a relatively fixed writing format, for example, lines 1 and 2 are fixed as the first-level form and the second-level form name in the App to be tested, and the 3 rd behavior parameter name includes: caseNo, control _ type, title, caseName, except _ result, submit _ value, is _ value, actual _ result, message. And determining the operation content executed by the current test case by associating the control _ type and the caseName with the custom keywords in the Robot Framework. All the data in the 4 th row are test case data, the data in each row and each column are assigned to the parameters in the test cases according to the parameter corresponding relation in the case model, so that a complete test case is generated and is temporarily stored in the global variable, and the purpose of driving and executing the test through the data and the keywords is achieved.
3) And writing the converted Test cases into a Test Case file of a Robot Framework in batches according to the Excel file.
4) After the Test is finished, the Python Test box modifies the Test Case file, empties the generated Test Case, and restores the Test Case to the initial state.
Based on the example generation process for the four-step test, the following purposes are mainly achieved:
a) each Excel file can be read only 1 time to generate all executable test cases, and the file reading and writing expenses are reduced.
b) And rapidly generating a test case in real time according to Excel data in each test. Therefore, only the correctness of Excel data needs to be ensured, the test case script is maintained in zero, and the workload is reduced.
c) The test case script adopts a temporary storage mode, does not need to occupy the space of a magnetic disk, simplifies the file tree structure in the Robot Framework, and improves the tool operation efficiency.
d) The expected result uses the data format of dictionary type uniformly, can maintain the test data intuitively, support a plurality of examination items flexibly.
e) The data content submitted to the operation is analyzed into the test case according to a specific data format, is not influenced by field sequence, quantity and the like, and can flexibly support various scenes: filling in multiple submitted values in one line, submitting multiple fields at a time, assigning values to get the latest value multiple times, etc.
S20, controlling the Robot Framework test tool to be connected to the mobile terminal through an Apdium service, and enabling the mobile terminal to start a monitoring program and an application program to be tested;
referring to fig. 5, fig. 5 is a flow of executing a test script, and it should be noted that, when the test script is executed, the test script is first connected to an app service through a Robot Framework, and is connected to a mobile end device (or an Android simulator) by using the app service, a bootstrap. On the basis, in the tested Android application on the mobile terminal equipment, the UiAutomator executes the test instruction and records the test data. And finally, generating a test report, and writing the test result back into the Excel test data through a self-developed Python test framework.
S30, executing the test case through the monitoring program and the application program to be tested to obtain a test result, and writing the test result back to the test data or generating a test report according to the test result.
The processing process of the HTML test report is as follows:
in each test case, a Tag mark is made according to a specific format, and Tag content is recorded in a test report. After each Excel file is tested, a separate test report and a log file are generated. And after all the contents are tested, combining to generate a test report, and deleting the sub-report. By establishing the HTML test report, the sub-test reports generated in the test process can be checked for the conditions of a large number of use cases and long test time, and the test result can be known in time. And the test tasks of the packaging platform can be conveniently linked to the corresponding HTML test reports, so that the test results of the test tasks triggered by packaging each time can be conveniently tracked. Meanwhile, the data statistics mode of the test report supports customization, and different data statistics requirements can be flexibly met.
In addition, the processing procedure of writing the test result back to the Excel test data is as follows:
the Robot Framework defines a global list, and after each test case is executed, the Excel file name and the test case execution result of the currently executed test are temporarily stored in the list.
And after the test is finished, the Python test framework receives the data of the global list and opens the corresponding file according to the Excel file name stored in the list.
And traversing the test result set, reading a sheet page of Excel according to the sheet name, positioning the sheet page to a row position according to caseNO, and writing the test result and the detailed information into the actual _ result and message columns line by line.
By writing the test results back to the Excel test data, each file can be opened for 1 time to write all the test results, and the file reading and writing expenses are reduced. In addition, the test data written into the Excel comprises the last test execution time, the execution result, log information and the like of the row of data, so that the test data is convenient to maintain, and the problem of test abnormity is solved
According to the control testing method provided by the embodiment of the invention, the application control automatic test of the data and keyword dual-drive testing model is realized through the application of the Python, Apdium and Robot Framework testing tools, so that the control test is not restricted by manpower resources, the manpower and time cost of the test is reduced, and the testing efficiency, the test version coverage rate and the accuracy of the result are improved.
Referring to fig. 6, in an exemplary embodiment, the control testing method further includes regularly constructing a testing task through a preset time interval in a packaging platform, and automatically packaging the application program to be tested.
The Android application packaging is automatically completed every day by pre-configuring a timing construction task in the packaging platform. After the packaging is finished, a test task is established, a test interface is called to trigger the test, if the test executing condition is not met, a test failure result is returned, and the test task is terminated. And if not, returning a response result of successful test task initiation, and asynchronously triggering a subsequent series of test actions, including downloading the packaged Android application into a test environment, pushing the Android application to be tested to a target mobile terminal (or an Android simulator) by using an ADB command, and completing installation. And starting the Robot Framework to execute the test script. And after the execution of the test script is finished, generating a test report, calling a test result return interface, and writing the test conclusion and the test report into the corresponding test task.
Referring to fig. 7, in an exemplary embodiment, a control testing apparatus is further provided, including:
the test data traversing unit 01 is used for traversing the acquired test data through the python test Framework to generate a test case corresponding to a test script which can be identified based on a Robot Framework test tool;
a test program starting unit 02, configured to control the Robot Framework test tool to connect to a mobile terminal through an Appium service, and enable the mobile terminal to start a monitoring program and an application program to be tested;
the test result generating unit 03 is configured to execute the test case through the monitor and the application to be tested to obtain a test result, and write back the test result to the test data, or generate a test report according to the test result.
When the test data traversing unit 01 executes step S10, firstly, a tester needs to obtain test data, where the test data is usually designed by a technician, designed for the content of an application program to be tested, and usually in the form of a test data table, an Excel table is usually used, where a flow of the obtained test data is traversed through a python test Framework, so as to generate a test script and a test case that can be recognized by a Robot Framework test tool, as shown in fig. 2: a tester designs Excel-based test data, reads the data one by one through a python test Framework, converts the format of the data into a test case corresponding to a test script which can be identified by a Robot Framework test tool, stores the converted data into a test script file of the Robot Framework, judges whether the current test case is the last one or not after the execution of the storage step is finished, if so, the data traversal is finished, and if not, the data reading is continued until all the test cases in the data are read. Wherein, fig. 3 shows the identification of the test script recognizable by the Robot Framework test tool.
In addition, the test data traversal unit 01 is further configured to perform the following steps:
s201, respectively generating test cases which can be identified by a Robot Framework test tool according to the operation types of the execution test, wherein the test cases comprise a first test case, a second test case and a third test case;
s202, carrying out parameterization processing on parameters of the test case to obtain a parameter corresponding relation; the parameters comprise list names, test form names, operation types and expected results;
s203, circularly reading the received data of the test file list by taking a file as a unit, and assigning the test case data in the test file list to the parameters of the test case according to the corresponding relation of the parameters to obtain a complete test case chain;
s204, writing the test case chain into the Robot Framework test tool, modifying through the python test Framework, and emptying the current test case chain data after the modification is completed.
When the test script is executed, the test program starting unit 02 is connected to the app service through the Robot Framework, uses the app service to connect to the mobile terminal device (or Android simulator), runs the bootstrap monitoring program on the mobile terminal device, and starts the Android application to be tested, thereby establishing a complete communication session link. On the basis, in the tested Android application on the mobile terminal equipment, the UiAutomator executes the test instruction and records the test data. And finally, generating a test report, and writing the test result back into the Excel test data through a self-developed Python test framework.
When the test result generating unit 03 executes step S30, the procedure of the HTML test report is as follows:
in each test case, a Tag mark is made according to a specific format, and Tag content is recorded in a test report. After each Excel file is tested, a separate test report and a log file are generated. And after all the contents are tested, combining to generate a test report, and deleting the sub-report. By establishing the HTML test report, the sub-test reports generated in the test process can be checked for the conditions of a large number of use cases and long test time, and the test result can be known in time. And the test tasks of the packaging platform can be conveniently linked to the corresponding HTML test reports, so that the test results of the test tasks triggered by packaging each time can be conveniently tracked. Meanwhile, the data statistics mode of the test report supports customization, and different data statistics requirements can be flexibly met
In addition, the processing procedure of writing the test result back to the Excel test data is as follows:
the Robot Framework defines a global list, and after each test case is executed, the Excel file name and the test case execution result of the currently executed test are temporarily stored in the list.
And after the test is finished, the Python test framework receives the data of the global list and opens the corresponding file according to the Excel file name stored in the list.
And traversing the test result set, reading a sheet page of Excel according to the sheet name, positioning the sheet page to a row position according to caseNO, and writing the test result and the detailed information into the actual _ result and message columns line by line.
By writing the test results back to the Excel test data, each file can be opened for 1 time to write all the test results, and the file reading and writing expenses are reduced. And the test data written into the Excel comprises the last test execution time, the execution result, log information and the like of the line of data, so that the test data is convenient to maintain, and the problem of test abnormity is solved.
In one exemplary embodiment, there is also provided a computer terminal device including:
one or more processors;
a memory coupled to the processor for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a control testing method as described above.
The processor is used for controlling the overall operation of the computer terminal equipment so as to complete all or part of the steps of the fully-automatic power consumption prediction method. The memory is used to store various types of data to support the operation at the computer terminal device, which data may include, for example, instructions for any application or method operating on the computer terminal device, as well as application-related data. The Memory may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk.
The computer terminal Device may be implemented by one or more Application Specific 1 integrated circuits (AS 1C), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a controller, a microcontroller, a microprocessor, or other electronic components, and is configured to perform the control testing method according to any of the embodiments described above, and achieve the technical effects consistent with the methods described above.
In an exemplary embodiment, a computer readable storage medium is also provided, which comprises program instructions, which when executed by a processor, implement the steps of the control testing method according to any one of the above embodiments. For example, the computer readable storage medium may be the above-mentioned memory including program instructions, which can be executed by a processor of a computer terminal device to implement the control testing method according to any one of the above-mentioned embodiments, and achieve the technical effects consistent with the above-mentioned method.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (9)

1. A control testing method is characterized by comprising the following steps:
through the traversal of the acquired test data by the python test Framework, generating a test case corresponding to a test script which can be identified based on a Robot Framework test tool, wherein the test case comprises the following steps:
respectively generating test cases which can be identified by a Robot Framework test tool according to the operation types of the execution tests, wherein the test cases comprise a first test case, a second test case and a third test case;
carrying out parameterization processing on the parameters of the test case to obtain a parameter corresponding relation; the parameters comprise list names, test form names, operation types and expected results;
circularly reading the received data of the test file list by taking a file as a unit, and assigning the test case data in the test file list to the parameters of the test case according to the parameter corresponding relation to obtain a complete test case chain;
writing the test case chain into the Robot Framework test tool, modifying through the python test Framework, and emptying the current test case chain data after the modification is completed;
controlling the Robot Framework testing tool to be connected to a mobile terminal through an Apdium service, and enabling the mobile terminal to start a monitoring program and an application program to be tested;
and executing the test case through the monitoring program and the application program to be tested to obtain a test result, and writing the test result back to the test data or generating a test report according to the test result.
2. The control testing method according to claim 1, wherein the test file list is a list in Excel format.
3. The control testing method of claim 1, wherein the content of the list of test files comprises:
the first line and the second line are respectively a primary form name and a secondary form name in the application program to be tested; the third row is the parameter name; the fourth row to the tail of the list act on the test case data; the parameter names include caseNO, control _ type, title, caseNAM, except _ result, submit _ value, is _ value, actual _ result and message.
4. The control testing method of claim 3, wherein the writing the test result back into the test data comprises:
defining a global list through a Robot Framework test tool, and storing a file name and a test result corresponding to a currently executed test case to the global list after the execution of each test case in the test cases is finished;
after the execution of all test cases is finished, controlling a Python test framework to acquire data of the global list;
traversing the test result in the data of the global list, reading the page number of the table according to the name of the table where the current test result is located, locating the row position according to the caseNO, and writing the test result into the actual _ result and the message column line by line.
5. The control testing method of claim 1, wherein generating a test report according to the test result comprises:
marking each test case of the test cases according to a specific format, and storing a marking result to the test report; and a process for the preparation of a coating,
after the test of each test case is finished, generating a test sub report respectively; and after all the test cases are tested, combining the sub-reports to generate a test report, and deleting the sub-reports.
6. The control testing method of claim 1, further comprising regularly constructing a testing task through a time interval preset in a packaging platform, and automatically packaging the application to be tested.
7. A control testing apparatus, comprising:
the test data traversing unit is used for traversing the acquired test data through the python test Framework to generate a test case corresponding to a test script which can be identified based on a Robot Framework test tool, and comprises the following steps:
respectively generating test cases which can be identified by a Robot Framework test tool according to the operation types of the execution tests, wherein the test cases comprise a first test case, a second test case and a third test case;
carrying out parameterization processing on the parameters of the test case to obtain a parameter corresponding relation; the parameters comprise list names, test form names, operation types and expected results;
circularly reading the received data of the test file list by taking a file as a unit, and assigning the test case data in the test file list to the parameters of the test case according to the parameter corresponding relation to obtain a complete test case chain;
writing the test case chain into the Robot Framework test tool, modifying through the python test Framework, and emptying the current test case chain data after the modification is completed;
the test program starting unit is used for controlling the Robot Framework test tool to be connected to the mobile terminal through the Apdium service and enabling the mobile terminal to start a monitoring program and an application program to be tested;
and the test result generating unit is used for executing the test case through the monitoring program and the application program to be tested to obtain a test result, and writing the test result back to the test data or generating a test report according to the test result.
8. A computer terminal device, comprising:
one or more processors;
a memory coupled to the processor for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the control testing method of any of claims 1-6.
9. A computer-readable storage medium, on which a computer program is stored, the computer program being executable by a processor to implement a control testing method according to any one of claims 1 to 6.
CN202011207004.9A 2020-11-03 2020-11-03 Control testing method and device, terminal equipment and computer readable storage medium Active CN112100080B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011207004.9A CN112100080B (en) 2020-11-03 2020-11-03 Control testing method and device, terminal equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011207004.9A CN112100080B (en) 2020-11-03 2020-11-03 Control testing method and device, terminal equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112100080A CN112100080A (en) 2020-12-18
CN112100080B true CN112100080B (en) 2021-02-26

Family

ID=73784538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011207004.9A Active CN112100080B (en) 2020-11-03 2020-11-03 Control testing method and device, terminal equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112100080B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112597045A (en) * 2020-12-29 2021-04-02 福州富昌维控电子科技有限公司 PLC instruction quality detection method and terminal based on ladder diagram
CN113806150B (en) * 2021-08-16 2024-02-13 济南浪潮数据技术有限公司 Method, system, equipment and storage medium for remote test of storage server
CN113656305A (en) * 2021-08-16 2021-11-16 杭州安恒信息技术股份有限公司 Method for automatically generating test suite and related device
CN113535591B (en) * 2021-09-13 2021-12-14 季华实验室 Robot program verification method, device, electronic device and storage medium
CN113918395A (en) * 2021-09-29 2022-01-11 浪潮(山东)计算机科技有限公司 Test report generation method, device and medium
CN114238142A (en) * 2021-12-24 2022-03-25 四川启睿克科技有限公司 Automatic mobile terminal ui testing method based on apium + python
CN114048147B (en) * 2022-01-12 2022-04-12 广东拓思软件科学园有限公司 Test case generation method and device, storage medium and electronic equipment
CN114661623B (en) * 2022-05-26 2022-08-16 中建电子商务有限责任公司 UI automatic test method for testing React Native application

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104834600A (en) * 2015-04-28 2015-08-12 南京邮电大学 Method for testing Android application controls
CN106598859A (en) * 2016-12-16 2017-04-26 四川长虹电器股份有限公司 Appium multi-thread implementation system and method
CN109408357A (en) * 2017-12-04 2019-03-01 深圳市珍爱网信息技术有限公司 A kind of automatic interface testing method and device
CN110471831A (en) * 2019-06-21 2019-11-19 南京壹进制信息科技有限公司 A kind of automatic method and device of compatibility test

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10608889B2 (en) * 2018-06-29 2020-03-31 Hewlett Packard Enterprise Development Lp High-level interface to analytics engine
CN110245083A (en) * 2019-06-11 2019-09-17 四川长虹电器股份有限公司 A kind of automatic interface testing method based on python

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104834600A (en) * 2015-04-28 2015-08-12 南京邮电大学 Method for testing Android application controls
CN106598859A (en) * 2016-12-16 2017-04-26 四川长虹电器股份有限公司 Appium multi-thread implementation system and method
CN109408357A (en) * 2017-12-04 2019-03-01 深圳市珍爱网信息技术有限公司 A kind of automatic interface testing method and device
CN110471831A (en) * 2019-06-21 2019-11-19 南京壹进制信息科技有限公司 A kind of automatic method and device of compatibility test

Also Published As

Publication number Publication date
CN112100080A (en) 2020-12-18

Similar Documents

Publication Publication Date Title
CN112100080B (en) Control testing method and device, terminal equipment and computer readable storage medium
CN109871326B (en) Script recording method and device
CN108459962B (en) Code normalization detection method and device, terminal equipment and storage medium
US9684587B2 (en) Test creation with execution
CN107080945B (en) Method and device for testing artificial intelligence behaviors in game and electronic equipment
CN111462811A (en) Automatic testing method and device, storage medium and electronic equipment
CN110879781A (en) Program debugging method and device, electronic equipment and computer readable storage medium
CN111679982A (en) Automatic testing method for REST API (representational State transfer) interface software
CN110188045A (en) A kind of method and apparatus that statistics APP performance indicator is automated based on iOS system
CN113778898A (en) User interface automatic testing method and device, electronic equipment and storage medium
CN112732587A (en) Method and device for acquiring automatic test log, electronic equipment and storage medium
CN116841865A (en) Visual test method and device, electronic equipment and storage medium
CN113126993B (en) Automatic test method and system applied to vehicle detection software
CN117407312A (en) Application testing method, device, computer equipment and storage medium
CN113532872A (en) Vehicle-mounted machine road testing method, device, system and storage medium
CN107480050B (en) Test method for automatically testing update package
CN114297961A (en) Chip test case processing method and related device
CN114661615A (en) FPGA software testing method and device
CN113672505A (en) Multi-terminal interactive automatic regression testing method
CN109144524B (en) Version release method of subject game on education platform and electronic equipment
CN112269742A (en) Jenkins-based automatic white box testing method and device and readable storage medium
CN112015638A (en) Automatic testing method and system
CN111444108A (en) Behavior audit automatic testing method based on S7 industrial protocol
CN117631606B (en) PLC analog control method and device applied to cell formation component
CN113392026B (en) Interface automatic test method, system, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 510000 room 23bd, No. 109, TIYU West Road, Tianhe District, Guangzhou City, Guangdong Province

Patentee after: GUANGZHOU XUANWU WIRELESS TECHNOLOGY Co.,Ltd.

Address before: 32B, no.103b, TianLiHe Road, Guangzhou, 510000

Patentee before: GUANGZHOU XUANWU WIRELESS TECHNOLOGY Co.,Ltd.