CN113794523B - Testing method, device and storage medium for near field communication device - Google Patents

Testing method, device and storage medium for near field communication device Download PDF

Info

Publication number
CN113794523B
CN113794523B CN202110965411.4A CN202110965411A CN113794523B CN 113794523 B CN113794523 B CN 113794523B CN 202110965411 A CN202110965411 A CN 202110965411A CN 113794523 B CN113794523 B CN 113794523B
Authority
CN
China
Prior art keywords
near field
field communication
communication equipment
target service
attribute information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110965411.4A
Other languages
Chinese (zh)
Other versions
CN113794523A (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.)
Wuxi Yuning Intelligent Technology Co ltd
Original Assignee
Wuxi Yuning Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuxi Yuning Intelligent Technology Co ltd filed Critical Wuxi Yuning Intelligent Technology Co ltd
Priority to CN202110965411.4A priority Critical patent/CN113794523B/en
Publication of CN113794523A publication Critical patent/CN113794523A/en
Application granted granted Critical
Publication of CN113794523B publication Critical patent/CN113794523B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/10Monitoring; Testing of transmitters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/20Monitoring; Testing of receivers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • H04B5/40Near-field transmission systems, e.g. inductive or capacitive transmission systems characterised by components specially adapted for near-field transmission
    • H04B5/48Transceivers
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a testing method, a testing device and a testing storage medium of near field communication equipment, wherein the method comprises the following steps: when an opening request sent by an automatic test application is received, a calling interface of a target service corresponding to a near field communication component in the near field communication equipment is obtained; sending a request for starting the near field communication component to the target service through the calling interface; when a response signal that the near field communication equipment is successfully started and fed back by the target service is received, generating a search request of the near field communication equipment and sending the search request to the target service; when a response signal that the near field communication equipment is successfully searched and fed back by the target service is received, acquiring attribute information of the near field communication equipment; and returning the attribute information to the automatic test application, so that the problem that all hardware test points on the near field communication equipment cannot be subjected to full coverage test is solved, and the reliability of the test result is improved.

Description

