CN114942892B - Method and device for communicating with software to be tested, equipment and storage medium - Google Patents

Method and device for communicating with software to be tested, equipment and storage medium Download PDF

Info

Publication number
CN114942892B
CN114942892B CN202210882324.7A CN202210882324A CN114942892B CN 114942892 B CN114942892 B CN 114942892B CN 202210882324 A CN202210882324 A CN 202210882324A CN 114942892 B CN114942892 B CN 114942892B
Authority
CN
China
Prior art keywords
software
card
tested
nfc
nfc signal
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.)
Active
Application number
CN202210882324.7A
Other languages
Chinese (zh)
Other versions
CN114942892A (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.)
Beijing Unigroup Tsingteng Microsystems Co Ltd
Original Assignee
Beijing Unigroup Tsingteng Microsystems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Unigroup Tsingteng Microsystems Co Ltd filed Critical Beijing Unigroup Tsingteng Microsystems Co Ltd
Priority to CN202210882324.7A priority Critical patent/CN114942892B/en
Publication of CN114942892A publication Critical patent/CN114942892A/en
Application granted granted Critical
Publication of CN114942892B publication Critical patent/CN114942892B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • H04B5/70Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes
    • H04B5/72Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes for local intradevice communication

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application relates to the field of communication, and discloses a method for communicating with software to be tested, which comprises the following steps: receiving a first Near Field Communication (NFC) signal sent by software to be tested by using a preset card model; the card model is used for analyzing the first NFC signal and modulating the second NFC signal according to a preset card technology type and a preset card protocol type; and communicating with the software to be tested according to the first NFC signal by utilizing the card model. In this way, the card model can be used to test software to be tested instead of a physical NFC card. And adopt the card model not need the manual work to place and change, can improve NFC software's efficiency of software testing. Meanwhile, the card model is adopted to test the software to be tested, and a plurality of entity cards are not required to be purchased, so that the test cost of the software to be tested can be reduced. The application also discloses a device, equipment and a storage medium for communicating with the software to be tested.

Description

