CN112395192A - Information processing method and device - Google Patents

Information processing method and device Download PDF

Info

Publication number
CN112395192A
CN112395192A CN202011282810.2A CN202011282810A CN112395192A CN 112395192 A CN112395192 A CN 112395192A CN 202011282810 A CN202011282810 A CN 202011282810A CN 112395192 A CN112395192 A CN 112395192A
Authority
CN
China
Prior art keywords
tested
test
devices
server
application program
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
CN202011282810.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.)
Beijing 58 Information Technology Co Ltd
Original Assignee
Beijing 58 Information 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 Beijing 58 Information Technology Co Ltd filed Critical Beijing 58 Information Technology Co Ltd
Priority to CN202011282810.2A priority Critical patent/CN112395192A/en
Publication of CN112395192A publication Critical patent/CN112395192A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management

Landscapes

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

Abstract

The application discloses an information processing method and device. The first thread corresponding to each device to be tested in the platform end and the second thread corresponding to each device to be tested in the server end can support the platform end to initiate a process of testing the application programs on each device to be tested in parallel, and each device to be tested can test the application programs installed in parallel, so that time can be saved, and the testing efficiency is improved. In addition, technicians can be prevented from participating after each device to be tested starts to execute the test process, so that the technicians can be prevented from participating in the whole process. Technical staff can control the server side without going to the site where the server side is located to achieve the purpose of testing application programs on all devices to be tested, centralized control over testing can be achieved for the technical staff, the work difficulty and the work load of the technical staff are reduced, and great convenience can be brought to the technical staff.

Description

