CN111258898A - Automatic testing method and device, computer equipment and storage medium - Google Patents

Automatic testing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111258898A
CN111258898A CN202010043722.0A CN202010043722A CN111258898A CN 111258898 A CN111258898 A CN 111258898A CN 202010043722 A CN202010043722 A CN 202010043722A CN 111258898 A CN111258898 A CN 111258898A
Authority
CN
China
Prior art keywords
test
testing
specified
equipment
app
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.)
Granted
Application number
CN202010043722.0A
Other languages
Chinese (zh)
Other versions
CN111258898B (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.)
Shenzhen Ping An Medical Health Technology Service Co Ltd
Original Assignee
Ping An Medical and Healthcare Management 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 Ping An Medical and Healthcare Management Co Ltd filed Critical Ping An Medical and Healthcare Management Co Ltd
Priority to CN202010043722.0A priority Critical patent/CN111258898B/en
Publication of CN111258898A publication Critical patent/CN111258898A/en
Application granted granted Critical
Publication of CN111258898B publication Critical patent/CN111258898B/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/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)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The application discloses an automatic testing method, an automatic testing device, computer equipment and a storage medium, wherein the method comprises the following steps: when receiving an equipment test instruction triggered by a user, displaying a test interface; receiving a designated device identification which is selected by a user from a display interface and corresponds to designated test equipment; controlling each appointed test device to install a preset test APP respectively according to the appointed device identification; after each appointed testing device completes the installation of the testing APP, distributing the testing script corresponding to the appointed testing device to each testing APP; and when receiving an execution instruction which is triggered by a user and used for automatically testing all the appointed testing equipment, respectively controlling the corresponding appointed testing equipment to execute the test case in the testing script through each testing APP. According to the method and the device, large-batch automatic testing of the testing equipment is realized, and the efficiency of the automatic testing is improved. In addition, the automatic test is not limited to wired direct connection any more, and the flexibility of the automatic test process is effectively improved.

Description

