CN116414630A - Device testing method, device, electronic device and computer readable storage medium - Google Patents

Device testing method, device, electronic device and computer readable storage medium Download PDF

Info

Publication number
CN116414630A
CN116414630A CN202111640420.2A CN202111640420A CN116414630A CN 116414630 A CN116414630 A CN 116414630A CN 202111640420 A CN202111640420 A CN 202111640420A CN 116414630 A CN116414630 A CN 116414630A
Authority
CN
China
Prior art keywords
test
tested
abnormal
control terminal
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111640420.2A
Other languages
Chinese (zh)
Inventor
戴志鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New 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 Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN202111640420.2A priority Critical patent/CN116414630A/en
Publication of CN116414630A publication Critical patent/CN116414630A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention discloses a device testing method, a device, an electronic device and a computer readable storage medium. By adopting the embodiment of the invention, the test operation can be prevented from being paused for a long time while the abnormal test site environment data is reserved, and the technical problem that the existing test process can not simultaneously meet the requirement of reserving the site and the requirement of continuing the test to obtain the stability index is solved.

Description

Device testing method, device, electronic device and computer readable storage medium
Technical Field
The present invention relates to the field of testing technologies, and in particular, to a device testing method, a device, an electronic device, and a computer readable storage medium.
Background
In verifying the completion of development, projects often require automation to increase the efficiency of the project. The automatic test can greatly save labor cost, the stability test requirement is often related to the automatic test at present, namely the same operation steps are repeated for a plurality of times, the success and failure times are counted, and the stability index of the equipment is summarized according to the statistical data.
Similar stability tests, often require hundreds of repeated operations, even thousands of times for some particular test items. For some problems with a low probability of occurrence, the items will be treated differently depending on their severity. For example, for a very serious bug, although the occurrence probability is small, the problem must be solved on the project. In the process of this solution, there is a logic paradox on test: testing is required to derive the probability of occurrence of the problem, and the site of the problem is reserved for the developer to check. It follows that the need to remain on site and the need to continue testing to derive stability indicators are contradictory.
Disclosure of Invention
An object of an embodiment of the present invention is to provide a device testing method, apparatus, electronic device, and computer readable storage medium, so as to solve the problems in the existing testing technology.
In a first aspect, to achieve the above object, an embodiment of the present invention provides an apparatus testing method, applied to a control terminal, where the control terminal is connected to an apparatus to be tested and is used for testing the apparatus to be tested, and the apparatus testing method includes:
According to a preset test item, corresponding test operation is executed on the equipment to be tested;
when detecting that an abnormal test item appears in the test process of the test operation, suspending the test operation;
acquiring and storing the current working state information of the control terminal and the equipment to be tested;
and activating the paused test operation to continue to execute the test operation on the device to be tested.
Further, after the step of acquiring and storing the current working state information of the control terminal and the device to be tested, the device testing method further includes:
simulating an abnormal working environment when the abnormal test item appears on a preset simulation test tool according to the current working state information of the control terminal and the equipment to be tested;
acquiring a system log file of the simulation test tool in the abnormal working environment;
based on the system log file, the anomaly test item is located and determined.
Further, the control terminal is further connected to the cloud, and the step of executing corresponding test operation on the device to be tested according to the preset test item includes:
according to a preset test item, a test instruction corresponding to the test item is sent to the cloud end, so that the cloud end forwards the test instruction to the equipment to be tested, and the equipment to be tested is controlled to execute test operation.
Further, when detecting that an abnormal test item occurs in the test process of the test operation, the step of suspending the test operation includes:
receiving test information sent by the cloud, wherein the test information is information uploaded to the cloud in real time by the equipment to be tested in the process of executing the test operation;
when an abnormal test item appears in the test information is detected, generating a pause test instruction, and sending the pause test instruction to the cloud end, so that the cloud end forwards the pause test instruction to the equipment to be tested, and the equipment to be tested is controlled to pause executing the test operation.
Further, after the step of acquiring and storing the current working state information of the control terminal and the device to be tested, the device testing method further includes:
and sending the current working state information of the control terminal to the cloud end, so that the cloud end generates a system backup file according to the current working state information of the control terminal and the current working state information uploaded by the equipment to be tested.
Further, the step of simulating an abnormal working environment when the abnormal test item appears on a preset simulation test tool according to the current working state information of the control terminal and the equipment to be tested comprises the following steps:
And acquiring the system backup file generated by the cloud, and simulating an abnormal working environment when the abnormal test item appears on a preset simulation test tool according to the system backup file.
Further, the preset simulation test tool includes an application container engine, and according to the current working state information of the control terminal and the device to be tested, an abnormal working environment when the abnormal test item appears is simulated on the preset simulation test tool, including:
packaging the working state information to obtain a packaged working state file;
and inputting the working state file into the application container engine so that the application container engine simulates according to the working state file and constructs an abnormal working environment when the abnormal test item appears.
In a second aspect, to solve the same technical problem, an embodiment of the present invention provides an apparatus testing device, which is applied to a control terminal, where the control terminal is connected to an apparatus to be tested and is used for testing the apparatus to be tested, and the apparatus testing device includes:
the testing module is used for executing corresponding testing operation on the equipment to be tested according to the preset testing items;
A suspension module, configured to suspend the test operation when an abnormal test item occurs in a test process of the test operation is detected;
the first acquisition module is used for acquiring and storing the current working state information of the control terminal and the equipment to be tested;
and the activating module is used for activating the paused test operation so as to continue to execute the test operation on the equipment to be tested.
Further, the device testing apparatus further includes:
the simulation module is used for simulating an abnormal working environment when the abnormal test item appears on a preset simulation test tool according to the current working state information of the control terminal and the equipment to be tested;
the second acquisition module is used for acquiring a system log file of the simulation test tool in the abnormal working environment;
and the positioning module is used for positioning and determining the abnormal test item based on the system log file.
Further, the control terminal is further connected with a cloud end, and the test module is further configured to send a test instruction corresponding to a preset test item to the cloud end, so that the cloud end forwards the test instruction to the device to be tested, and control the device to be tested to execute a test operation.
Further, the pause module comprises a receiving unit and a sending unit;
the receiving unit is used for receiving test information sent by the cloud, wherein the test information is information uploaded to the cloud in real time by the equipment to be tested in the process of executing the test operation;
the sending unit is used for generating a pause test instruction when detecting that an abnormal test item occurs in the test information, and sending the pause test instruction to the cloud end so that the cloud end forwards the pause test instruction to the equipment to be tested, and controlling the equipment to be tested to pause executing the test operation.
Further, the device testing apparatus further includes:
the sending module is used for sending the current working state information of the control terminal to the cloud end, so that the cloud end generates a system backup file according to the current working state information of the control terminal and the current working state information uploaded by the equipment to be tested.
Furthermore, the simulation module is further configured to obtain a system backup file generated by the cloud, and simulate, on a preset simulation test tool, an abnormal working environment when the abnormal test item appears according to the system backup file.
Further, the preset simulation test tool comprises an application container engine, and the simulation module comprises a packaging unit and a simulation unit;
the packaging unit is used for packaging the working state information to obtain a packaged working state file;
the simulation unit is used for inputting the working state file into the application container engine so that the application container engine simulates according to the working state file and constructs an abnormal working environment when the abnormal test item appears.
In a third aspect, to solve the same technical problem, an embodiment of the present invention provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the memory is coupled to the processor, and where the processor executes the computer program, to implement the steps in the device testing method described in any one of the above.
In a fourth aspect, in order to solve the same technical problem, an embodiment of the present invention provides a computer readable storage medium, where a computer program is stored, where a device where the computer readable storage medium is located is controlled to execute the steps in the device testing method described in any one of the above when the computer program runs.
The embodiment of the invention provides a device testing method, a device, an electronic device and a computer readable storage medium, wherein the method is used for immediately activating a suspended testing process to continue to execute testing operation on a device to be tested after the current working state information of a control terminal and the device to be tested is acquired and stored, so that the problem that the existing testing process cannot simultaneously meet the requirements of a reserved field and a continuous test to obtain stability indexes is solved while the abnormal testing field environment data is kept.
Drawings
FIG. 1 is a schematic flow chart of a device testing method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of another embodiment of a device testing method according to the present invention;
FIG. 3 is a schematic flow chart of a device testing method according to an embodiment of the present invention under different testing states;
FIG. 4 is a schematic structural diagram of a device testing apparatus according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of another configuration of a device testing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
Fig. 7 is a schematic diagram of another structure of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
In the embodiment of the present invention, the device testing method provided in the embodiment of the present invention is mainly applied to a control terminal, where the control terminal is connected to a device to be tested and is used for testing the device to be tested, please refer to fig. 1, fig. 1 is a schematic flow chart of the device testing method provided in the embodiment of the present invention, and as shown in fig. 1, the device testing method provided in the embodiment of the present invention includes steps 101 to 104;
step 101, executing corresponding test operation on the equipment to be tested according to the preset test items.
In this embodiment, the preset test items are a plurality of test items preset by a user and required to be tested on the device to be tested, where different devices to be tested correspond to the same or different test items, and in actual application, the test items are determined according to the device to be tested in a specific application scenario, which is not limited herein.
The preset test items may be stored in a preset test item pool, where the test item pool stores test item sets corresponding to each device to be tested in advance, and each test item set contains a plurality of test items, so that tests of corresponding test items can be performed on different devices to be tested. Specifically, the test item set in the test item pool can be added manually in advance according to different devices to be tested, or can be obtained and added by aiming at different devices to be tested in a resource pool of the Internet.
And 102, suspending the test operation when detecting that an abnormal test item appears in the test process of the test operation.
In this embodiment, when an abnormal test item is detected in the test process, in order to meet the technical requirement of retaining the current abnormal working scene, the mobile terminal is enabled to timely acquire the current abnormal working scene data through a short pause test operation, so that the situation that the test is directly stopped is avoided, and after the abnormal problem is determined, the subsequent test can be continued, thereby improving the test efficiency.
And step 103, acquiring and storing the current working state information of the control terminal and the equipment to be tested.
In the existing test technology, aiming at a special test item, when an abnormality occurs in a test process, the technical requirement that a current abnormal working scene needs to be reserved exists, so that a worker can locate and confirm a specific abnormal problem according to the abnormal working scene, and therefore, the existing test is finished, the test is always needed to be stopped, and after the abnormal problem is confirmed, the subsequent test can be continued. The basic requirement of automatic test is to test the equipment to be tested continuously, so that the existing test technology cannot meet the technical requirement of retaining abnormal working scenes and the technical requirement of testing the equipment to be tested continuously.
In this embodiment, when an abnormal test item is detected in the test process, a pause instruction of a preset time period is triggered and generated, so that the test operation is controlled to pause in the preset time period by the pause instruction of the preset time period, then the current working state information of the current control terminal and the device to be tested is timely acquired and stored in the preset time period, and after the time of the preset time period passes or after the reservation of the abnormal working scene data is completed, the normal test process can be resumed, thereby avoiding stopping the test for a long time, avoiding additional workload caused by delaying the working progress of the test item, and further saving a great amount of labor cost.
The time of the preset time period is usually several seconds, for example, 0.1 to 3s, and the specific preset time period needs to be determined according to the data reading performance of the control terminal and the device to be tested, which is not limited herein.
As an optional embodiment, after step 103, the device testing method provided by the embodiment of the present invention further includes: simulating an abnormal working environment when an abnormal test item appears on a preset simulation test tool according to the current working state information of the control terminal and the equipment to be tested; acquiring a system log file of the simulation test tool in an abnormal working environment; based on the system log file, the anomaly test item is located and determined.
The method specifically comprises the steps of simulating an abnormal working environment when an abnormal test item appears on a preset simulation test tool according to the current working state information of a control terminal and equipment to be tested, wherein the preset simulation test tool comprises an application container engine, and the steps specifically comprise: packaging the working state information to obtain a packaged working state file; and inputting the working state file into an application container engine so that the application container engine simulates according to the working state file and constructs an abnormal working environment when the abnormal test item appears.
It should be noted that, the application container engine is mainly used for enabling a developer to package applications to be used and rely on packages to a portable container, then issue the packages to any Linux machine or Windows machine, and also implement virtualization, where the containers are completely using a sandbox mechanism and do not have any interfaces with each other.
By adopting the application container engine, the rapid deployment of the specific software operation can be realized, so that the test efficiency is further improved.
In this embodiment, the preset simulation test tool is used for restoring the abnormal working environment at the time according to the working state information of the control terminal and the device to be tested when the abnormal test item occurs, so that a worker can simulate and restore the abnormal working environment at the time on the simulation test tool, and locate the abnormal problem in the abnormal working environment, thereby realizing the location of the abnormal problem and asynchronous processing of the test operation, and locating the abnormal problem at the same time without interrupting the test operation, thereby saving labor cost to a great extent and accelerating the progress of the test item.
By acquiring the working state information of the control terminal and the equipment to be tested, restoring the abnormal working environment on the simulation test tool, the technical requirement for keeping the current abnormal working environment can be met, and the test operation can be continued while restoring the simulated abnormal working environment, and the technical requirement for continuously and uninterruptedly testing the equipment to be tested can be met.
And 104, activating the suspended test operation to continue to execute the test operation on the equipment to be tested.
In this embodiment, after the storage of the current working state information of the current control terminal and the device to be tested is completed, the suspended test process is immediately activated to continue the test operation of the device to be tested, so that the test of the device to be tested can be continuously completed on the premise of avoiding the long-time interruption of the test operation, the automatic test is realized, and a large amount of labor cost is saved.
In summary, the device testing method provided by the embodiment of the invention includes executing corresponding testing operation on the device to be tested according to the preset testing item, suspending the testing operation when detecting that the abnormal testing item appears in the testing process of the testing operation, then acquiring and storing the current working state information of the control terminal and the device to be tested, and activating the suspended testing operation to continue executing the testing operation on the device to be tested. By adopting the embodiment of the invention, the abnormal test site environment data is maintained, the long-time suspension of test operation is avoided, the technical problem that the existing test process can not simultaneously meet the requirement of the reserved site and the requirement of continuous test to obtain the stability index is solved, the automatic test is realized, and a large amount of labor cost is saved.
As an optional embodiment, the device testing method provided by the embodiment of the present invention is applied to testing of the internet of things, so that the control terminal provided by the embodiment of the present invention is further connected to the cloud end, please refer to fig. 2, fig. 2 is another flow chart of the device testing method provided by the embodiment of the present invention, and as shown in fig. 2, the device testing method provided by the embodiment of the present invention includes steps 201 to 207;
Step 201, according to a preset test item, sending a test instruction corresponding to the test item to the cloud end, so that the cloud end forwards the test instruction to the device to be tested, and controls the device to be tested to execute a test operation.
In the embodiment, the test instruction is sent to the cloud end and forwarded by the cloud end, so that the device to be tested can perform corresponding test operation according to the test instruction, the purpose of performing remote test in the Internet of things is achieved, a worker does not need to reach the designated device side to perform the test, and manpower and material resources are saved.
Step 202, receiving test information sent by a cloud.
The test information is information uploaded to the cloud in real time in the process of executing test operation of the equipment to be tested.
In this embodiment, after the cloud forwards the test instruction to the device to be tested, the device to be tested starts to perform the test operation according to the test instruction, and at the same time, in the process of performing the test operation on the device to be tested, the device to be tested uploads test information to the cloud in real time, where the uploaded test information mainly includes test status information, and the test status information is mainly used to determine whether the currently ongoing test item is in an abnormal status.
Specifically, the test state information includes a Start state, a Processing state, an Exception state, a Save state, and a Done state, please refer to fig. 3, fig. 3 is a schematic flow chart of the device test method provided in the embodiment of the present invention in different test states, as shown in fig. 3, when the test state information of the device to be tested is Start, it indicates that the device to be tested starts a test operation, and then the next flow is Processing; when the test state information of the device to be tested is a Processing state, which means that the device to be tested is performing a test operation, the next step may be an acceptance state or a Done state; when the test state information of the equipment to be tested is in an acceptance state, the process of the next step is in a Save state, wherein the process indicates that the test item of the equipment to be tested is abnormal; when the test state information of the equipment to be tested is in the Save state, the equipment to be tested starts uploading the current working state information to the cloud for storage, and returns to the Processing state after the Save state is completed; and when the test state information of the equipment to be tested is the Done state, the equipment to be tested is indicated to complete the test operation.
The working state information comprises a firmware log, an execution log of the test APP and a step log of the test process, and an abnormal environment with abnormality can be quickly constructed through the log information, so that a large amount of test time is saved, and the test efficiency is improved.
And 203, when an abnormal test item in the test information is detected, generating a pause test instruction, and sending the pause test instruction to the cloud end, so that the cloud end forwards the pause test instruction to the equipment to be tested, and the equipment to be tested is controlled to pause the execution of the test operation.
When the control terminal detects a test item in an abnormal state in the test information received in real time, a pause test instruction is automatically generated and sent to the cloud end, and the cloud end forwards the pause test instruction to the equipment to be tested so as to control the equipment to be tested to pause executing test operation.
Specifically, after the device to be tested pauses the execution of the test operation, the device to be tested automatically uploads the current working state information to the cloud.
And 204, acquiring and storing the current working state information of the control terminal and the equipment to be tested.
In this embodiment, when the control terminal detects a test item in an abnormal state in the test information received in real time, not only the current working state information of the control terminal itself but also the working state information uploaded by the device to be tested from the cloud end is required to be obtained. The current working state information of the control terminal and the equipment to be tested is acquired and stored, so that the subsequent recovery work of the abnormal working environment can be performed according to the acquired working state information, and the testing efficiency is effectively improved.
Step 205, the current working state information of the control terminal is sent to the cloud end, so that the cloud end generates a system backup file according to the current working state information of the control terminal and the current working state information uploaded by the device to be tested.
Optionally, the embodiment can also send the current working state information of the control terminal to the cloud end, so that the cloud end generates a system backup file according to the current working state information of the control terminal and the current working state information uploaded by the equipment to be tested, and therefore the system backup file can be obtained from the cloud end anywhere, the purpose that the abnormal working environment can be restored remotely anywhere is achieved, restoration work of the abnormal working environment can be carried out without being carried out locally at the control terminal or the equipment to be tested, and the testing efficiency is further improved.
Step 206, acquiring a system backup file generated by the cloud, and simulating an abnormal working environment when an abnormal test item appears on a preset simulation test tool according to the system backup file.
In this embodiment, a preset simulation test tool is locally provided at the control terminal, so that an abnormal working environment when an abnormal test item appears can be simulated at any time by using the simulation test tool according to a system backup file generated by the cloud, and abnormal problem investigation is not required in the abnormal working environment of the device to be tested, thereby avoiding additional workload increased due to delay of test progress and further improving test efficiency.
Optionally, the preset simulation test tool includes a Docker, where the Docker is a software platform, and the core function is to package the software into a container, where the container includes a requisite dependency required for running software such as a program library, a system tool, and the like, and is used for rapidly deploying an environment that enables a specific software to run.
Step 207, activating the paused test operation to continue to perform the test operation on the device under test.
In this embodiment, the control terminal sends the generated activation instruction to the cloud end, so that the cloud end forwards the activation instruction to the device to be tested, so as to control the large test device to continue to execute the incomplete test operation, and the long-time suspension of the test operation can be avoided while the abnormal test site environment data is reserved, thereby solving the technical problem that the existing test process cannot simultaneously meet the requirements of the reserved site and the requirements of continuous test to obtain the stability index.
According to the method described in the above embodiments, the present embodiment will be further described from the perspective of a device testing apparatus, which may be implemented as a separate entity, or may be implemented as an integrated electronic device, such as a terminal, where the terminal may include a mobile phone, a tablet computer, or the like.
In this embodiment, the device testing apparatus provided in this embodiment is applied to a control terminal, where the control terminal is connected to a device to be tested and is used for testing the device to be tested, please refer to fig. 4, fig. 4 is a schematic structural diagram of the device testing apparatus provided in the embodiment of the present invention, and as shown in fig. 4, the device testing apparatus 400 provided in the embodiment of the present invention includes:
the testing module 401 is configured to execute corresponding testing operations on the device to be tested according to the preset testing items.
In this embodiment, the control terminal is further connected to a cloud end, and the test module 401 is further configured to send a test instruction corresponding to a test item to the cloud end according to the preset test item, so that the cloud end forwards the test instruction to the device to be tested, and control the device to be tested to execute the test operation.
A suspending module 402, configured to suspend the test operation when detecting that an abnormal test item occurs in the test process of the test operation.
In this embodiment, the suspension module includes a receiving unit and a transmitting unit; the receiving unit is used for receiving test information sent by the cloud end, wherein the test information is information uploaded to the cloud end in real time in the process of executing test operation of the equipment to be tested; the sending unit is used for generating a suspending test instruction when detecting that an abnormal test item appears in the test information, and sending the suspending test instruction to the cloud end, so that the cloud end forwards the suspending test instruction to the equipment to be tested, and the equipment to be tested is controlled to suspend executing test operation.
The first obtaining module 403 is configured to obtain and store current operating state information of the control terminal and the device to be tested.
And the activating module 404 is configured to activate the paused test operation to continue to perform the test operation on the device to be tested.
Referring to fig. 5, fig. 5 is another schematic structural diagram of an apparatus testing device provided in an embodiment of the present invention, as shown in fig. 5, an apparatus testing device 400 provided in an embodiment of the present invention further includes:
the simulation module 405 is configured to simulate, on a preset simulation test tool, an abnormal working environment when an abnormal test item appears according to current working state information of the control terminal and the device to be tested.
In some embodiments, the simulation module 405 is further configured to obtain a system backup file generated by the cloud, and simulate, according to the system backup file, an abnormal working environment when an abnormal test item appears on a preset simulation test tool.
Specifically, the preset simulation test tool includes an application container engine, and the simulation module 405 includes a packaging unit and a simulation unit; the packing unit is used for packing the working state information to obtain a packed working state file; the simulation unit is used for inputting the working state file into the application container engine so that the application container engine simulates according to the working state file and constructs an abnormal working environment when the abnormal test item appears.
In other embodiments, the device testing apparatus 400 provided in the embodiments of the present invention further includes:
the sending module 406 is configured to send the current operating state information of the control terminal to the cloud end, so that the cloud end generates a system backup file according to the current operating state information of the control terminal and the current operating state information uploaded by the device to be tested.
The second obtaining module 407 is configured to obtain a system log file of the simulation test tool in the abnormal working environment. A positioning module 408, configured to position and determine the abnormal test item based on the system log file.
In the implementation, each module and/or unit may be implemented as an independent entity, or may be combined arbitrarily and implemented as the same entity or a plurality of entities, where the implementation of each module and/or unit may refer to the foregoing method embodiment, and the specific beneficial effects that may be achieved may refer to the beneficial effects in the foregoing method embodiment, which are not described herein again.
In addition, referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where the electronic device may be a mobile terminal, such as a smart phone, a tablet computer, or the like. As shown in fig. 6, the electronic device 600 includes a processor 601, a memory 602. The processor 601 is electrically connected to the memory 602.
The processor 601 is a control center of the electronic device 600, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device 600 and processes data by running or loading application programs stored in the memory 602 and calling data stored in the memory 602, thereby performing overall monitoring of the electronic device 600.
In this embodiment, the processor 601 in the electronic device 600 loads instructions corresponding to the processes of one or more application programs into the memory 602 according to the following steps, and the processor 601 executes the application programs stored in the memory 602, so as to implement various functions:
according to a preset test item, executing corresponding test operation on the equipment to be tested;
when detecting that an abnormal test item appears in the test process of the test operation, suspending the test operation;
acquiring and storing the current working state information of the control terminal and the equipment to be tested;
and activating the paused test operation to continue to execute the test operation on the device to be tested.
The electronic device 600 may implement the steps in any embodiment of the device testing method provided by the embodiment of the present invention, so that the beneficial effects that any device testing method provided by the embodiment of the present invention can implement are detailed in the previous embodiments, and are not described herein.
Referring to fig. 7, fig. 7 is another schematic structural diagram of an electronic device provided in the embodiment of the present invention, and fig. 7 is a specific structural block diagram of the electronic device provided in the embodiment of the present invention, where the electronic device may be used to implement the device testing method provided in the embodiment. The electronic device 700 may be a mobile terminal such as a smart phone or a notebook computer.
The RF circuit 710 is configured to receive and transmit electromagnetic waves, and to perform mutual conversion between the electromagnetic waves and the electrical signals, thereby communicating with a communication network or other devices. RF circuitry 710 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. The RF circuitry 710 may communicate with various networks such as the internet, intranets, wireless networks, or other devices via wireless networks. The wireless network may include a cellular telephone network, a wireless local area network, or a metropolitan area network. The wireless network may use various communication standards, protocols, and technologies including, but not limited to, global system for mobile communications (Global System for Mobile Communication, GSM), enhanced mobile communications technology (Enhanced Data GSM Environment, EDGE), wideband code division multiple access technology (Wideband Code Division Multiple Access, WCDMA), code division multiple access technology (Code Division Access, CDMA), time division multiple access technology (Time Division Multiple Access, TDMA), wireless fidelity technology (Wireless Fidelity, wi-Fi) (e.g., institute of electrical and electronics engineers standards IEEE 802.11a,IEEE 802.11b,IEEE802.11g and/or IEEE802.11 n), internet telephony (Voice over Internet Protocol, voIP), worldwide interoperability for microwave access (Worldwide Interoperability for Microwave Access, wi-Max), other protocols for mail, instant messaging, and short messaging, as well as any other suitable communication protocols, even including those not currently developed.
The memory 720 may be used to store software programs and modules, such as program instructions/modules corresponding to the device testing method in the above embodiments, and the processor 780 executes the software programs and modules stored in the memory 720 to perform various functional applications and device tests, i.e., implement the following functions:
according to a preset test item, executing corresponding test operation on the equipment to be tested;
when detecting that an abnormal test item appears in the test process of the test operation, suspending the test operation;
acquiring and storing the current working state information of the control terminal and the equipment to be tested;
and activating the paused test operation to continue to execute the test operation on the device to be tested.
Memory 720 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 720 may further include memory located remotely from processor 780, which may be connected to electronic device 700 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input unit 730 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 730 may include a touch-sensitive surface 731 and other input devices 732. The touch-sensitive surface 731, also referred to as a touch display screen or touch pad, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on or thereabout the touch-sensitive surface 731 using any suitable object or accessory such as a finger, stylus, etc.), and actuate the corresponding connection device according to a pre-set program. Alternatively, touch-sensitive surface 731 may comprise two parts, a touch-detecting device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 780, and can receive commands from the processor 780 and execute them. In addition, the touch sensitive surface 731 may be implemented in a variety of types, such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 731, the input unit 730 may also include other input devices 732. In particular, the other input devices 732 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 740 may be used to display information entered by a user or provided to a user as well as various graphical user interfaces of the electronic device 700, which may be composed of graphics, text, icons, video, and any combination thereof. The display unit 740 may include a display panel 741, and alternatively, the display panel 741 may be configured in the form of an LCD (Liquid Crystal Display ), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 731 may overlay the display panel 741, and upon detection of a touch operation thereon or thereabout by the touch-sensitive surface 731, the touch-sensitive surface 731 is passed to the processor 780 for determining the type of touch event, and the processor 780 then provides a corresponding visual output on the display panel 741 based on the type of touch event. Although in the figures the touch-sensitive surface 731 and the display panel 741 are implemented as two separate components, in some embodiments the touch-sensitive surface 731 and the display panel 741 may be integrated to implement the input and output functions.
The electronic device 700 may also include at least one sensor 750, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 741 according to the brightness of ambient light, and a proximity sensor that may generate an interrupt when the folder is closed or closed. As one of the motion sensors, the gravity acceleration sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and the direction when the mobile phone is stationary, and can be used for applications of recognizing the gesture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured with the electronic device 700 are not described in detail herein.
Audio circuitry 760, speaker 761, and microphone 762 may provide an audio interface between a user and electronic device 700. The audio circuit 760 may transmit the received electrical signal converted from audio data to the speaker 761, and the electrical signal is converted into a sound signal by the speaker 761 to be output; on the other hand, microphone 762 converts the collected sound signals into electrical signals, which are received by audio circuit 760 and converted into audio data, which are processed by audio data output processor 780 for transmission to, for example, another terminal via RF circuit 710, or which are output to memory 720 for further processing. Audio circuitry 760 may also include an ear bud jack to provide communication between a peripheral ear bud and electronic device 700.
The electronic device 700 may facilitate user reception of requests, transmission of information, etc. via a transmission module 770 (e.g., wi-Fi module), which provides wireless broadband internet access to the user. Although the transmission module 770 is shown in the drawings, it is understood that it does not belong to the essential constitution of the electronic device 700, and can be omitted entirely as required within the scope not changing the essence of the invention.
The processor 780 is a control center of the electronic device 700, connects various parts of the entire handset using various interfaces and lines, and performs various functions of the electronic device 700 and processes data by running or executing software programs and/or modules stored in the memory 720 and invoking data stored in the memory 720, thereby performing overall monitoring of the electronic device. Optionally, the processor 780 may include one or more processing cores; in some embodiments, the processor 780 may integrate an application processor that primarily processes operating systems, user interfaces, applications, and the like, with a modem processor that primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 780.
The electronic device 700 also includes a power supply 790 (e.g., a battery) that provides power to the various components, and in some embodiments, may be logically coupled to the processor 780 through a power management system to perform functions such as managing charging, discharging, and power consumption by the power management system. Power supply 790 may also include one or more of any components, such as a dc or ac power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the electronic device 700 further includes a camera (e.g., front camera, rear camera), a bluetooth module, etc., which will not be described in detail herein. In particular, in this embodiment, the display unit of the electronic device is a touch screen display, the mobile terminal further includes a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for:
according to a preset test item, executing corresponding test operation on the equipment to be tested;
when detecting that an abnormal test item appears in the test process of the test operation, suspending the test operation;
Acquiring and storing the current working state information of the control terminal and the equipment to be tested;
and activating the paused test operation to continue to execute the test operation on the device to be tested.
In the implementation, each module may be implemented as an independent entity, or may be combined arbitrarily, and implemented as the same entity or several entities, and the implementation of each module may be referred to the foregoing method embodiment, which is not described herein again.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present invention provides a storage medium having stored therein a plurality of instructions capable of being loaded by a processor to perform the steps of any one of the embodiments of the device testing method provided by the embodiment of the present invention.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The steps in any embodiment of the device testing method provided by the embodiment of the present invention can be executed by the instructions stored in the storage medium, so that the beneficial effects that any device testing method provided by the embodiment of the present invention can achieve can be achieved, and detailed descriptions of the foregoing embodiments are omitted.
The foregoing has described in detail the method, apparatus, electronic device and computer readable storage medium for testing devices provided in the embodiments of the present application, and specific examples have been applied to illustrate the principles and embodiments of the present application, where the foregoing examples are provided to assist in understanding the method and core ideas of the present application; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above. Moreover, it will be apparent to those skilled in the art that various modifications and variations can be made without departing from the principles of the present invention, and such modifications and variations are also considered to be within the scope of the invention.

