CN113468007A - Equipment identification information verification method, device, equipment and storage medium - Google Patents

Equipment identification information verification method, device, equipment and storage medium Download PDF

Info

Publication number
CN113468007A
CN113468007A CN202110737939.6A CN202110737939A CN113468007A CN 113468007 A CN113468007 A CN 113468007A CN 202110737939 A CN202110737939 A CN 202110737939A CN 113468007 A CN113468007 A CN 113468007A
Authority
CN
China
Prior art keywords
equipment
test
tested
test case
identification information
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
CN202110737939.6A
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.)
Perfect World Beijing Software Technology Development Co Ltd
Original Assignee
Perfect World Beijing Software Technology Development 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 Perfect World Beijing Software Technology Development Co Ltd filed Critical Perfect World Beijing Software Technology Development Co Ltd
Priority to CN202110737939.6A priority Critical patent/CN113468007A/en
Publication of CN113468007A publication Critical patent/CN113468007A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2289Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by configuration test
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0251Targeted advertisements

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Computer Hardware Design (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • Strategic Management (AREA)
  • Game Theory and Decision Science (AREA)
  • Software Systems (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention provides a method, a device, equipment and a storage medium for verifying equipment identification information, wherein the method comprises the following steps: the test equipment responds to the test starting operation, executes a first test case on the terminal equipment to be tested, and obtains the identification information of the prediction equipment; determining and executing a second test case and a third test case for the terminal equipment to be tested according to the predicted equipment identification information and the corresponding relation between the test cases to obtain equipment identification verification information, wherein the obtained two pieces of information can both indicate the support state of the terminal equipment to be tested on different types of equipment identifications; and finally, verifying the predicted equipment identification information by using the equipment identification verification information to obtain the target equipment identification information of the terminal equipment to be tested. In the scheme, the test equipment only needs to respond to the test starting operation triggered by the user, and then the plurality of test cases can be automatically executed to automatically finish the verification process, so that the test efficiency is improved.

Description

Equipment identification information verification method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for verifying device identification information.
Background
In practice, there is a need to determine the support status of the terminal device for different types of device identifiers. On the basis, for example, the statistics of the total number of users and the number of daily active users of the application program can be realized according to the support states of different terminal devices to different types of device identifiers. For example, the advertisement can be accurately delivered to the terminal device according to the support states of different terminal devices to different types of device identifiers.
In the prior art, the determined support states of the terminal device for different types of device identifiers are often inaccurate, and therefore, the obtained support states need to be checked. But the checking process has the defect of high manual participation. Therefore, how to improve the automation of the verification process becomes an urgent problem to be solved.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a device, and a storage medium for verifying device identification information, so as to implement automatic verification of a device identification type supported by a terminal device.
In a first aspect, an embodiment of the present invention provides a method for verifying device identification information, including:
responding to a test starting operation, executing a first test case on the terminal equipment to be tested so as to obtain the predicted equipment identification information of the terminal equipment to be tested from the terminal equipment to be tested;
determining a second test case and a third test case corresponding to the terminal equipment to be tested according to the corresponding relation between the predicted equipment identification information and the test cases;
executing the second test case and the third test case on the terminal equipment to be tested to obtain equipment identification verification information of the terminal equipment to be tested;
and verifying the predicted equipment identification information according to the equipment identification verification information to obtain target equipment identification information of the terminal equipment to be tested.
In a second aspect, an embodiment of the present invention provides an apparatus for verifying device identification information, including:
the first execution module is used for responding to a test starting operation and executing a first test case on the terminal equipment to be tested so as to obtain the predicted equipment identification information of the terminal equipment to be tested from the terminal equipment to be tested;
the test case determining module is used for determining a second test case and a third test case corresponding to the terminal equipment to be tested according to the corresponding relation between the predicted equipment identification information and the test cases;
the second execution module is used for executing the second test case and the third test case on the terminal equipment to be tested so as to obtain equipment identification verification information of the terminal equipment to be tested;
and the verification module is used for verifying the predicted equipment identification information according to the equipment identification verification information so as to obtain the target equipment identification information of the terminal equipment to be tested.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, where the memory is used to store one or more computer instructions, and when executed by the processor, the one or more computer instructions implement the device identification information verification method in the first aspect. The electronic device may also include a communication interface for communicating with other devices or a communication network.
In a fourth aspect, an embodiment of the present invention provides a non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to implement at least the device identification information verification method according to the first aspect.
In the method for verifying the device identifier information provided in the embodiment of the present invention, the test device executes the first test case on the terminal device to be tested in response to the test start operation, so as to obtain the predicted device identifier information from the terminal device to be tested, where the identifier information indicates a support state of the device to be tested on different types of device identifiers, that is, indicates whether the device to be tested supports a certain type or multiple types of device identifiers. And then, the test equipment determines a second test case and a third test case according to the predicted equipment identification information and the corresponding relation between the test cases, and executes the second test case and the third test case on the terminal equipment to be tested to obtain equipment identification verification information of the equipment to be tested, wherein the verification information can also indicate the support state of the terminal equipment to be tested on different types of equipment identifications, and the predicted equipment identification information and the equipment identification verification information are obtained by executing different test cases. Finally, the test equipment can verify the predicted equipment identification information according to the equipment identification verification information to obtain a verification result, namely the target equipment identification information of the terminal equipment to be tested.
Therefore, in the process, the test equipment only needs to respond to the test starting operation triggered by the user, then the first test case can be automatically obtained and executed, and then the second test case and the third test case are further obtained and executed, so that the verification of the equipment identification information is finally realized. The automation degree of the whole checking process is high.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for verifying device identification information according to an embodiment of the present invention;
fig. 2a is a schematic flowchart of an alternative implementation manner of step S103 according to an embodiment of the present invention;
fig. 2b is a schematic flowchart of another alternative implementation manner of step S103 according to the embodiment of the present invention;
fig. 3 is a schematic flowchart of another method for verifying device identification information according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of another method for verifying device identification information according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus identification information verification apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device corresponding to the device identification information verification apparatus provided in the embodiment shown in fig. 5.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, and "a" and "an" generally include at least two, but do not exclude at least one, unless the context clearly dictates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
The words "if," "if," as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a recognition," depending on the context. Similarly, the phrases "if determined" or "if identified (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when identified (a stated condition or event)" or "in response to an identification (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good 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 good or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a commodity or system that includes the element.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The features of the embodiments and examples described below may be combined with each other without conflict between the embodiments. In addition, the sequence of steps in each method embodiment described below is only an example and is not strictly limited.
Fig. 1 is a schematic flowchart of a device identification information verification method according to an embodiment of the present invention, where the device identification information verification method according to the embodiment of the present invention may be executed by a test device. It will be appreciated that the test device may be implemented as software, or a combination of software and hardware. As shown in fig. 1, the method comprises the steps of:
s101, responding to a test starting operation, executing a first test case on the terminal equipment to be tested, and obtaining the predicted equipment identification information of the terminal equipment to be tested from the terminal equipment to be tested.
It should be noted that, in order to ensure that the subsequent description is concise, in this embodiment and the subsequent embodiments, the predicted device identification information may be referred to as the predicted information for short, the device identification verification information may be referred to as the verification information for short, and the target device identification information may be referred to as the target information for short.
Based on this, the following description may be made on the device identification information verification method provided in this embodiment:
the terminal device to be tested can be connected with the test device through physical connection or virtual connection and the like, and then a user can trigger the test starting operation on a test interface provided by the test device. Optionally, the terminal device to be tested may be any brand, any model of mobile phone, notebook computer, tablet computer, or other terminal device. The test interface may be provided by a test framework of the test equipment deployment.
The test equipment responds to the test starting operation, and can execute a first test case on the terminal equipment to be tested by means of a test framework arranged by the test equipment so as to acquire the prediction information of the terminal equipment to be tested from the terminal equipment to be tested. The prediction information can reflect the support state of the terminal equipment to be tested for at least one type of equipment identification. Moreover, the predicted information obtained by executing the first test case is only preliminary information, and the accuracy of the predicted information cannot be guaranteed, so that subsequent steps need to be executed to verify the predicted information.
Optionally, the at least one type of Device Identifier may include an International Mobile Equipment Identity (IMEI), a Media Access Control Address (MAC), an Open Anonymous Device Identifier (OAID), an Advertising Digital Identifier (ADID), and so on.
And under different scenes, the first test case has a corresponding relationship with the device identifier, so that whether the terminal device to be tested supports at least one type of device identifier corresponding to the scene can be tested by using the first test case corresponding to the scene. For example, for a scenario in which an advertisement is delivered to a terminal device, whether the terminal device under test supports an ADID and whether the terminal device under test supports an OAID may be tested using a first test case corresponding to the scenario in which the advertisement is delivered. The prediction information obtained by executing the first test case may include, for example: the terminal equipment to be tested supports OAID and does not support ADID, and the prediction information shows that the terminal equipment to be tested has OAID and does not have ADID.
And S102, determining a second test case and a third test case corresponding to the terminal equipment to be tested according to the corresponding relation between the predicted equipment identification information and the test cases.
Then, the test device may determine a second test case and a third test case corresponding to the device to be tested according to the correspondence between the prediction information and the test cases. The second test case and the third test case can be understood as a test case set, and each test case contained in each test case set can have a tree relationship.
According to the description in the above steps, the prediction information obtained after the first test case is executed can reflect the support condition of the terminal device to be tested on at least one device identifier. In a common situation, the prediction information can reflect the support situation of the terminal device to be tested on the two device identifiers, and at this time, the prediction information is actually the combination of the two device identifier information. The information combination may specifically include two combinations that are not mutually exclusive in the terminal device to be tested, which have the first identifier, do not have the first identifier, have the second identifier, and do not have the second identifier. And the two kinds of equipment identification information in the information combination respectively correspond to the second test case and the third test case.
Continuing to accept the advertisement putting scenario, the test information obtained after executing the first test case may include any one of the following 4 cases: supporting OAID, supporting ADID; supporting OAID, not ADID; no OAID supported, ADID supported, and no ADID supported.
And when the test information specifically includes that the terminal equipment to be tested supports the OAID and does not support the ADID, that is, the terminal equipment to be tested has the OAID and does not have the ADID, determining that the test case corresponding to the OAID is the second test case and determining that the test case corresponding to the ADID is the third test case according to the corresponding relation between the prediction information and the test cases.
S103, executing the second test case and the third test case on the terminal equipment to be tested to obtain equipment identification verification information of the terminal equipment to be tested.
And S104, verifying and predicting the equipment identification information according to the equipment identification verification information to obtain target equipment identification information of the terminal equipment to be tested.
Furthermore, the test device may sequentially execute the second test case and the third test case to re-determine the support of the terminal device to be tested on different types of device identifiers, that is, obtain the verification information of the terminal device to be tested, so as to verify the prediction information according to the verification information.
It should be noted that, the present invention does not limit the sequential execution relationship between the second test case and the third test case in step S103, and the two test cases are only required to be continuously executed.
For the verification process, if the verification information is the same as the prediction information, which indicates that the support conditions of the terminal device to be tested on different types of devices obtained after different test cases are executed are the same, the prediction information or the verification information can be directly determined as the target information of the terminal device to be tested. If the verification information is different from the prediction information and indicates that the prediction information obtained by executing the first test case is wrong, the verification information can be used for verifying the prediction information to obtain target information of the terminal equipment to be tested.
Continuing to bear the above example, the test device may determine again whether the terminal device to be tested supports the OAID by executing the second test case, and may determine again whether the terminal device to be tested supports the ADID by executing the third test case, so as to obtain the verification information: the terminal equipment to be tested supports OAID and supports ADID. At this time, the verification information is different from the prediction information obtained in step S101, and the prediction information is incorrect, at this time, the testing device may perform verification on the prediction information by using the verification information to obtain a verification result: the terminal equipment to be tested supports OAID and ADID, and the verification result is used as the target information of the terminal equipment to be tested.
In this embodiment, the test device responds to the test start operation, and executes the first test case on the terminal device to be tested to obtain the prediction information. And then, the test equipment determines a second test case and a third test case according to the corresponding relation between the predicted equipment identification information and the test cases, and executes the second test case and the third test case on the terminal equipment to be tested to obtain the verification information. The prediction information and the verification information can both indicate the support states of the terminal device to be tested on different types of device identifications, but the prediction information and the verification information are obtained by executing different test cases. Finally, the test equipment can verify the predicted equipment identification information according to the equipment identification verification information to obtain the target equipment identification information of the terminal equipment to be tested.
Therefore, in the process, the test equipment only needs to respond to the test starting operation triggered by the user, then the first test case can be automatically obtained and executed, and then the second test case and the third test case are further obtained and executed, so that the verification of the equipment identification information is finally realized, and the automation degree of the whole verification process is high.
Optionally, after the verification is completed, the target device identifier of the terminal device to be tested may be obtained from the terminal device to be tested according to the target information. On the basis, the statistics of the total number of users of the application program, the number of daily active users and the advertisement click quantity/browsing quantity can be realized according to the obtained target equipment identification.
The target equipment identification can also reflect the brand, the system model and the like of the terminal equipment to be tested. Therefore, the advertisement corresponding to the terminal device to be tested can be determined and launched according to the target device identifier, that is, the advertisement can be launched accurately.
Optionally, after the verification is completed, the test device may further generate a log file according to a verification result.
Specifically, if the prediction information is the same as the verification information, it is indicated that the test device can obtain the same execution result after executing the first prediction case and subsequently executing the second test case and the third test case, and the prediction information obtained by the test device executing the first test case is accurate, so that the test device can generate a log file reflecting that the prediction information is correct.
If the prediction information is different from the verification information, the test equipment is indicated to obtain different execution results after the test equipment executes the first prediction case and subsequently executes the second test case and the third test case, at the moment, the verification information is needed to verify the prediction information to obtain target information, and then the test equipment can generate a log file reflecting the error of the prediction information.
Alternatively, whether the prediction information is correct or not can be directly embodied from the file name. And in practice, the user of the test equipment can select to send all or part of the log file to the developer according to actual requirements. The developer can directly know the device identification supported by the terminal device to be tested according to the log file without manually informing, and the communication cost is reduced.
In the embodiment shown in fig. 1, it is disclosed that the test device may execute the first test case by using a test framework deployed by itself, so as to obtain the prediction information. Then, for the execution mode of the first test case, optionally:
the test device responds to the test start operation, and the first test case can be analyzed by means of a test framework deployed in the test device, that is, the class declared in the annotation contained in the first test case is analyzed, so that the function to be executed contained in the first test case is obtained. And then, the test equipment executes the function to be executed contained in the first test case by using the test framework, so that the prediction information of the terminal equipment to be tested is obtained.
After the test equipment obtains the prediction information, the test equipment also obtains the verification information based on a test framework deployed by the test equipment. Then, a manner of optionally obtaining the verification information, that is, an optional implementation manner of step S103, as shown in fig. 2a, may include the following steps:
s201, the second test case is analyzed by means of a test framework deployed in the test equipment, so that a function to be executed contained in the second test case is obtained.
S202, executing the function to be executed contained in the second test case to obtain the first equipment identification verification information.
In order to ensure that the following description is simple, the first device identifier checking information may be referred to as first checking information for short, and the second device identifier checking information may be referred to as second checking information for short.
Therefore, the test device can analyze the second test case by means of the test framework deployed by the test device, that is, analyze the class declared in the annotation contained in the second test case, so as to obtain the function to be executed contained in the second test case. And then, executing the function to be executed contained in the second test case by using the test framework to obtain a result of the execution completion of the second test case, namely the verification information of the first equipment standard. Therefore, whether the terminal equipment to be tested supports a certain type of equipment identifier can be tested by means of the second test case. And the second test case has a corresponding relation with the type of equipment identifier.
S203, responding to the result of the second test case, and analyzing the third test case by using the test framework deployed in the test equipment to obtain the function to be executed contained in the third test case.
And S204, executing the function to be executed contained in the third test case to obtain the second equipment identification verification information.
S205, generating the device identification verification information according to the first device identification verification information and the second device identification verification information.
The test equipment responds to a result obtained after the second test case is executed, the third test case is further analyzed by the test framework to obtain an execution function contained in the third test case, and second check information is obtained by executing the test function contained in the third test case. At this time, it can be tested whether the terminal device to be tested supports another type of device identifier by using the third test case.
Finally, verification information may be generated from the first verification information and the second verification information for subsequent use in verifying the prediction information.
In this embodiment, the test device may perform analysis and execution of the second test case and the third test case by using a test framework deployed by the test device, so as to obtain verification information of the terminal device to be tested, and finally implement verification of the device identifier of the terminal device to be tested.
It should be noted that, in practice, the parsing and execution of the second test case or the third test case by the test device may be performed by different modules in the test framework. In the process of processing any test case by means of the test framework, after the analysis module completes the analysis of the test case, the execution module is not started by itself, so that after the analysis module completes the analysis, the execution module is often required to manually trigger the execution operation on the test equipment, so that the execution module is started and further executes the function to be executed contained in the test case.
Therefore, by combining the embodiments shown in fig. 1 and fig. 2, after the test device obtains the prediction information, the second test case and the third test case can be automatically determined according to the corresponding relationship between the prediction information and the test cases, and then the relevant manual operation is further triggered, and finally the verification of the prediction information of the terminal device to be tested is completed.
After the prediction information is obtained, the test equipment obtains the verification information based on a test framework deployed by the test equipment. Another optional way to obtain the verification information, that is, another optional implementation manner of step S103, as shown in fig. 2b, may include the following steps:
s301, the second test case and the third test case are analyzed by means of a test framework deployed in the test equipment, so that a function to be executed contained in the second test case and a function to be executed contained in the third test case are obtained.
S302, sending the function to be executed contained in the second test case and the function to be executed contained in the third test case to a test case manager in the test frame, so that the test case manager executes the received function to be executed to obtain equipment identification verification information.
The test equipment can analyze the second test case and the third test by using a test framework deployed by the test equipment, so as to respectively obtain a function to be executed contained in the second test case and a function to be executed contained in the third test case. The specific analysis process of the test case may be referred to in the description of the embodiment shown in fig. 2a, which is not described herein again.
Then, the analyzed function to be executed is sent to the test case manager in the test framework, that is, the function to be executed is injected into the test case manager, so that the test case manager executes the function to be executed. The test framework deployed in the test equipment needs to be modified in advance, so that the test case manager in the test framework can receive and execute the function to be executed.
For the execution of the to-be-executed function by the test case manager, optionally, the test case manager may use a hook function deployed by the test framework to automatically jump to execute the to-be-executed function contained in the third test case after the test manager outputs the execution result of the to-be-executed function contained in the second test case. Optionally, the hook function may also be deployed in the test case manager, so that the test case manager may sequentially execute the to-be-executed functions included in the second test case and the third test case.
In this embodiment, the test frame is modified, so that the test case manager in the test frame can receive and sequentially execute the to-be-executed functions included in the test case, and finally obtain the verification information of the to-be-tested terminal device. In the process, the verification information is obtained without user triggering operation, namely, the whole verification process has higher automation degree.
Based on this, fig. 3 is a schematic flowchart of another method for verifying device identification information according to an embodiment of the present invention. As shown in fig. 3, the method may include the steps of:
s401, responding to the test starting operation, executing a first statement contained in a script file deployed in the test equipment to realize the execution of a first test case, and obtaining the identification information of the prediction equipment.
The user can trigger a test start operation on the test equipment, so that the test equipment responds to the operation and executes a first statement contained in the script file deployed by the test equipment, so that the execution of the first test case is realized, and the prediction information is obtained.
S402, determining a second test case and a third test case corresponding to the terminal equipment to be tested according to the corresponding relation between the predicted equipment identification information and the test cases.
The execution process of the step S402 is similar to the corresponding steps in the foregoing embodiment, and reference may be made to the relevant description in the embodiment shown in fig. 1, which is not repeated herein.
And S403, executing the second statement contained in the script file to realize the execution of the second test case, and executing the third statement contained in the script file after the execution of the second statement is completed to realize the execution of the third test case, so as to obtain the equipment identifier verification information of the terminal equipment to be tested.
After the obtained second test case and the third test case are obtained, the test equipment can further continue to execute the second statement contained in the script file, so as to implement the execution of the second test case. After that, the test equipment further executes a third statement contained in the script file to implement the execution of a third test case. After the two test cases are executed, the verification information of the terminal equipment to be tested can be obtained.
Optionally, the first statement, the second statement and the third statement may be written into the same script file, and the test device may sequentially execute different statements included in the script file, so that the three test cases may be automatically and continuously executed, and the participation of the user in the whole prediction information verification process is reduced.
Optionally, the first statement, the second statement, and the third statement may also be included in different script files, and the continuous execution of the three test cases is realized by establishing a call relationship between the three script files.
For clarity of description, a script file containing a first statement may be referred to as a first script file, a script file containing a second statement may be referred to as a second script file, and so on. And the three script files are compiled according to the same template. For the generation mode of the three script files, an optional mode is as follows:
the test equipment can execute a first statement contained in a first script file which is written in advance, so that an execution result corresponding to the first test case is obtained. Wherein the first script file can be written in accordance with the template. And then, writing the execution result corresponding to the first test case into a second script text by taking the execution result as a parameter so as to finish writing a second script file. Similarly, the test device may obtain an execution result corresponding to the second test case by executing the second statement included in the second script file, and write the execution result corresponding to the second test case as a parameter into the third script file, so as to complete writing of the third script file.
S404, verifying and predicting the equipment identification information according to the equipment identification verification information to obtain target equipment identification information of the terminal equipment to be tested.
The execution process of step S404 is similar to the corresponding steps in the foregoing embodiment, and reference may be made to the relevant description in the embodiment shown in fig. 1, which is not repeated herein.
In this embodiment, the test device may implement continuous execution of multiple test cases by executing the script file, so as to reduce the participation of the user in the verification process of the device identification information, and the automation degree of the whole verification process is high.
In order to improve the verification efficiency, in practice, the test device may also perform verification of the device identification information on multiple terminal devices to be tested at the same time, and fig. 4 is a flowchart of another device identification information verification method provided in the embodiment of the present invention. Before step S101, as shown in fig. 4, the method may include the steps of:
s501, responding to a preset instruction, and determining the number of the terminal devices to be tested which are normally connected with the testing device.
And S502, creating threads with the same number as the terminal equipment to be tested.
At least one terminal device to be tested can be connected with the test device in a virtual connection or physical connection mode. The test equipment can respond to the preset instruction and determine the number of the at least one terminal equipment to be tested which is normally connected with the test equipment. Alternatively, the preset instruction may be an adb devices instruction.
And then, the test equipment creates at least one thread, and the thread corresponds to the terminal equipment to be tested in the normal connection state one to one. And then, respectively executing the first test case on the at least one terminal device to be tested by means of the thread corresponding to the at least one terminal device to be tested which is normally connected with the test device, so as to respectively obtain the respective predicted device identification information of the at least one terminal device to be tested from the at least one terminal device to be tested.
And then, according to the corresponding relation between the predicted equipment identification information and the test cases, determining a second test case and a third test case which respectively correspond to at least one terminal equipment to be tested.
The test equipment executes the second test case and the third test case corresponding to the at least one terminal equipment to be tested by means of the thread corresponding to the at least one terminal equipment to be tested so as to obtain equipment identification verification information of the at least one terminal equipment to be tested. And finally, verifying and predicting the equipment identification information according to the equipment identification verification information to obtain the target equipment identification information of the terminal equipment to be tested.
The process of verifying the prediction information of the terminal device to be tested corresponding to each thread by each thread may refer to the related descriptions in the embodiments shown in fig. 1 to fig. 3. And will not be described in detail herein.
It should be noted that after at least one thread is created, the device number of the terminal device to be tested or the interface number occupied by the connection between the terminal device to be tested and the device to be tested may also be obtained, and the corresponding relationship between the numbers and the threads is established, thereby realizing the distribution of the threads. And then, the thread distributed to each terminal device to be tested is used for verifying the prediction information of the terminal device to be tested.
In this embodiment, when there are a plurality of terminal devices to be tested and the test device is normally connected, the test device may establish a plurality of threads, and the plurality of threads check the plurality of terminal devices to be tested in parallel, thereby improving the checking efficiency.
The device identification information verification apparatus of one or more embodiments of the present invention will be described in detail below. Those skilled in the art will appreciate that these device identification information verification means can be configured by the steps taught in the present embodiment using commercially available hardware components.
Fig. 5 is a schematic structural diagram of an apparatus identification information verification apparatus according to an embodiment of the present invention, and as shown in fig. 5, the apparatus includes:
the first execution module 11 is configured to execute a first test case on the terminal device to be tested in response to a test start operation, so as to obtain the predicted device identification information of the terminal device to be tested from the terminal device to be tested.
And the test case determining module 12 is configured to determine a second test case and a third test case corresponding to the terminal device to be tested according to the correspondence between the predicted device identification information and the test case.
And the second execution module 13 is configured to execute the second test case and the third test case on the terminal device to be tested, so as to obtain device identifier verification information of the terminal device to be tested.
And the checking module 14 is configured to check the predicted device identification information according to the device identification checking information, so as to obtain target device identification information of the terminal device to be tested.
The predicted equipment identification information is an equipment identification information combination of the terminal equipment to be tested, and the equipment identification information combination comprises two combinations which are not mutually exclusive and comprise that the terminal equipment to be tested has a first identification, the terminal equipment to be tested does not have the first identification, the terminal equipment to be tested has a second identification and the terminal equipment to be tested does not have the second identification; and two kinds of equipment identification information in the equipment identification information combination respectively correspond to the second test case and the second test case.
Optionally, the second executing module 13 is specifically configured to: analyzing the second test case by means of a test framework deployed in the test equipment to obtain a function to be executed contained in the second test case;
executing a function to be executed contained in the second test case to obtain first equipment identification verification information;
responding to a result of the second test case, and analyzing the third test case by means of a test framework deployed in the test equipment to obtain a function to be executed contained in the third test case;
executing a function to be executed contained in the third test case to obtain second equipment identification verification information;
and generating the equipment identification verification information according to the first equipment identification verification information and the second equipment identification verification information.
Optionally, the second executing module 13 is specifically configured to: analyzing the second test case and the third test case by means of a test framework deployed in the test equipment to obtain a function to be executed contained in the second test case and a function to be executed contained in the third test case;
and sending the function to be executed contained in the second test case and the function to be executed contained in the third test case to a test case manager in the test frame, so that the test case manager executes the received function to be executed to obtain the equipment identification verification information.
Optionally, the first executing module 11 is specifically configured to: and executing a first statement contained in a script file deployed in the test equipment to realize the execution of the first test case and obtain the identification information of the prediction equipment.
The second execution module 13 is specifically configured to: executing a second statement contained in the script file to realize the execution of the second test case, and executing a third statement contained in the script file after the execution of the second statement is completed to realize the execution of the third test case, so as to obtain the equipment identification verification information of the terminal equipment to be tested.
Optionally, the first executing module 11 is specifically configured to: analyzing the first test case by means of a test framework deployed in the test equipment to obtain a function to be executed contained in the first test case;
and executing the function to be executed contained in the first test case on the terminal equipment to be tested to obtain the predicted equipment identification information of the terminal equipment to be tested.
Optionally, the apparatus further comprises: a generating module 21, configured to generate a log file that reflects that the predicted device identifier information is correct, where the predicted device identifier information is the same as the device identifier verification information;
and if the predicted equipment identification information is different from the equipment identification verification information, generating a log file reflecting the error of the predicted equipment identification information.
Optionally, the apparatus further comprises: an obtaining module 22, configured to obtain, according to the target device identification information, a target device identification of the terminal device to be tested from the terminal device to be tested.
Optionally, the apparatus further comprises: a quantity determination module 23 and a creation module 24.
The number determining module 23 is configured to determine, in response to a preset instruction, the number of terminal devices to be tested that are normally connected to the test device.
The creating module 24 is configured to create threads having the same number as that of the terminal device to be tested.
The first execution module 11 is configured to execute the first test case on the at least one terminal device to be tested respectively by using threads corresponding to the at least one terminal device to be tested that is normally connected to the test device, so as to obtain, from the at least one terminal device to be tested, respective predicted device identification information of the at least one terminal device to be tested.
The apparatus shown in fig. 5 can perform the method of the embodiment shown in fig. 1 to 4, and reference may be made to the related description of the embodiment shown in fig. 1 to 4 for a part not described in detail in this embodiment. The implementation process and technical effect of the technical solution refer to the descriptions in the embodiments shown in fig. 1 to fig. 4, and are not described herein again.
The internal functions and structures of the device identification information verification apparatus are described above, and in one possible design, the structure of the device identification information verification apparatus may be implemented as an electronic device, as shown in fig. 6, which may include: a processor 31 and a memory 32. Wherein the memory 32 is used for storing a program that supports the electronic device to execute the device identification information verification method provided in the embodiments shown in fig. 1 to 4, and the processor 31 is configured to execute the program stored in the memory 32.
The program comprises one or more computer instructions which, when executed by the processor 31, are capable of performing the steps of:
responding to a test starting operation, executing a first test case on the terminal equipment to be tested so as to obtain the predicted equipment identification information of the terminal equipment to be tested from the terminal equipment to be tested;
determining a second test case and a third test case corresponding to the terminal equipment to be tested according to the corresponding relation between the predicted equipment identification information and the test cases;
executing the second test case and the third test case on the terminal equipment to be tested to obtain equipment identification verification information of the terminal equipment to be tested;
and verifying the predicted equipment identification information according to the equipment identification verification information to obtain target equipment identification information of the terminal equipment to be tested. Optionally, the processor 31 is further configured to perform all or part of the steps in the foregoing embodiments shown in fig. 1 to 4.
The electronic device may further include a communication interface 33 for communicating with other devices or a communication network.
In addition, an embodiment of the present invention provides a computer storage medium, which is used for storing computer software instructions for the electronic device, and includes a program for executing the device identification information verification method in the method embodiments shown in fig. 1 to 4.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (12)

1. The equipment identification information verification method is applied to test equipment and comprises the following steps:
responding to a test starting operation, executing a first test case on the terminal equipment to be tested so as to obtain the predicted equipment identification information of the terminal equipment to be tested from the terminal equipment to be tested;
determining a second test case and a third test case corresponding to the terminal equipment to be tested according to the corresponding relation between the predicted equipment identification information and the test cases;
executing the second test case and the third test case on the terminal equipment to be tested to obtain equipment identification verification information of the terminal equipment to be tested;
and verifying the predicted equipment identification information according to the equipment identification verification information to obtain target equipment identification information of the terminal equipment to be tested.
2. The method according to claim 1, wherein executing the second test case and the third test case on the terminal device to be tested to obtain device identifier verification information of the terminal device to be tested comprises:
analyzing the second test case by means of a test framework deployed in the test equipment to obtain a function to be executed contained in the second test case;
executing a function to be executed contained in the second test case to obtain first equipment identification verification information;
responding to the execution completion result of the second test case, and analyzing the third test case by using a test framework deployed in the test equipment to obtain a function to be executed contained in the third test case;
executing a function to be executed contained in the third test case to obtain second equipment identification verification information;
and generating the equipment identification verification information according to the first equipment identification verification information and the second equipment identification verification information.
3. The method according to claim 1, wherein executing the second test case and the third test case on the terminal device to be tested to obtain device identifier verification information of the terminal device to be tested comprises:
analyzing the second test case and the third test case by means of a test framework deployed in the test equipment to obtain a function to be executed contained in the second test case and a function to be executed contained in the third test case;
and sending the function to be executed contained in the second test case and the function to be executed contained in the third test case to a test case manager in the test frame, so that the test case manager executes the received function to be executed to obtain the equipment identification verification information.
4. The method according to claim 1, wherein the executing the first test case on the terminal device to be tested to obtain the predicted device identification information of the terminal device to be tested from the terminal device to be tested comprises:
executing a first statement contained in a script file deployed in the test equipment to realize the execution of the first test case and obtain the identification information of the prediction equipment;
the executing the second test case and the third test case on the terminal device to be tested to obtain the device identifier verification information of the terminal device to be tested includes:
executing a second statement contained in the script file to realize the execution of the second test case, and executing a third statement contained in the script file after the execution of the second statement is completed to realize the execution of the third test case, so as to obtain the equipment identification verification information of the terminal equipment to be tested.
5. The method according to claim 1, wherein the executing the first test case on the terminal device to be tested to obtain the predicted device identification information of the terminal device to be tested from the terminal device to be tested comprises:
analyzing the first test case by means of a test framework deployed in the test equipment to obtain a function to be executed contained in the first test case;
and executing the function to be executed contained in the first test case on the terminal equipment to be tested to obtain the predicted equipment identification information of the terminal equipment to be tested.
6. The method according to claim 1, wherein the predicted device identification information is a device identification information combination of the terminal device under test, and the device identification information combination includes two combinations that are not mutually exclusive of the terminal device under test having the first identifier, the terminal device under test not having the first identifier, the terminal device under test having the second identifier, and the terminal device under test not having the second identifier; and two kinds of equipment identification information in the equipment identification information combination respectively correspond to the second test case and the second test case.
7. The method of claim 1, further comprising:
if the predicted equipment identification information is the same as the equipment identification verification information, generating a log file reflecting that the predicted equipment identification information is correct;
and if the predicted equipment identification information is different from the equipment identification verification information, generating a log file reflecting the error of the predicted equipment identification information.
8. The method of claim 1, further comprising:
and acquiring the target equipment identification of the terminal equipment to be detected from the terminal equipment to be detected according to the target equipment identification information.
9. The method of claim 1, further comprising:
responding to a preset instruction, and determining the number of the terminal devices to be tested which are normally connected with the test device;
creating threads with the same number as the terminal equipment to be tested;
the responding to the test starting operation, executing a first test case to the terminal equipment to be tested to obtain the predicted equipment identification information of the terminal equipment to be tested from the terminal equipment to be tested, and the method comprises the following steps:
and executing the first test case on the at least one terminal device to be tested by means of threads corresponding to the at least one terminal device to be tested which is normally connected with the test device, so as to obtain the respective predicted device identification information of the at least one terminal device to be tested from the at least one terminal device to be tested.
10. An apparatus for verifying device identification information, comprising:
the first execution module is used for responding to a test starting operation and executing a first test case on the terminal equipment to be tested so as to obtain the predicted equipment identification information of the terminal equipment to be tested from the terminal equipment to be tested;
the test case determining module is used for determining a second test case and a third test case corresponding to the terminal equipment to be tested according to the corresponding relation between the predicted equipment identification information and the test cases;
the second execution module is used for executing the second test case and the third test case on the terminal equipment to be tested so as to obtain equipment identification verification information of the terminal equipment to be tested;
and the verification module is used for verifying the predicted equipment identification information according to the equipment identification verification information so as to obtain the target equipment identification information of the terminal equipment to be tested.
11. An electronic device, comprising: a memory, a processor; wherein the memory has stored thereon executable code which, when executed by the processor, causes the processor to perform the device identification information verification method of any one of claims 1 to 9.
12. A non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform the device identification information verification method of any one of claims 1 to 9.
CN202110737939.6A 2021-06-30 2021-06-30 Equipment identification information verification method, device, equipment and storage medium Pending CN113468007A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110737939.6A CN113468007A (en) 2021-06-30 2021-06-30 Equipment identification information verification method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110737939.6A CN113468007A (en) 2021-06-30 2021-06-30 Equipment identification information verification method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113468007A true CN113468007A (en) 2021-10-01

Family

ID=77876635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110737939.6A Pending CN113468007A (en) 2021-06-30 2021-06-30 Equipment identification information verification method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113468007A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018040946A1 (en) * 2016-08-31 2018-03-08 阿里巴巴集团控股有限公司 Identity authentication method and device
WO2018166109A1 (en) * 2017-03-13 2018-09-20 华为技术有限公司 Terminal test method, and terminal
CN109726107A (en) * 2018-06-01 2019-05-07 平安普惠企业管理有限公司 Test method, device, equipment and storage medium
CN110598446A (en) * 2019-09-16 2019-12-20 腾讯科技(深圳)有限公司 Block chain based test method and device, storage medium and computer equipment
US20200195545A1 (en) * 2018-12-13 2020-06-18 Microsoft Technology Licensing, Llc Internet of things (iot) device and solution certification as a service
CN112799958A (en) * 2021-02-23 2021-05-14 长鑫存储技术有限公司 Equipment batch test method and device, computer equipment and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018040946A1 (en) * 2016-08-31 2018-03-08 阿里巴巴集团控股有限公司 Identity authentication method and device
WO2018166109A1 (en) * 2017-03-13 2018-09-20 华为技术有限公司 Terminal test method, and terminal
CN109726107A (en) * 2018-06-01 2019-05-07 平安普惠企业管理有限公司 Test method, device, equipment and storage medium
US20200195545A1 (en) * 2018-12-13 2020-06-18 Microsoft Technology Licensing, Llc Internet of things (iot) device and solution certification as a service
CN110598446A (en) * 2019-09-16 2019-12-20 腾讯科技(深圳)有限公司 Block chain based test method and device, storage medium and computer equipment
CN112799958A (en) * 2021-02-23 2021-05-14 长鑫存储技术有限公司 Equipment batch test method and device, computer equipment and medium

Similar Documents

Publication Publication Date Title
CN108595329B (en) Application testing method and device and computer storage medium
CN108984389B (en) Application program testing method and terminal equipment
CN108804215B (en) Task processing method and device and electronic equipment
CN111124919A (en) User interface testing method, device, equipment and storage medium
CN106940695B (en) Data source information verification method and device
KR20080068385A (en) Program test system, method and computer readable medium on which program for executing the method is recorded
WO2018120965A1 (en) Automatic test method and device, and computer-readable storage medium
CN108089985B (en) Method, device and equipment for verifying interface return parameters and readable storage medium
CN110955409B (en) Method and device for creating resources on cloud platform
CN110569194A (en) interface testing method and device, electronic equipment and storage medium
CN111124911A (en) Automatic testing method, device, equipment and readable storage medium
CN113238930A (en) Software system testing method and device, terminal equipment and storage medium
CN114238134A (en) Test result display method, device, equipment and storage medium
CN112231206A (en) Script editing method for application program test, computer readable storage medium and test platform
CN109587351B (en) Call testing method, device, equipment and storage medium
CN112395182A (en) Automatic testing method, device, equipment and computer readable storage medium
CN112131127B (en) Interface testing method, device and system and electronic equipment
KR20150030297A (en) Verification apparatus, terminal device, system, method and computer-readable medium for verifying application
CN116431522A (en) Automatic test method and system for low-code object storage gateway
CN113468007A (en) Equipment identification information verification method, device, equipment and storage medium
CN115237441A (en) Upgrade test method, device and medium based on cloud platform
CN115757165A (en) Automatic testing method, device, equipment and storage medium
CN108845932B (en) Unit testing method and device of network library, storage medium and terminal
CN114356346A (en) Application program deployment method, device, storage medium and electronic equipment
CN113495846A (en) Terminal test system and test device based on cluster

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