CN113836032A - Android interface concurrent testing method, device, equipment and storage medium - Google Patents

Android interface concurrent testing method, device, equipment and storage medium Download PDF

Info

Publication number
CN113836032A
CN113836032A CN202111168562.3A CN202111168562A CN113836032A CN 113836032 A CN113836032 A CN 113836032A CN 202111168562 A CN202111168562 A CN 202111168562A CN 113836032 A CN113836032 A CN 113836032A
Authority
CN
China
Prior art keywords
interface
android
testing
target
test
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
CN202111168562.3A
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.)
Dongfeng Nissan Passenger Vehicle Co
Original Assignee
Dongfeng Nissan Passenger Vehicle Co
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 Dongfeng Nissan Passenger Vehicle Co filed Critical Dongfeng Nissan Passenger Vehicle Co
Priority to CN202111168562.3A priority Critical patent/CN113836032A/en
Publication of CN113836032A publication Critical patent/CN113836032A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Landscapes

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

Abstract

The invention relates to the technical field of interface testing, and discloses a concurrent testing method, a device, equipment and a storage medium for an android interface, wherein the method comprises the following steps: determining a corresponding interface type according to each android interface of the target vehicle machine; generating a target test thread set according to each preset application program and a preset thread pool; extracting each testing thread in the target testing thread set; carrying out concurrent testing on each android interface through each testing thread and interface type to obtain a corresponding testing result; according to the method and the device, the interface types of the testing threads and the target car machine in the target testing thread set are generated through the preset application programs and the preset thread pools, the android interfaces are subjected to concurrent testing, and corresponding testing results are obtained.

Description