Testing method, device and storage medium for near field communication device
Technical Field
The present invention relates to the field of testing technologies, and in particular, to a testing method and device for near field communication devices, and a storage medium.
Background
Currently, terminals of near field communication devices can exchange data in close proximity to each other; in the related art, in the process of testing the nfc device developed by enzimupu semiconductor company through the hardware automatic test scheme developed by the joint development department, usually, after the nfc device is powered on, the power-on state of the enable pin of the nfc device is read through the IIC bus to determine whether the nfc device is normal, but with the above test scheme, a full coverage test cannot be performed on all hardware test points on the nfc device developed by enzimupu semiconductor company, which results in a reduction in reliability of a test result.
Disclosure of Invention
The embodiment of the application aims to solve the problem that all hardware test points on the near field communication equipment developed by Enzhipu semiconductor company cannot be subjected to full coverage test by providing a test method, equipment and a storage medium of the near field communication equipment.
The embodiment of the application provides a testing method of near field communication equipment, which comprises the following steps:
when an opening request sent by an automatic test application is received, a calling interface of a target service corresponding to a near field communication component in the near field communication equipment is obtained;
sending a request for starting the near field communication component to the target service through the calling interface;
when a response signal that the near field communication equipment is successfully started and fed back by the target service is received, generating a search request of the near field communication equipment and sending the search request to the target service;
when a response signal that the near field communication equipment is successfully searched and fed back by the target service is received, acquiring attribute information of the near field communication equipment;
and returning the attribute information to the automatic test application so that the automatic test application obtains a test result according to the attribute information.
In an embodiment, the step of returning the attribute information to the automatic test application so that the automatic test application obtains a test result according to the attribute information includes:
sending a request to stop searching to the target service.
In an embodiment, the step of acquiring a call interface of a target service corresponding to a near field communication component in the near field communication device when receiving a start request sent by an automatic test application includes:
and the automatic test system is in communication connection with the automatic test application through Socket.
In one embodiment, the sending the search request to a target service includes:
sending a request to the target service to search for the near field communication device through the invocation interface.
In one embodiment, the testing method of the near field communication device comprises the following steps:
sending a starting request of a near field communication component in near field communication equipment to proxy service, so that when the proxy service receives the starting request, the proxy service sequentially sends a request for starting the near field communication component and a search request for sending the near field communication equipment to a target service, and when the proxy service receives a response signal that the near field communication equipment is successfully searched and fed back by the target service, the proxy service acquires attribute information of the near field communication equipment and sends the attribute information to an automatic test application;
receiving attribute information of the near field communication equipment fed back by the proxy service;
and obtaining a test result according to the attribute information.
In an embodiment, the attribute information includes a type and a data length of the near field communication device, and the step of obtaining the test result according to the attribute information includes:
checking the type and the data length of the near field communication equipment;
and obtaining a test result of the near field communication equipment according to the verification result.
In an embodiment, the step of obtaining a test result of the near field communication device according to the verification result includes:
acquiring a preset type and a preset data length of the near field communication equipment;
and when the verification result is that the type of the near field communication equipment is the same as the preset type and the data length of the near field communication equipment is equal to the preset data length, the test result is that the near field communication equipment is normal.
In addition, to achieve the above object, the present invention also provides a test apparatus, including: the testing method comprises a memory, a processor and a testing program of the near field communication equipment, wherein the testing program of the near field communication equipment is stored on the memory and can run on the processor, and the steps of the testing method of the near field communication equipment are realized when the testing program of the near field communication equipment is executed by the processor.
In addition, to achieve the above object, the present invention also provides a storage medium having stored thereon a test program of a near field communication device, which when executed by a processor, implements the steps of the test method of the near field communication device described above.
According to the technical scheme, the proxy service is added between an automatic test application and a target service, when a starting request sent by the automatic test application is received, a request for starting a near field communication component and a request for searching the near field communication equipment are sent to the target service through a calling interface of the target service corresponding to the near field communication component in the near field communication equipment by the proxy service, and when a response signal fed back by the target service and indicating that the near field communication equipment is successfully searched is received, the setting of the hardware state of the near field communication equipment is completed; after the hardware state of the near field communication equipment is set, the attribute information of the near field communication equipment is obtained, the attribute information is returned to the automatic test application, the attribute information is analyzed through the automatic test application to obtain a test result, the problem that all hardware test points on the near field communication equipment developed by Enzhipu semiconductor company cannot be subjected to full coverage test is solved, and the reliability of the test result is improved.
Drawings
FIG. 1 is a schematic diagram of a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a timing chart of a testing method of the near field communication device according to a first embodiment of the present invention;
fig. 3 is a schematic flowchart of a fifth embodiment of a testing method of a near field communication device according to the present invention;
fig. 4 is a flowchart illustrating a testing method of a near field communication device according to a sixth embodiment of the present invention;
fig. 5 is a flowchart illustrating a testing method of a near field communication device according to a seventh embodiment of the present invention;
the objects, features, and advantages of the present invention will be further explained with reference to the accompanying drawings, which are an illustration of one embodiment, and not an entirety of the invention.
Detailed Description
For a better understanding of the above technical solutions, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As shown in fig. 1, fig. 1 is a schematic structural diagram of a hardware operating environment according to an embodiment of the present invention.
It should be noted that fig. 1 is a schematic structural diagram of a hardware operating environment of the near field communication device.
As shown in fig. 1, the near field communication device may include: a processor 1001, such as a CPU, a memory 1005, a user interface 1003, a network interface 1004, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
It will be appreciated by a person skilled in the art that the near field communication device structure shown in fig. 1 does not constitute a limitation of the near field communication device and may comprise more or less components than shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein a test program of an operating system, a network communication module, a user interface module, and a near field communication device. Among these, the operating system is a program that manages and controls the hardware and software resources of the near field communication device, the test program of the near field communication device, and the execution of other software or programs.
In the near field communication apparatus shown in fig. 1, the user interface 1003 is mainly used for connecting a terminal, and performing data communication with the terminal; the network interface 1004 is mainly used for the background server and performs data communication with the background server; the processor 1001 may be used to invoke a test program of the near field communication device stored in the memory 1005.
In this embodiment, the near field communication device includes: a memory 1005, a processor 1001 and a test program of a near field communication device stored on said memory and executable on said processor, wherein:
when the processor 1001 calls the test program of the near field communication device stored in the memory 1005, the following operations are performed:
when an opening request sent by an automatic test application is received, a calling interface of a target service corresponding to a near field communication component in the near field communication equipment is obtained;
sending a request for starting the near field communication component to the target service through the calling interface;
when a response signal that the near field communication equipment is successfully started and fed back by the target service is received, generating a search request of the near field communication equipment and sending the search request to the target service;
when a response signal that the near field communication equipment is successfully searched and fed back by the target service is received, acquiring attribute information of the near field communication equipment;
and returning the attribute information to the automatic test application so that the automatic test application obtains a test result according to the attribute information.
When the processor 1001 calls the test program of the near field communication device stored in the memory 1005, the following operations are also performed:
sending a request to stop searching to the target service.
When the processor 1001 calls the test program of the near field communication device stored in the memory 1005, the following operations are also performed:
and the automatic test system is in communication connection with the automatic test application through Socket.
When the processor 1001 calls the test program of the near field communication device stored in the memory 1005, the following operations are also performed:
sending a request to the target service to search for the near field communication device through the invocation interface.
When the processor 1001 calls the test program of the near field communication device stored in the memory 1005, the following operations are also performed:
sending a starting request of a near field communication component in near field communication equipment to proxy service, so that when the proxy service receives the starting request, the proxy service sequentially sends a request for starting the near field communication component and a search request for sending the near field communication equipment to a target service, and when the proxy service receives a response signal that the near field communication equipment is successfully searched and fed back by the target service, the proxy service acquires attribute information of the near field communication equipment and sends the attribute information to an automatic test application;
receiving attribute information of the near field communication equipment fed back by the proxy service;
and obtaining a test result according to the attribute information.
When the processor 1001 calls the test program of the near field communication device stored in the memory 1005, the following operations are also performed:
checking the type and the data length of the near field communication equipment;
and obtaining a test result of the near field communication equipment according to the verification result.
When the processor 1001 calls the test program of the near field communication device stored in the memory 1005, the following operations are also performed:
acquiring a preset type and a preset data length of the near field communication equipment;
and when the verification result is that the type of the near field communication equipment is the same as the preset type and the data length of the near field communication equipment is equal to the preset data length, the test result is that the near field communication equipment is normal.
Embodiments of the present invention provide embodiments of a method for testing a near field communication device, it should be noted that although a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in an order different from that here.
As shown in fig. 2, in a first embodiment of the present application, a testing method of a near field communication device of the present application includes the following steps:
step S110, when receiving a starting request sent by an automatic test application, obtaining a calling interface of a target service corresponding to a near field communication component in the near field communication equipment;
step S120, a request for starting the near field communication component is sent to the target service through the calling interface;
step S130, when a response signal that the near field communication equipment is successfully started and fed back by the target service is received, generating a search request of the near field communication equipment and sending the search request to the target service;
step S140, when a response signal that the near field communication device is successfully searched and fed back by the target service is received, acquiring attribute information of the near field communication device;
and step S150, returning the attribute information to the automatic test application so that the automatic test application obtains a test result according to the attribute information.
In this embodiment, in order to solve the technical problem that in the prior art, only the enablement of a chip of a near field communication device can be tested, and all hardware test points on the near field communication device developed by enginepu semiconductor company cannot be subjected to full coverage testing, the present application designs a testing method of a near field communication device, the testing method of a near field communication device sets an agent service on the basis of an automatic testing application developed by existing co-distributed departments and a call interface of a target service corresponding to a near field communication component in the near field communication device provided by enginepu semiconductor company, and through interaction among the automatic testing application, the agent service, the call interface and the target service, full coverage testing of all hardware test points on the near field communication device is realized, and reliability of a test result is improved.
In this embodiment, the NFC device refers to a device using NFC technology, such as a mobile phone, and the devices using NFC technology can exchange data when they are close to each other, and is integrated and evolved from a contactless radio frequency identification RFID and an interconnection and interworking technology, and by integrating functions of an inductive card reader, an inductive card and a point-to-point communication on a single chip, the present application aims to implement a full coverage test on all hardware test points on the NFC device developed by enzimum semiconductor company, and the following discussion is made on a test process of the NFC device:
firstly, an automatic test application generates a starting request of near field communication equipment and sends the starting request to an agent service; then, after receiving a starting request sent by the automatic test application, the proxy service acquires a calling interface of a target service corresponding to a near field communication component in the near field communication equipment, and sends the starting request to the target service through the calling interface to request for starting the near field communication component; then, when the target service receives an opening request, the near field communication component is opened, a response signal which is successfully opened is generated at the same time, and the response signal which is successfully opened is fed back to the proxy service through a calling interface; then, after receiving a response signal which is sent by the target service and is successfully started, the proxy service generates a search request, and sends the search request to the target service through a calling interface again; then, when the target service receives a search request, starting a search mode to search the near field communication equipment, and after the search is successful, generating a response signal of the successful search and sending the response signal of the successful search to the proxy service; meanwhile, after the target service sends a response signal of successful search to the proxy service, the target service waits for the near field communication equipment to approach, when the near field communication equipment approaches, namely the target service detects an approach mark of the near field communication equipment, the attribute information of the approaching near field communication equipment is obtained, and the attribute information is sent to the proxy service through the calling interface; then, when the proxy service receives the attribute information sent by the target service, the attribute information is sent to the automatic test application through the Socket communication connection relation; and finally, verifying the attribute information by adopting the automatic test application to judge whether the near field communication equipment is normal.
In this embodiment, specifically, as shown in fig. 2, fig. 2 is a timing diagram of a second embodiment of the present application, and at the proxy service side in fig. 2, the application of the proxy service includes: socket communication connection is pre-established with the automatic test application; receiving an opening request sent by an automatic test application through a Socket communication connection relation, and sending the opening request to a target service; after receiving a response signal of successful starting fed back by the target service, generating a search request of the near field communication equipment and sending the search request to the target service; after receiving a near field communication equipment search success response signal fed back by a target service, acquiring attribute information of the near field communication equipment; sending the attribute information to an automatic test application for verification through a Socket communication connection relation; in the process, the proxy service and the target service do not directly communicate with each other, and the proxy service and the target service communicate with each other through the calling interface.
In fig. 2, the invoking interface is an invoking interface of a target service corresponding to a near field communication component in the near field communication device, and an application of the invoking interface includes: the proxy service sends a request for starting the near field communication component to the target service through the calling interface; the target service sends a response signal of successful starting of the near field communication component to the proxy service through the calling interface; the proxy service sends a request for searching near field communication equipment to the target service through the calling interface; the target service sends a successful search response signal of the near field communication equipment to the proxy service through the calling interface; in the target service side in fig. 2, the target service side is in direct contact with the nfc device, and the target service side is configured to detect whether the nfc device approaches, acquire attribute information of the nfc device when the nfc device approaches, and send the attribute information of the nfc device to the proxy service through the call interface.
According to the technical scheme, the proxy service is added between the automatic test application and the target service, when the proxy service receives a starting request sent by the automatic test application, the proxy service sends a request for starting the near field communication component and a request for searching the near field communication device to the target service through a calling interface of the target service corresponding to the near field communication component in the near field communication device, and when a response signal of successful searching of the near field communication device fed back by the target service is received, the setting of the hardware state of the near field communication device is completed; after the hardware state of the near field communication equipment is set, the attribute information of the near field communication equipment is obtained, the attribute information is returned to the automatic test application, the attribute information is analyzed through the automatic test application to obtain a test result, the problem that all hardware test points on the near field communication equipment developed by Enzhipu semiconductor company cannot be subjected to full coverage test is solved, and the reliability of the test result is improved.
The following embodiment is a second embodiment of the present application, and after step S150 based on the first embodiment, the second embodiment of the present application includes the following steps:
step S210, sending a request for stopping searching to the target service.
In this embodiment, after the proxy service acquires the attribute information of the near field communication device, sends the attribute information to the automatic test application, the proxy service will send a request to stop searching to the target service by invoking the interface, the request to stop searching being a request to stop searching for the near field communication device, the target service stops searching for the near field communication device after receiving the request to stop searching sent by the proxy service, meanwhile, the target service generates a successful response signal for stopping the search request, and sends the successful response signal for stopping the search request to the proxy service through the calling interface, the proxy service then sends a successful response signal of the search stopping request to the automatic test application through the Socket communication connection relation, to alert the automatic test application that the search for near field communication devices has ceased, thereby reducing the consumption of resources by turning off the search request for near field communication devices.
According to the technical scheme, the search stopping request is sent to the target service after the attribute information of the near field communication device is acquired, and the search service is closed to reduce the consumption of resources.
The following embodiment is a third embodiment of the present application, and before step S110 based on the first embodiment, the third embodiment of the present application includes:
and S310, performing communication connection with the automatic test application through Socket.
In this embodiment, before receiving an opening request sent by an automatic test application, a communication connection relationship between the automatic test application and an agent service needs to be established, where the automatic test application and the agent service are in communication connection through a Socket, specifically, the agent service creates a Socket, and an automatic test program binds the Socket, so as to establish a connection between the automatic test application and the agent service; and establishing a Socket communication connection relation between the automatic test program and the proxy service, and enabling the automatic test application to send an opening request to the proxy service through the communication connection relation or enabling the automatic test application to receive the attribute information of the near field communication equipment sent by the proxy service through the communication connection relation.
According to the technical scheme, the communication and data interaction between the automatic test application and the agent service is realized by adopting a technical means of communication connection with the automatic test application through Socket.
The following embodiment is a fourth embodiment of the present application, and based on the first embodiment, step S130, the fourth embodiment of the present application includes:
step S131, sending a request for searching for the near field communication device to the target service through the call interface.
In this embodiment, the proxy service and the target service are not in direct communication, but the communication between the proxy service and the target service is realized through a calling interface, where the calling interface is a calling interface of the target service corresponding to a near field communication component in the near field communication device, and the proxy service sends a request for starting the near field communication component to the target service through the calling interface; the target service sends a response signal of successful starting of the near field communication component to the proxy service through the calling interface; the proxy service sends a request for searching near field communication equipment to the target service through the calling interface; and the target service sends a search success response signal of the near field communication equipment to the proxy service through the calling interface.
According to the technical scheme, the calling interface of the target service corresponding to the near field communication component in the near field communication equipment is adopted, and the request for searching the near field communication equipment is sent to the target service through the calling interface.
As shown in fig. 3, fig. 3 is a fifth embodiment of the present application, which includes:
step S410, sending a starting request of a near field communication component in near field communication equipment to an agent service, so that the agent service sequentially sends a request for starting the near field communication component and a search request for sending the near field communication equipment to a target service when receiving the starting request, and the agent service obtains attribute information of the near field communication equipment and sends the attribute information to an automatic test application when receiving a response signal that the near field communication equipment is successfully searched and fed back by the target service;
step S420, receiving attribute information of the near field communication device fed back by the proxy service;
and step S430, obtaining a test result according to the attribute information.
In this embodiment, the scheme adopted in this embodiment is applied to an automatic test application, where the automatic test application is connected with a target service through a proxy service, obtains attribute information of a near field communication device detected by the target service through the proxy service, and then feeds back the attribute information to the automatic test application through the proxy service, specifically, the automatic test application sends a start request of a near field communication component in the near field communication device to the proxy service, when the proxy service receives the start request, the proxy service obtains a call interface of the target service corresponding to the near field communication component in the near field communication device, sends a request for starting the near field communication component to the target service through the call interface, and when a response signal that the near field communication device is successfully started and fed back by the target service is received, generating a search request of the near field communication equipment, sending the search request to a target service, acquiring attribute information of the near field communication equipment when receiving a response signal of successful search of the near field communication equipment fed back by the target service, and returning the attribute information to the automatic test application.
In this embodiment, after receiving attribute information of the near field communication device fed back by the proxy service, the automatic test application verifies the attribute information, obtains a test result of the near field communication device according to the attribute information, and determines whether the near field communication device is normal or abnormal according to the test result.
According to the technical scheme, the near field communication equipment is tested by adopting the technical means of sending the starting request of the near field communication component in the near field communication equipment to the proxy service, receiving the attribute information of the near field communication equipment fed back by the proxy service and obtaining the test result according to the attribute information.
As shown in fig. 4, fig. 4 is a sixth embodiment of the present application, and based on the step S430 of the fifth embodiment, the sixth embodiment of the present application includes:
step S431, verifying the type and data length of the nfc device;
and step S432, obtaining a test result of the near field communication equipment according to the verification result.
In this embodiment, the attribute information includes a type of the nfc device and an obtained data length of the nfc device, and in general, when data of the nfc device is obtained, it may be determined that the nfc device is normal; however, since the obtained data of the nfc device may have other interference signals, so that the test result of the nfc device cannot be accurately known, in order to improve the accuracy of the test result, the type of the nfc device and the obtained data length of the nfc device may be obtained, the type and the data length of the nfc device may be verified, and the test result of the nfc device may be obtained according to the verification result, so that the test result is more accurate; the test results include two situations, normal or abnormal; in other embodiments, in order to make the test result more accurate, a plurality of test scenarios may be set, and a corresponding test result may be provided in each test scenario.
According to the technical scheme, the accuracy and the reliability of the test result are improved by the technical means of verifying the type and the data length of the near field communication equipment and obtaining the test result of the near field communication equipment according to the verification result.
As shown in fig. 5, fig. 5 is a seventh embodiment of the present application, and based on the sixth embodiment step S432, the seventh embodiment of the present application includes:
step S4321, acquiring a preset type and a preset data length of the near field communication equipment;
step S4322, when the verification result indicates that the type of the nfc device is the same as the preset type and the data length of the nfc device is the same as the preset data length, determining that the nfc device is normal according to the test result.
In this embodiment, the process of obtaining the test result of the nfc device according to the verification result substantially includes: each piece of near field communication equipment is preset with a corresponding type and a corresponding data length, the type of the actually obtained near field communication equipment is compared with the preset type of the near field communication equipment to realize verification by obtaining the preset type and the preset data length of the near field communication equipment, or the data length of the actually obtained near field communication equipment is compared with the preset data length of the near field communication equipment to realize verification, and whether the near field communication equipment is normal or not is judged according to a verification result; specifically, when the verification result indicates that the type of the near field communication device is the same as the preset type and the data length of the near field communication device is equal to the preset data length, the test result indicates that the near field communication device is normal; and when the verification result is that the type of the near field communication equipment is different from the preset type or the data length of the near field communication equipment is not equal to the preset data length, determining that the near field communication equipment is abnormal according to the test result.
According to the technical scheme, the method and the device have the advantages that the preset type and the preset data length of the near field communication equipment are obtained, the actually obtained type and the actually obtained data length of the near field communication equipment are compared with the preset type and the preset data length respectively to check, and the test result of the near field communication equipment is judged according to the check result, so that the reliability of the test result of the near field communication equipment is improved.
Based on the same inventive concept, an embodiment of the present application further provides a storage medium, where the storage medium stores a test program of a near field communication device, and the test program of the near field communication device is executed by a processor to implement the above steps of the test of the near field communication device, and can achieve the same technical effect, and is not described herein again to avoid repetition.
Since the storage medium provided in the embodiments of the present application is a storage medium used for implementing the method in the embodiments of the present application, based on the method described in the embodiments of the present application, a person skilled in the art can understand a specific structure and a modification of the storage medium, and thus details are not described here. Any storage medium used in the methods of the embodiments of the present application is intended to be within the scope of the present application.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (9)