Automatic testing method and device, computer equipment and storage medium
Technical Field
The application relates to the technical field of computer testing, in particular to an automatic testing method, an automatic testing device, computer equipment and a storage medium.
Background
The conventional automated testing technology applied to mobile devices is to start a HTTP (Hyper Text Transfer Protocol) server at a PC (Personal Computer), install a proxy server similar to a proxy at a mobile terminal, and then transmit a test command and collect a test result through TCP (transmission control Protocol) communication between the HTTP server and the proxy server, thereby completing automated testing. According to the existing automatic testing mode, due to the fact that testers need to manually control respective mobile devices to be directly connected to the HTTP server of the PC end, the connection number of the mobile devices is limited, when the number of the mobile devices needing to be tested is large, more testers need to be called to conduct testing work, difficulty in controlling the multiple mobile devices to simultaneously execute scripts is large, and therefore the flexibility of an automatic testing process is low, and the workload of manual testing is large. In addition, due to the adoption of the form that the continuous connection cannot be disconnected, the mobile device cannot be easily disconnected from the HTTP server at the PC end in the test process of executing the test script, otherwise, the execution result of the test script is easily lost, and the execution efficiency and the stability of the test script are greatly reduced.
Disclosure of Invention
The application mainly aims to provide an automatic testing method, an automatic testing device, computer equipment and a storage medium, and aims to solve the technical problems that an existing automatic testing mode easily causes low flexibility of an automatic testing process, large workload of manual testing, and low execution efficiency and stability of a testing script.
The application provides an automatic testing method, which comprises the following steps:
when an equipment testing instruction triggered by a user is received, displaying a testing interface, wherein the testing interface displays equipment identifications respectively corresponding to a plurality of testing equipment;
receiving a designated device identification corresponding to designated test devices selected from the display interface by the user, wherein the number of the designated test devices is one or more;
controlling each specified test device to install a preset test APP respectively according to the specified device identification, wherein each specified test device is correspondingly provided with one same test APP;
after each appointed testing device completes the installation of the testing APP, distributing the testing script corresponding to the appointed testing device to the testing APP in each appointed testing device, and installing the testing script in each corresponding appointed testing device through each testing APP;
and when receiving an execution instruction which is triggered by the user and used for automatically testing all the specified test equipment, respectively controlling each corresponding specified test equipment to execute the test case in the test script through each test APP.
Optionally, before the step of distributing the test script corresponding to the specified test device to the test APP in each of the specified test devices after each of the specified test devices completes installation of the test APP, the method includes:
triggering the pre-packaged application code to execute compiling operation according to the received equipment test instruction;
acquiring a compiling result generated after the application code executes the compiling operation;
and generating the test script according to the compiling result.
Optionally, the step of distributing the test script corresponding to the specified test device to the test APPs in each of the specified test devices includes:
acquiring the number of all the specified test devices;
generating a plurality of the test scripts with the same number;
correspondingly distributing each test script to a plurality of pre-created sub-threads with the same number;
distributing the received test scripts to test APPs in the designated test equipment corresponding to the sub threads one by one through the sub threads.
Optionally, after the step of controlling, by each test APP, each corresponding designated test device to execute the test case in the test script when receiving the execution instruction triggered by the user to automatically test all the designated test devices, the method includes:
receiving each test result respectively fed back by each test APP, wherein the test result is generated after the specified test equipment executes the test case in the test script;
and displaying each test result.
Optionally, after the step of receiving the test results fed back by the test APPs respectively, the method includes:
filling all the test results into a pre-created report template to generate a corresponding test report;
and sending the test report to a preset receiving end.
Optionally, after the step of controlling, by each test APP, each corresponding designated test device to execute the test case in the test script when receiving the execution instruction triggered by the user to automatically test all the designated test devices, the method includes:
judging whether an interface debugging instruction for a specified interface triggered by the user is received;
if yes, intercepting all requests of the specified test equipment through a pre-established interceptor, and displaying current interface calling information;
judging whether an operation instruction for the specified interface input by the user is received;
and if so, executing corresponding processing on the specified interface according to the operation instruction.
Optionally, after the step of performing corresponding processing on the designated interface according to the operation instruction, the method includes:
acquiring a processing result generated after the designated interface executes corresponding processing;
judging whether the designated interface has error information or not according to the processing result;
if so, positioning an abnormal fault position corresponding to the error information;
and sending the error information and the abnormal fault position to a tester.
The application also provides an automatic testing arrangement, includes:
the device comprises a first receiving module, a second receiving module and a control module, wherein the first receiving module is used for displaying a test interface when receiving a device test instruction triggered by a user, and the test interface displays device identifications respectively corresponding to a plurality of test devices;
the second receiving module is used for receiving a designated device identifier which is selected by the user from the display interface and corresponds to designated test devices, wherein the number of the designated test devices is one or more;
the installation module is used for controlling each specified test device to install a preset test APP respectively according to the specified device identification, wherein each specified test device is correspondingly provided with one same test APP;
the distribution module is used for distributing the test script corresponding to the specified test equipment to the test APP in each specified test equipment after each specified test equipment completes the installation of the test APP, so that the test script is installed in each corresponding specified test equipment through each test APP;
and the test module is used for controlling the corresponding appointed test equipment to execute the test case in the test script through each test APP when receiving an execution instruction which is triggered by the user and used for automatically testing all the appointed test equipment.
The present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method.
The automated testing method, the automated testing device, the computer equipment and the storage medium have the following beneficial effects:
according to the automatic testing method, the automatic testing device, the computer equipment and the storage medium, when an equipment testing instruction triggered by a user is received, a testing interface is displayed, wherein equipment identifications respectively corresponding to a plurality of testing equipment are displayed on the testing interface; receiving a designated device identification corresponding to designated test devices selected from the display interface by the user, wherein the number of the designated test devices is one or more; controlling each specified test device to install a preset test APP respectively according to the specified device identification, wherein each specified test device is correspondingly provided with one same test APP; after each appointed testing device completes the installation of the testing APP, distributing the testing script corresponding to the appointed testing device to the testing APP in each appointed testing device, and installing the testing script in each corresponding appointed testing device through each testing APP; and when receiving an execution instruction which is triggered by the user and used for automatically testing all the specified test equipment, respectively controlling each corresponding specified test equipment to execute the test case in the test script through each test APP. Through the method and the device, large-batch automatic testing of the testing equipment is realized, the efficiency of the automatic testing is effectively improved, the workload of manual testing is reduced, and the labor cost is reduced. In addition, the automatic testing device can communicate with the testing equipment through the testing APP arranged in the testing equipment, is not limited to wired connection, greatly increases the number of machine types of the manageable testing equipment for testing, and effectively improves the intelligence and flexibility of the automatic testing process.
Drawings
FIG. 1 is a schematic flow chart of an automated testing method according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of an automated testing apparatus according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It should be noted that all directional indicators (such as upper, lower, left, right, front and rear … …) in the embodiments of the present application are only used to explain the relative position relationship between the components, the movement situation, etc. in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indicator is changed accordingly, and the connection may be a direct connection or an indirect connection.
Referring to fig. 1, an automated testing method according to an embodiment of the present application includes:
s1: when an equipment testing instruction triggered by a user is received, displaying a testing interface, wherein the testing interface displays equipment identifications respectively corresponding to a plurality of testing equipment;
s2: receiving a designated device identification corresponding to designated test devices selected from the display interface by the user, wherein the number of the designated test devices is one or more;
s3: controlling each specified test device to install a preset test APP respectively according to the specified device identification, wherein each specified test device is correspondingly provided with one same test APP;
s4: after each appointed testing device completes the installation of the testing APP, distributing the testing script corresponding to the appointed testing device to the testing APP in each appointed testing device, and installing the testing script in each corresponding appointed testing device through each testing APP;
s5: and when receiving an execution instruction which is triggered by the user and used for automatically testing all the specified test equipment, respectively controlling each corresponding specified test equipment to execute the test case in the test script through each test APP.
As described in the above steps S1 to S5, the execution subject of the embodiment of the method is an automated testing apparatus, which may be a mobile distribution testing platform. In practical application, the mobile distribution test platform may be implemented by a virtual device, such as a software code, or by an entity device in which a relevant execution code is written or integrated, and may perform human-computer interaction with a user through a keyboard, a mouse, a remote controller, a touch panel, or a voice control device. The automatic testing device provided by the embodiment can effectively improve the testing efficiency of the automatic testing of the mobile equipment. Specifically, it is first determined whether an equipment test instruction triggered by a user is received, where a function switch corresponding to the equipment test instruction may be preset on the automatic test apparatus, and the user may trigger the equipment test instruction through the function switch. The function switch can be a virtual icon, a character key or a voice command. When a user touches the virtual icon or the character key or sends a preset voice, the automatic testing device detects that the virtual icon or the character key receives a touch signal, or the automatic testing device receives the preset voice, and then the user is judged to trigger a function switch of an equipment testing instruction currently. And if an equipment test instruction triggered by a user is received, displaying a test interface, wherein the test interface displays equipment identifications respectively corresponding to the plurality of test equipment, so that the user can select the required specified test equipment to perform automatic test according to personal requirements. After receiving the appointed equipment identification corresponding to the appointed testing equipment selected by the user from the display interface, controlling each appointed testing equipment to install the preset testing APP respectively according to the appointed equipment identification. The number of the appointed test equipment is one or more, and each appointed test equipment is correspondingly provided with one same test APP. After each appointed device completes the installation of the test APP, the test scripts corresponding to the appointed test devices are distributed to the test APPs in the appointed test devices, and the test scripts are installed in the corresponding appointed test devices through the test APPs. The test script can be automatically generated by an automatic test device, and can also be input by a developer after being compiled according to actual functional requirements. The test APP is used for carrying out wireless communication with the automatic test device and has the functions of downloading, managing, uploading and the like of test scripts distributed by the automatic test device. And finally, when receiving an execution instruction which is triggered by the user and used for automatically testing all the specified test equipment, respectively controlling the corresponding specified test equipment to execute the test cases in the test script through each test APP so as to automatically test all the specified test equipment. The preset key corresponding to the specified instruction can be set on the current page, the preset key belongs to a virtual control, optionally, a display text prompt can be set on the preset key, and the display text prompt is used for prompting a user what function the preset key can generate. For example, the display text prompts "an execution instruction for performing an automatic test on the test equipment" corresponding to the execution instruction. In addition, the test script includes a plurality of test cases, and each test case may include a plurality of test steps. The automatic test system has the advantages that the large-batch automatic test of the test equipment is realized through the embodiment, the efficiency of the automatic test is effectively improved, the workload of manual test is reduced, and the labor cost is reduced. In addition, the automatic test beard device can communicate with the test equipment through the test APP arranged in the test equipment, is not limited to wired connection, greatly increases the manageable model number of the test equipment for testing, and effectively improves the intelligence and flexibility of the automatic test flow.
Further, in an embodiment of the present application, before the step S4, the method includes:
s400: triggering the pre-packaged application code to execute compiling operation according to the received equipment test instruction;
s401: acquiring a compiling result generated after the application code executes the compiling operation;
s402: and generating the test script according to the compiling result.
As described in steps S400 to S402, before distributing the test script corresponding to the specified test device to each test APP, a process of generating the test script is further included. Specifically, the automated testing apparatus stores application codes used for generating the test scripts in advance, and when a device test instruction sent by a user is received, the application codes packaged in advance are automatically triggered to execute compiling operation, so that a corresponding compiling result is generated by compiling the application codes of the test scripts, and then the test scripts used for automatically testing the specified testing devices are generated according to the compiling result. The application code may be compiled by a compiler to obtain the compiling result (i.e., the test script), and the compiling method may use an existing common code compiling scheme, which is not described herein again. According to the embodiment, the application code for generating the test script is preset, so that when the test equipment needs to be automatically tested, the test script for automatically testing can be automatically generated, the time for manually writing the test code by a user is effectively reduced, and the use experience of the user is improved. In another embodiment, the test script may be written by a developer and input into the testing device, instead of being automatically generated by the testing device. Specifically, before the step of distributing the test script corresponding to the specified test device to each of the test APPs, the method includes: receiving a test script input by a tester; and storing the test script. The automatic test script is a program code written by a tester correspondingly according to the function of the test equipment, and the program code can be automatically run by the test equipment and is used for automatically testing each function of the test equipment. In addition, the test script can provide a corresponding test result after the operation is completed.
Further, in an embodiment of the present application, the step S4 includes:
s410: acquiring the number of all the specified test devices;
s411: generating a plurality of the test scripts with the same number;
s412: correspondingly distributing each test script to a plurality of pre-created sub-threads with the same number;
s413: distributing the received test scripts to test APPs in the designated test equipment corresponding to the sub threads one by one through the sub threads.
As described in steps S410 to S413, when the user has a requirement for testing a plurality of specified test devices, the automatic test apparatus may allocate a plurality of test scripts from the thread pool configured in the automatic test apparatus, and correspondingly distribute the plurality of test scripts to the test APPs in each specified test device through the thread pool. Specifically, the number of all the above-described specified test devices is first acquired. After the number of all the specified test devices is obtained, a plurality of test scripts of the same number are generated. The same number of test scripts as described above can be obtained by copying the pre-generated original test script. Then correspondingly distributing each test script to a plurality of pre-created sub-threads with the same number as the test scripts; the thread pool is divided into a plurality of sub-threads, each sub-thread is correspondingly connected with a designated testing device, and the thread pool is used for limiting the number of threads executed in the automatic testing device. And finally, distributing the received test scripts to test APPs in specified test equipment corresponding to the sub-threads one by one through the sub-threads. The embodiment can automatically set the corresponding number of the sub-threads according to the number of the specified test equipment, and effectively realizes parallel distribution of the test scripts for each specified test equipment, thereby achieving the best effect of system operation, and effectively avoiding the situations that fewer threads waste system resources, more threads cause system congestion and low efficiency.
Further, in an embodiment of the present application, after the step S5, the method includes:
s500: receiving each test result respectively fed back by each test APP, wherein the test result is generated after the specified test equipment executes the test case in the test script;
s501: and displaying each test result.
As described in steps S500 to S501, after the test case in the test script is executed by the specified test device, the corresponding test result is automatically generated. After the step of respectively controlling each corresponding specified test device to execute the test case in the test script through each test APP, the method includes: and receiving each test result fed back by each test APP, wherein the test result is generated after the specified test device executes the test case in the test script. In addition, the test result may specifically include: the test success or test failure may be represented by different identifiers, for example, the test result is represented by a first identifier 1 as test success, the test result is represented by a second identifier 0 as test failure, and the test result may be saved in a json manner. After receiving the test results, displaying the test results, for example, displaying the test results on a current interface, so that a user can clearly and clearly see the test results of each specified test device after the test script is run. The test results can be displayed in a list form on a current interface of the automatic test device, each designated test device is a line in the list, and each line of designated test devices displays the corresponding test result after the test script is executed. In addition, in the process of carrying out automatic testing on the specified testing equipment, the testing APP can implement and monitor the execution process of each testing script in the specified testing equipment, and obtain the testing result of each specified testing equipment after the execution of the testing script is completed, and the testing result is transmitted back to the automatic testing device in a mode that the testing APP completes the instant return of one testing script according to each test. When the automatic test device learns the test result, the test result of the test script on the corresponding specified test equipment is displayed on the corresponding line. Therefore, the tester can check the test result corresponding to each appointed test device through the interface of the automatic test device, and the tester can conveniently monitor the test result included in the whole automatic test item.
Further, in an embodiment of the present application, after the step S500, the method includes:
s502: filling all the test results into a pre-created report template to generate a corresponding test report;
s503: and sending the test report to a preset receiving end.
As described in steps S502 to S503, after receiving each test result returned by each test APP, a corresponding test report may be further generated according to all the test results. Specifically, first, all the test results are filled into a pre-created report template to generate a corresponding test report, where the test report may include: name of test case, number of test case, test result and running time. After the test report is generated, the test report may also be displayed, for example, each test result is displayed on a current interface for a user to clearly view. For example, statistics may be performed based on the test results, for example, the test results of all the specified test devices are output in the form of a test report after being counted and integrated. In addition, the content of the test report at least comprises statistical information such as the total number of test cases, the number of test passes, the test pass rate, the number of test failures, the test failure rate, the test failure case display, the failure reason display and the like. And the statistical information can be displayed by a column diagram, a line diagram or a pie chart on the current interface, so that a user can visually and clearly know the test related information of the automatic test. Further, the generated test report can be sent to a preset receiving end, so that a receiving end user can receive test related information of the automatic test and perform subsequent corresponding processing according to the test report.
In an embodiment of the application, after the step S5, the method includes:
s510: judging whether an interface debugging instruction for a specified interface triggered by the user is received;
s511: if yes, intercepting all requests of the specified test equipment through a pre-established interceptor, and displaying current interface calling information;
s512: judging whether an operation instruction for the specified interface input by the user is received;
s513: and if so, executing corresponding processing on the specified interface according to the operation instruction.
As described in the above steps S510 to S513, in the process of performing the automatic test on the specified test device at the front end, the automatic test apparatus further has a function of performing interface debugging on the back-end interface. Specifically, it is first determined whether an interface debugging instruction for a specified interface triggered by a user is received. The designated interface is any one of all interfaces included in the back end. In addition, the trigger mode of the interface debugging instruction may refer to the trigger mode of the device test instruction or the execution instruction, which is not described herein again. And if the interface debugging instruction is received, intercepting all requests of the specified test equipment through a pre-established interceptor, and displaying current interface calling information. The method and the device have the advantages that all requests of the specified testing equipment are intercepted, so that a tester can conveniently check the calling condition of the back-end interface. Further, the automated test equipment also provides breakpoint and rewrite functionality for backend interfaces. When the operation instruction for the specified interface input by the user is received, corresponding processing is executed on the specified interface according to the operation instruction, so that the interface debugging function for the back-end interface is conveniently and quickly provided for the user. For example, the tester may modify the requests and responses of the interfaces (e.g., suspend and rewrite the process), or set breakpoints for specified interfaces, etc.
Further, in an embodiment of the present application, after the step S513, the method includes:
s514: acquiring a processing result generated after the designated interface executes corresponding processing;
s515: judging whether the designated interface has error information or not according to the processing result;
s516: if so, positioning an abnormal fault position corresponding to the error information;
s517: and sending the error information and the abnormal fault position to a tester.
As described in steps S514 to S517, after the corresponding processing is performed on the designated interface, a corresponding processing result is generated. And in the above processing result, there may be a case that the interface error exists in the designated interface, and at this time, it is necessary to find out the error information of the interface error and send it to the tester for corresponding processing. Specifically, a processing result generated by the designated interface after executing the corresponding processing is first obtained. And then judging whether the specified interface has error information or not according to the processing result. If the error information exists, the abnormal fault position corresponding to the error information is positioned. In which, a method (e.g., alert static method) corresponding to exception handling packaged in advance in the automatic test apparatus may be called to quickly and accurately locate an exception fault location corresponding to the error information. After the abnormal fault position is obtained, the error information and the abnormal fault position are sent to a tester, so that the tester can clearly check the abnormal fault position with the error information in the specified interface and detailed error information, the interface can be repaired again according to the error information, and the development and communication efficiency of the tester is effectively improved.
Referring to fig. 2, an embodiment of the present application further provides an automatic testing apparatus, including:
the device comprises a first receiving module 1, a second receiving module and a control module, wherein the first receiving module is used for displaying a test interface when receiving a device test instruction triggered by a user, and the test interface displays device identifications respectively corresponding to a plurality of test devices;
the second receiving module 2 is configured to receive a specified device identifier corresponding to a specified test device, which is selected from the display interface by the user, where the number of the specified test devices is one or more;
the installation module 3 is used for controlling each specified test device to install a preset test APP respectively according to the specified device identification, wherein each specified test device is correspondingly provided with one same test APP;
the distribution module 4 is configured to distribute, after each of the designated test devices completes installation of the test APP, the test script corresponding to the designated test device to the test APP in each of the designated test devices, so as to install the test script in each of the corresponding designated test devices through each of the test APPs;
and the test module 5 is configured to, when receiving an execution instruction, triggered by the user, for automatically testing all the specified test devices, respectively control, through each of the test APPs, each of the corresponding specified test devices to execute the test case in the test script.
In this embodiment, the implementation processes of the functions and functions of the first receiving module, the second receiving module, the installation module, the distribution module and the test module in the automatic testing apparatus are specifically detailed in the implementation processes corresponding to steps S1 to S5 in the automatic testing method, and are not described herein again.
Further, in an embodiment of the present application, the automatic testing apparatus includes:
the triggering module is used for triggering the application codes packaged in advance to execute compiling operation according to the received equipment testing instruction;
the first acquisition module is used for acquiring a compiling result generated after the application code executes the compiling operation;
and the first generation module is used for generating the test script according to the compiling result.
In this embodiment, the implementation processes of the functions and functions of the triggering module, the first obtaining module, and the first generating module in the automatic testing apparatus are specifically detailed in the implementation processes corresponding to steps S400 to S402 in the automatic testing method, and are not described herein again.
Further, in an embodiment of the present application, the distribution module includes:
the acquisition unit is used for acquiring the number of all the specified test equipment;
a generating unit configured to generate a plurality of test scripts equal to the number;
the distribution unit is used for correspondingly distributing each test script to a plurality of pre-created sub-threads with the same number;
and the distribution unit is used for distributing the received test scripts to test APPs in the specified test equipment corresponding to the sub threads one by one through the sub threads.
In this embodiment, the implementation processes of the functions and functions of the obtaining unit, the generating unit, the allocating unit and the distributing unit in the automatic testing apparatus are specifically detailed in the implementation processes corresponding to steps S410 to S413 in the automatic testing method, and are not described herein again.
Further, in an embodiment of the present application, the automatic testing apparatus includes:
a third receiving module, configured to receive each test result fed back by each test APP, where the test result is generated after the specified test device executes the test case in the test script;
and the display module is used for displaying each test result.
In this embodiment, the implementation process of the functions and functions of the third receiving module and the displaying module in the automatic testing apparatus is specifically detailed in the implementation process corresponding to steps S500 to S501 in the automatic testing method, and is not described herein again.
Further, in an embodiment of the present application, the automatic testing apparatus includes:
the second generation module is used for filling all the test results into a pre-created report template to generate a corresponding test report;
and the first sending module is used for sending the test report to a preset receiving end.
In this embodiment, the implementation process of the functions and actions of the second generating module and the first sending module in the automatic testing apparatus is specifically described in the implementation processes corresponding to steps S502 to S503 in the automatic testing method, and is not described herein again.
Further, in an embodiment of the present application, the automatic testing apparatus includes:
the first judgment module is used for judging whether an interface debugging instruction which is triggered by the user and is used for an appointed interface is received;
the interception module is used for intercepting all requests of the specified test equipment through a pre-established interceptor and displaying current interface calling information if the requests are received;
the second judgment module is used for judging whether an operation instruction for the specified interface input by the user is received or not;
and if so, executing corresponding processing on the specified interface according to the operation instruction.
In this embodiment, the implementation processes of the functions and functions of the first determining module, the intercepting module, the second determining module, and the processing module in the automatic testing apparatus are specifically detailed in the implementation processes corresponding to steps S510 to S513 in the automatic testing method, and are not described herein again.
Further, in an embodiment of the present application, the automatic testing apparatus further includes:
the second acquisition module is used for acquiring a processing result generated after the designated interface executes corresponding processing;
the third judging module is used for judging whether the specified interface has error information or not according to the processing result;
the positioning module is used for positioning the abnormal fault position corresponding to the error information if the error information is in the positive state;
and the second sending module is used for sending the error information and the abnormal fault position to a tester.
In this embodiment, the implementation processes of the functions and functions of the second obtaining module, the third determining module, the positioning module and the second sending module in the automatic testing apparatus are specifically detailed in the implementation processes corresponding to steps S514 to S517 in the automatic testing method, and are not described herein again.
Referring to fig. 3, a computer device, which may be a server and whose internal structure may be as shown in fig. 3, is also provided in the embodiment of the present application. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is designed to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used for storing data such as test APP and test scripts. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an automated testing method.
The processor executes the steps of the automated testing method:
when an equipment testing instruction triggered by a user is received, displaying a testing interface, wherein the testing interface displays equipment identifications respectively corresponding to a plurality of testing equipment;
receiving a designated device identification corresponding to designated test devices selected from the display interface by the user, wherein the number of the designated test devices is one or more;
controlling each specified test device to install a preset test APP respectively according to the specified device identification, wherein each specified test device is correspondingly provided with one same test APP;
after each appointed testing device completes the installation of the testing APP, distributing the testing script corresponding to the appointed testing device to the testing APP in each appointed testing device, and installing the testing script in each corresponding appointed testing device through each testing APP;
and when receiving an execution instruction which is triggered by the user and used for automatically testing all the specified test equipment, respectively controlling each corresponding specified test equipment to execute the test case in the test script through each test APP.
Those skilled in the art will appreciate that the structure shown in fig. 3 is only a block diagram of a part of the structure related to the present application, and does not constitute a limitation to the apparatus and the computer device to which the present application is applied.
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements an automated testing method, and specifically:
when an equipment testing instruction triggered by a user is received, displaying a testing interface, wherein the testing interface displays equipment identifications respectively corresponding to a plurality of testing equipment;
receiving a designated device identification corresponding to designated test devices selected from the display interface by the user, wherein the number of the designated test devices is one or more;
controlling each specified test device to install a preset test APP respectively according to the specified device identification, wherein each specified test device is correspondingly provided with one same test APP;
after each appointed testing device completes the installation of the testing APP, distributing the testing script corresponding to the appointed testing device to the testing APP in each appointed testing device, and installing the testing script in each corresponding appointed testing device through each testing APP;
and when receiving an execution instruction which is triggered by the user and used for automatically testing all the specified test equipment, respectively controlling each corresponding specified test equipment to execute the test case in the test script through each test APP.
To sum up, according to the automated testing method, the automated testing device, the computer device, and the storage medium provided in the embodiments of the present application, when receiving a device testing instruction triggered by a user, a testing interface is displayed, where the testing interface displays device identifiers respectively corresponding to a plurality of testing devices; receiving a designated device identification corresponding to designated test devices selected from the display interface by the user, wherein the number of the designated test devices is one or more; controlling each specified test device to install a preset test APP respectively according to the specified device identification, wherein each specified test device is correspondingly provided with one same test APP; after each appointed testing device completes the installation of the testing APP, distributing the testing script corresponding to the appointed testing device to the testing APP in each appointed testing device, and installing the testing script in each corresponding appointed testing device through each testing APP; and when receiving an execution instruction which is triggered by the user and used for automatically testing all the specified test equipment, respectively controlling each corresponding specified test equipment to execute the test case in the test script through each test APP. Through the method and the device, large-batch automatic testing of the testing equipment is realized, the efficiency of the automatic testing is effectively improved, the workload of manual testing is reduced, and the labor cost is reduced. In addition, the automatic testing device can communicate with the testing equipment through the testing APP arranged in the testing equipment, is not limited to wired connection, greatly increases the number of machine types of the manageable testing equipment for testing, and effectively improves the intelligence and flexibility of the automatic testing process.
It will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by hardware associated with instructions of a computer program, which may be stored on a non-volatile computer-readable storage medium, and when executed, may include processes of the above embodiments of the methods. Any reference to memory, storage, database, or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (10)