Information processing method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to an information processing method and apparatus.
Background
The application program of the mobile terminal has the characteristics of short development period and quick update iteration, one application program usually needs to be subjected to adaptation test on a plurality of mobile terminals, a large amount of repeated work and labor waste are caused, and the technology of carrying out automatic test on the mobile terminals is developed in order to better meet the product quality and the user experience.
Disclosure of Invention
The application discloses an information processing method and device.
In a first aspect, the present application shows an information processing method applied to a platform side, where the method includes:
acquiring test tasks of at least two devices to be tested, wherein each test task is used for testing whether an application program on the corresponding device to be tested is abnormal;
selecting a first thread corresponding to each to-be-tested device in at least two to-be-tested devices from a plurality of threads created by the platform end in advance;
and respectively issuing the test tasks of the devices to be tested to the same server corresponding to at least two devices to be tested based on the first threads, so that the server respectively starts the appium service corresponding to each device to be tested based on the second threads corresponding to each device to be tested, respectively issues the test tasks of the corresponding devices to be tested to the corresponding devices to be tested based on each appium service, and further enables each device to be tested to execute respective test tasks in parallel.
In an optional implementation, the method further includes:
for each device to be tested in the at least two devices to be tested, receiving a test report of the device to be tested, which is sent by the server, based on a first thread corresponding to the device to be tested, wherein the test report is generated and sent to the server under the condition that a test result obtained by the device to be tested after executing a test task indicates that an application program on the device to be tested is abnormal, and the test report is used for indicating that the application program on the device to be tested is abnormal;
and outputting the test report.
In a second aspect, the present application shows an information processing method, applied to a server, the method including:
receiving a test task of each to-be-tested device in at least two to-be-tested devices issued by a platform end, wherein each test task is used for testing whether an application program on the corresponding to-be-tested device is abnormal or not;
selecting a second thread corresponding to each device to be tested in at least two devices to be tested from a plurality of threads established by the server;
respectively starting the appium service corresponding to each device to be tested based on each second thread;
and respectively issuing the test tasks of the corresponding devices to be tested to the corresponding devices to be tested based on each apium service so as to enable each device to be tested to execute respective test tasks in parallel.
In an optional implementation, the method further includes:
for each device to be tested in the at least two devices to be tested, receiving a test report sent by the device to be tested based on an apium service corresponding to the device to be tested, wherein the test report is generated when a test result obtained by the device to be tested after executing a test task indicates that an application program on the device to be tested is abnormal, and the test report is used for indicating that the application program on the device to be tested is abnormal;
and sending the test report to the platform end so that the platform end outputs the test report.
In a third aspect, the present application shows an information processing method applied to a device to be tested, the method including:
receiving a test task issued by a server, wherein the test task is sent to the server by a first thread corresponding to the to-be-tested device on the basis of a platform end, then the server starts an appium service corresponding to the to-be-tested device on the basis of a second thread corresponding to the to-be-tested device, and is issued to the to-be-tested device on the basis of the appium service, and the test task is used for testing whether an application program on the to-be-tested device is abnormal or not;
and executing the test task.
In an optional implementation manner, the test task includes an initialization script, a test script, and a test case;
the executing the test task includes:
configuring a test environment of the device to be tested based on the initialization script;
and executing the test case through the test script in the test environment.
In an optional implementation, the method further includes:
determining whether a test result obtained after the test task is executed indicates that the application program is abnormal;
and under the condition that the test result indicates that the application program is abnormal, executing the test task again.
In an optional implementation, the method further includes:
determining whether the executed times of executing the test task reach preset times or not under the condition that the test result indicates that the application program is abnormal;
under the condition that the executed times do not reach the preset times, executing the test task again;
and under the condition that the executed times reach preset times, determining a test result obtained after the test task is executed for the last time as a final test result of the test task.
In an optional implementation, the method further includes:
under the condition that a test result obtained after the test task is executed indicates that the application program is abnormal, generating a test report for indicating that the application program is abnormal;
and sending a test report to a server so that the server sends the test report to the platform, and the platform outputs the test report.
In a fourth aspect, the present application shows an information processing apparatus applied to a platform side, the apparatus comprising:
the device comprises an acquisition module, a test module and a test module, wherein the acquisition module is used for acquiring test tasks of at least two devices to be tested, and each test task is respectively used for testing whether an application program on the corresponding device to be tested is abnormal;
the first selection module is used for selecting a first thread corresponding to each to-be-tested device in at least two to-be-tested devices from a plurality of threads created in advance by the platform end;
the first issuing module is used for issuing the test tasks of the at least two devices to be tested to the same server side corresponding to the at least two devices to be tested respectively based on the first threads, so that the server side starts the appium service corresponding to each device to be tested respectively based on the second threads corresponding to each device to be tested respectively, and issues the test tasks of the corresponding devices to be tested respectively to the corresponding devices to be tested based on each appium service, and further each device to be tested executes the respective test task in parallel.
In an optional implementation, the apparatus further comprises:
the first receiving module is configured to receive, for each to-be-tested device of the at least two to-be-tested devices, a test report of the to-be-tested device sent by the server based on a first thread corresponding to the to-be-tested device, where the test report is generated and sent to the server when a test result obtained by the to-be-tested device after executing a test task indicates that an application program on the to-be-tested device is abnormal, and the test report is used for indicating that the application program on the to-be-tested device is abnormal;
and the output module is used for outputting the test report.
In a fifth aspect, the present application shows an information processing apparatus applied to a server, the apparatus comprising:
the second receiving module is used for receiving a test task of each to-be-tested device in at least two to-be-tested devices issued by the platform end, and each test task is used for testing whether an application program on the corresponding to-be-tested device is abnormal or not;
the second selection module is used for selecting a second thread corresponding to each device to be tested in at least two devices to be tested from the multiple threads established by the server;
the starting module is used for respectively starting the appium service corresponding to each device to be tested based on each second thread;
and the second issuing module is used for issuing the test tasks of the corresponding devices to be tested to the corresponding devices to be tested respectively based on each apium service so as to enable each device to be tested to execute respective test tasks in parallel.
In an optional implementation, the apparatus further comprises:
a third receiving module, configured to receive, for each of the at least two devices to be tested, a test report sent by the device to be tested based on an appium service corresponding to the device to be tested, where the test report is generated when a test result obtained by the device to be tested after executing a test task indicates that an application program on the device to be tested is abnormal, and the test report is used to indicate that the application program on the device to be tested is abnormal;
and the first sending module is used for sending the test report to the platform end so that the platform end outputs the test report.
In a sixth aspect, the present application shows an information processing apparatus applied to a device to be tested, the apparatus comprising:
the fourth receiving module is used for receiving a test task issued by a server, wherein the test task is sent to the server by a first thread corresponding to the to-be-tested device on the basis of a platform end, then the server starts an apium service corresponding to the to-be-tested device by a second thread corresponding to the to-be-tested device, and is issued to the to-be-tested device on the basis of the apium service, and the test task is used for testing whether an application program on the to-be-tested device is abnormal or not;
and the execution module is used for executing the test task.
In an optional implementation manner, the test task includes an initialization script, a test script, and a test case;
the execution module comprises:
the configuration unit is used for configuring the test environment of the device to be tested based on the initialization script;
and the execution unit is used for executing the test case through the test script in the test environment.
In an optional implementation, the apparatus further comprises:
the first determining module is used for determining whether a test result obtained after the test task is executed indicates that the application program is abnormal or not;
the execution module is further to: and under the condition that the test result indicates that the application program is abnormal, executing the test task again.
In an optional implementation, the apparatus further comprises:
the second determination module is used for determining whether the executed times of executing the test task reach preset times or not under the condition that the test result indicates that the application program is abnormal;
the execution module is further to: under the condition that the executed times do not reach the preset times, executing the test task again;
and the third determining module is used for determining a test result obtained after the test task is executed for the last time as a final test result of the test task under the condition that the executed times reach preset times.
In an optional implementation, the apparatus further comprises:
the generating module is used for generating a test report used for indicating the application program to be abnormal under the condition that the test result obtained after the test task is executed indicates that the application program is abnormal;
and the second sending module is used for sending a test report to the server side so that the server side sends the test report to the platform side and the platform side outputs the test report.
In a seventh aspect, the present application shows an electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the information processing method according to the first aspect.
In an eighth aspect, the present application illustrates a non-transitory computer-readable storage medium having instructions which, when executed by a processor of an electronic device, enable the electronic device to perform the information processing method of the first aspect.
In a ninth aspect, the present application shows a computer program product, in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform the information processing method according to the first aspect.
In a tenth aspect, the present application shows an electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to execute the information processing method according to the second aspect.
In an eleventh aspect, the present application shows a non-transitory computer-readable storage medium having instructions which, when executed by a processor of an electronic device, enable the electronic device to perform the information processing method according to the second aspect.
In a twelfth aspect, the present application shows a computer program product, wherein the instructions of the computer program product, when executed by a processor of an electronic device, enable the electronic device to perform the information processing method according to the second aspect.
In a thirteenth aspect, the present application shows an electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the information processing method according to the third aspect.
In a fourteenth aspect, the present application shows a non-transitory computer-readable storage medium having instructions which, when executed by a processor of an electronic device, enable the electronic device to perform the information processing method according to the third aspect.
Fifteenth aspect, the present application shows a computer program product, wherein instructions of the computer program product, when executed by a processor of an electronic device, enable the electronic device to perform the information processing method according to the third aspect.
The technical scheme provided by the application can comprise the following beneficial effects:
in the application, a platform end obtains test tasks of at least two devices to be tested, each test task is used for testing whether an application program on the corresponding device to be tested is abnormal or not, a first thread corresponding to each device to be tested in the at least two devices to be tested is selected from a plurality of threads established in advance by the platform end, and the test tasks of the devices to be tested are respectively issued to the same server end corresponding to the at least two devices to be tested based on the first threads. The server receives a test task of each to-be-tested device in at least two to-be-tested devices issued by the platform, selects a second thread corresponding to each to-be-tested device in the at least two to-be-tested devices from a plurality of threads established by the server, respectively starts an apium service corresponding to each to-be-tested device based on each second thread, and respectively issues the test task of the corresponding to-be-tested device to the corresponding to-be-tested device based on each apium service. And each device to be tested receives the test task issued by the server respectively and executes the test task issued by the server respectively.
By the method and the device, the platform end can be supported to initiate a process of testing the application program on each to-be-tested device in the at least two to-be-tested devices in parallel through the first thread corresponding to each to-be-tested device in the platform end and the second thread corresponding to each to-be-tested device in the server end, and each to-be-tested device in the at least two to-be-tested devices can test the application program installed in parallel, so that time can be saved, and the testing efficiency is improved.
Secondly, the worker can initiate a process of testing the application program on each of the at least two devices to be tested only by one operation, that is, the process of testing the application program on each of the at least two devices to be tested can be started by one key, and then each device to be tested completes the automatic test of the application program based on the test task.
In addition, the platform end can provide an interface to the outside, so that a technician can remotely control the platform end through the interface, and the platform end can test the application programs on the at least two devices to be tested through the server end, therefore, the technician can control the server end to test the application programs on the at least two devices to be tested without going to the site where the server end is located, centralized control over the test can be realized for the technician, the work difficulty and the work load of the technician are reduced, and great convenience can be brought to the technician.
Drawings
Fig. 1 is a block diagram of an information processing system according to the present application.
FIG. 2 is a flow chart of steps of an information processing method of the present application.
Fig. 3 is a block diagram of a configuration of an information processing apparatus according to the present application.
Fig. 4 is a block diagram of a configuration of an information processing apparatus according to the present application.
Fig. 5 is a block diagram of the structure of an information processing apparatus according to the present application.
Fig. 6 is a block diagram of an electronic device shown in the present application.
Fig. 7 is a block diagram of an electronic device shown in the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
When automated testing is performed on an application program in a device, in one mode, the application program on the device may be automatically tested based on an app, which is an open-source, free device automation testing framework and is implemented based on a C/S architecture.
When an automation framework based on the Apium performs UI automation test, the Apium Server runs at a PC end, an automation test script in the UI automation test is transmitted to equipment, the equipment tests an application program based on the automation test script, and a test result is returned to the Apium Server.
In the above manner, the application on one device can be tested at a time by using the Appium Server, and if the testing of the application on multiple devices is to be completed, the applications on the devices need to be serially tested in sequence by using the Appium Server, but this results in a long time required for testing, and further results in low testing efficiency.
Secondly, before the application program on each device is tested, technicians are required to manually start the testing process, and thus, the technicians are required to participate in the whole testing process, so that the workload of the technicians is increased, and further the labor cost is increased.
Therefore, in order to improve the testing efficiency and reduce the workload of technicians to reduce labor cost, referring to fig. 1, a block diagram of an information processing system of the present application is shown, where the system includes at least a platform end 01, at least one server end 02, at least two devices under test 03, and the like, and of course, the system may further include other main bodies according to actual situations, which is not exemplified herein.
The platform end 01 and the service end 02 are in communication connection. For example, the platform side 01 and the server side 02 may perform data interaction with each other based on a socket (socket).
The server 02 is in communication connection with each device to be tested 03. For example, the server 02 and each device under test 03 can perform data interaction with each other based on the socket respectively.
The platform end 01 comprises a linux terminal and the like, and technicians can directly control the platform end 01 to respectively test the application programs on the at least two devices to be tested 03 through the platform end 01 and the server side 02.
The server 02 may have data forwarding and data storing functions, and the server 02 includes a desktop computer or a notebook computer.
The device to be tested 03 includes a terminal, such as a mobile phone, a tablet computer, a smart watch, and the like, in which an application can be installed and run.
Fig. 1 illustrates the system including a platform side 01, a service side 02 and three devices under test 03 as an example, but not by way of limitation to the scope of the present application.
Referring to fig. 2, a flowchart illustrating steps of an information processing method according to the present application is shown, where the method is applied to the system shown in fig. 1, and the method may specifically include the following steps:
in step S101, the platform obtains test tasks of at least two devices to be tested, where each test task is used to test whether an application program on the corresponding device to be tested is abnormal.
In the present application, the at least two devices under test shown in fig. 1 are different. For example, in one example, it is assumed that the device to be tested is a mobile phone, the mobile phone includes mobile phones of multiple manufacturers, different manufacturers include mobile phones of multiple models, and the types or versions of the operating systems of the mobile phones of different manufacturers are different.
Therefore, in the devices to be tested on the market, there often exists at least partial differences between the devices to be tested of different models, and when a technician needs to develop a type of application program running on the devices to be tested, in order to support the devices to be tested of each model, the application programs can be respectively developed for the devices to be tested of different models, in order to adapt to the respective devices to be tested, there exists differences between the application programs, and the differences can be used for adapting to the operating systems and the like of the respective devices to be tested.
Therefore, there are several models of devices to be tested on the market, so that technicians need to develop several versions for application programs, which is equivalent to developing multiple application programs, and the development workload of the technicians is greatly increased.
Therefore, in order to reduce the development workload of the technician, the technician may develop an application program, and the application program may be adapted to the devices to be tested of each model, that is, the application program may be compatible with the devices to be tested of each model.
However, before the application is developed and brought online, the application may be installed on each model of device to be tested, and the application may be tested on each model of device to be tested to determine whether the application can normally run on each device to be tested.
Under the condition that the application program can normally run on each device to be tested, the application program is proved to have no problem, and the application program can be online to be downloaded and used by a large number of users.
However, even in a case where the application cannot normally run on at least one device to be tested, it indicates that the application has a problem, for example, the application cannot be compatible with all devices to be tested, and a technician needs to repair and improve the application until the application can normally run on each device to be tested, and then log the application on line for downloading and use by a large number of users.
In the application, in at least two devices to be tested, the device identifiers of different devices to be tested may be different, and a technician may create respective corresponding test tasks for different devices to be tested in advance, where the test tasks may include an initialization script, a test case, and the like.
The device identifier may include a hardware identifier of the device, such as an IMEI (International Mobile Equipment Identity) or an meid (Mobile Equipment identifier) of the device.
For example, a test script common to each device under test may be created. Then, for any one device to be tested, a technician may create an initialization script, a test case, and the like corresponding to the device to be tested according to a manufacturer, a model, a type of an operating system, a version of the operating system, and the like of the device to be tested, and then generate a test task corresponding to the device to be tested according to the common test script, the initialization script, the test case, and the like corresponding to the device to be tested. The same is true for each other device to be tested, so that the test task corresponding to each device to be tested is obtained.
The testing tasks may then be stored on the platform side for later invocation by a technician when the application needs to be tested on the device under test.
In the application, when a technician needs to test whether an application program on at least two devices to be tested is abnormal, the technician may input a test instruction on a platform terminal, where the test instruction may include device identifiers of the at least two devices to be tested, a program identifier of the application program, and the like, the platform terminal obtains the test instruction input by the technician, then may determine which application program needs to be tested according to the program identifier in the test instruction, then may screen out a test task for testing the application program from among a plurality of stored test tasks of the platform terminal, and then may screen out a test task for testing the application program in the device to be tested corresponding to the device identifier according to the device identifier of the device to be tested. Then, step S102 is performed.
In step S102, the platform selects a first thread corresponding to each of at least two devices to be tested from a plurality of threads created by the platform in advance.
The platform end needs to issue respective corresponding test tasks to the at least two devices to be tested via the server end, however, when the platform end issues respective corresponding test tasks to the at least two devices to be tested via the server end, a thread is needed to execute the process.
In one embodiment, in this step, the platform end may respectively and temporarily create a corresponding thread for each of the at least two devices to be tested, and then execute step S103.
However, the process of creating the thread takes a long time, which lengthens the time taken by the whole test flow, and further reduces the test efficiency.
Therefore, in order to improve the testing efficiency, the platform end may create a thread for each device to be tested in advance, and then the platform end may continuously maintain the state of each thread as a waiting state. Therefore, when the corresponding test tasks need to be respectively issued to the at least two devices to be tested through the server, the thread in the waiting state can be directly called without temporarily creating the thread, so that the time can be saved, and the test efficiency is improved.
For any one device to be tested, after the platform end creates a thread for the device to be tested, the device identifier of the device to be tested and the thread identifier of the thread can form a corresponding entry and be stored in the corresponding relationship between the device identifier and the thread identifier, which is stored in the platform end, and the same is true for each other device to be tested.
Therefore, in this step, for any one of the at least two devices to be tested, the platform end may search, in the correspondence between the device identifier and the thread identifier stored in the platform end, for the thread identifier corresponding to the device identifier of the device to be tested, and use the thread corresponding to the thread identifier as the first thread corresponding to the device to be tested, which is the same for each of the other at least two devices to be tested.
The threads in the present application may include python threads, etc.
In step S103, the platform end issues the test task of each device to be tested to the same server corresponding to at least two devices to be tested based on each first thread.
In the application, the same server corresponding to the two devices to be tested may be the server 02 shown in fig. 1, and the like, and the at least two devices to be tested are in communication connection with the server 02 shown in fig. 1, respectively, so that the platform end may issue the test tasks of the devices to be tested to the same server corresponding to the at least two devices to be tested, respectively, so that the server may issue the respective test tasks to the devices to be tested, respectively, and further, the devices to be tested may execute the respective test tasks, thereby completing the test work.
In the application, for any one device to be tested and the first thread corresponding to the device to be tested, a status.set () function may be called to load the test task of the device to be tested into the first thread corresponding to the device to be tested, and then the test task of the device to be tested is issued to the server based on the first thread corresponding to the device to be tested. The same is true for the first threads corresponding to each other device to be tested and each other device to be tested.
In step S104, the server receives a test task of each of at least two devices to be tested issued by the platform.
In step S105, the server selects, from the multiple threads created by the server, a second thread corresponding to each device to be tested in the at least two devices to be tested.
The server needs to issue respective testing tasks to the at least two devices to be tested, however, when the server issues respective testing tasks to the at least two devices to be tested, a thread is needed to execute the process.
In one embodiment, in this step, the server may temporarily create a thread corresponding to each of the at least two devices to be tested, and then execute step S106.
However, the process of creating the thread takes a long time, which lengthens the time taken by the whole test flow, and further reduces the test efficiency.
Therefore, in order to improve the testing efficiency, the server may create a thread for each device to be tested in advance, and then the server may continuously maintain the state of each thread as a waiting state. Therefore, when the corresponding test tasks need to be respectively issued to the at least two devices to be tested, the thread in the waiting state can be directly called without temporarily creating the thread, so that the time can be saved, and the test efficiency is improved.
For any one device to be tested, after the server creates a thread for the device to be tested, the device identifier of the device to be tested and the thread identifier of the thread may form a corresponding entry, and the corresponding entry is stored in the corresponding relationship between the device identifier and the thread identifier, which is stored in the server, and the same applies to each of the other devices to be tested.
Therefore, in this step, for any one of the at least two devices to be tested, the server may search, in the correspondence between the device identifier and the thread identifier stored in the server, for the thread identifier corresponding to the device identifier of the device to be tested, and use the thread corresponding to the thread identifier as the second thread corresponding to the device to be tested, which is the same for each of the other at least two devices to be tested.
The threads in the present application may include python threads, etc.
In step S106, the service end respectively starts an apium service corresponding to each device to be tested based on each second thread.
In this application, under the condition that the server needs to issue respective corresponding test tasks to at least two devices to be tested, in one manner, for any one device to be tested, the server may start an apium service corresponding to the device to be tested based on a second thread corresponding to the device to be tested, which is equivalent to starting a test interface between the server and the device to be tested, and then the server may issue the test task of the device to be tested to the device to be tested based on the apium service. The same is true for each of the other devices under test.
In step S107, the server sends test tasks of the corresponding devices to be tested to the corresponding devices to be tested based on each apium service.
In the application, for a test task of any one device to be tested, the test task of the device to be tested may carry a device identifier of the device to be tested, and the server may determine, through the device identifier carried in the test task, that the test task is sent to the device to be tested, instead of sending the test task to other devices to be tested. However, the device identifier of the device to be tested may be a hardware identifier of the device to be tested, for example, an IMEI, an MEID, and the like of the device to be tested, however, in general, the server interacts with the device to be tested based on an IP (Internet Protocol Address) Address, that is, the server locates the device to be tested based on the IP Address.
Therefore, for the server, after obtaining the device identifier of the device to be tested, the server often cannot directly locate the device to be tested based on the device identifier of the device to be tested, needs to obtain the IP address of the device to be tested, and then sends the test task of the device to be tested to the device to be tested according to the IP address of the device to be tested.
In order to enable the server to obtain the IP address of the device to be tested, for any one device to be tested, the server may obtain the device identifier of the device to be tested and obtain the IP address of the device to be tested in advance, then form a corresponding table entry by the device identifier of the device to be tested and the IP address of the device to be tested, and store the table entry in the corresponding relationship between the device identifier and the IP address, and then the server may monitor whether the IP address of the device to be tested changes in real time, and if so, update the IP address corresponding to the device identifier of the device to be tested in the corresponding relationship between the device identifier and the IP address. The same is true for any one device under test.
The correspondence between the device identifier and the IP address may be located in a config file of the server.
Therefore, for any one device to be tested, under the condition that the server needs to acquire the IP address of the device to be tested, the server can search the IP address corresponding to the device identifier of the device to be tested in the corresponding relationship between the device identifier and the IP address, and use the IP address as the IP address of the device to be tested. The same is true for each of the other devices under test.
Further, for any one of the at least two devices to be tested, the following flow from step S108 to step S109 may be executed, and the same is true for each other device to be tested of the at least two devices to be tested.
In step S108, the device to be tested receives the test task issued by the server.
In step S109, the device to be tested executes the test task issued by the server.
In the application, the test task includes an initialization script, a test case, and the like, so that when the test task is executed, a test environment of the device to be tested may be configured based on the initialization script, for example, the initialization script is run in the device to be tested to configure the test environment in the device to be tested, then in the test environment, the test case is executed through the test script, for example, the test case may be loaded into the test script, and then the test script is executed to implement the test case execution through the test script.
In the application, a platform end obtains test tasks of at least two devices to be tested, each test task is used for testing whether an application program on the corresponding device to be tested is abnormal or not, a first thread corresponding to each device to be tested in the at least two devices to be tested is selected from a plurality of threads established in advance by the platform end, and the test tasks of the devices to be tested are respectively issued to the same server end corresponding to the at least two devices to be tested based on the first threads. The server receives a test task of each to-be-tested device in at least two to-be-tested devices issued by the platform, selects a second thread corresponding to each to-be-tested device in the at least two to-be-tested devices from a plurality of threads established by the server, respectively starts an apium service corresponding to each to-be-tested device based on each second thread, and respectively issues the test task of the corresponding to-be-tested device to the corresponding to-be-tested device based on each apium service. And each device to be tested receives the test task issued by the server respectively and executes the test task issued by the server respectively.
By the method and the device, the platform end can be supported to initiate a process of testing the application program on each to-be-tested device in the at least two to-be-tested devices in parallel through the first thread corresponding to each to-be-tested device in the platform end and the second thread corresponding to each to-be-tested device in the server end, and each to-be-tested device in the at least two to-be-tested devices can test the application program installed in parallel, so that time can be saved, and the testing efficiency is improved.
Secondly, the worker can initiate a process of testing the application program on each of the at least two devices to be tested only by one operation, that is, the process of testing the application program on each of the at least two devices to be tested can be started by one key, and then each device to be tested completes the automatic test of the application program based on the test task.
In addition, the platform end can provide an interface to the outside, so that a technician can remotely control the platform end through the interface, and the platform end can test the application programs on the at least two devices to be tested through the server end, therefore, the technician can control the server end to test the application programs on the at least two devices to be tested without going to the site where the server end is located, centralized control over the test can be realized for the technician, the work difficulty and the work load of the technician are reduced, and great convenience can be brought to the technician.
In another embodiment of the present application, in a case where a test result obtained after the test task is performed indicates an application exception, a test report indicating the application exception may be generated, and then the test report indicating the application exception may be output to provide a test report indicating the application exception to a technician.
The content recorded in the test report may include: the page identifier of the page in which the exception occurs in the application program, the element identifier of the element in which the exception occurs in the page, the network state of the device to be tested when the exception occurs, the IP address of the device to be tested, the manufacturer of the device to be tested, the model of the device to be tested, the type of the operating system of the device to be tested, the version number of the operating system of the device to be tested, and the like.
The technician can determine the specific reason of the application program abnormality according to the test report, and then eliminate the application program abnormality according to the reason.
In order to output a test report indicating an application exception to provide a technician with the test report indicating the application exception, in one embodiment of the present application, the device to be tested may send the test report to the server; the service end can receive the test report and send the test report to the platform end. And then the platform side receives the test report sent by the service side, and then the test report can be output.
Specifically, for any one of at least two devices to be tested, the server may receive, based on the appium service corresponding to the device to be tested, a test report sent by the device to be tested, where the test report is generated when a test result obtained by the device to be tested after executing a test task of the device to be tested indicates that an application program on the device to be tested is abnormal, and the test report is used to indicate that the application program on the device to be tested is abnormal; the server side can send a test report to the platform side. Accordingly, the platform end may receive the test report of the device to be tested, which is sent by the server end, based on the first thread corresponding to the device to be tested, and then may output the test report of the device to be tested, so as to provide the test report of the device to be tested to the technician. The same is true for each of the other at least two devices under test.
For example, a test report indicating an application exception may be displayed on a screen of the platform end, so that a technician may view the test report indicating an application exception, or the test report indicating an application exception may be played through a sound box of the platform end, so that the technician may perceive the test report indicating an application exception, or the test report indicating an application exception may be sent to a terminal device used by the technician, so that the technician may view the test report indicating an application exception on the terminal device used by the technician. The method can be specifically sent by means of mails, internet instant messaging tools, short messages or PUSH and the like, and the specific sending mode is not limited in the application.
Through the application, technicians do not need to manually obtain the test reports through all the devices to be tested respectively, and the test reports of all the devices to be tested can be uniformly obtained through the platform end, so that the burden of workers can be reduced, and the labor cost is further reduced.
Sometimes, in the embodiment shown in fig. 2, after the device to be tested performs the testing task, one possible result is that the testing result obtained by the device to be tested indicates the application program exception, in which case, the device to be tested generates a testing report for indicating the application program exception and outputs the testing report for indicating the application program exception.
However, in the process of executing the test task, the device to be tested may need to perform data interaction with other devices on the network, for example, obtain page data from the network, however, if the network connection between the device to be tested and the other devices on the network is abnormal, this may cause that the device to be tested cannot perform normal data interaction with the other devices on the network, and thus cannot complete the test smoothly, and in a possible case, the test result obtained by the device to be tested after executing the test task may indicate that the application program is abnormal.
However, in a possible case, the result of the exception is caused by an exception of the network connection between the test device and other devices on the network, and not by an exception of the application itself, that is, an inaccurate test result may occur.
Therefore, in order to improve the accuracy of the test result, in another embodiment of the present application, on the basis of the embodiment shown in fig. 2, the device to be tested may determine whether the test result obtained after the test task is performed indicates that the application program is abnormal, and in a case that the test result obtained after the test task is performed indicates that the application program is abnormal, the test task may be performed again.
According to the method and the device for testing the application program, the test task is tried to be executed again, so that the device to be tested can execute the test task for many times as much as possible, the application program is tested for many times, the influence on the test result due to the abnormal network connection between the test device and other devices on the network is avoided as much as possible, and the accuracy of the test result is improved.
Specifically, in the case where the test result obtained after the test task is executed indicates that the application program is abnormal, the device to be tested may execute the test task again by means of the unittest component.
In addition, in the case that the test result obtained after the test task is executed indicates that the application program is normal, the device to be tested may end the test flow, may generate a test report for indicating that the application program is normal and output the test report for indicating that the application program is normal, so as to provide the test report for indicating that the application program is normal to the technician.
However, in some cases, actually, the application program itself is abnormal, which causes the test result obtained after the device to be tested executes the test task to indicate that the application program is abnormal, and the test result obtained after the device to be tested executes the test task is not abnormal due to the abnormal network connection between the device to be tested and other devices on the network, which temporarily occurs during the test.
Therefore, in order to save system resources and network resources of the device to be tested, in another embodiment of the present application, on the basis of the embodiment shown in fig. 1, the method further includes:
in the case where the test result obtained after the test task is executed indicates that the application program is abnormal, it may be determined whether the number of times the test task has been executed reaches a preset number of times. In the case where the number of executed times does not reach the preset number of times, step S109 may be executed again: and executing the testing task. In a case where the number of times of execution has reached the preset number of times, a test result obtained after the test task was executed the last time may be determined as a final test result of the test task.
In this application, after the device to be tested executes the test task for the first time, the device to be tested may set an initial value of the execution times, for example, 1, and then form the task identifier of the test task and the initial value of the execution times into a corresponding entry, and store the entry in the corresponding relationship between the task identifier and the execution times. After the test task is executed for the second time, the device to be tested may increase the execution times corresponding to the task identifier of the test task in the correspondence between the task identifier and the execution times, for example, increase 1 on the basis of 1, obtain 2, and so on.
After the third, fourth, and nth etc. execution of the test task, reference may be made to the above-mentioned operation flow after the test task is executed for the second time, which is not described in detail herein.
Therefore, when determining whether the executed number of times of executing the test task reaches the preset number of times, the device to be tested may search, in the correspondence between the task identifier and the executed number of times, the executed number of times corresponding to the task identifier of the test task and use the searched executed number of times as the executed number of times of executing the test task, and then compare the executed number of times with the preset number of times.
The preset times may include 3, 5, or 8, etc., and specific values may be determined according to actual situations, which are not described in detail herein. For example, the preset number may be set according to the network state of the device to be tested in the last period of time, and in one example, the preset number may be set to be lower in a case where the network state of the device to be tested is more stable, and the preset number may be set to be higher in a case where the network state of the device to be tested is more unstable.
In addition, under the condition that the executed times reach the preset times, the executed times for executing the test task are often more, in this case, the application program itself is usually abnormal, and the test result obtained after the test task is executed indicates that the application program is abnormal due to the abnormality, so that the test task can not be executed any more, the process can be ended, and the system resources, the network resources and the like of the device to be tested can be saved.
It is noted that, for simplicity of explanation, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will appreciate that the present application is not limited by the order of acts, as some steps may, in accordance with the present application, occur in other orders and concurrently. Further, those skilled in the art will also appreciate that the embodiments described in the specification are exemplary and that no action is necessarily required in this application.
Referring to fig. 3, a block diagram of an information processing apparatus according to the present application is shown, and the apparatus is applied to a platform side, and may specifically include the following modules:
the acquiring module 11 is configured to acquire test tasks of at least two devices to be tested, where each test task is used to test whether an application program on the corresponding device to be tested is abnormal;
the first selection module 12 is configured to select, from a plurality of threads created in advance by the platform end, a first thread corresponding to each of at least two devices to be tested;
the first issuing module 13 is configured to issue a test task of each to-be-tested device to the same server corresponding to at least two to-be-tested devices based on each first thread, so that the server starts an apium service corresponding to each to-be-tested device based on each second thread corresponding to each to-be-tested device, and issues a test task of the corresponding to-be-tested device to the corresponding to-be-tested device based on each apium service, thereby enabling each to-be-tested device to execute respective test tasks in parallel.
In an optional implementation, the apparatus further comprises:
the first receiving module is configured to receive, for each to-be-tested device of the at least two to-be-tested devices, a test report of the to-be-tested device sent by the server based on a first thread corresponding to the to-be-tested device, where the test report is generated and sent to the server when a test result obtained by the to-be-tested device after executing a test task indicates that an application program on the to-be-tested device is abnormal, and the test report is used for indicating that the application program on the to-be-tested device is abnormal;
and the output module is used for outputting the test report.
In the application, a platform end obtains test tasks of at least two devices to be tested, each test task is used for testing whether an application program on the corresponding device to be tested is abnormal or not, a first thread corresponding to each device to be tested in the at least two devices to be tested is selected from a plurality of threads established in advance by the platform end, and the test tasks of the devices to be tested are respectively issued to the same server end corresponding to the at least two devices to be tested based on the first threads. The server receives a test task of each to-be-tested device in at least two to-be-tested devices issued by the platform, selects a second thread corresponding to each to-be-tested device in the at least two to-be-tested devices from a plurality of threads established by the server, respectively starts an apium service corresponding to each to-be-tested device based on each second thread, and respectively issues the test task of the corresponding to-be-tested device to the corresponding to-be-tested device based on each apium service. And each device to be tested receives the test task issued by the server respectively and executes the test task issued by the server respectively.
By the method and the device, the platform end can be supported to initiate a process of testing the application program on each to-be-tested device in the at least two to-be-tested devices in parallel through the first thread corresponding to each to-be-tested device in the platform end and the second thread corresponding to each to-be-tested device in the server end, and each to-be-tested device in the at least two to-be-tested devices can test the application program installed in parallel, so that time can be saved, and the testing efficiency is improved.
Secondly, the worker can initiate a process of testing the application program on each of the at least two devices to be tested only by one operation, that is, the process of testing the application program on each of the at least two devices to be tested can be started by one key, and then each device to be tested completes the automatic test of the application program based on the test task.
In addition, the platform end can provide an interface to the outside, so that a technician can remotely control the platform end through the interface, and the platform end can test the application programs on the at least two devices to be tested through the server end, therefore, the technician can control the server end to test the application programs on the at least two devices to be tested without going to the site where the server end is located, centralized control over the test can be realized for the technician, the work difficulty and the work load of the technician are reduced, and great convenience can be brought to the technician.
Referring to fig. 4, a block diagram of an information processing apparatus according to the present application is shown, and the apparatus is applied to a server, and specifically includes the following modules:
the second receiving module 21 is configured to receive a test task of each of at least two devices to be tested issued by the platform end, where each test task is used to test whether an application program on the corresponding device to be tested is abnormal;
a second selecting module 22, configured to select, from the multiple threads created by the server, a second thread corresponding to each device to be tested in the at least two devices to be tested;
the starting module 23 is configured to respectively start the apium service corresponding to each device to be tested based on each second thread;
and the second issuing module 24 is configured to issue the test tasks of the corresponding devices to be tested to the corresponding devices to be tested based on each apium service, so that each device to be tested executes its test task in parallel.
In an optional implementation, the apparatus further comprises:
a third receiving module, configured to receive, for each of the at least two devices to be tested, a test report sent by the device to be tested based on an appium service corresponding to the device to be tested, where the test report is generated when a test result obtained by the device to be tested after executing a test task indicates that an application program on the device to be tested is abnormal, and the test report is used to indicate that the application program on the device to be tested is abnormal;
and the first sending module is used for sending the test report to the platform end so that the platform end outputs the test report.
In the application, a platform end obtains test tasks of at least two devices to be tested, each test task is used for testing whether an application program on the corresponding device to be tested is abnormal or not, a first thread corresponding to each device to be tested in the at least two devices to be tested is selected from a plurality of threads established in advance by the platform end, and the test tasks of the devices to be tested are respectively issued to the same server end corresponding to the at least two devices to be tested based on the first threads. The server receives a test task of each to-be-tested device in at least two to-be-tested devices issued by the platform, selects a second thread corresponding to each to-be-tested device in the at least two to-be-tested devices from a plurality of threads established by the server, respectively starts an apium service corresponding to each to-be-tested device based on each second thread, and respectively issues the test task of the corresponding to-be-tested device to the corresponding to-be-tested device based on each apium service. And each device to be tested receives the test task issued by the server respectively and executes the test task issued by the server respectively.
By the method and the device, the platform end can be supported to initiate a process of testing the application program on each to-be-tested device in the at least two to-be-tested devices in parallel through the first thread corresponding to each to-be-tested device in the platform end and the second thread corresponding to each to-be-tested device in the server end, and each to-be-tested device in the at least two to-be-tested devices can test the application program installed in parallel, so that time can be saved, and the testing efficiency is improved.
Secondly, the worker can initiate a process of testing the application program on each of the at least two devices to be tested only by one operation, that is, the process of testing the application program on each of the at least two devices to be tested can be started by one key, and then each device to be tested completes the automatic test of the application program based on the test task.
In addition, the platform end can provide an interface to the outside, so that a technician can remotely control the platform end through the interface, and the platform end can test the application programs on the at least two devices to be tested through the server end, therefore, the technician can control the server end to test the application programs on the at least two devices to be tested without going to the site where the server end is located, centralized control over the test can be realized for the technician, the work difficulty and the work load of the technician are reduced, and great convenience can be brought to the technician.
Referring to fig. 5, a block diagram of an information processing apparatus according to the present application is shown, and the apparatus is applied to a device to be tested, and specifically includes the following modules:
a fourth receiving module 31, configured to receive a test task issued by a server, where the test task is sent to the server by a first thread corresponding to the to-be-tested device by a platform end, then the server starts an apium service corresponding to the to-be-tested device by a second thread corresponding to the to-be-tested device, and is issued to the to-be-tested device based on the apium service, and the test task is used to test whether an application program on the to-be-tested device is abnormal;
and the execution module 32 is used for executing the test task.
In an optional implementation manner, the test task includes an initialization script, a test script, and a test case;
the execution module comprises:
the configuration unit is used for configuring the test environment of the device to be tested based on the initialization script;
and the execution unit is used for executing the test case through the test script in the test environment.
In an optional implementation, the apparatus further comprises:
the first determining module is used for determining whether a test result obtained after the test task is executed indicates that the application program is abnormal or not;
the execution module is further to: and under the condition that the test result indicates that the application program is abnormal, executing the test task again.
In an optional implementation, the apparatus further comprises:
the second determination module is used for determining whether the executed times of executing the test task reach preset times or not under the condition that the test result indicates that the application program is abnormal;
the execution module is further to: under the condition that the executed times do not reach the preset times, executing the test task again;
and the third determining module is used for determining a test result obtained after the test task is executed for the last time as a final test result of the test task under the condition that the executed times reach preset times.
In an optional implementation, the apparatus further comprises:
the generating module is used for generating a test report used for indicating the application program to be abnormal under the condition that the test result obtained after the test task is executed indicates that the application program is abnormal;
and the second sending module is used for sending a test report to the server side so that the server side sends the test report to the platform side and the platform side outputs the test report.
In the application, a platform end obtains test tasks of at least two devices to be tested, each test task is used for testing whether an application program on the corresponding device to be tested is abnormal or not, a first thread corresponding to each device to be tested in the at least two devices to be tested is selected from a plurality of threads established in advance by the platform end, and the test tasks of the devices to be tested are respectively issued to the same server end corresponding to the at least two devices to be tested based on the first threads. The server receives a test task of each to-be-tested device in at least two to-be-tested devices issued by the platform, selects a second thread corresponding to each to-be-tested device in the at least two to-be-tested devices from a plurality of threads established by the server, respectively starts an apium service corresponding to each to-be-tested device based on each second thread, and respectively issues the test task of the corresponding to-be-tested device to the corresponding to-be-tested device based on each apium service. And each device to be tested receives the test task issued by the server respectively and executes the test task issued by the server respectively.
By the method and the device, the platform end can be supported to initiate a process of testing the application program on each to-be-tested device in the at least two to-be-tested devices in parallel through the first thread corresponding to each to-be-tested device in the platform end and the second thread corresponding to each to-be-tested device in the server end, and each to-be-tested device in the at least two to-be-tested devices can test the application program installed in parallel, so that time can be saved, and the testing efficiency is improved.
Secondly, the worker can initiate a process of testing the application program on each of the at least two devices to be tested only by one operation, that is, the process of testing the application program on each of the at least two devices to be tested can be started by one key, and then each device to be tested completes the automatic test of the application program based on the test task.
In addition, the platform end can provide an interface to the outside, so that a technician can remotely control the platform end through the interface, and the platform end can test the application programs on the at least two devices to be tested through the server end, therefore, the technician can control the server end to test the application programs on the at least two devices to be tested without going to the site where the server end is located, centralized control over the test can be realized for the technician, the work difficulty and the work load of the technician are reduced, and great convenience can be brought to the technician.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Fig. 6 is a block diagram of an electronic device 800 shown in the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, images, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives broadcast signals or broadcast operation information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the electronic device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Fig. 7 is a block diagram of an electronic device 1900 shown in the present application. For example, the electronic device 1900 may be provided as a server.
Referring to fig. 7, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal 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, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The information processing method and apparatus provided by the present application are introduced in detail, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (24)