Android interface concurrent testing method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of interface testing, in particular to an android interface concurrent testing method, device, equipment and storage medium.
Background
In recent years, with the rapid development of the automobile industry and the consumer electronics industry and the rapid popularization of artificial intelligence in the global scope, people have more and more demands on car machines, mobile phones and portable equipment. At present, android systems are commonly adopted for car machines, mobile phones and portable devices, and most functions are carried by application programs (APP).
The android interface is a bridge for communication between the APP and the android system, and interaction between the APP and hardware (vehicles, mobile phones and portable equipment) can be realized by calling the android interface. Therefore, the performance of the android interface is particularly important here, concurrent testing is an optimal testing mode for testing the performance of the android interface, especially for an android terminal system developer, whether concurrent call protection is performed on the android interface or not is required to be tested to ensure development quality, a current common concurrent testing scheme is to realize testing by manually clicking each application program or test item by item through an automatic tool, but because the manual clicking speed is slow, a large number of android interfaces (2) cannot be accurately and efficiently tested by the current automatic tool to simulate concurrent testing of multiple APP interfaces; therefore, the test efficiency and the accuracy of the test result are low.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a method, a device, equipment and a storage medium for concurrent testing of android interfaces, and aims to solve the technical problem that the accuracy and efficiency of concurrent testing of android interfaces in the prior art are low.
In order to achieve the above object, the present invention provides an android interface concurrent testing method, which includes the following steps:
obtaining each android interface of a target vehicle machine, and determining a corresponding interface type according to each android interface;
generating a target test thread set according to each preset application program and a preset thread pool;
extracting each testing thread in the target testing thread set;
and carrying out concurrent testing on the android interfaces through the testing threads and the interface types to obtain corresponding testing results.
Optionally, the obtaining of each android interface of the target car machine and determining a corresponding interface type according to each android interface include:
acquiring each android interface of a target vehicle machine, and extracting identification information of each android interface;
classifying the android interfaces according to the identification information;
and determining the corresponding interface type according to the classification result.
Optionally, the generating a target test thread set according to each preset application program and a preset thread pool includes:
obtaining corresponding program running information according to each preset application program;
simulating the program running information through a preset thread pool;
and generating a target testing thread set according to the simulation result.
Optionally, the concurrently testing the android interfaces through the test threads and the interface types to obtain corresponding test results includes:
obtaining the execution sequence of each android interface according to the interface type;
and carrying out concurrent testing on the android interfaces through the testing threads and the execution sequence to obtain corresponding testing results.
Optionally, the concurrently testing the android interfaces through the test threads and the execution sequence to obtain corresponding test results includes:
acquiring a preset random strategy, and generating a target random number according to the preset random strategy;
determining an initial android interface and a non-initial android interface according to the target random number and the android interfaces;
and carrying out concurrent testing on the initial android interface and the non-initial android interface through each testing thread and the execution sequence to obtain corresponding testing results.
Optionally, after performing concurrent testing on each android interface through each testing thread and the interface type to obtain a corresponding testing result, the method further includes:
extracting a test return value and a test log in the test result;
judging whether the test return value is in a target range and/or whether the test log has abnormal information;
and if the test return value is not in the target range and/or the test log has abnormal information, determining that the concurrence protection of the target locomotive is abnormal.
Optionally, after determining whether the test return value is located in a target range and/or whether the test log has abnormal information, the method further includes:
if the test return value is within the target range and/or the test log has no abnormal information, judging whether the interface of the target car machine displays abnormity in the running process of each preset application program;
and if the interface display of the target locomotive is abnormal, determining that the concurrency protection of the target locomotive is abnormal.
In addition, in order to achieve the above object, the present invention further provides an android interface concurrent testing apparatus, where the android interface concurrent testing apparatus includes:
the determining module is used for acquiring all android interfaces of the target car machine and determining corresponding interface types according to the android interfaces;
the generating module is used for generating a target testing thread set according to each preset application program and the preset thread pool;
the extraction module is used for extracting each test thread in the target test thread set;
and the concurrent testing module is used for carrying out concurrent testing on each android interface through each testing thread and the interface type to obtain a corresponding testing result.
In addition, in order to achieve the above object, the present invention further provides an android interface concurrent testing device, where the android interface concurrent testing device includes: the device comprises a memory, a processor and an android interface concurrent test program which is stored on the memory and can run on the processor, wherein the android interface concurrent test program is configured to realize the android interface concurrent test method.
In addition, in order to achieve the above object, the present invention further provides a storage medium, where an android interface concurrent testing program is stored, and when executed by a processor, the android interface concurrent testing program implements the android interface concurrent testing method as described above.
According to the android interface concurrent testing method provided by the invention, the corresponding interface type is determined according to each android interface of the target vehicle machine by obtaining each android interface; generating a target test thread set according to each preset application program and a preset thread pool; extracting each testing thread in the target testing thread set; carrying out concurrent testing on each android interface through each testing thread and the interface type to obtain a corresponding testing result; according to the method and the device, the android interfaces are concurrently tested according to the interface types of the test threads and the target car machine in the target test thread set generated by the preset application programs and the preset thread pool, and the corresponding test results are obtained.
Drawings
Fig. 1 is a schematic structural diagram of an android interface concurrent testing device of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a first embodiment of an android interface concurrent testing method according to the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of the concurrent android interface testing method according to the present invention;
FIG. 4 is a schematic flow chart of a third embodiment of the android interface concurrent testing method according to the present invention;
fig. 5 is a schematic functional module diagram of a concurrent android interface testing device according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an android interface concurrent testing device of a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the android interface concurrent testing device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the architecture shown in FIG. 1 does not constitute a definition of an android interface concurrency testing device, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and an android interface concurrent test program.
In the android interface concurrent testing device shown in fig. 1, the network interface 1004 is mainly used for data communication with the network integration platform workstation; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 of the android interface concurrency test device can be arranged in the android interface concurrency test device, and the android interface concurrency test device calls the android interface concurrency test program stored in the memory 1005 through the processor 1001 and executes the android interface concurrency test method provided by the embodiment of the invention.
Based on the hardware structure, the embodiment of the android interface concurrent testing method is provided.
Referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of an android interface concurrent testing method according to the present invention.
In a first embodiment, the concurrent android interface testing method includes the following steps:
and step S10, obtaining each android interface of the target vehicle machine, and determining the corresponding interface type according to each android interface.
It should be noted that, the execution subject of the embodiment is an android interface concurrent testing device, and may also be other devices that can implement the same or similar functions, such as an android interface tester, for example, which is not limited in this embodiment.
It should be understood that each android interface refers to an android interface called by an application program in a target vehicle machine when the application program runs, for example, a popup interface, a player interface, a sound setting interface, and the like, and the interface type refers to a type to which each android interface belongs, for example, each android interface may include a sound setting interface, a system setting interface, a headlamp interface, a turn signal interface, a vehicle door interface, a backdoor interface, and a safety belt interface. The sound setting interface and the system setting interface belong to the setting interface type, the headlamp interface and the steering indicator light interface belong to the car light interface, and the car door interface, the back door interface and the safety belt interface belong to the car door and the safety belt interface.
And step S20, generating a target test thread set according to each preset application program and the preset thread pool.
It should be understood that each preset application refers to an application that can normally run in a target vehicle, for example, music, a radio station, a children story, a map, and voice, and the preset thread pool refers to a thread pool that can simulate the same function as each preset application, and the preset thread pool may be an android thread execution thread pool or other thread pools.
Further, step S20 includes: obtaining corresponding program running information according to each preset application program; simulating the program running information through a preset thread pool; and generating a target testing thread set according to the simulation result.
It can be understood that the program running information refers to information of each preset application program when the preset application program normally runs in the target vehicle machine, for example, when the preset application program is music, the program running information includes starting, song selection, volume adjustment, seat comfort level adjustment, light adjustment and the like, after the program running information is obtained, the program running information is simulated through threads in a preset thread pool, and a corresponding test thread is obtained, the test thread is consistent with a process of an android interface called by the preset application program, and the target test thread set refers to a set of test threads simulated by each preset application program. The simulation program running information is specifically used for simulating a plurality of preset application programs to access all android interfaces concurrently and randomly.
And step S30, extracting each test thread in the target test thread set.
It should be understood that after the target testing thread set is obtained, each testing thread in the target testing thread set is extracted, for example, the target testing thread set includes a music testing thread, a map testing thread, and a station testing thread.
And step S40, carrying out concurrent test on the android interfaces through the test threads and the interface types to obtain corresponding test results.
It can be understood that the concurrent testing refers to testing all android interfaces simultaneously, for example, each android interface includes a sound setting interface, a system setting interface and a headlamp interface, and the concurrent testing is performed on the sound setting interface, the system setting interface and the headlamp interface through corresponding testing threads, specifically, the concurrent testing is performed according to the interface type to which each android interface belongs, the selection of the interface type is determined by a user scene and a service scene, the interfaces in the interface type are tested in sequence according to an execution sequence, and after the testing steps are executed by a plurality of threads according to a random time sequence, a large-batch concurrent random testing is realized.
Further, after step S40, the method further includes: extracting a test return value and a test log in the test result; judging whether the test return value is in a target range and/or whether the test log has abnormal information; and if the test return value is not in the target range and/or the test log has abnormal information, determining that the concurrence protection of the target locomotive is abnormal.
It should be understood that the test return value refers to a value returned after the test on each android interface is finished, the test log refers to a log generated in the test process on each android interface, the target range refers to a normal value of the range of each android interface, for example, the tested android interface is a sound setting interface, the target range of the sound setting interface is a-B, if the corresponding test return value is C, and C is not located between a and B, it indicates that the concurrent protection of the target locomotive is abnormal, the abnormal information refers to information that an abnormality occurs in the test log, and if the abnormal information occurs in the test log, it indicates that the concurrent protection of the target locomotive is abnormal, that is, the test return value is not located in the target range and the abnormal information that the test log occurs satisfies a condition, and it is determined that the concurrent protection of the target locomotive is abnormal.
Further, after determining whether the test return value is located in a target range and/or whether the test log has abnormal information, the method further includes: if the test return value is within the target range and/or the test log has no abnormal information, judging whether the interface of the target car machine displays abnormity in the running process of each preset application program; and if the interface display of the target locomotive is abnormal, determining that the concurrency protection of the target locomotive is abnormal.
It can be understood that if the test return value is in the target range and the test log has no abnormal information, that is, both conditions are satisfied, it is determined whether the display of the target locomotive is abnormal, where the display abnormality includes conditions such as a black screen, a dead halt, no response, and the like, if the display abnormality is detected, the concurrent protection of the target locomotive is abnormal, otherwise, the concurrent protection of the target locomotive is abnormal.
In the embodiment, by acquiring each android interface of a target car machine, a corresponding interface type is determined according to each android interface; generating a target test thread set according to each preset application program and a preset thread pool; extracting each testing thread in the target testing thread set; carrying out concurrent testing on each android interface through each testing thread and the interface type to obtain a corresponding testing result; in the embodiment, concurrent testing is performed on the android interfaces through the interface types of the test threads and the target car machine in the target test thread set generated by the preset application programs and the preset thread pool to obtain corresponding test results, compared with the prior art that the android interfaces are tested one by manually clicking the application programs or using an automatic tool, the concurrent call interface testing in a large batch can be simulated quickly and effectively, and the accuracy and the efficiency of the testing are improved effectively.
In an embodiment, as shown in fig. 3, a second embodiment of the concurrent android interface testing method according to the present invention is proposed based on the first embodiment, where the step S10 includes:
step S101, obtaining each android interface of the target car machine, and extracting identification information of each android interface.
It should be understood that each android interface refers to an android interface called by an application program in a target vehicle machine when the application program runs, and the identification information refers to information capable of uniquely identifying each android interface, for example, the identification information of the sound setting interface and the system setting interface is set, and the application program calls the sound setting interface or the system setting interface in the setting process.
And S102, classifying the android interfaces according to the identification information.
It can be understood that after obtaining the identification information of each android interface, classify each android interface through this identification information, namely divide into corresponding group, this division mode can be through the function of interface, also can be for other division standards of interface, this embodiment does not limit this to illustrate through the function division example of interface, for example, each android interface can contain sound setting interface, system setting interface, headlamp interface, turn to pilot lamp interface, door interface, back door interface, safety belt interface. The sound setting interface and the system setting interface belong to the setting interface type, the headlamp interface and the steering indicator light interface belong to the car light interface, and the car door interface, the back door interface and the safety belt interface belong to the car door and the safety belt interface.
And step S103, determining the corresponding interface type according to the classification result.
It should be understood that after the android interfaces are classified, the type of the interface to which each android interface belongs is determined according to the classification result, for example, the sound setting interface and the system setting interface are classified into the setting interface type, the headlamp interface and the turn indicator light interface are classified into the vehicle lamp interface, and the vehicle door interface, the back door interface and the safety belt interface are classified into the vehicle door and the safety belt interface.
In the embodiment, identification information of each android interface is extracted by acquiring each android interface of a target car machine; classifying the android interfaces according to the identification information; determining a corresponding interface type according to the classification result; the android interfaces of the target vehicle machine are classified through the identification information, and the interface types corresponding to the android interfaces are determined according to the classification results, so that the efficiency of concurrent testing of the android interfaces is effectively improved.
In an embodiment, as shown in fig. 4, a third embodiment of the concurrent android interface testing method according to the present invention is proposed based on the first embodiment, where the step S40 includes:
and S401, obtaining the execution sequence of each android interface according to the interface type.
It is understood that the execution order refers to an order in which each test thread tests each android interface, for example, there are 5 android interfaces in the interface type, and the test order of the 5 android interfaces is A, C, E, B and D, then the test order is the execution order.
And S402, carrying out concurrent testing on the android interfaces through the testing threads and the execution sequence to obtain corresponding testing results.
It can be understood that after the execution sequence is obtained, concurrent testing is performed on each android interface through each testing thread and the execution sequence to obtain a corresponding testing result, the concurrent testing in the interface type needs to be performed according to the execution sequence, and the concurrent testing of the android interface corresponding to the interface type is random.
Further, step S402 includes: acquiring a preset random strategy, and generating a target random number according to the preset random strategy; determining an initial android interface and a non-initial android interface according to the target random number and the android interfaces; performing concurrent testing on the initial android interface and the non-initial android interface through each testing thread and the execution sequence to obtain a corresponding testing result, wherein the running time of each thread is random in a main Controller (CPU) of the tested equipment; by utilizing the randomness, the concurrent test also has randomness at the same time, and the actual running state of the concurrent random access interface of the multiple application programs can be simulated.
It should be understood that the preset random policy refers to a policy for generating a random number, that is, a target random number generated is uncertain, that is, an initial android interface and a non-initial android interface obtained according to the target random number and each android interface are also uncertain, for example, the classified interface types are X, Y and Z, the target random number generated for the first time through the preset random policy is 2, the corresponding types are Y, that is, the initial android interface is Y, and the non-initial android interfaces are X and Z, and the Y-first stage is concurrently tested through each test thread and execution sequence; then carrying out concurrency test on the X; and finally, carrying out concurrent test on the Z to obtain a corresponding test result.
According to the embodiment, the execution sequence of each android interface is obtained according to the interface type; carrying out concurrent testing on the android interfaces through the testing threads and the execution sequence to obtain corresponding testing results; according to the implementation, concurrent testing is performed on the android interfaces through the execution sequence obtained by each testing thread and the interface type, so that the accuracy of concurrent testing on the android interfaces is effectively improved.
In addition, an embodiment of the present invention further provides a storage medium, where an android interface concurrent testing program is stored on the storage medium, and when the android interface concurrent testing program is executed by a processor, the steps of the android interface concurrent testing method described above are implemented.
Since the storage medium adopts all technical solutions of all the embodiments, at least all the beneficial effects brought by the technical solutions of the embodiments are achieved, and no further description is given here.
In addition, referring to fig. 5, an embodiment of the present invention further provides an android interface concurrent testing apparatus, where the android interface concurrent testing apparatus includes:
the determining module 10 is configured to obtain each android interface of the target vehicle machine, and determine a corresponding interface type according to each android interface.
It should be understood that each android interface refers to an android interface called by an application program in a target vehicle machine when the application program runs, for example, a popup interface, a player interface, a sound setting interface, and the like, and the interface type refers to a type to which each android interface belongs, for example, each android interface may include a sound setting interface, a system setting interface, a headlamp interface, a turn signal interface, a vehicle door interface, a backdoor interface, and a safety belt interface. The sound setting interface and the system setting interface belong to the setting interface type, the headlamp interface and the steering indicator light interface belong to the car light interface, and the car door interface, the back door interface and the safety belt interface belong to the car door and the safety belt interface.
And a generating module 20, configured to generate a target test thread set according to each preset application program and the preset thread pool.
It should be understood that each preset application refers to an application that can normally run in a target vehicle, for example, music, a radio station, a children story, a map, and voice, and the preset thread pool refers to a thread pool that can simulate the same function as each preset application, and the preset thread pool may be an android thread execution thread pool or other thread pools.
Further, the generating module 20 is further configured to obtain corresponding program running information according to each preset application program; simulating the program running information through a preset thread pool; and generating a target testing thread set according to the simulation result.
It can be understood that the program running information refers to information of each preset application program when the preset application program normally runs in the target vehicle machine, for example, when the preset application program is music, the program running information is starting, song selection, volume adjustment, seat comfort level adjustment, light adjustment and the like, after the program running information is obtained, the program running information is simulated through threads in a preset thread pool, and a corresponding test thread is obtained, the test thread is consistent with a process of an android interface called by the preset application program, and the target test thread set refers to a set of test threads simulated by each preset application program. The simulation program running information is specifically used for simulating a plurality of preset application programs to access all android interfaces concurrently and randomly.
And the extracting module 30 is configured to extract each test thread in the target test thread set.
It should be understood that after the target testing thread set is obtained, each testing thread in the target testing thread set is extracted, for example, the target testing thread set includes a music testing thread, a map testing thread, and a station testing thread.
And the concurrent testing module 40 is configured to perform concurrent testing on each android interface through each testing thread and the interface type to obtain a corresponding testing result.
It can be understood that the concurrent testing refers to testing each android interface simultaneously, for example, each android interface includes a sound setting interface, a system setting interface, and a headlamp interface, and the concurrent testing is performed on the sound setting interface, the system setting interface, and the headlamp interface through corresponding testing threads, specifically, the concurrent testing is performed according to the interface type to which each android interface belongs, and the selection of the interface type is determined by a user scene and a service scene, and the interfaces in the interface type are sequentially tested according to an execution sequence; after the testing steps are executed by the multiple threads according to a random time sequence, mass concurrent random testing is realized.
Further, the concurrent testing module 40 is further configured to extract a test return value and a test log in the test result; judging whether the test return value is in a target range and/or whether the test log has abnormal information; and if the test return value is not in the target range and/or the test log has abnormal information, determining that the concurrence protection of the target locomotive is abnormal.
It should be understood that the test return value refers to a value returned after the test on each android interface is finished, the test log refers to a log generated in the test process on each android interface, the target range refers to a normal value of the range of each android interface, for example, the tested android interface is a sound setting interface, the target range of the sound setting interface is a-B, if the corresponding test return value is C, and C is not located between a and B, it indicates that the concurrent protection of the target locomotive is abnormal, the abnormal information refers to information that an abnormality occurs in the test log, and if the abnormal information occurs in the test log, it indicates that the concurrent protection of the target locomotive is abnormal, that is, the test return value is not located in the target range and the abnormal information that the test log occurs satisfies a condition, and it is determined that the concurrent protection of the target locomotive is abnormal.
Further, after determining whether the test return value is located in a target range and/or whether the test log has abnormal information, the method further includes: if the test return value is within the target range and/or the test log has no abnormal information, judging whether the interface of the target car machine displays abnormity in the running process of each preset application program; and if the interface display of the target locomotive is abnormal, determining that the concurrency protection of the target locomotive is abnormal.
It can be understood that if the test return value is in the target range and the test log has no abnormal information, that is, both conditions are satisfied, it is determined whether the display of the target locomotive is abnormal, where the display abnormality includes conditions such as a black screen, a dead halt, no response, and the like, if the display abnormality is detected, the concurrent protection of the target locomotive is abnormal, otherwise, the concurrent protection of the target locomotive is abnormal.
In the embodiment, by acquiring each android interface of a target car machine, a corresponding interface type is determined according to each android interface; generating a target test thread set according to each preset application program and a preset thread pool; extracting each testing thread in the target testing thread set; carrying out concurrent testing on each android interface through each testing thread and the interface type to obtain a corresponding testing result; in the embodiment, concurrent testing is performed on the android interfaces through the interface types of the test threads and the target car machine in the target test thread set generated by the preset application programs and the preset thread pool to obtain corresponding test results, compared with the prior art that the android interfaces are tested one by manually clicking the application programs or using an automatic tool, the concurrent call interface testing in a large batch can be simulated quickly and effectively, and the accuracy and the efficiency of the testing are improved effectively.
It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.
In addition, the technical details that are not described in detail in this embodiment may refer to the android interface concurrent testing method provided in any embodiment of the present invention, and are not described herein again.
In an embodiment, the determining module 10 is further configured to obtain each android interface of the target car machine, and extract identification information of each android interface; classifying the android interfaces according to the identification information; and determining the corresponding interface type according to the classification result.
In an embodiment, the generating module 20 is further configured to obtain corresponding program running information according to each preset application program; simulating the program running information through a preset thread pool; and generating a target testing thread set according to the simulation result.
In an embodiment, the concurrent testing module 40 is further configured to obtain an execution sequence of each android interface according to the interface type; and carrying out concurrent testing on the android interfaces through the testing threads and the execution sequence to obtain corresponding testing results.
In an embodiment, the concurrency test module 40 is further configured to obtain a preset random policy, and generate a target random number according to the preset random policy; determining an initial android interface and a non-initial android interface according to the target random number and the android interfaces; and carrying out concurrent testing on the initial android interface and the non-initial android interface through each testing thread and the execution sequence to obtain corresponding testing results.
In an embodiment, the concurrent testing module 40 is further configured to extract a test return value and a test log in the test result; judging whether the test return value is in a target range and/or whether the test log has abnormal information; and if the test return value is not in the target range and/or the test log has abnormal information, determining that the concurrence protection of the target locomotive is abnormal.
In an embodiment, the concurrent testing module 40 is further configured to determine whether an interface of the target car machine displays an abnormality in the running process of each preset application program if the test return value is within the target range and/or the test log does not have abnormal information; and if the interface display of the target locomotive is abnormal, determining that the concurrency protection of the target locomotive is abnormal.
Other embodiments or methods of implementing the android interface concurrent test apparatus according to the present invention can refer to the above embodiments, and are not exhaustive.
Further, it is to be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. 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 system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., Read Only Memory (ROM)/RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device (e.g., a mobile phone, a computer, an all-in-one platform workstation, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An android interface concurrent testing method is characterized by comprising the following steps:
obtaining each android interface of a target vehicle machine, and determining a corresponding interface type according to each android interface;
generating a target test thread set according to each preset application program and a preset thread pool;
extracting each testing thread in the target testing thread set;
and carrying out concurrent testing on the android interfaces through the testing threads and the interface types to obtain corresponding testing results.
2. The android interface concurrent testing method of claim 1, wherein the obtaining each android interface of a target car machine, and determining a corresponding interface type according to each android interface, comprises:
acquiring each android interface of a target vehicle machine, and extracting identification information of each android interface;
classifying the android interfaces according to the identification information;
and determining the corresponding interface type according to the classification result.
3. The android interface concurrent testing method of claim 1, wherein the generating a set of target testing threads according to each preset application and a preset thread pool comprises:
obtaining corresponding program running information according to each preset application program;
simulating the program running information through a preset thread pool;
and generating a target testing thread set according to the simulation result.
4. The android interface concurrent testing method of claim 1, wherein the concurrently testing each android interface through each testing thread and the interface type to obtain a corresponding test result comprises:
obtaining the execution sequence of each android interface according to the interface type;
and carrying out concurrent testing on the android interfaces through the testing threads and the execution sequence to obtain corresponding testing results.
5. The android interface concurrent testing method of claim 4, wherein the concurrently testing each android interface through each testing thread and the execution sequence to obtain a corresponding test result comprises:
acquiring a preset random strategy, and generating a target random number according to the preset random strategy;
determining an initial android interface and a non-initial android interface according to the target random number and the android interfaces;
and carrying out concurrent testing on the initial android interface and the non-initial android interface through each testing thread and the execution sequence to obtain corresponding testing results.
6. The android interface concurrent testing method of any one of claims 1 to 5, wherein the concurrent testing of the android interfaces by the test threads and the interface types to obtain corresponding test results further comprises:
extracting a test return value and a test log in the test result;
judging whether the test return value is in a target range and/or whether the test log has abnormal information;
and if the test return value is not in the target range and/or the test log has abnormal information, determining that the concurrence protection of the target locomotive is abnormal.
7. The android interface concurrent testing method of claim 6, wherein after determining whether the test return value is within a target range and/or whether the test log has exception information, further comprising:
if the test return value is within the target range and/or the test log has no abnormal information, judging whether the interface of the target car machine displays abnormity in the running process of each preset application program;
and if the interface display of the target locomotive is abnormal, determining that the concurrency protection of the target locomotive is abnormal.
8. An android interface concurrent testing method device is characterized in that the android interface concurrent testing method device comprises the following steps:
the determining module is used for acquiring all android interfaces of the target car machine and determining corresponding interface types according to the android interfaces;
the generating module is used for generating a target testing thread set according to each preset application program and the preset thread pool;
the extraction module is used for extracting each test thread in the target test thread set;
and the concurrent testing module is used for carrying out concurrent testing on each android interface through each testing thread and the interface type to obtain a corresponding testing result.
9. An android interface concurrent testing method device is characterized in that the android interface concurrent testing method device comprises the following steps: the device comprises a memory, a processor and an android interface concurrent testing method program which is stored on the memory and can run on the processor, wherein the android interface concurrent testing method program is configured with the android interface concurrent testing method according to any one of claims 1 to 7.
10. A storage medium having stored thereon an android interface concurrent testing method program, which when executed by a processor implements the android interface concurrent testing method of any of claims 1 to 7.
CN202111168562.3A 2021-09-30 2021-09-30 Android interface concurrent testing method, device, equipment and storage medium Pending CN113836032A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111168562.3A CN113836032A (en) 2021-09-30 2021-09-30 Android interface concurrent testing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111168562.3A CN113836032A (en) 2021-09-30 2021-09-30 Android interface concurrent testing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113836032A true CN113836032A (en) 2021-12-24

Family

ID=78968271

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111168562.3A Pending CN113836032A (en) 2021-09-30 2021-09-30 Android interface concurrent testing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113836032A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115550216A (en) * 2022-09-26 2022-12-30 中国农业银行股份有限公司 Acquisition control module test method, apparatus, storage medium, and program product

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115550216A (en) * 2022-09-26 2022-12-30 中国农业银行股份有限公司 Acquisition control module test method, apparatus, storage medium, and program product

Similar Documents

Publication Publication Date Title
CN114546738B (en) Universal test method, system, terminal and storage medium for server
CN110096430B (en) Third party SDK access test method, device, terminal and storage medium
CN112052169A (en) Test management method, system, device and computer readable storage medium
CN112749081A (en) User interface testing method and related device
CN111693089A (en) Product quality control method, device, equipment and storage medium for assembly line
CN112052172A (en) Rapid testing method and device for third-party channel and electronic equipment
CN114064473A (en) Vehicle machine system testing method and system, vehicle and computer readable storage medium
CN113836032A (en) Android interface concurrent testing method, device, equipment and storage medium
CN111708712A (en) User behavior test case generation method, flow playback method and electronic equipment
CN109710510B (en) Code submitting method, device, equipment and readable storage medium
CN109299592B (en) Man-machine behavior characteristic boundary construction method, system, server and storage medium
CN113312261A (en) Test case screening method, test case screening equipment, storage medium and device
CN112905451A (en) Automatic testing method and device for application program
CN105653455A (en) Program vulnerability detection method and detection system
CN117493188A (en) Interface testing method and device, electronic equipment and storage medium
CN110011964B (en) Webpage environment detection method and device
CN116415258A (en) Vulnerability detection method, device, equipment, medium and program product
CN116431522A (en) Automatic test method and system for low-code object storage gateway
CN110888809A (en) Test task risk prediction method and device
CN107766231B (en) Automatic testing method and device
CN115952078A (en) Test case sequencing method, device and system and storage medium
CN115543816A (en) Software regression test result verification method, device, equipment and storage medium
CN111949510B (en) Test processing method, device, electronic equipment and readable storage medium
CN113297092A (en) Defect prediction method of software and related equipment
CN109002694B (en) Method and device for positioning problem point after application code confusion

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