1. An automated testing method, comprising:
when an equipment testing instruction triggered by a user is received, displaying a testing interface, wherein the testing interface displays equipment identifications respectively corresponding to a plurality of testing equipment;
receiving a designated device identification corresponding to designated test devices selected from the display interface by the user, wherein the number of the designated test devices is one or more;
controlling each specified test device to install a preset test APP respectively according to the specified device identification, wherein each specified test device is correspondingly provided with one same test APP;
after each appointed testing device completes the installation of the testing APP, distributing the testing script corresponding to the appointed testing device to the testing APP in each appointed testing device, and installing the testing script in each corresponding appointed testing device through each testing APP;
and when receiving an execution instruction which is triggered by the user and used for automatically testing all the specified test equipment, respectively controlling each corresponding specified test equipment to execute the test case in the test script through each test APP.
2. The automated testing method of claim 1, wherein before the step of distributing the test script corresponding to each of the designated testing devices to the test APP in each of the designated testing devices after each of the designated testing devices completes installation of the test APP, the method comprises:
triggering the pre-packaged application code to execute compiling operation according to the received equipment test instruction;
acquiring a compiling result generated after the application code executes the compiling operation;
and generating the test script according to the compiling result.
3. The automated testing method of claim 1, wherein the step of distributing the test script corresponding to the designated testing device to the testing APPs within each of the designated testing devices comprises:
acquiring the number of all the specified test devices;
generating a plurality of the test scripts with the same number;
correspondingly distributing each test script to a plurality of pre-created sub-threads with the same number;
distributing the received test scripts to test APPs in the designated test equipment corresponding to the sub threads one by one through the sub threads.
4. The automated testing method according to claim 1, wherein after the step of controlling, by each of the testing APPs, each of the corresponding designated testing devices to execute the test case in the testing script when receiving the execution instruction triggered by the user to automatically test all of the designated testing devices, the method includes:
receiving each test result respectively fed back by each test APP, wherein the test result is generated after the specified test equipment executes the test case in the test script;
and displaying each test result.
5. The automated testing method of claim 4, wherein the step of receiving the test results fed back by the test APPs respectively comprises:
filling all the test results into a pre-created report template to generate a corresponding test report;
and sending the test report to a preset receiving end.
6. The automated testing method according to claim 1, wherein after the step of controlling, by each of the testing APPs, each of the corresponding designated testing devices to execute the test case in the testing script when receiving the execution instruction triggered by the user to automatically test all of the designated testing devices, the method includes:
judging whether an interface debugging instruction for a specified interface triggered by the user is received;
if yes, intercepting all requests of the specified test equipment through a pre-established interceptor, and displaying current interface calling information;
judging whether an operation instruction for the specified interface input by the user is received;
and if so, executing corresponding processing on the specified interface according to the operation instruction.
7. The automated testing method according to claim 6, wherein the step of performing the corresponding processing on the designated interface according to the operation instruction comprises:
acquiring a processing result generated after the designated interface executes corresponding processing;
judging whether the designated interface has error information or not according to the processing result;
if so, positioning an abnormal fault position corresponding to the error information;
and sending the error information and the abnormal fault position to a tester.
8. An automated testing apparatus, comprising:
the device comprises a first receiving module, a second receiving module and a control module, wherein the first receiving module is used for displaying a test interface when receiving a device test instruction triggered by a user, and the test interface displays device identifications respectively corresponding to a plurality of test devices;
the second receiving module is used for receiving a designated device identifier which is selected by the user from the display interface and corresponds to designated test devices, wherein the number of the designated test devices is one or more;
the installation module is used for controlling each specified test device to install a preset test APP respectively according to the specified device identification, wherein each specified test device is correspondingly provided with one same test APP;
the distribution module is used for distributing the test script corresponding to the specified test equipment to the test APP in each specified test equipment after each specified test equipment completes the installation of the test APP, so that the test script is installed in each corresponding specified test equipment through each test APP;
and the test module is used for controlling the corresponding appointed test equipment to execute the test case in the test script through each test APP when receiving an execution instruction which is triggered by the user and used for automatically testing all the appointed test equipment.
9. A computer device comprising a memory and a processor, the memory having stored therein a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method according to any one of claims 1 to 7.
10. A storage medium having a computer program stored thereon, the computer program, when being executed by a processor, realizing the steps of the method of any one of claims 1 to 7.
CN202010043722.0A 2020-01-15 2020-01-15 Automatic testing method and device, computer equipment and storage medium Active CN111258898B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010043722.0A CN111258898B (en) 2020-01-15 2020-01-15 Automatic testing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010043722.0A CN111258898B (en) 2020-01-15 2020-01-15 Automatic testing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111258898A true CN111258898A (en) 2020-06-09
CN111258898B CN111258898B (en) 2023-03-28