Method and device for communicating with software to be tested, equipment and storage medium
Technical Field
The present application relates to the field of communications, and for example, to a method and apparatus for communicating with software to be tested, a terminal device, and a storage medium.
Background
At present, various terminal devices are equipped with NFC (Near Field Communication) chips so that NFC software of the terminal devices can use NFC functions. Before the NFC software is configured to each terminal device for use by a user, the NFC software needs to be tested. In the related art, the NFC software is usually tested by using different physical NFC cards. For example: and the entity NFC card is used for contacting the mobile phone to obtain the communication condition of the entity NFC card and the NFC software to be tested so as to determine whether the NFC software on the mobile phone reads the NFC card normally.
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 entity NFC card is used for communicating with the NFC software to be tested, so that the entity NFC card needs to be manually placed and replaced when the NFC software is tested, which results in lower efficiency of testing the NFC software.
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 communicating with software to be tested, a terminal device and a storage medium, so as to improve the testing efficiency of the software to be tested.
In some embodiments, the method for communicating with software under test comprises: receiving a first Near Field Communication (NFC) signal sent by software to be tested by using a preset card model; the card model is used for analyzing the first NFC signal and modulating the second NFC signal according to a preset card technology type and a preset card protocol type; and communicating with the software to be tested according to the first NFC signal by utilizing the card model.
In some embodiments, the means for communicating with software to be tested comprises: the receiving module is configured to receive a first Near Field Communication (NFC) signal sent by software to be tested by using a preset card model; the card model is used for analyzing the first NFC signal and modulating the second NFC signal according to a preset card technology type and a preset card protocol type; a communication module configured to communicate with the software to be tested according to the first NFC signal using the card model.
In some embodiments, the terminal device comprises a processor and a memory storing program instructions, the processor being configured to perform the above-mentioned method for communicating with software to be tested when executing the program instructions.
In some embodiments, the storage medium, when executed, performs the above-described method for communicating with software to be tested.
The method and the device for communicating with the software to be tested, the terminal device and the storage medium provided by the embodiment of the disclosure can achieve the following technical effects: and receiving a first Near Field Communication (NFC) signal sent by software to be tested by utilizing a preset card model. The card model is used for analyzing the first NFC signal and modulating the second NFC signal according to a preset card technology type and a preset card protocol type. And communicating with the software to be tested according to the first NFC signal by utilizing the card model. Therefore, the card model can analyze the first NFC signal sent by the software to be tested and communicate with the software to be tested according to the analyzed operation instruction. Thus, the card model can be used to test software to be tested instead of a physical NFC card. And the card model is adopted, manual placement and replacement are not needed, and the test efficiency of the software to be tested can be improved. Meanwhile, the card model is adopted to test the software to be tested, and a plurality of entity cards are not required to be purchased, so that the test cost of the software to be tested can be reduced.
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 communicating with software to be tested provided by an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a second method for communicating with software under test provided by an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a third method for communicating with software under test provided by an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a fourth method for communicating with software under test provided by an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of an apparatus for communicating with software to be tested provided by an embodiment of the present disclosure;
fig. 6 is a schematic diagram of a terminal device provided in 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 as appropriate for the embodiments of the disclosure described herein. 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. For example, a and/or B, represents: a or B, or A and B.
In the embodiment of the present disclosure, the software to be tested is NFC software. The preset card technology type is a technology type of an entity NFC card, for example: NFC-A, NFC-B, NFC-F or NFC-V. The preset card protocol type is a protocol type of an entity NFC card, for example: T1T, T2T, T3T, T T, T T or Mifare. The data formats of the first NFC signal and the second NFC signal are written according to a preset card technology type and a preset card protocol type. The virtual card management module is used for managing the communication sequence of each card model and the software to be tested. Meanwhile, the virtual card management module is also used for determining whether the software process of the software to be tested is correct.
In the embodiment of the present disclosure, the card model is provided with corresponding card data, and the card model performs operations such as reading, changing, and writing on the corresponding card data. The card model is a code capable of analyzing the first NFC signal and modulating the second NFC signal according to a preset card technology type and a preset card protocol type. The card data includes Block data, UID (User Identification), status information, authentication information, and the like. The card data is stored in a preset configuration file. The card data is static, can be loaded into the memory by the card model for use, and is written into the magnetic disk from the memory by the card model and is stored persistently. The storage of card data is generally in units of bytes (Byte), and usually a plurality of bytes are combined into a Byte Block (Block) for management. The card data is divided into a plurality of byte blocks, and the data stored in a single byte Block is called Block data; the number of bytes of the divided byte blocks may be different for different card data. In this way, a virtual NFC card is formed by the card model and the card data, and the virtual NFC card tests the NFC software in the terminal device, so that the test of the NFC software can be performed without using a physical NFC card.
The application is applied to the terminal equipment and used for testing the NFC software in the terminal equipment. In the related art, the physical NFC card communicates with NFC software through a real NFC Firmware (NFC Firmware) using RF (Radio Frequency). In the prior art, an entity NFC card is required to be used for testing NFC software, so that the test cost of the NFC software is high. In the embodiment of the present disclosure, the card model communicates with the NFC software through the virtual NFC firmware using an NCI (NFC Controller interface) instruction, and can perform a test on the NFC software without using an entity NFC card, so that the whole test process is completed by the terminal device, thereby reducing the test cost of the NFC software.
In the embodiment of the present disclosure, the terminal device is an electronic device provided with NFC software, for example: smart phones, POS (Point of sales information management) machines, and the like.
Referring to fig. 1, a first method for communicating with software to be tested provided by the embodiments of the present disclosure includes:
step S101, the terminal device receives a first NFC signal sent by software to be tested by using a preset card model, and the card model is used for analyzing the first NFC signal and modulating a second NFC signal according to a preset card technology type and a preset card protocol type.
And S102, the terminal equipment communicates with the software to be tested according to the first NFC signal by using the card model.
By adopting the first method for communicating with the software to be tested, which is provided by the embodiment of the disclosure, the first Near Field Communication (NFC) signal sent by the software to be tested is received by utilizing the preset card model. The card model is used for analyzing the first NFC signal and modulating the second NFC signal according to a preset card technology type and a preset card protocol type. And communicating with the software to be tested according to the first NFC signal by utilizing the card model. Therefore, the card model can analyze the first NFC signal sent by the software to be tested and communicate with the software to be tested according to the analyzed operation instruction. Thus, the card model can be used to test software to be tested instead of a physical NFC card. And adopt the card model not need the manual work to place and change, can improve NFC software's efficiency of software testing. Meanwhile, the card model is adopted to test the software to be tested, and a plurality of entity cards are not required to be purchased, so that the test cost of the software to be tested can be reduced.
Further, receiving a first NFC signal sent by software to be tested by using a preset card model includes: and receiving a first NFC signal sent by the software to be tested through a virtual card management module by using the card model. In this way, in the case where there are a plurality of card models, the first NFC signal is received by the virtual card management module. And each card model is convenient to manage.
Optionally, receiving, by using the card model, a first NFC signal sent by software to be tested through the virtual card management module includes: and receiving an activation instruction sent by the virtual card management module. And under the condition that the card model is activated, receiving a first NFC signal sent by the software to be tested through the virtual card management module. The card model receives a first NFC signal sent by the virtual card management module in a transparent transmission mode.
Optionally, receiving, by using the card model, a first NFC signal sent by software to be tested through the virtual card management module includes: and receiving an activation instruction sent by the virtual card management module. In the case that the card model is activated, the card model receives a first NFC signal sent by software to be tested.
Optionally, the communication with the software to be tested according to the first NFC signal by using the card model includes: and analyzing the first NFC signal by using the card model to obtain an operation instruction. And communicating with the software to be tested according to the operation instruction by using the card model.
Optionally, the communication with the software to be tested according to the operation instruction by using the card model includes: and under the condition that the operation instruction is a read instruction, determining a first data address and a byte number corresponding to the read instruction. And acquiring data to be transmitted by using the card model according to the first data address and the byte number. And sending the data to be sent to the software to be tested. Therefore, the reading flow between the entity NFC card and the software to be tested can be simulated through the card model.
Further, obtaining data to be sent by using the card model according to the first data address and the number of bytes, including: searching a first data address in a preset configuration file through a card model, acquiring a section of card data at the first data address according to a preset storage sequence, wherein the length of the section of card data is equal to the number of bytes corresponding to the reading instruction, and determining the section of card data as data to be sent.
Optionally, sending data to be sent to the software to be tested, including: compiling data to be sent according to a preset card technology type and a preset card protocol type to obtain a second NFC signal; and sending the second NFC signal to the software to be tested.
Further, sending the second NFC signal to the software to be tested includes: and sending the second NFC signal to the software to be tested through the virtual card management module.
Referring to fig. 2, a second method for communicating with software to be tested provided by the embodiments of the present disclosure includes:
in step S201, the virtual card management module sends an activation instruction to the card model.
In step S202, the card model receives the activation instruction, and determines the card technology type and the card protocol type of the card model.
Step S203, the card model sends card activation information to the virtual card management module; the card activation information includes a card technology type and a card protocol type.
In step S204, the virtual card management module receives the card activation information.
In step S205, the virtual card management module sends card activation information to the software to be tested.
In step S206, the software to be tested receives the card activation information.
Step S207, the software to be tested sends the first NFC signal to the virtual card management module.
In step S208, the virtual card management module receives the first NFC signal.
In step S209, the virtual card management module sends the first NFC signal to the card model.
Step S210, the card model analyzes the first NFC signal to obtain an operation instruction; determining a first data address and byte number corresponding to the reading instruction under the condition that the operating instruction is the reading instruction; acquiring data to be transmitted according to the first data address and the byte number by using the card model; writing data to be sent according to a preset card technology type and a preset card protocol type to obtain a second NFC signal.
In step S211, the card model sends a second NFC signal to the virtual card management module.
In step S212, the virtual card management module receives the second NFC signal.
In step S213, the virtual card management module sends the second NFC signal to the software to be tested.
By adopting the second method for communicating with the software to be tested, which is provided by the embodiment of the disclosure, the card model is activated through the virtual card management module, and then the card model is utilized to communicate with the software to be tested through the virtual card management module. Therefore, the virtual card management module manages the card models, and the card models can communicate with the software to be tested in order under the condition that the card models are multiple.
Optionally, the card data stores therein a card technology type and a card protocol type. Determining a card technology type and a card protocol type of the card model, comprising: and determining the card technology type and the card protocol type stored in the card data corresponding to the card model as the card technology type and the card protocol type of the card model.
Optionally, the card model is used to communicate with the software to be tested according to the operation instruction, and the following method can be further implemented: and under the condition that the operation instruction is a write-in instruction, determining a second data address and data to be written corresponding to the write-in instruction. And writing the data to be written in the second data address by utilizing the card model to obtain the writing condition. And sending the writing condition to the software to be tested. Therefore, the writing process between the entity NFC card and the software to be tested can be simulated through the card model. Wherein, the writing condition is writing success or writing failure.
Further, sending the writing condition to the software to be tested, including: writing the writing situation according to the preset card technology type and the preset card protocol type to obtain a second NFC signal. And sending the second NFC signal to the software to be tested.
With reference to fig. 3, a third method for communicating with software to be tested provided by the embodiments of the present disclosure includes:
step S301, the virtual card management module sends an activation instruction to the card model.
Step S302, the card model receives the activation instruction and determines the card technology type and the card protocol type of the card model.
Step S303, the card model sends card activation information to the virtual card management module; the card activation information includes a card technology type and a card protocol type.
In step S304, the virtual card management module receives the card activation information.
In step S305, the virtual card management module sends card activation information to the software to be tested.
In step S306, the software to be tested receives the card activation information.
In step S307, the software to be tested sends the first NFC signal to the virtual card management module.
In step S308, the virtual card management module receives the first NFC signal.
Step S309, the virtual card management module sends the first NFC signal to the card model.
Step S310, the card model analyzes the first NFC signal to obtain an operation instruction; determining a second data address and data to be written corresponding to the write-in instruction under the condition that the operation instruction is the write-in instruction; writing the data to be written in at the second data address by using the card model to obtain the writing condition; writing the writing situation according to the preset card technology type and the preset card protocol type to obtain a second NFC signal.
In step S311, the card model sends a second NFC signal to the virtual card management module.
In step S312, the virtual card management module receives the second NFC signal.
Step S313, the virtual card management module sends the second NFC signal to the software to be tested.
By adopting the third method for communicating with the software to be tested, which is provided by the embodiment of the disclosure, the card model is activated through the virtual card management module, and then the card model is utilized to communicate with the software to be tested through the virtual card management module. Therefore, the virtual card management module manages the card models, and the card models can communicate with the software to be tested in order under the condition that the card models are multiple.
In some embodiments, the card model is directly in the activated state, and the card model is capable of directly sending card activation information. Referring to fig. 4, a fourth method for communicating with software to be tested according to an embodiment of the present disclosure includes:
step S401, the card model sends card activation information to software to be tested; the card activation information includes a card technology type and a card protocol type.
In step S402, the software to be tested receives card activation information.
Step S403, the software to be tested sends a first NFC signal to the card model.
Step S404, the card model analyzes the first NFC signal to obtain an operation instruction; determining a first data address and byte number corresponding to the reading instruction under the condition that the operating instruction is the reading instruction; acquiring data to be transmitted according to the first data address and the byte number by using the card model; and compiling data to be sent according to a preset card technology type and a preset card protocol type to obtain a second NFC signal.
Step S405, the card model sends a second NFC signal to the software to be tested.
By adopting the fourth method for communicating with the software to be tested, which is provided by the embodiment of the disclosure, the card activation information is sent to the software to be tested through the card model. The software to be tested receives the card activation information and sends a first NFC signal to the card model according to the card activation information. And the card model analyzes the first NFC signal to obtain an operation instruction. And under the condition that the operation instruction is a read instruction, determining a first data address and a byte number corresponding to the read instruction. And acquiring data to be transmitted by using the card model according to the first data address and the byte number. And compiling data to be sent according to a preset card technology type and a preset card protocol type to obtain a second NFC signal. And the card model sends the second NFC signal to the software to be tested. Therefore, the card model directly interacts with the software to be tested, and the method is very convenient and fast.
Optionally, after the card model is used to receive the first NFC signal sent by the software to be tested through the virtual card management module, the method further includes: the virtual card management module stores the first NFC signal.
Optionally, after the virtual card management module sends the second NFC signal to the software to be tested, the method further includes: the virtual card management module stores the second NFC signal.
Optionally, after the virtual card management module stores the first NFC signal and the second NFC signal, the method further includes: and arranging the first NFC signals and the second NFC signals stored by the virtual card management module according to a receiving sequence to form a signal sequence. And determining whether the software flow of the software to be tested is correct or not according to the signal sequence. Therefore, the virtual card management module sequentially stores the communication signal condition of the card model and the software to be tested according to the receiving sequence, whether the signal sent by the software to be tested accords with the preset flow can be judged, and a user can complete the software to be tested according to whether the software flow of the software to be tested is correct.
Optionally, determining whether the software flow of the software to be tested is correct according to the signal sequence includes: and comparing the signal sequence with a preset sequence, and determining that the software flow of the software to be tested is correct under the condition that the comparison result is that the signal sequence is consistent with the preset sequence. And determining the software flow error of the software to be tested under the condition that the comparison result is that the signal sequence is inconsistent with the preset sequence.
In some embodiments, the software to be tested sends a first NFC signal a to the virtual card management module for the first time. The virtual card management module stores the first NFC signal a and sends the first NFC signal a to the card model. And the card model analyzes the first NFC signal a to obtain a writing instruction. And the card model forms a second NFC signal b for the first time according to the write-in instruction, and sends the second NFC signal b to the virtual card management module. The virtual card management module stores the second NFC signal b and sends the second NFC signal b to the software to be tested. And the software to be tested receives the second NFC signal b and sends the first NFC signal c to the virtual card management module for the second time. The virtual card management module stores the second NFC signal c and sends the first NFC signal c to the card model. And the card model analyzes the first NFC signal c to obtain a reading instruction. And the card model forms a second NFC signal d for the second time according to the reading instruction, and sends the second NFC signal d to the virtual card management module. The virtual card management module stores a first NFC signal a, a second NFC signal b, a first NFC signal c and a second NFC signal d of signal sequences. And comparing the signal sequence with a preset sequence, and determining that the software flow of the software to be tested is correct under the condition that the comparison result is that the signal sequence is consistent with the preset sequence.
Optionally, determining whether the software flow of the software to be tested is correct according to the signal sequence includes: and sequentially analyzing the first NFC signal and the second NFC signal according to the sequence of the signal sequence to respectively obtain first analysis data and second analysis data. And sequentially arranging the first analytic data and the second analytic data according to the sequence of the signal sequence to form an analytic data sequence. And comparing the analytic data sequence with a preset data sequence. And determining that the software flow of the software to be tested is correct under the condition that the analysis data sequence is consistent with the preset data sequence. And determining the software flow error of the software to be tested under the condition that the analysis data sequence is inconsistent with the preset data sequence according to the comparison result.
In some embodiments, the card model sends the NFC signal to the terminal device kernel through the virtual card management module, the terminal device kernel sends the NFC signal to an NFC hardware abstraction layer (NFC HAL) through a driver corresponding to the virtual card management module, and the NFC hardware abstraction layer communicates with software to be tested through an NCI instruction.
As shown in fig. 5, an apparatus for communicating with software to be tested according to an embodiment of the present disclosure includes: a receiving module 501 and a communication module 502. The receiving module 501 is configured to receive a first near field communication NFC signal sent by software to be tested by using a preset card model. The card model is used for analyzing the first NFC signal and modulating the second NFC signal according to a preset card technology type and a preset card protocol type. A communication module 502 configured to communicate with the software to be tested according to the first NFC signal using the card model.
By adopting the device for communicating with the software to be tested, which is provided by the embodiment of the disclosure, the receiving module receives the first Near Field Communication (NFC) signal sent by the software to be tested by using the preset card model. The card model is used for analyzing the first NFC signal and modulating the second NFC signal according to a preset card technology type and a preset card protocol type. And the communication module communicates with the software to be tested according to the first NFC signal by using the card model. Therefore, the card model can analyze the first NFC signal sent by the software to be tested and communicate with the software to be tested according to the analyzed operation instruction. Thus, the card model can be used to test software to be tested instead of a physical NFC card. And adopt the card model not need the manual work to place and change, can improve NFC software's efficiency of software testing. Meanwhile, the card model is adopted to test the software to be tested, and a plurality of entity cards are not required to be purchased, so that the test cost of the software to be tested can be reduced.
As shown in fig. 6, a terminal device provided in the embodiment of the present disclosure includes a processor (processor) 600 and a memory (memory) 601. Optionally, the apparatus may also include a Communication Interface 602 and a bus 603. The processor 600, the communication interface 602, and the memory 601 may communicate with each other via a bus 603. The communication interface 602 may be used for information transfer. The processor 600 may call logic instructions in the memory 601 to perform the method for communicating with software to be tested of the above embodiments.
In addition, the logic instructions in the memory 601 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products.
The memory 601 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 600 executes functional applications and data processing, i.e. implements the method for communicating with the software to be tested in the above embodiments, by executing program instructions/modules stored in the memory 601.
The memory 601 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. In addition, the memory 601 may include a high speed random access memory, and may also include a non-volatile memory.
By adopting the terminal equipment of the embodiment of the disclosure, the first Near Field Communication (NFC) signal sent by the software to be tested is received by utilizing the preset card model. The card model is used for analyzing the first NFC signal and modulating the second NFC signal according to a preset card technology type and a preset card protocol type. And communicating with the software to be tested according to the first NFC signal by utilizing the card model. Therefore, the card model can analyze the first NFC signal sent by the software to be tested and communicate with the software to be tested according to the analyzed operation instruction. Thus, the card model can be used to test software to be tested instead of a physical NFC card. And adopt the card model not need the manual work to place and change, can improve NFC software's efficiency of software testing. Meanwhile, the card model is adopted to test the software to be tested, and a plurality of entity cards are not required to be purchased, so that the test cost of the software to be tested can be reduced.
The disclosed embodiments provide a storage medium storing program instructions that, when executed, perform the above-described method for communicating with software to be tested.
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 communicating with software to be tested.
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 terminal device, 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 only and are not intended to limit 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 …" does not exclude the presence of additional like elements in a process, method, or apparatus that comprises 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 disclosure, 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 simplicity of description, the specific working processes of the above-described systems, apparatuses, and units 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 systems, 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 (6)