1. An information processing method, applied to a platform side, the method comprising:
acquiring test tasks of at least two devices to be tested, wherein each test task is used for testing whether an application program on the corresponding device to be tested is abnormal;
selecting a first thread corresponding to each to-be-tested device in at least two to-be-tested devices from a plurality of threads created by the platform end in advance;
and respectively issuing the test tasks of the devices to be tested to the same server corresponding to at least two devices to be tested based on the first threads, so that the server respectively starts the appium service corresponding to each device to be tested based on the second threads corresponding to each device to be tested, respectively issues the test tasks of the corresponding devices to be tested to the corresponding devices to be tested based on each appium service, and further enables each device to be tested to execute respective test tasks in parallel.
2. The method of claim 1, further comprising:
for each device to be tested in the at least two devices to be tested, receiving a test report of the device to be tested, which is sent by the server, based on a first thread corresponding to the device to be tested, wherein the test report is generated and sent to the server under the condition that a test result obtained by the device to be tested after executing a test task indicates that an application program on the device to be tested is abnormal, and the test report is used for indicating that the application program on the device to be tested is abnormal;
and outputting the test report.
3. An information processing method, applied to a server, the method comprising:
receiving a test task of each to-be-tested device in at least two to-be-tested devices issued by a platform end, wherein each test task is used for testing whether an application program on the corresponding to-be-tested device is abnormal or not;
selecting a second thread corresponding to each device to be tested in at least two devices to be tested from a plurality of threads established by the server;
respectively starting the appium service corresponding to each device to be tested based on each second thread;
and respectively issuing the test tasks of the corresponding devices to be tested to the corresponding devices to be tested based on each apium service so as to enable each device to be tested to execute respective test tasks in parallel.
4. The method of claim 3, further comprising:
for each device to be tested in the at least two devices to be tested, receiving a test report sent by the device to be tested based on an apium service corresponding to the device to be tested, wherein the test report is generated when a test result obtained by the device to be tested after executing a test task indicates that an application program on the device to be tested is abnormal, and the test report is used for indicating that the application program on the device to be tested is abnormal;
and sending the test report to the platform end so that the platform end outputs the test report.
5. An information processing method is applied to a device to be tested, and the method comprises the following steps:
receiving a test task issued by a server, wherein the test task is sent to the server by a first thread corresponding to the to-be-tested device on the basis of a platform end, then the server starts an appium service corresponding to the to-be-tested device on the basis of a second thread corresponding to the to-be-tested device, and is issued to the to-be-tested device on the basis of the appium service, and the test task is used for testing whether an application program on the to-be-tested device is abnormal or not;
and executing the test task.
6. The method of claim 5, wherein the test task comprises an initialization script, a test script and a test case;
the executing the test task includes:
configuring a test environment of the device to be tested based on the initialization script;
and executing the test case through the test script in the test environment.
7. The method of claim 5, further comprising:
determining whether a test result obtained after the test task is executed indicates that the application program is abnormal;
and under the condition that the test result indicates that the application program is abnormal, executing the test task again.
8. The method of claim 7, further comprising:
determining whether the executed times of executing the test task reach preset times or not under the condition that the test result indicates that the application program is abnormal;
under the condition that the executed times do not reach the preset times, executing the test task again;
and under the condition that the executed times reach preset times, determining a test result obtained after the test task is executed for the last time as a final test result of the test task.
9. The method of claim 5, further comprising:
under the condition that a test result obtained after the test task is executed indicates that the application program is abnormal, generating a test report for indicating that the application program is abnormal;
and sending a test report to a server so that the server sends the test report to the platform, and the platform outputs the test report.
10. An information processing apparatus, applied to a platform side, the apparatus comprising:
the device comprises an acquisition module, a test module and a test module, wherein the acquisition module is used for acquiring test tasks of at least two devices to be tested, and each test task is respectively used for testing whether an application program on the corresponding device to be tested is abnormal;
the first selection module is used for selecting a first thread corresponding to each to-be-tested device in at least two to-be-tested devices from a plurality of threads created in advance by the platform end;
the first issuing module is used for issuing the test tasks of the at least two devices to be tested to the same server side corresponding to the at least two devices to be tested respectively based on the first threads, so that the server side starts the appium service corresponding to each device to be tested respectively based on the second threads corresponding to each device to be tested respectively, and issues the test tasks of the corresponding devices to be tested respectively to the corresponding devices to be tested based on each appium service, and further each device to be tested executes the respective test task in parallel.
11. The apparatus of claim 10, further comprising:
the first receiving module is configured to receive, for each to-be-tested device of the at least two to-be-tested devices, a test report of the to-be-tested device sent by the server based on a first thread corresponding to the to-be-tested device, where the test report is generated and sent to the server when a test result obtained by the to-be-tested device after executing a test task indicates that an application program on the to-be-tested device is abnormal, and the test report is used for indicating that the application program on the to-be-tested device is abnormal;
and the output module is used for outputting the test report.
12. An information processing apparatus, applied to a server, the apparatus comprising:
the second receiving module is used for receiving a test task of each to-be-tested device in at least two to-be-tested devices issued by the platform end, and each test task is used for testing whether an application program on the corresponding to-be-tested device is abnormal or not;
the second selection module is used for selecting a second thread corresponding to each device to be tested in at least two devices to be tested from the multiple threads established by the server;
the starting module is used for respectively starting the appium service corresponding to each device to be tested based on each second thread;
and the second issuing module is used for issuing the test tasks of the corresponding devices to be tested to the corresponding devices to be tested respectively based on each apium service so as to enable each device to be tested to execute respective test tasks in parallel.
13. The apparatus of claim 12, further comprising:
a third receiving module, configured to receive, for each of the at least two devices to be tested, a test report sent by the device to be tested based on an appium service corresponding to the device to be tested, where the test report is generated when a test result obtained by the device to be tested after executing a test task indicates that an application program on the device to be tested is abnormal, and the test report is used to indicate that the application program on the device to be tested is abnormal;
and the first sending module is used for sending the test report to the platform end so that the platform end outputs the test report.
14. An information processing apparatus, applied to a device to be tested, the apparatus comprising:
the fourth receiving module is used for receiving a test task issued by a server, wherein the test task is sent to the server by a first thread corresponding to the to-be-tested device on the basis of a platform end, then the server starts an apium service corresponding to the to-be-tested device by a second thread corresponding to the to-be-tested device, and is issued to the to-be-tested device on the basis of the apium service, and the test task is used for testing whether an application program on the to-be-tested device is abnormal or not;
and the execution module is used for executing the test task.
15. The apparatus according to claim 14, wherein the test task comprises an initialization script, a test script and a test case;
the execution module comprises:
the configuration unit is used for configuring the test environment of the device to be tested based on the initialization script;
and the execution unit is used for executing the test case through the test script in the test environment.
16. The apparatus of claim 14, further comprising:
the first determining module is used for determining whether a test result obtained after the test task is executed indicates that the application program is abnormal or not;
the execution module is further to: and under the condition that the test result indicates that the application program is abnormal, executing the test task again.
17. The apparatus of claim 16, further comprising:
the second determination module is used for determining whether the executed times of executing the test task reach preset times or not under the condition that the test result indicates that the application program is abnormal;
the execution module is further to: under the condition that the executed times do not reach the preset times, executing the test task again;
and the third determining module is used for determining a test result obtained after the test task is executed for the last time as a final test result of the test task under the condition that the executed times reach preset times.
18. The apparatus of claim 14, further comprising:
the generating module is used for generating a test report used for indicating the application program to be abnormal under the condition that the test result obtained after the test task is executed indicates that the application program is abnormal;
and the second sending module is used for sending a test report to the server side so that the server side sends the test report to the platform side and the platform side outputs the test report.
19. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the information processing method of any one of claims 1-2.
20. A non-transitory computer-readable storage medium in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform the information processing method of any one of claims 1-2.
21. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the information processing method of any one of claims 3 to 4.
22. A non-transitory computer-readable storage medium in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform the information processing method of any one of claims 3 to 4.
23. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the information processing method of any one of claims 5 to 9.
24. A non-transitory computer-readable storage medium in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform the information processing method of any one of claims 5 to 9.
CN202011282810.2A 2020-11-16 2020-11-16 Information processing method and device Pending CN112395192A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011282810.2A CN112395192A (en) 2020-11-16 2020-11-16 Information processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011282810.2A CN112395192A (en) 2020-11-16 2020-11-16 Information processing method and device