Family

ID=70948959

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010043722.0A Active CN111258898B (en) 2020-01-15 2020-01-15 Automatic testing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111258898B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111679652A (en) * 2020-06-11 2020-09-18 深圳创维-Rgb电子有限公司 Test method and device based on smart screen, smart screen and readable storage medium
CN111913886A (en) * 2020-08-07 2020-11-10 平安科技(深圳)有限公司 Mobile phone APP automatic test method, device, equipment and storage medium
CN112100068A (en) * 2020-09-14 2020-12-18 贵州电网有限责任公司 Method for testing redirection of communication object of terminal software
CN113238901A (en) * 2021-05-10 2021-08-10 展讯通信(上海)有限公司 Multi-device automatic testing method and device, storage medium and computer device
CN113567153A (en) * 2021-09-23 2021-10-29 深圳市星卡软件技术开发有限公司 One-key action test method and device and computer equipment
CN113765693A (en) * 2021-01-29 2021-12-07 北京京东拓先科技有限公司 Demand testing method, device, server and storage medium
CN116166554A (en) * 2023-02-24 2023-05-26 上海硬通网络科技有限公司 Automated test system, method and storage medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365770A (en) * 2012-04-09 2013-10-23 陆兵 Mobile terminal software testing system and software testing method
CN103544100A (en) * 2012-07-12 2014-01-29 腾讯科技(深圳)有限公司 Method, system and client side for testing APP of portable data processing equipment
US20150135164A1 (en) * 2013-11-08 2015-05-14 Halliburton Energy Services, Inc. Integrated Software Testing Management
CN106681924A (en) * 2016-12-30 2017-05-17 深圳天珑无线科技有限公司 Software testing method and software testing system
CN107102949A (en) * 2017-06-30 2017-08-29 上海木爷机器人技术有限公司 Application program off-line test method and instrument
CN107122291A (en) * 2016-02-25 2017-09-01 北京博酷科技有限公司 Mobile terminal software stability test method and apparatus
CN107329899A (en) * 2017-07-04 2017-11-07 广州云测信息技术有限公司 A kind of application compatibility method of testing and device
CN108255730A (en) * 2018-01-23 2018-07-06 平安普惠企业管理有限公司 Software interface test approach, test equipment, storage medium and device
CN108572919A (en) * 2018-05-30 2018-09-25 平安普惠企业管理有限公司 Automated testing method, device, computer equipment and storage medium
CN108647143A (en) * 2018-05-09 2018-10-12 平安普惠企业管理有限公司 MOCK interface test methods, device, computer equipment and storage medium
CN109471789A (en) * 2018-09-04 2019-03-15 中国平安人寿保险股份有限公司 For the multi-apparatus management method of test, device, server and storage medium
CN109582579A (en) * 2018-11-30 2019-04-05 腾讯音乐娱乐科技(深圳)有限公司 Applied program testing method, device, electronic equipment and storage medium
CN109766258A (en) * 2018-11-30 2019-05-17 北京奇艺世纪科技有限公司 A kind of performance test methods, device and computer readable storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365770A (en) * 2012-04-09 2013-10-23 陆兵 Mobile terminal software testing system and software testing method
CN103544100A (en) * 2012-07-12 2014-01-29 腾讯科技(深圳)有限公司 Method, system and client side for testing APP of portable data processing equipment
US20150135164A1 (en) * 2013-11-08 2015-05-14 Halliburton Energy Services, Inc. Integrated Software Testing Management
CN107122291A (en) * 2016-02-25 2017-09-01 北京博酷科技有限公司 Mobile terminal software stability test method and apparatus
CN106681924A (en) * 2016-12-30 2017-05-17 深圳天珑无线科技有限公司 Software testing method and software testing system
CN107102949A (en) * 2017-06-30 2017-08-29 上海木爷机器人技术有限公司 Application program off-line test method and instrument
CN107329899A (en) * 2017-07-04 2017-11-07 广州云测信息技术有限公司 A kind of application compatibility method of testing and device
CN108255730A (en) * 2018-01-23 2018-07-06 平安普惠企业管理有限公司 Software interface test approach, test equipment, storage medium and device
CN108647143A (en) * 2018-05-09 2018-10-12 平安普惠企业管理有限公司 MOCK interface test methods, device, computer equipment and storage medium
CN108572919A (en) * 2018-05-30 2018-09-25 平安普惠企业管理有限公司 Automated testing method, device, computer equipment and storage medium
CN109471789A (en) * 2018-09-04 2019-03-15 中国平安人寿保险股份有限公司 For the multi-apparatus management method of test, device, server and storage medium
CN109582579A (en) * 2018-11-30 2019-04-05 腾讯音乐娱乐科技(深圳)有限公司 Applied program testing method, device, electronic equipment and storage medium
CN109766258A (en) * 2018-11-30 2019-05-17 北京奇艺世纪科技有限公司 A kind of performance test methods, device and computer readable storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111679652A (en) * 2020-06-11 2020-09-18 深圳创维-Rgb电子有限公司 Test method and device based on smart screen, smart screen and readable storage medium
CN111913886A (en) * 2020-08-07 2020-11-10 平安科技(深圳)有限公司 Mobile phone APP automatic test method, device, equipment and storage medium
CN112100068A (en) * 2020-09-14 2020-12-18 贵州电网有限责任公司 Method for testing redirection of communication object of terminal software
CN113765693A (en) * 2021-01-29 2021-12-07 北京京东拓先科技有限公司 Demand testing method, device, server and storage medium
CN113238901A (en) * 2021-05-10 2021-08-10 展讯通信(上海)有限公司 Multi-device automatic testing method and device, storage medium and computer device
CN113567153A (en) * 2021-09-23 2021-10-29 深圳市星卡软件技术开发有限公司 One-key action test method and device and computer equipment
CN116166554A (en) * 2023-02-24 2023-05-26 上海硬通网络科技有限公司 Automated test system, method and storage medium

