CN115514680A - Method and device for verifying compatibility of module, electronic equipment and storage medium - Google Patents

Method and device for verifying compatibility of module, electronic equipment and storage medium Download PDF

Info

Publication number
CN115514680A
CN115514680A CN202211435613.9A CN202211435613A CN115514680A CN 115514680 A CN115514680 A CN 115514680A CN 202211435613 A CN202211435613 A CN 202211435613A CN 115514680 A CN115514680 A CN 115514680A
Authority
CN
China
Prior art keywords
tested
communication module
module
test instruction
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.)
Granted
Application number
CN202211435613.9A
Other languages
Chinese (zh)
Other versions
CN115514680B (en
Inventor
徐淑琦
刘嘉维
杨玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ziguang Tongxin Microelectronics Co Ltd
Original Assignee
Ziguang Tongxin Microelectronics 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 Ziguang Tongxin Microelectronics Co Ltd filed Critical Ziguang Tongxin Microelectronics Co Ltd
Priority to CN202211435613.9A priority Critical patent/CN115514680B/en
Publication of CN115514680A publication Critical patent/CN115514680A/en
Application granted granted Critical
Publication of CN115514680B publication Critical patent/CN115514680B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0866Checking the configuration

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to the technical field of communication test, and discloses a method for verifying module compatibility, which comprises the following steps: determining a communication module to be tested and a file path corresponding to the communication module to be tested from a preset database; loading a configuration file of a test instruction set corresponding to the communication module to be tested according to the file path to obtain a structured array; determining a function item to be tested corresponding to the communication module to be tested; matching a test instruction corresponding to the functional item to be tested from the structured array; and sending the test instruction to the communication module to be tested so that the communication module to be tested performs testing based on the test instruction. Therefore, when the compatibility of the modules is verified, the expansion modules can be realized only by adding configuration files of the communication modules and the test instruction sets and associating the configuration files. The code of the test flow does not need to be modified, and the convenience of module expansion is improved. The application also discloses a device for verifying the compatibility of the module, electronic equipment and a storage medium.

Description

Method and device for verifying compatibility of module, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications testing technologies, and in particular, to a method and an apparatus for verifying module compatibility, an electronic device, and a storage medium.
Background
The SIM (Subscriber Identity Module) card needs to verify the compatibility of the SIM card with different communication modules in the application of the Internet of things, and the Module compatibility test system sends a test instruction set to the communication modules through a serial port, so that the automatic test of basic function modules such as a network, a call, a short message, a phone book and the like is realized. The test instruction set function and data format of communication modules of different manufacturers and models are different.
In the prior art, when the compatibility of the module is verified, the test instruction for testing is usually stored in a preset database in a code form, and the code of the test flow needs to be modified when a new communication module is added, so that the process is complicated and inconvenient when the new module is expanded.
Existing methods for verifying module compatibility, for example: chinese patent document CN113778774A discloses a test data transmission method applied to an application chip in a communication module, where the communication module further includes a baseband chip and a shared memory; the application chip is connected with the shared memory through a first interface, the baseband chip is connected with the shared memory, the application chip further comprises an MBIM interface, and the method comprises the following steps: receiving a test instruction sent by terminal equipment through the MBIM interface; adding the test instruction to the first interface so as to store the test instruction in the shared memory through the first interface; the baseband chip is used for executing the test instruction in the shared memory and storing response information into the shared memory; when the response information is read from the first interface, packaging the response information into MBIM response information; and sending the MBIM response information to the terminal equipment through the MBIM interface.
Chinese patent publication No. CN212809187U discloses an automated test development board for a communication module, where the test development board includes a development board body, a module test socket fixed on the development board body, an upper computer, and a plurality of first data conversion modules; the module test seat comprises a communication interface, a plurality of first interfaces to be tested and a plurality of second interfaces to be tested; the communication interface is electrically connected with the second interface to be tested and the upper computer respectively; each first data conversion module is electrically connected with the first interface to be tested and the upper computer respectively; the communication module to be tested is fixedly arranged on the module test seat; the upper computer is used for generating a target test instruction and sending the target test instruction to the communication interface; the module test socket is used for sending the data to be tested corresponding to the first interface to be tested to the first data conversion module according to the target test instruction received by the communication interface; each first data conversion module is used for converting the corresponding data to be tested into target data and sending the target data to the upper computer; the upper computer is also used for detecting the target data and generating a test result; or the module test socket is used for sending the data to be tested corresponding to the second interface to be tested to the upper computer through the communication interface according to the target test instruction received by the communication interface; the upper computer is also used for detecting the data to be tested and generating a test result.
In the process of implementing the embodiments of the present disclosure, it is found that at least the following problems exist in the related art:
in the related art, the addition of a new communication module can be realized by modifying a code of a test flow, so that the process of expanding the new module is complicated and inconvenient.
It is noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the application and therefore may include information that does not constitute prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview and is intended to neither identify key/critical elements nor delineate the scope of such embodiments, but is intended to be a prelude to the more detailed description that is presented later.
The embodiment of the disclosure provides a method and a device for verifying module compatibility, electronic equipment and a storage medium, so that convenience of module expansion can be improved.
In some embodiments, a method for verifying module compatibility, comprising: and determining a communication module to be tested and a file path corresponding to the communication module to be tested from a preset database. The database stores a plurality of communication modules and file paths of configuration files of test instruction sets corresponding to the communication modules respectively. And loading the configuration file of the test instruction set corresponding to the communication module to be tested according to the file path to obtain the structured array. And determining the functional items to be tested corresponding to the communication module to be tested. And matching a test instruction corresponding to the functional item to be tested from the structured array. The structured array stores a plurality of test instructions and corresponding relations between the test instructions and the test function items. And sending the test instruction to the communication module to be tested so as to enable the communication module to be tested to test based on the test instruction.
In some embodiments, the configuration file includes a configuration item, and the configuration item is used for configuring test information of the module to be tested; loading the configuration file of the test instruction set corresponding to the communication module to be tested according to the file path to obtain a structured array, wherein the method comprises the following steps: and finding out a configuration file of the test instruction set corresponding to the communication module to be tested according to the file path. And analyzing the configuration items in the configuration file to obtain analysis data, and verifying the configuration items to obtain a verification result. Storing the analysis data into a structured array under the condition that the verification result is that the verification is passed; the parsed data includes test instructions.
In some embodiments, checking the configuration item to obtain a check result includes: and checking the file format of the configuration item. Determining that the verification result is verification passing under the condition that the file format of the configuration item is the same as the preset format; or, under the condition that the file format of the configuration item is different from the preset format, determining that the verification result is verification failure.
In some embodiments, checking the configuration item, and after obtaining a check result, further includes: and under the condition that the verification result is verification failure, prompting the error line number, error reason and correct format of the file format of the configuration item on a preset display interface.
In some embodiments, before determining the communication module to be tested and the file path corresponding to the communication module to be tested from the preset database, the method further includes: and acquiring configuration files of the communication module and the test instruction set. And associating the communication module with the configuration file of the test instruction set, and storing the associated configuration file of the test instruction set. And determining a file path stored by the configuration file of the associated test instruction set, and storing the communication module and the file path stored by the configuration file of the associated test instruction set into the database.
In some embodiments, sending the test instruction to the communication module to be tested, so that after the communication module to be tested performs testing based on the test instruction, the method further includes: acquiring an analysis result of interactive data and key information of the communication module to be tested, which is tested based on the test instruction; the key information is used for representing the execution result of the functional item to be tested. And displaying the interactive data and the analysis result of the key information on a preset display interface.
In some embodiments, the means for verifying module compatibility comprises: the system comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is configured to determine a communication module to be tested and a file path corresponding to the communication module to be tested from a preset database; the database stores a plurality of communication modules and file paths of configuration files of test instruction sets corresponding to the communication modules respectively. And the loading module is configured to load the configuration file of the test instruction set corresponding to the communication module to be tested according to the file path to obtain the structured array. And the second determining module is configured to determine the function item to be tested corresponding to the communication module to be tested. And the matching module is configured to match out a test instruction corresponding to the functional item to be tested from the structured array. The structured array stores a plurality of test instructions and corresponding relations between the test instructions and the test function items. The sending module is configured to send the test instruction to the communication module to be tested so that the communication module to be tested performs testing based on the test instruction.
In some embodiments, the apparatus for verifying module compatibility includes a processor and a memory storing program instructions, and the processor is configured to execute the method for verifying module compatibility.
In some embodiments, the electronic device comprises: an electronic device body; the device for verifying the compatibility of the module is arranged on the electronic equipment body.
In some embodiments, the storage medium stores program instructions that, when executed, perform the method for verifying module compatibility described above.
The method and the device for verifying the compatibility of the module, the electronic equipment and the storage medium provided by the embodiment of the disclosure can realize the following technical effects: determining a communication module to be tested and a file path corresponding to the communication module to be tested from a preset database; loading a configuration file of a test instruction set corresponding to the communication module to be tested according to the file path to obtain a structured array; determining a function item to be tested corresponding to the communication module to be tested; matching a test instruction corresponding to the functional item to be tested from the structured array; and sending the test instruction to the communication module to be tested so that the communication module to be tested performs testing based on the test instruction. In this way, the test instruction set corresponding to the communication module is expressed in the form of a configuration file. When the compatibility of the modules is verified, the expansion modules can be realized only by adding configuration files of the communication modules and the test instruction sets and associating the configuration files, so that the compatibility test of the SIM card on different modules is realized. The code of the test flow does not need to be modified, and the convenience of module expansion is improved.
The foregoing general description and the following description are exemplary and explanatory only and are not restrictive of the application.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the accompanying drawings and not in limitation thereof, in which elements having the same reference numeral designations are shown as like elements and not in limitation thereof, and wherein:
fig. 1 is a schematic diagram of a first method for verifying module compatibility according to an embodiment of the disclosure;
fig. 2 is a schematic diagram of a second method for verifying module compatibility according to an embodiment of the disclosure;
FIG. 3 is a schematic diagram of a method for verifying a configuration file according to an embodiment of the disclosure;
fig. 4 is a schematic structural diagram of a first apparatus for verifying module compatibility according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a second apparatus for verifying module compatibility according to an embodiment of the disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
So that the manner in which the features and advantages of the embodiments of the present disclosure can be understood in detail, a more particular description of the embodiments of the disclosure, briefly summarized above, may be had by reference to the appended drawings, which are included to illustrate, but are not intended to limit the embodiments of the disclosure. In the following description of the technology, for purposes of explanation, numerous details are set forth in order to provide a thorough understanding of the disclosed embodiments. However, one or more embodiments may be practiced without these details. In other instances, well-known structures and devices may be shown in simplified form in order to simplify the drawing.
The terms "first," "second," and the like in the description and in the claims, and the above-described drawings of embodiments of the present disclosure, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the present disclosure described herein may be made. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions.
The term "plurality" means two or more, unless otherwise specified.
In the embodiment of the present disclosure, the character "/" indicates that the preceding and following objects are in an or relationship. For example, A/B represents: a or B.
The term "and/or" is an associative relationship that describes objects, meaning that three relationships may exist. E.g., a and/or B, represents: a or B, or A and B.
The term "correspond" may refer to an association or binding relationship, and a corresponds to B refers to an association or binding relationship between a and B.
As shown in fig. 1, an embodiment of the present disclosure provides a method for verifying module compatibility, where the method includes:
step S101, the electronic equipment determines a communication module to be tested and a file path corresponding to the communication module to be tested from a preset database. The database stores a plurality of communication modules and file paths of configuration files of test instruction sets corresponding to the communication modules.
And S102, the electronic equipment loads a configuration file of a test instruction set corresponding to the communication module to be tested according to the file path to obtain a structured array.
Step S103, the electronic device determines the function item to be tested corresponding to the communication module to be tested.
And step S104, the electronic equipment matches a test instruction corresponding to the functional item to be tested from the structured array. The structured array stores a plurality of test instructions and corresponding relations between the test instructions and the test function items.
Step S105, the electronic device sends the test instruction to the communication module to be tested, so that the communication module to be tested performs testing based on the test instruction.
By adopting the method for verifying the compatibility of the modules, the communication module to be tested and the file path corresponding to the communication module to be tested are determined from the preset database; loading a configuration file of a test instruction set corresponding to the communication module to be tested according to the file path to obtain a structured array; determining a function item to be tested corresponding to the communication module to be tested; matching a test instruction corresponding to the functional item to be tested from the structured array; and sending the test instruction to the communication module to be tested so that the communication module to be tested performs testing based on the test instruction. In this way, the test instruction set corresponding to the communication module is expressed in the form of a configuration file. When the compatibility of the modules is verified, the expansion modules can be realized only by adding configuration files of the communication modules and the test instruction sets and associating the configuration files, so that the compatibility test of the SIM card on different modules is realized. The code of the test flow does not need to be modified, and the convenience of module expansion is improved.
Optionally, the test instruction is an AT (Attention) instruction, and the test instruction set is an AT instruction set. In some embodiments, the configuration file is a text document TXT formatted document. In this way, the test instruction set corresponding to the communication module is expressed in the form of a configuration file. When the compatibility of the modules is verified, the expansion modules can be realized only by adding configuration files of the communication modules and the test instruction sets and carrying out association. The code of the test flow does not need to be modified, and the convenience of module expansion is improved.
Further, the electronic device determines the communication module to be tested and the file path corresponding to the communication module to be tested from the preset database, and the method includes: the electronic equipment responds to a preset first selection instruction, and selects a communication module to be tested and a file path corresponding to the communication module to be tested from a plurality of communication modules in a preset database.
Optionally, after the electronic device determines the communication module to be tested and the file path corresponding to the communication module to be tested from the preset database, the method further includes: and acquiring information required by the test. The information required by the test comprises information such as SIM card information, dialing-out numbers, service access addresses, log paths, test configuration and the like. The SIM card information includes a mobile phone Number and a PIN (Personal Identification Number) code. The test configuration includes card merchant information and docket number. In some embodiments, the card merchant information is a card issuing enterprise or company. The log path is used for storing interaction records, namely test records, between the SIM card and the communication module to be tested. The test record includes the test time, the module to be tested and other information. Therefore, the test records between the SIM card and the communication module to be tested are stored according to the log path, so that a user can conveniently input query conditions to query test information.
Optionally, the information required by the test is obtained by: and responding to the preset operation, and determining the text information input by the user as the information required by the test.
Further, the configuration file comprises a configuration item, and the configuration item is used for configuring the test information of the functional item to be tested. The electronic equipment loads the configuration file of the test instruction set corresponding to the communication module to be tested according to the file path to obtain a structured array, and the method comprises the following steps: the electronic equipment finds out the configuration file of the test instruction set corresponding to the communication module to be tested according to the file path. And analyzing the configuration items in the configuration file to obtain analysis data, and verifying the configuration items to obtain a verification result. And storing the analysis data into the structured array under the condition that the verification result is that the verification is passed. Wherein the parsed data includes test instructions. Optionally, the analysis data further includes a large function item supported by the communication module and a function sub item corresponding to the large function item.
Optionally, the configuration items include a primary configuration item, a secondary configuration item, and a tertiary configuration item.
Further, the primary configuration item is a large function item, and the large function item includes functions such as network residence, voice call, short message, phone book, PIN \ PUK (Personal identification number) \ (Personal identification number unlock Key) or data service. The large function item exclusively occupies one line in the configuration file in the form of a first preset identifier. Wherein, the first preset mark is "[ ]", the first-level configuration items are, for example: [ stay on net ], [ voice call ], etc.
Further, the secondary configuration items are function sub-items of the large function item. The function sub-item exclusively occupies one line in the configuration file in the form of a second preset identifier. Wherein the second preset mark is "- ]". For example: under the condition that the large function item is [ short message ], the function sub-items of the large function item [ short message ] are as follows: and (c) setting a short message mode, sending, receiving or reading the short message. In the case that the major function item is [ voice call ], the function sub-items of the major function item [ message voice call ] are: and (c) answering, exhaling or hanging up and the like.
Further, the third-level configuration item is used for configuring specific test instructions. The file format of the three-level configuration item is the KEY VALUE pair "KEY = VALUE". Wherein, KEY is used for representing the searched information, and VALUE is used for representing the searched position of the information. When there are a plurality of VALUEs in the VALUE, the plurality of VALUEs are separated by commas.
Optionally, the three-level configuration item is used to implement configuration of the following test information, where the test information includes: judging the functions supported by the communication module, sending and receiving the test instruction, and analyzing the key information in the return data of the communication module. The key information is used for representing the execution result of the functional item to be tested.
In some embodiments, the electronic device determines the functions supported by the communication module by: the electronic device reads the function module supported by the supported function configuration under the General item, so as to determine the function supported by the communication module. In some embodiments, the function corresponding to the functional module is determined as the function supported by the communication module.
In some embodiments, the electronic device includes a CMD (Command) key, an execute (post reaction) key, etc. in the sending and receiving of the set of test instructions. Wherein the CMD key is used to characterize the test command sequence for the functional sub-item. The EXRESPONSE key is used to characterize the expected return value, and corresponds one-to-one to the test instructions in the CMD key. CMD (Command) keywords are for example: CMD = { AT + CMGF = n }. Wherein, AT + CMGF = n is used for representing that the short message is sent in a preset format. Wherein n =0 or 1. When n =0, the preset format is a PDU (Protocol Data Unit) format, and when n =1, the preset format is a text format.
In some embodiments, the electronic device parses the key information in the return data of the communication module, including: the electronic device determines a length type of the critical information. And under the condition that the length type is the fixed length, searching the initial position by using the keyword of the first preset type, searching the key information according to the initial position and analyzing. Wherein the keywords of the first preset type include HANGUPVALUE, connectictedvalue, and the like. HANGUPVALUE is used to characterize the return data of the communication module: the call state is no one answer, and the CONNECTED VALUE is used for representing the return data of the communication module: the call state is connected.
In some embodiments, the electronic device parses the key information in the return data of the communication module, including: the electronic device determines a length type of the critical information. And under the condition that the length type is not the fixed length, searching the initial position and the end position of the key information by using the second preset type of key words, and searching and analyzing the key information according to the initial position and the end position. Wherein the second preset type of key includes MSG _ START and MSG _ END. The MSG _ START is used for representing the starting position of the returned short message content, and the MSG _ END is used for representing the ending position of the returned short message content.
In some embodiments, the key information with fixed length is the execution result of the answering of the function sub item of the large function item [ voice call ]. The key information with non-fixed length is the execution result of reading the function sub item of the large function item [ short message ].
In some embodiments, the key information is represented in the form of KEYWORDS (QUALIFIER),
{ OFFSET }, { EXPECTED _ VALUE }. Wherein, KEYWORDS is used for representing KEYWORDS, and QUALIFIER is used for representing the limiting conditions of the KEYWORDS. Qualifiier is formatted with a 1 character search direction plus 1 character search times, L for characterizing LAST, i.e., search from back to front, and F for characterizing FIRST, i.e., search from front to back. For example: QUALIFIER is L2, which means that the keyword is searched twice from back to front. QUALIFIER is F1, which means that the keyword is searched once from front to back. OFFSET is used to characterize the OFFSET and EXPECTED _ VALUE is used to characterize the EXPECTED VALUE.
Furthermore, the communication module to be tested has a plurality of function items, and the electronic device determines the function items to be tested corresponding to the communication module to be tested, including: and the electronic equipment responds to a preset second selection instruction and selects the functional items to be tested from the functional items of the communication module to be tested.
Optionally, the verifying the configuration item by the electronic device to obtain a verification result includes: the electronic equipment checks the file format of the configuration item. And under the condition that the file format of the configuration item is the same as the preset format, determining that the verification result is verification passing. Or, under the condition that the file format of the configuration item is different from the preset format, determining that the verification result is verification failure. In some embodiments, the preset format is KEY VALUE pair KEY = VALUE.
Optionally, the verifying the configuration item by the electronic device to obtain a verification result includes: the electronic equipment judges whether the preset configuration items are missing in the configuration file or not. And under the condition that the preset configuration items are not lost in the configuration file, determining that the verification result is verification passing. Or, determining that the verification result is verification failure under the condition that the preset configuration item is missing in the configuration file.
Optionally, the verifying the configuration item by the electronic device to obtain a verification result includes: the electronic equipment judges whether the configuration items in the configuration file meet the preset sequence requirement or not. And under the condition that the configuration items in the configuration file meet the preset sequence requirement, determining that the verification result is verification passing. Or, under the condition that the configuration items in the configuration file do not meet the preset sequence requirement, determining that the verification result is verification failure.
As shown in fig. 2, an embodiment of the present disclosure provides a method for verifying module compatibility, where the method includes:
step S201, the electronic device determines a communication module to be tested and a file path corresponding to the communication module to be tested from a preset database. The database stores a plurality of communication modules and file paths of configuration files of test instruction sets corresponding to the communication modules respectively.
Step S202, the electronic device finds out a configuration file of a test instruction set corresponding to the communication module to be tested according to the file path.
Step S203, the electronic device analyzes the configuration items in the configuration file to obtain analysis data, and verifies the configuration items to obtain a verification result.
Step S204, the electronic equipment stores the analysis data into the structured array under the condition that the verification result is that the verification is passed, wherein the analysis data comprises a test instruction.
Step S205, the electronic device determines a function item to be tested corresponding to the communication module to be tested.
Step S206, the electronic device matches a test instruction corresponding to the functional item to be tested from the structured array. The structured array stores a plurality of test instructions and the corresponding relation between the test instructions and the test function items.
Step S207, the electronic device sends the test instruction to the communication module to be tested, so that the communication module to be tested performs a test based on the test instruction.
By adopting the method for verifying the compatibility of the module, the test instruction set corresponding to the communication module is expressed in the form of the configuration file. When the compatibility of the modules is verified, the expansion modules can be realized only by adding configuration files of the communication modules and the test instruction sets and associating the configuration files. The code of the test flow does not need to be modified, and the convenience of module expansion is improved.
Further, the electronic device checks the configuration item, and after obtaining the checking result, the method further includes: and when the verification result is that the verification fails, the electronic equipment prompts the error line number, the error reason and the correct format of the file format of the configuration item on a preset display interface. Therefore, when the test instruction set is loaded, the electronic equipment can verify the format of the configuration file, and if the format is not in accordance with the specified format, error information, a position and a correct format are prompted, so that the risk of configuration file errors can be reduced, and meanwhile, a user can conveniently find the errors and modify the errors in time.
As shown in fig. 3, an embodiment of the present disclosure provides a method for verifying a configuration file, where the method includes:
step S301, the electronic device determines the communication module to be tested and a file path corresponding to the communication module to be tested from a preset database. The database stores a plurality of communication modules and file paths of configuration files of test instruction sets corresponding to the communication modules.
Step S302, the electronic device finds out a configuration file of a test instruction set corresponding to the communication module to be tested according to the file path.
Step S303, the electronic device analyzes the configuration items in the configuration file to obtain analysis data, and verifies the configuration items to obtain a verification result.
And step S304, under the condition that the verification result is verification failure, the electronic equipment prompts the error line number, the error reason and the correct format of the file format of the configuration item on a preset display interface.
By adopting the method for verifying the configuration file provided by the embodiment of the disclosure, the format of the configuration file is verified when the test instruction set is loaded, and error information, position and correct format are prompted under the condition that the format is not in accordance with the specified format, so that the risk of configuration file errors can be reduced, and meanwhile, a user can conveniently find the errors in time and modify the errors.
Further, before the electronic device determines the communication module to be tested and the file path corresponding to the communication module to be tested from the preset database, the method further includes: the electronic equipment acquires the configuration files of the communication module and the test instruction set. And associating the communication module with the configuration file of the test instruction set, and storing the associated configuration file of the test instruction set. Determining a file path of the configuration file storage of the associated test instruction set. And storing the communication module and the file path stored by the configuration file of the associated test instruction set into a database. In this way, by describing the test instruction set of the communication module in the form of a configuration file, the test instruction set format of the communication module is described in a prescribed format in the configuration file. The communication modules correspond to the test instruction sets one by one, and only one test instruction set needs to be associated when the modules are added, so that after one communication module is selected during testing, the electronic equipment can automatically load the corresponding test instruction set, and compatibility of the test instruction sets of the communication modules is realized. The code separation of the module expansion and the test flow is realized, the coupling is reduced, and the test instruction set of the communication module is easier to expand, maintain and modify.
Optionally, storing the communication module and the file path stored in the configuration file of the associated test instruction set in a database, including: acquiring a file path stored by a configuration file of the associated test instruction set; and storing the communication module and the file path stored by the configuration file of the associated test instruction set into a database.
Further, the electronic device sends the test instruction to the communication module to be tested, so that the communication module to be tested tests based on the test instruction, and the method further comprises the following steps: the electronic equipment obtains the analysis result of the interactive data and the key information of the communication module to be tested based on the test instruction. The key information is used for representing the execution result of the functional item to be tested. And displaying the interactive data and the analysis result of the key information on a preset display interface.
Optionally, after the preset display interface displays the analysis result of the interactive data and the key information, the method further includes: and storing the analysis result of the interactive data and the key information into a log. Therefore, the process of testing the communication module can be traced conveniently by the user.
Referring to fig. 4, an embodiment of the present disclosure provides an apparatus 200 for verifying module compatibility, where the method includes: a first determination module 401, a loading module 402, a second determination module 403, a matching module 404, and a sending module 405. The first determining module 401 is configured to determine the communication module to be tested and the file path corresponding to the communication module to be tested from a preset database. And sending the file path corresponding to the communication module to be tested to the loading module, and sending the communication module to be tested to the second determining module. The loading module 402 is configured to receive the file path sent by the first determining module. And loading the configuration file of the test instruction set corresponding to the communication module to be tested according to the file path to obtain the structured array. And sends the structured array to the matching module. The second determining module 403 is configured to receive the communication module to be tested sent by the first determining module, and determine the function item to be tested corresponding to the communication module to be tested. And sending the functional items to be tested to the matching module. The matching module 404 is configured to receive the structured array sent by the loading module, receive the function item to be tested sent by the second determining module, and match a test instruction corresponding to the function item to be tested from the structured array. The structured array stores a plurality of test instructions and corresponding relations between the test instructions and the test function items. And sending the test instruction to a sending module. The sending module 405 is configured to receive the test instruction sent by the matching module. And sending the test instruction to the communication module to be tested so that the communication module to be tested performs testing based on the test instruction.
By adopting the device for verifying the compatibility of the module, the communication module to be tested and the file path corresponding to the communication module to be tested are determined from the preset database through the first determining module. And the loading module loads the configuration file of the test instruction set corresponding to the communication module to be tested according to the file path to obtain the structured array. The second determining module determines the function item to be tested corresponding to the communication module to be tested. And the matching module matches a test instruction corresponding to the functional item to be tested from the structured array. The sending module sends the test instruction to the communication module to be tested so that the communication module to be tested can be tested based on the test instruction. In this way, the test instruction set corresponding to the communication module is expressed in the form of a configuration file. When the compatibility of the modules is verified, the expansion modules can be realized only by adding configuration files of the communication modules and the test instruction sets and carrying out association. The code of the test flow does not need to be modified, and the convenience of module expansion is improved.
Further, the configuration file includes a configuration item, and the configuration item is used for configuring test information of the module to be tested. The loading module is configured to load a configuration file of a test instruction set corresponding to the communication module to be tested according to the file path in the following way, and obtain a structured array, including: and finding out a configuration file of the test instruction set corresponding to the communication module to be tested according to the file path. And analyzing the configuration items in the configuration file to obtain analysis data, and verifying the configuration items to obtain a verification result. And storing the analysis data into the structured array under the condition that the verification result is that the verification is passed. The parsed data includes test instructions.
Further, the loading module is configured to check the configuration item to obtain a check result by: and checking the file format of the configuration item. And under the condition that the file format of the configuration item is the same as the preset format, determining that the verification result is verification passing. Or, under the condition that the file format of the configuration item is different from the preset format, determining that the verification result is verification failure.
Further, the device for verifying the compatibility of the module further comprises an error prompt module, wherein the error prompt module is configured to prompt the error row number, the error reason and the correct format of the file format of the configuration item on a preset display interface under the condition that the verification result is verification failure after the configuration item is verified and the verification result is obtained.
Further, the device for verifying the compatibility of the module further comprises a module extension module, wherein the module extension module is configured to obtain configuration files of the communication module and the test instruction set before determining the communication module to be tested and a file path corresponding to the communication module to be tested from a preset database. And associating the communication module with the configuration file of the test instruction set, and storing the associated configuration file of the test instruction set. And storing the communication module and the file path stored by the configuration file of the associated test instruction set into a database.
Further, the sending module is configured to send the test instruction to the communication module to be tested, so that after the communication module to be tested performs testing based on the test instruction, the analysis result of the interactive data and the key information of the communication module to be tested performing testing based on the test instruction is obtained. The key information is used for representing the execution result of the functional item to be tested. And displaying the analysis result of the interactive data and the key information on a preset display interface.
As shown in fig. 5, an embodiment of the present disclosure provides an apparatus 300 for verifying module compatibility, which includes a processor (processor) 500 and a memory (memory) 501. Optionally, the apparatus may also include a Communication Interface 502 and a bus 503. The processor 500, the communication interface 502, and the memory 501 may communicate with each other via a bus 503. The communication interface 502 may be used for information transfer. The processor 500 may call logic instructions in the memory 501 to perform the method for verifying module compatibility of the above-described embodiments.
By adopting the device for verifying the compatibility of the modules, the communication module to be tested and the file path corresponding to the communication module to be tested are determined from the preset database; loading a configuration file of a test instruction set corresponding to the communication module to be tested according to the file path to obtain a structured array; determining a function item to be tested corresponding to the communication module to be tested; matching a test instruction corresponding to the functional item to be tested from the structured array; and sending the test instruction to the communication module to be tested so that the communication module to be tested performs testing based on the test instruction. In this way, the test instruction set corresponding to the communication module is expressed in the form of a configuration file. When the compatibility of the modules is verified, the expansion modules can be realized only by adding configuration files of the communication modules and the test instruction sets and associating the configuration files, so that the compatibility test of the SIM card on different modules is realized. The code of the test flow does not need to be modified, and the convenience of module expansion is improved.
In addition, the logic instructions in the memory 501 may be implemented in the form of software functional units and may be stored in a computer readable storage medium when the logic instructions are sold or used as independent products.
The memory 501 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, such as program instructions/modules corresponding to the methods in the embodiments of the present disclosure. The processor 500 executes functional applications and data processing by executing program instructions/modules stored in the memory 501, i.e. implements the method for verifying module compatibility in the above embodiments.
The memory 501 may include a storage program area and a storage data area, wherein the storage program area may store an application program required to operate at least one function; the storage data area may store data created according to the use of the terminal device, and the like. Further, the memory 501 may include a high speed random access memory and may also include a non-volatile memory.
As shown in fig. 6, an embodiment of the present disclosure provides an electronic device 100, including: an electronic device body, and the above-mentioned device 200 (300) for verifying module compatibility, the device 200 (300) for verifying module compatibility being mounted to the electronic device body. The installation relationship stated herein is not limited to being placed inside the product, but also includes installation connection with other components of the product, including but not limited to physical connection, electrical connection, or signal transmission connection. It will be appreciated by those skilled in the art that the apparatus 200 (300) for verifying module compatibility may be adapted to a feasible product body, thereby enabling other feasible embodiments.
Optionally, the electronic device comprises a server or a computer or the like.
By adopting the electronic equipment provided by the embodiment of the disclosure, the communication module to be tested and the file path corresponding to the communication module to be tested are determined from the preset database; loading a configuration file of a test instruction set corresponding to the communication module to be tested according to the file path to obtain a structured array; determining a function item to be tested corresponding to the communication module to be tested; matching a test instruction corresponding to the functional item to be tested from the structured array; and sending the test instruction to the communication module to be tested so that the communication module to be tested performs testing based on the test instruction. In this way, the test instruction set corresponding to the communication module is expressed in the form of a configuration file. When the compatibility of the modules is verified, the expansion modules can be realized only by adding configuration files of the communication modules and the test instruction sets and associating the configuration files, so that the compatibility test of the SIM card on different modules is realized. The code of the test flow does not need to be modified, and the convenience of module expansion is improved.
The embodiment of the disclosure provides a storage medium, which stores program instructions, and when the program instructions are executed, the method for verifying module compatibility is executed.
Embodiments of the present disclosure provide a computer program product comprising a computer program stored on a computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the above-described method for verifying module compatibility.
The computer readable storage medium described above may be a transitory computer readable storage medium or a non-transitory computer readable storage medium.
The technical solution of the embodiments of the present disclosure may be embodied in the form of a software product, where the computer software product is stored in a storage medium and includes one or more instructions to enable a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present disclosure. And the aforementioned storage medium may be a non-transitory storage medium comprising: a U-disk, a portable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other media capable of storing program codes, and may also be a transient storage medium.
The above description and drawings sufficiently illustrate embodiments of the disclosure to enable those skilled in the art to practice them. Other embodiments may incorporate structural, logical, electrical, process, and other changes. The examples merely typify possible variations. Individual components and functions are optional unless explicitly required, and the sequence of operations may vary. Portions and features of some embodiments may be included in or substituted for those of others. Furthermore, the words used in the specification are words of description for example only and are not limiting upon the claims. As used in the description of the embodiments and the claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Similarly, the term "and/or" as used in this application is meant to encompass any and all possible combinations of one or more of the associated listed. Furthermore, the terms "comprises" and/or "comprising," when used in this application, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. Without further limitation, an element defined by the phrase "comprising a" \8230; "does not exclude the presence of additional like elements in a process, method or apparatus comprising the element. In this document, each embodiment may be described with emphasis on differences from other embodiments, and the same and similar parts between the respective embodiments may be referred to each other. For methods, products, etc. of the embodiment disclosures, reference may be made to the description of the method section for relevance if it corresponds to the method section of the embodiment disclosure.
Those of skill in the art would appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software may depend upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments. It can be clearly understood by the skilled person that, for convenience and brevity of description, the specific working processes of the apparatus and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments disclosed herein, the disclosed methods, products (including but not limited to devices, apparatuses, etc.) may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units may be merely a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form. The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to implement the present embodiment. In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. In the description corresponding to the flowcharts and block diagrams in the figures, operations or steps corresponding to different blocks may also occur in different orders than disclosed in the description, and sometimes there is no specific order between the different operations or steps. For example, two sequential operations or steps may in fact be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. Each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

Claims (10)

1. A method for verifying compatibility of a module, comprising:
determining a communication module to be tested and a file path corresponding to the communication module to be tested from a preset database; the database stores a plurality of communication modules and file paths of configuration files of a test instruction set corresponding to each communication module;
loading a configuration file of a test instruction set corresponding to the communication module to be tested according to the file path to obtain a structured array;
determining a function item to be tested corresponding to the communication module to be tested;
matching a test instruction corresponding to the functional item to be tested from the structured array; the structured array stores a plurality of test instructions and corresponding relations between the test instructions and the test function items;
and sending the test instruction to the communication module to be tested so that the communication module to be tested performs testing based on the test instruction.
2. The method of claim 1, wherein the configuration file comprises a configuration item, and the configuration item is used for configuring test information of the module to be tested; loading the configuration file of the test instruction set corresponding to the communication module to be tested according to the file path to obtain a structured array, comprising:
finding out a configuration file of a test instruction set corresponding to the communication module to be tested according to the file path;
analyzing the configuration items in the configuration file to obtain analysis data, and verifying the configuration items to obtain a verification result;
storing the analysis data into a structured array under the condition that the verification result is that the verification is passed; the parsed data includes test instructions.
3. The method of claim 2, wherein checking the configuration item to obtain a check result comprises:
checking the file format of the configuration item;
determining that the verification result is verification passing under the condition that the file format of the configuration item is the same as the preset format; or the like, or, alternatively,
and under the condition that the file format of the configuration item is different from the preset format, determining that the verification result is verification failure.
4. The method of claim 3, wherein the configuration item is verified, and after obtaining the verification result, the method further comprises:
and under the condition that the verification result is verification failure, prompting the error line number, error reason and correct format of the file format of the configuration item on a preset display interface.
5. The method of claim 1, before determining a communication module to be tested and a file path corresponding to the communication module to be tested from a preset database, further comprising:
acquiring configuration files of a communication module and a test instruction set;
associating the communication module with the configuration file of the test instruction set, and storing the associated configuration file of the test instruction set;
determining a file path stored by a configuration file of the associated test instruction set;
and storing the communication module and the file path stored by the configuration file of the associated test instruction set into the database.
6. The method of claim 1, wherein sending the test instruction to the communication module to be tested, so that the communication module to be tested performs a test based on the test instruction, further comprises:
acquiring the analysis result of the interactive data and the key information of the communication module to be tested based on the test instruction; the key information is used for representing the execution result of the functional item to be tested;
and displaying the interactive data and the analysis result of the key information on a preset display interface.
7. An apparatus for verifying module compatibility, comprising:
the system comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is configured to determine a communication module to be tested and a file path corresponding to the communication module to be tested from a preset database; the database stores a plurality of communication modules and file paths of configuration files of a test instruction set corresponding to each communication module;
the loading module is configured to load a configuration file of a test instruction set corresponding to the communication module to be tested according to the file path to obtain a structured array;
the second determination module is configured to determine a to-be-tested function item corresponding to the to-be-tested communication module;
the matching module is configured to match a test instruction corresponding to the functional item to be tested from the structured array; the structured array stores a plurality of test instructions and corresponding relations between the test instructions and the test function items;
the sending module is configured to send the test instruction to the communication module to be tested so that the communication module to be tested performs testing based on the test instruction.
8. An apparatus for verifying module compatibility comprising a processor and a memory storing program instructions, wherein the processor is configured to perform the method for verifying module compatibility of any of claims 1 to 6 when executing the program instructions.
9. An electronic device, comprising:
an electronic device body;
the apparatus for verifying module compatibility of claim 8, mounted to the electronic device body.
10. A storage medium storing program instructions which, when executed, perform a method for verifying module compatibility according to any one of claims 1 to 6.
CN202211435613.9A 2022-11-16 2022-11-16 Method and device for verifying compatibility of module, electronic equipment and storage medium Active CN115514680B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211435613.9A CN115514680B (en) 2022-11-16 2022-11-16 Method and device for verifying compatibility of module, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211435613.9A CN115514680B (en) 2022-11-16 2022-11-16 Method and device for verifying compatibility of module, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115514680A true CN115514680A (en) 2022-12-23
CN115514680B CN115514680B (en) 2023-03-21

Family

ID=84513649

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211435613.9A Active CN115514680B (en) 2022-11-16 2022-11-16 Method and device for verifying compatibility of module, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115514680B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117849595A (en) * 2024-03-07 2024-04-09 山海芯半导体科技(上海)有限公司 Chip compatibility verification method, device and system and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180365136A1 (en) * 2017-06-16 2018-12-20 Cognizant Technology Solutions India Pvt. Ltd. System and method for automatically categorizing test cases for model based testing
CN112486818A (en) * 2020-11-27 2021-03-12 合肥移瑞通信技术有限公司 Module function test system and test method
US20210318948A1 (en) * 2020-04-09 2021-10-14 The Toronto-Dominion Bank System and Method for Automated Application Testing
CN114978974A (en) * 2022-05-20 2022-08-30 国网重庆市电力公司电力科学研究院 Wireless communication module testing method, device, equipment and storage medium
CN115276844A (en) * 2022-08-02 2022-11-01 上海移柯通信技术股份有限公司 Communication module testing method and device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180365136A1 (en) * 2017-06-16 2018-12-20 Cognizant Technology Solutions India Pvt. Ltd. System and method for automatically categorizing test cases for model based testing
US20210318948A1 (en) * 2020-04-09 2021-10-14 The Toronto-Dominion Bank System and Method for Automated Application Testing
CN112486818A (en) * 2020-11-27 2021-03-12 合肥移瑞通信技术有限公司 Module function test system and test method
CN114978974A (en) * 2022-05-20 2022-08-30 国网重庆市电力公司电力科学研究院 Wireless communication module testing method, device, equipment and storage medium
CN115276844A (en) * 2022-08-02 2022-11-01 上海移柯通信技术股份有限公司 Communication module testing method and device and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117849595A (en) * 2024-03-07 2024-04-09 山海芯半导体科技(上海)有限公司 Chip compatibility verification method, device and system and electronic equipment
CN117849595B (en) * 2024-03-07 2024-05-07 山海芯半导体科技(上海)有限公司 Chip compatibility verification method, device and system and electronic equipment

Also Published As

Publication number Publication date
CN115514680B (en) 2023-03-21

Similar Documents

Publication Publication Date Title
CN110445688B (en) Interface service function monitoring method and system based on data collection
US7613916B2 (en) Method for burning chips
CN111177005A (en) Service application testing method, device, server and storage medium
KR20080068385A (en) Program test system, method and computer readable medium on which program for executing the method is recorded
CN115514680B (en) Method and device for verifying compatibility of module, electronic equipment and storage medium
KR102274561B1 (en) Transaction system error detection method, apparatus, storage medium and computer device
CN109766483B (en) Regular expression generation method, device, computer equipment and storage medium
CN109165017A (en) Data verification method, device and computer storage medium
CN105245392A (en) Method and device for base line checking and repairing
CN112905459A (en) Service interface testing method and device, electronic equipment and storage medium
CN110633217A (en) Interface checking method and device
CN113312258A (en) Interface testing method, device, equipment and storage medium
CN113448844A (en) Method and device for regression testing and electronic equipment
CN103336757A (en) Hardware protocol stack
CN105281963A (en) nginx server vulnerability detection method and device
CN109086145B (en) Data generation method and device and computer storage medium
CN110221958B (en) Application testing method, device, computing equipment and computer readable storage medium
CN103188117A (en) Device and method for information interaction server simulation testing
CN110825795A (en) Method, device and equipment for accessing database and computer readable storage medium
CN116893978B (en) Test plan generation method, system and storage medium based on PTCRB authentication
CN110597712A (en) Component attribute checking method and device, terminal and storage medium
CN112000579B (en) Software interface testing method, system, equipment and medium
CN114942892B (en) Method and device for communicating with software to be tested, equipment and storage medium
CN116431722A (en) HTTP interface generation method and device and electronic equipment
CN111144867B (en) Method and device for generating region code mapping relation

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
GR01 Patent grant
GR01 Patent grant