1. A method for communicating with software under test, comprising:
receiving a first Near Field Communication (NFC) signal sent by software to be tested by using a preset card model; the card model is a code capable of analyzing the first NFC signal and modulating the second NFC signal according to a preset card technology type and a preset card protocol type; the card model is provided with corresponding card data, and the card model performs reading, changing and writing operations on the corresponding card data; the card model and the card data form a virtual NFC card;
communicating with the software to be tested according to the first NFC signal by utilizing the card model;
receiving a first NFC signal sent by software to be tested by using a preset card model, wherein the first NFC signal comprises: receiving a first NFC signal sent by software to be tested through a virtual card management module by utilizing the card model;
communicating with the software to be tested according to the first NFC signal by using the card model, wherein the communication comprises the following steps: analyzing the first NFC signal by using the card model to obtain an operation instruction; communicating with the software to be tested according to the operation instruction by utilizing the card model;
communicating with the software to be tested according to the operation instruction by utilizing the card model, wherein the communication comprises the following steps: determining a first data address and byte number corresponding to the reading instruction under the condition that the operating instruction is the reading instruction; acquiring data to be transmitted according to the first data address and the byte number by using the card model; writing the data to be sent according to a preset card technology type and a preset card protocol type to obtain a second NFC signal; sending the second NFC signal to the software to be tested through the virtual card management module;
after a card model is utilized to receive a first NFC signal sent by software to be tested through a virtual card management module, the method further comprises the following steps: the virtual card management module stores the first NFC signal;
after sending the second NFC signal to the software to be tested through the virtual card management module, the method further includes: the virtual card management module stores the second NFC signal;
after the virtual card management module stores the first NFC signal and the second NFC signal, the method further includes: arranging the first NFC signals and the second NFC signals stored by the virtual card management module according to a receiving sequence to form a signal sequence; comparing the signal sequence with a preset sequence; determining that the software flow of the software to be tested is correct under the condition that the comparison result is that the signal sequence is consistent with the preset sequence; determining a software flow error of the software to be tested under the condition that the comparison result is that the signal sequence is inconsistent with the preset sequence;
the software to be tested is NFC software.
2. The method of claim 1, wherein communicating with the software to be tested according to the operation instructions using the card model comprises:
determining a second data address and data to be written corresponding to the writing instruction under the condition that the operating instruction is the writing instruction;
writing the data to be written in at the second data address by using the card model to obtain a writing condition; and sending the writing condition to the software to be tested.
3. The method of claim 2, wherein sending the write to the software under test comprises:
writing the writing condition according to a preset card technology type and a preset card protocol type to obtain a second NFC signal; and sending the second NFC signal to the software to be tested.
4. An apparatus for communicating with software to be tested, comprising:
the receiving module is configured to receive a first Near Field Communication (NFC) signal sent by software to be tested by using a preset card model; the card model is a code capable of analyzing the first NFC signal and modulating the second NFC signal according to a preset card technology type and a preset card protocol type; the card model is provided with corresponding card data, and the card model performs reading, changing and writing operations on the corresponding card data; the card model and the card data form a virtual NFC card;
a communication module configured to communicate with the software to be tested according to the first NFC signal by using the card model;
receiving a first NFC signal sent by software to be tested by using a preset card model, wherein the first NFC signal comprises: receiving a first NFC signal sent by software to be tested through a virtual card management module by utilizing the card model;
communicating with the software to be tested according to the first NFC signal by using the card model, wherein the communication comprises the following steps: analyzing the first NFC signal by using the card model to obtain an operation instruction; communicating with the software to be tested according to the operation instruction by utilizing the card model;
communicating with the software to be tested according to the operation instruction by utilizing the card model, wherein the communication comprises the following steps: determining a first data address and byte number corresponding to the reading instruction under the condition that the operating instruction is the reading instruction; acquiring data to be transmitted according to the first data address and the byte number by using the card model; writing the data to be sent according to a preset card technology type and a preset card protocol type to obtain a second NFC signal; sending the second NFC signal to the software to be tested through the virtual card management module;
after a card model is utilized to receive a first NFC signal sent by software to be tested through a virtual card management module, the method further comprises the following steps: the virtual card management module stores the first NFC signal;
after sending the second NFC signal to the software to be tested through the virtual card management module, the method further includes: the virtual card management module stores the second NFC signal;
after the virtual card management module stores the first NFC signal and the second NFC signal, the method further includes: arranging the first NFC signals and the second NFC signals stored by the virtual card management module according to a receiving sequence to form a signal sequence; comparing the signal sequence with a preset sequence; determining that the software flow of the software to be tested is correct under the condition that the comparison result is that the signal sequence is consistent with the preset sequence; determining a software flow error of the software to be tested under the condition that the comparison result is that the signal sequence is inconsistent with the preset sequence;
the software to be tested is NFC software.
5. A terminal device comprising a processor and a memory storing program instructions, characterized in that the processor is configured to carry out the method for communicating with software to be tested according to any one of claims 1 to 3 when executing the program instructions.
6. A storage medium storing program instructions, characterized in that said program instructions, when executed, perform the method for communicating with software to be tested according to any of claims 1 to 3.
CN202210882324.7A 2022-07-26 2022-07-26 Method and device for communicating with software to be tested, equipment and storage medium Active CN114942892B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210882324.7A CN114942892B (en) 2022-07-26 2022-07-26 Method and device for communicating with software to be tested, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210882324.7A CN114942892B (en) 2022-07-26 2022-07-26 Method and device for communicating with software to be tested, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114942892A CN114942892A (en) 2022-08-26
CN114942892B true CN114942892B (en) 2022-10-28