Also Published As

Publication number Publication date
CN111258898B (en) 2023-03-28

Similar Documents

Publication Publication Date Title
CN111258898B (en) Automatic testing method and device, computer equipment and storage medium
US10289535B2 (en) Software testing integration
CN111679965A (en) Automatic testing method and device, computer equipment and storage medium
CN109491891A (en) Full-automatic interface pressure surveys method, apparatus, computer equipment and storage medium
CN105302722B (en) CTS automatic testing method and device
CN107608901B (en) Jmeter-based testing method and device, storage medium and electronic equipment
CN107656872B (en) Software testing method, device, equipment and computer storage medium
CN111078567B (en) Report generation method, terminal and storage medium of automatic test platform
CN110659198A (en) Application program test case execution method and device and software test system
US9026997B2 (en) Systems and methods for executing object-oriented programming code invoking pre-existing objects
CN110597714A (en) Kafka message testing method and device, computer equipment and storage medium
CN107170218B (en) Remote assistance method and system for debugging fire alarm system
KR101689984B1 (en) Programmable controller, programmable controller system, and execute error information creation method
CN109194535A (en) A kind of terminal test system and method
CN111796578A (en) Vehicle controller testing method, device and system and storage medium
CN112231206A (en) Script editing method for application program test, computer readable storage medium and test platform
CN107102937B (en) User interface testing method and device
CN107918587B (en) Debugging method and system for application program
US8635178B2 (en) Rule-based processing in different layers
CN112685311A (en) Test script automatic generation method and device, computer equipment and storage medium
CN111177605B (en) Single-page loading performance monitoring method and device and related equipment
CN112612706A (en) Automated testing method, computer device and storage medium
CN105808419B (en) Application testing method and terminal
CN110633213A (en) Unit testing method, unit testing device, computer equipment and storage medium
CN111176986A (en) Thread script debugging method and device, computer 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20220520

Address after: 518000 China Aviation Center 2901, No. 1018, Huafu Road, Huahang community, Huaqiang North Street, Futian District, Shenzhen, Guangdong Province

Applicant after: Shenzhen Ping An medical and Health Technology Service Co.,Ltd.

Address before: Room 12G, Block H, 666 Beijing East Road, Huangpu District, Shanghai 200000

Applicant before: PING AN MEDICAL AND HEALTHCARE MANAGEMENT Co.,Ltd.

GR01 Patent grant
GR01 Patent grant