Publications (1)

Publication Number Publication Date
CN112395192A true CN112395192A (en) 2021-02-23

Family

ID=74599942

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011282810.2A Pending CN112395192A (en) 2020-11-16 2020-11-16 Information processing method and device

Country Status (1)

Country Link
CN (1) CN112395192A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672505A (en) * 2021-08-05 2021-11-19 浙江万朋教育科技股份有限公司 Multi-terminal interactive automatic regression testing method
CN113934353A (en) * 2021-09-30 2022-01-14 北京五八信息技术有限公司 Information processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130106878A1 (en) * 2011-10-26 2013-05-02 Roy E. Williams Declarative interface for developing test cases for graphics programs
CN109471789A (en) * 2018-09-04 2019-03-15 中国平安人寿保险股份有限公司 For the multi-apparatus management method of test, device, server and storage medium
CN110188043A (en) * 2019-05-27 2019-08-30 上海上湖信息技术有限公司 A kind of method and control equipment of the test of control multiple devices
CN110287122A (en) * 2019-06-29 2019-09-27 广州华多网络科技有限公司 A kind of automated testing method, device, terminal and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130106878A1 (en) * 2011-10-26 2013-05-02 Roy E. Williams Declarative interface for developing test cases for graphics programs
CN109471789A (en) * 2018-09-04 2019-03-15 中国平安人寿保险股份有限公司 For the multi-apparatus management method of test, device, server and storage medium
CN110188043A (en) * 2019-05-27 2019-08-30 上海上湖信息技术有限公司 A kind of method and control equipment of the test of control multiple devices
CN110287122A (en) * 2019-06-29 2019-09-27 广州华多网络科技有限公司 A kind of automated testing method, device, terminal and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672505A (en) * 2021-08-05 2021-11-19 浙江万朋教育科技股份有限公司 Multi-terminal interactive automatic regression testing method
CN113672505B (en) * 2021-08-05 2024-04-19 浙江万朋教育科技股份有限公司 Multi-terminal interactive automatic regression testing method
CN113934353A (en) * 2021-09-30 2022-01-14 北京五八信息技术有限公司 Information processing method and device