Claims (10)

1. The device testing method is characterized by being applied to a control terminal, wherein the control terminal is connected with a device to be tested and used for testing the device to be tested, and the device testing method comprises the following steps:
According to a preset test item, corresponding test operation is executed on the equipment to be tested;
when detecting that an abnormal test item appears in the test process of the test operation, suspending the test operation;
acquiring and storing the current working state information of the control terminal and the equipment to be tested;
and activating the paused test operation to continue to execute the test operation on the device to be tested.
2. The device testing method according to claim 1, wherein after the step of acquiring and storing current operation state information of the control terminal and the device under test, the device testing method further comprises:
simulating an abnormal working environment when the abnormal test item appears on a preset simulation test tool according to the current working state information of the control terminal and the equipment to be tested;
acquiring a system log file of the simulation test tool in the abnormal working environment;
based on the system log file, the anomaly test item is located and determined.
3. The device testing method according to claim 1 or 2, wherein the control terminal is further connected to a cloud, and the step of executing a corresponding testing operation on the device to be tested according to a preset testing item includes:
According to a preset test item, a test instruction corresponding to the test item is sent to the cloud end, so that the cloud end forwards the test instruction to the equipment to be tested, and the equipment to be tested is controlled to execute test operation.
4. The device testing method of claim 3, wherein the step of suspending the test operation when an abnormal test item is detected in the test process of the test operation comprises:
receiving test information sent by the cloud, wherein the test information is information uploaded to the cloud in real time by the equipment to be tested in the process of executing the test operation;
when an abnormal test item appears in the test information is detected, generating a pause test instruction, and sending the pause test instruction to the cloud end, so that the cloud end forwards the pause test instruction to the equipment to be tested, and the equipment to be tested is controlled to pause executing the test operation.
5. The device testing method according to claim 3, wherein after the step of acquiring and storing current operation state information of the control terminal and the device under test, the device testing method further comprises:
And sending the current working state information of the control terminal to the cloud end, so that the cloud end generates a system backup file according to the current working state information of the control terminal and the current working state information uploaded by the equipment to be tested.
6. The device testing method according to claim 3, wherein the step of simulating an abnormal working environment when the abnormal test item appears on a preset simulation test tool according to current working state information of the control terminal and the device to be tested comprises the steps of:
and acquiring the system backup file generated by the cloud, and simulating an abnormal working environment when the abnormal test item appears on a preset simulation test tool according to the system backup file.
7. The device testing method of claim 2, wherein the predetermined simulation test tool includes an application container engine, and the simulating, on the predetermined simulation test tool, an abnormal working environment when the abnormal test item occurs according to current working state information of the control terminal and the device to be tested includes:
packaging the working state information to obtain a packaged working state file;
And inputting the working state file into the application container engine so that the application container engine simulates according to the working state file and constructs an abnormal working environment when the abnormal test item appears.
8. The utility model provides a device testing arrangement, its characterized in that is applied to control terminal, control terminal is connected with the equipment that awaits measuring for to the equipment that awaits measuring tests, device testing arrangement includes:
the testing module is used for executing corresponding testing operation on the equipment to be tested according to the preset testing items;
a suspension module, configured to suspend the test operation when an abnormal test item occurs in a test process of the test operation is detected;
the first acquisition module is used for acquiring and storing the current working state information of the control terminal and the equipment to be tested;
and the activating module is used for activating the paused test operation so as to continue to execute the test operation on the equipment to be tested.
9. An electronic device comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the memory being coupled to the processor and the processor, when executing the computer program, implementing the steps in the device testing method of any of claims 1 to 7.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program, wherein the computer program, when run, controls a device in which the computer readable storage medium is located to perform the steps in the device testing method according to any one of claims 1 to 7.
CN202111640420.2A 2021-12-29 2021-12-29 Device testing method, device, electronic device and computer readable storage medium Pending CN116414630A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111640420.2A CN116414630A (en) 2021-12-29 2021-12-29 Device testing method, device, electronic device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111640420.2A CN116414630A (en) 2021-12-29 2021-12-29 Device testing method, device, electronic device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116414630A true CN116414630A (en) 2023-07-11