1. A testing method of a near field communication device is applied to proxy service, and the testing method of the near field communication device comprises the following steps:
when a starting request sent by an automatic test application is received, acquiring a calling interface of a target service corresponding to a near field communication component in the near field communication equipment;
sending a request for starting the near field communication component to the target service through the calling interface;
when a response signal that the near field communication equipment is successfully started and fed back by the target service is received, generating a search request of the near field communication equipment and sending the search request to the target service;
when a response signal that the near field communication equipment is successfully searched and fed back by the target service is received, acquiring attribute information of the near field communication equipment; after the target service sends a response signal that the near field communication equipment is successfully searched to the proxy service and when the near field communication equipment approaching mark is detected, acquiring the attribute information of the approaching near field communication equipment and sending the attribute information of the near field communication equipment to the proxy service through the calling interface;
and returning the attribute information to the automatic test application so that the automatic test application obtains a test result according to the attribute information.
2. The method for testing a near field communication device of claim 1, wherein the step of returning the attribute information to the automatic test application to cause the automatic test application to obtain a test result based on the attribute information is followed by:
sending a request to stop searching to the target service.
3. The method for testing near field communication device according to claim 1, wherein the step of obtaining the call interface of the target service corresponding to the near field communication component in the near field communication device when receiving the start request sent by the automatic test application comprises:
and the automatic test system is in communication connection with the automatic test application through Socket.
4. The method for testing a near field communication device of claim 1, wherein said sending the search request to a target service comprises:
sending a request for searching for the near field communication device to the target service through the invocation interface.
5. A testing method of a near field communication device is applied to automatic testing application, and the testing method of the near field communication device comprises the following steps:
sending a starting request of a near field communication component in near field communication equipment to proxy service, so that when the proxy service receives the starting request, the proxy service sequentially sends a request for starting the near field communication component and a search request for sending the near field communication equipment to a target service, and when the proxy service receives a response signal that the near field communication equipment is successfully searched and fed back by the target service, the proxy service acquires attribute information of the near field communication equipment and sends the attribute information of the near field communication equipment to an automatic test application; after the target service sends a response signal indicating that the near field communication equipment is successfully searched to the proxy service and when the near field communication equipment approaches the mark, acquiring the attribute information of the approaching near field communication equipment and sending the attribute information of the near field communication equipment to the proxy service through the calling interface;
receiving attribute information of the near field communication equipment fed back by the proxy service;
and obtaining a test result according to the attribute information.
6. The method for testing a near field communication device according to claim 5, wherein the attribute information includes a type of the near field communication device and a data length, and the step of obtaining the test result according to the attribute information includes:
checking the type and the data length of the near field communication equipment;
and obtaining a test result of the near field communication equipment according to the verification result.
7. Method for testing a near field communication device according to claim 6, characterized in that the step of deriving a test result of the near field communication device on the basis of the verification result comprises:
acquiring a preset type and a preset data length of the near field communication equipment;
and when the verification result is that the type of the near field communication equipment is the same as the preset type and the data length of the near field communication equipment is equal to the preset data length, the test result is that the near field communication equipment is normal.
8. A test apparatus, characterized in that the test apparatus comprises: memory, a processor and a test program of a near field communication device stored on the memory and executable on the processor, the test program of a near field communication device realizing the steps of the method of testing a near field communication device of any of claims 1-7 when executed by the processor.
9. Storage medium, characterized in that a test program of a near field communication device is stored thereon, which test program, when executed by a processor, implements the steps of the test method of a near field communication device of any of claims 1-7.
CN202110965411.4A 2021-08-20 2021-08-20 Testing method, device and storage medium for near field communication device Active CN113794523B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110965411.4A CN113794523B (en) 2021-08-20 2021-08-20 Testing method, device and storage medium for near field communication device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110965411.4A CN113794523B (en) 2021-08-20 2021-08-20 Testing method, device and storage medium for near field communication device