Similar Documents

Publication Publication Date Title
US10055204B2 (en) Generating communication firmware and a program plug-in based on product information and a program template
CN104536891B (en) System detection method and device
CN109542777B (en) Pressure testing method and device and readable medium
CN104539476A (en) Data package obtaining method and device
CN110502444B (en) Testing method and testing device for image processing algorithm
CN105183631A (en) Equipment test methods and devices
CN111221733A (en) Information processing method and device, mobile terminal and storage medium
CN112395192A (en) Information processing method and device
CN112597051A (en) Method and device for obtaining test result, electronic equipment and storage medium
CN107562500B (en) Debugging device, method and equipment
CN109684112B (en) Program file operation method, device, terminal and storage medium
CN111209195B (en) Method and device for generating test case
CN113377664A (en) Model testing method and device, electronic device and storage medium
CN113885914A (en) Application program processing method and device, electronic equipment and storage medium
CN111596980B (en) Information processing method and device
CN111221593A (en) Dynamic loading method and device
CN115757135A (en) Test environment deployment method, apparatus, storage medium, and program product
CN114896165A (en) Testing method and device of conversation robot system, electronic equipment and storage medium
CN115033469A (en) Website system performance test method and device, equipment and storage medium
CN112306883A (en) Software testing method, device and medium
CN112650686A (en) Method and device for obtaining test result, electronic equipment and storage medium
CN111597106A (en) Point burying management method and device
CN112612516B (en) Code processing method and device
CN113946353B (en) Data processing method and device, electronic equipment and storage medium
CN110990073B (en) Method and device for verifying customization requirements of application program

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