Family

ID=82911055

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210882324.7A Active CN114942892B (en) 2022-07-26 2022-07-26 Method and device for communicating with software to be tested, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114942892B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9237465B1 (en) * 2014-07-08 2016-01-12 Mastercard International Incorporated Systems, apparatus and methods for consumer testing of an NFC-enabled mobile device
CN108307679A (en) * 2015-04-30 2018-07-20 高通股份有限公司 System and method for wirelessly communicating test automation
CN109889280A (en) * 2019-02-22 2019-06-14 信联科技(南京)有限公司 A kind of NFC device safety detecting method
CN110289890A (en) * 2019-05-15 2019-09-27 惠州Tcl移动通信有限公司 Near-field communication test method, system, mobile terminal and storage medium
CN112395894A (en) * 2019-08-16 2021-02-23 华为技术有限公司 Communication method and device based on NFC
CN114301506A (en) * 2022-01-17 2022-04-08 北京紫光青藤微***有限公司 Method and device for simulating NFC function, NFC terminal and storage medium
CN114625483A (en) * 2022-03-31 2022-06-14 中国工商银行股份有限公司 Virtual IC card, manufacturing method and device thereof, virtual IC card testing system and method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9237465B1 (en) * 2014-07-08 2016-01-12 Mastercard International Incorporated Systems, apparatus and methods for consumer testing of an NFC-enabled mobile device
CN108307679A (en) * 2015-04-30 2018-07-20 高通股份有限公司 System and method for wirelessly communicating test automation
CN109889280A (en) * 2019-02-22 2019-06-14 信联科技(南京)有限公司 A kind of NFC device safety detecting method
CN110289890A (en) * 2019-05-15 2019-09-27 惠州Tcl移动通信有限公司 Near-field communication test method, system, mobile terminal and storage medium
CN112395894A (en) * 2019-08-16 2021-02-23 华为技术有限公司 Communication method and device based on NFC
CN114301506A (en) * 2022-01-17 2022-04-08 北京紫光青藤微***有限公司 Method and device for simulating NFC function, NFC terminal and storage medium
CN114625483A (en) * 2022-03-31 2022-06-14 中国工商银行股份有限公司 Virtual IC card, manufacturing method and device thereof, virtual IC card testing system and method