Family

ID=87054829

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111640420.2A Pending CN116414630A (en) 2021-12-29 2021-12-29 Device testing method, device, electronic device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116414630A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117347755A (en) * 2023-09-27 2024-01-05 广州致远仪器有限公司 Test method, system, equipment and storage medium based on state machine

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117347755A (en) * 2023-09-27 2024-01-05 广州致远仪器有限公司 Test method, system, equipment and storage medium based on state machine
CN117347755B (en) * 2023-09-27 2024-04-26 广州致远仪器有限公司 Test method, system, equipment and storage medium based on state machine

Similar Documents

Publication Publication Date Title
US10853437B2 (en) Method and apparatus for invoking application programming interface
CN111176961B (en) Application program testing method and device and storage medium
CN107329901B (en) Data packet capturing method, terminal, server and storage medium
CN108039963B (en) Container configuration method and device and storage medium
CN104346276B (en) The method and device of software test
CN109451130B (en) Mobile terminal testing method and device, mobile terminal and storage medium
CN105610878B (en) Directory uploading method, data publishing method, terminal and server
CN111078523A (en) Log obtaining method and device, storage medium and electronic equipment
CN111104180B (en) Application program optimization method and device, storage medium and electronic equipment
CN107066374B (en) Data processing method and mobile terminal
WO2014166307A1 (en) Method for determining performance of process of application and computer system
CN109688611B (en) Frequency band parameter configuration method, device, terminal and storage medium
CN112199246B (en) Terminal test method and device, storage medium and mobile terminal
CN116414630A (en) Device testing method, device, electronic device and computer readable storage medium
CN105278942B (en) Component management method and device
CN111026457B (en) Hardware configuration method and device, storage medium and terminal equipment
US20230004273A1 (en) Ranging method and apparatus thereof, storage medium, and terminal device
CN111045737A (en) Equipment identifier acquisition method and device, terminal equipment and storage medium
CN107918583B (en) Script dynamic debugging method, device and terminal
CN114518718A (en) Device control method, device, storage medium and electronic device
CN110062074A (en) Display screen detection method, device, mobile terminal and storage medium
CN111651299A (en) Wireless chip reset control method and device, storage medium and mobile terminal
CN105740396B (en) HTTP data processing method and device
CN106033358B (en) Batch installation method and device of application programs
CN109995441B (en) Communication information processing method, device 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