Publications (2)

Publication Number Publication Date
CN113794523A CN113794523A (en) 2021-12-14
CN113794523B true CN113794523B (en) 2022-06-03

Family

ID=78876198

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110965411.4A Active CN113794523B (en) 2021-08-20 2021-08-20 Testing method, device and storage medium for near field communication device

Country Status (1)

Country Link
CN (1) CN113794523B (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9071989B2 (en) * 2012-02-01 2015-06-30 Dynatrace Llc System and methods that enable automated testing of mobile devices at a remote monitor site
US9980205B2 (en) * 2015-11-18 2018-05-22 At&T Mobility Ii Llc Locating physical assets via near field communication nodes
CA3018612A1 (en) * 2016-04-14 2017-10-19 Cubic Corporation Auto-diagnostic nfc reader
CN107491706B (en) * 2017-08-16 2020-11-13 惠州Tcl移动通信有限公司 NFC pressure testing method and system based on mobile terminal and storage device
CN111427766B (en) * 2020-02-20 2023-08-18 北京齐尔布莱特科技有限公司 Request processing method and device and proxy server
CN113138886A (en) * 2021-04-23 2021-07-20 摩拜(北京)信息技术有限公司 Method and device for testing embedded equipment and testing equipment
CN113238935A (en) * 2021-05-10 2021-08-10 深圳前海微众银行股份有限公司 Application testing method, system, device, medium, and computer program product

Also Published As

Publication number Publication date
CN113794523A (en) 2021-12-14

Similar Documents

Publication Publication Date Title
JP5668051B2 (en) Method for pre-selecting at least one application in a mobile communication device including an NFC system
US8750900B2 (en) Facilitating use of a device based on short-range wireless technology
CN111860020A (en) Service processing method, device and equipment
CN113672441B (en) Method and device for testing intelligent equipment
CN112039896B (en) Data processing method, equipment, server and storage medium
CN104244289A (en) Method and device for identifying pseudo base station
CN110267215B (en) Data detection method, equipment and storage medium
CN105184337A (en) Intelligent card application detection method and system for NFC equipment
CN108009096B (en) Test method and terminal
CN113794523B (en) Testing method, device and storage medium for near field communication device
CN109542775B (en) Test script generation and execution method and device
CN115314427B (en) Protocol testing method, electronic equipment and chip system
WO2020192520A1 (en) Terminal testing method and device, and terminal testing system
WO2021155785A1 (en) Payment method, terminal, server and system
CN107515821B (en) Control testing method and device
CN115080418A (en) Automatic testing method and device, electronic equipment and computer readable storage medium
CN110221958B (en) Application testing method, device, computing equipment and computer readable storage medium
CN111949510B (en) Test processing method, device, electronic equipment and readable storage medium
CN110851254A (en) Equipment production method, device, server and storage medium based on microservice
CN111597101A (en) SDK access state detection method, computer device and computer readable storage medium
CN114564413B (en) Synchronous equipment testing method and device
CN112866938B (en) Method and device for opening application program by using wireless device, intelligent device and storage medium
CN112488856B (en) Information classification method, equipment, electronic equipment and storage medium
CN110347960B (en) Data transfer processing method, device, equipment and storage medium
WO2023050900A1 (en) Data processing method and system, and terminal and computer-readable storage medium

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