Also Published As

Publication number Publication date
CN114942892A (en) 2022-08-26

Similar Documents

Publication Publication Date Title
US7689826B2 (en) Flexibly loading a tamper resistant module
US6488211B1 (en) System and method for flexibly loading in IC card
CN103458004A (en) Internet of things-based device subscription information changing method and equipment
KR20190050993A (en) Update escalation system and method
CN110289039B (en) Debugging method and device of eMMC
CN107463341A (en) Method for deleting, device and the mobile terminal of FLASH chip
CN113541741A (en) Analog card switching method and device, electronic equipment and storage medium
CN114625483A (en) Virtual IC card, manufacturing method and device thereof, virtual IC card testing system and method
CN114301506B (en) Method and device for simulating NFC function, NFC terminal and storage medium
CN110191054B (en) Route processing method and device, storage medium and electronic equipment
CN107678770B (en) Interface chip upgrading method and device, storage medium and processor
CN114942892B (en) Method and device for communicating with software to be tested, equipment and storage medium
CN108228611B (en) Document information copying method and device
CN110535962B (en) Data synchronization method, device, equipment and storage medium based on authentication equipment
CN105354704A (en) Resource processing method, apparatus and system
CN113272785B (en) Method for mounting file system, terminal equipment and storage medium
KR100734395B1 (en) method for copying installed card data at mobile phone and mobile phone thereof
CN113407386B (en) Device for simulating and testing resident certificates
CN110401934A (en) A kind of method of management equipment, management equipment and computer readable storage medium
CN105678565A (en) Information processing system and information processing method
CN103472991A (en) Method, equipment and system for adding contacts
CN103870368A (en) SAS (Serial Attached SCSI (small computer system interface)) expander testing system and method
CN115543876B (en) Method and device for verifying address decoding function, electronic equipment and medium
CN105740198B (en) Display methods when the execution verifying of electronic equipment and electronic equipment
US9807230B2 (en) Parameter writing program on communication subscriber card

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