CN107797930B - Method, system, device and readable storage medium for testing functions of smart card - Google Patents

Method, system, device and readable storage medium for testing functions of smart card Download PDF

Info

Publication number
CN107797930B
CN107797930B CN201711022405.5A CN201711022405A CN107797930B CN 107797930 B CN107797930 B CN 107797930B CN 201711022405 A CN201711022405 A CN 201711022405A CN 107797930 B CN107797930 B CN 107797930B
Authority
CN
China
Prior art keywords
tested
functional interface
scene
test
module
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
CN201711022405.5A
Other languages
Chinese (zh)
Other versions
CN107797930A (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.)
Eastcompeace Technology Co Ltd
Original Assignee
Eastcompeace 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 Eastcompeace Technology Co Ltd filed Critical Eastcompeace Technology Co Ltd
Priority to CN201711022405.5A priority Critical patent/CN107797930B/en
Publication of CN107797930A publication Critical patent/CN107797930A/en
Application granted granted Critical
Publication of CN107797930B publication Critical patent/CN107797930B/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
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/067Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components

Abstract

The invention discloses a method for testing functions of a smart card, which comprises the steps of constructing all application scenes of N functional interfaces, wherein N is a positive integer; determining a test scene of a functional interface to be tested, and inputting test data in the test scene, wherein the test scene is any application scene of the functional interface to be tested; and judging whether the test scene can output an expected return value, if so, calling the functional interface to be tested, and if not, sending alarm information so as to remind an engineer to correct in time. The invention reduces the test blind area, tests the functional interface to be tested in an all-round way, can find problems in the early stage, improves the project quality and further reduces the project development period to a certain extent. The invention also discloses a system and a device for testing the functions of the smart card and a readable storage medium, which have the beneficial effects.

Description

Method, system, device and readable storage medium for testing functions of smart card
Technical Field
The present invention relates to the field of smart cards, and in particular, to a method, system, apparatus, and readable storage medium for testing functions of a smart card.
Background
At present, with the continuous and deep development of gold card engineering construction, the smart card is widely applied in a plurality of fields, and obtains preliminary social benefit and economic benefit. In the development process of the smart card, the functions which can be realized by the smart card need to be tested in advance, and the test aiming at the functions of the smart card is generally carried out in the integrated test stage at the later stage of development. However, too many functional interfaces for joint debugging in the integrated test stage may not fully cover the test points of a certain functional interface, which may result in that the key code portion of the functional interface is not tested, and thus the key problem cannot be found.
Therefore, how to provide a solution to the above technical problem is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a method for testing functions of a smart card, which reduces test blind areas, tests a functional interface to be tested in an all-around manner, can find problems in the early stage, improves the quality of a project and further reduces the development period of the project to a certain extent; another object of the present invention is to provide a system, an apparatus and a readable storage medium for testing the functions of a smart card.
In order to solve the above technical problem, the present invention provides a method for testing functions of a smart card, comprising:
constructing all application scenes of N functional interfaces, wherein N is a positive integer;
determining a test scene of a functional interface to be tested, and inputting test data in the test scene, wherein the test scene is any application scene of the functional interface to be tested;
and judging whether the test scene can output an expected return value, if so, calling the functional interface to be tested, and if not, sending alarm information so as to remind an engineer to correct in time.
Preferably, the process of constructing all application scenarios of the N functional interfaces specifically includes:
respectively checking the parameters and the code coverage of each functional interface, and marking the parameters of each functional interface with a TAG label;
checking application service scenes of a user, and marking a TAG label on each application service scene;
and constructing all application scenes of each functional interface by arranging and combining all the TAG labels.
Preferably, after constructing all the application scenarios of the N functional interfaces and before determining the test scenario of the functional interface to be tested, the method further includes:
respectively carrying out code encapsulation on the codes of each functional interface, and then marking the TAG labels;
the process of inputting test data in the test scenario specifically includes:
and controlling the functional interface to be tested to be opened through the TAG label on the functional interface to be tested, and then inputting test data in the test scene.
In order to solve the above technical problem, the present invention further provides a system for testing functions of a smart card, comprising:
the system comprises a construction module, a display module and a control module, wherein the construction module is used for constructing all application scenes of N functional interfaces, and N is a positive integer;
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a test scene of a functional interface to be tested and inputting test data in the test scene, and the test scene is any application scene of the functional interface to be tested;
the judging module is used for judging whether the test scene can output an expected return value or not, if so, the calling module is triggered, and if not, the alarming module is triggered;
the calling module is used for calling the functional interface to be tested;
and the alarm module is used for sending alarm information.
Preferably, the construction module is specifically configured to check parameters and code coverage of each functional interface, and mark a TAG on the parameters of each functional interface;
checking application service scenes of a user, and marking a TAG label on each application service scene;
and constructing all application scenes of each functional interface by arranging and combining all the TAG labels.
Preferably, the system further comprises an isolation module, configured to perform code encapsulation on the code of each functional interface, and then print the TAG label;
the determining module is specifically configured to control the functional interface to be tested to open through the TAG on the functional interface to be tested, and then input test data in the test scenario.
In order to solve the above technical problem, the present invention further provides a device for testing functions of a smart card, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the test method as described in any one of the above when the computer program is executed.
To solve the above technical problem, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the testing method according to any one of the above items.
The invention provides a method for testing functions of a smart card, which comprises the steps of constructing all application scenes of N functional interfaces, wherein N is a positive integer; determining a test scene of a functional interface to be tested, and inputting test data in the test scene, wherein the test scene is any application scene of the functional interface to be tested; and judging whether the test scene can output an expected return value, if so, calling the functional interface to be tested, and if not, sending alarm information so as to remind an engineer to correct in time.
Therefore, in practical application, all application scenes of the functional interface are constructed in advance, the functional interface to be tested is tested through different test scenes, test blind areas are reduced, problems can be found in the early stage by adopting the scheme of the invention, the project quality is improved, and the project development cycle is further reduced to a certain extent.
The invention also provides a system, a device and a readable storage medium for testing the functions of the smart card, and has the same beneficial effects as the testing method.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed in the prior art and the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a flow chart of a method for testing smart card functionality in accordance with the present invention;
fig. 2 is a schematic structural diagram of a system for testing functions of a smart card according to the present invention.
Detailed Description
The core of the invention is to provide a method for testing the functions of the smart card, which reduces the test blind area, tests the function interface to be tested in an all-around way, can find problems in the early stage, improves the project quality and further reduces the project development period to a certain extent; the invention also provides a system, a device and a readable storage medium for testing the functions of the smart card.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of a method for testing functions of a smart card according to the present invention, including:
step 1: constructing all application scenes of N functional interfaces, wherein N is a positive integer;
specifically, each smart card is provided with N functional interfaces, the smart card realizes different functions through different functional interfaces, and the same function can be applied to different scenes. For example, the function of paying fees is realized through the smart card, and the applied scenes can be markets, hospitals, banks and the like, so in order to ensure the comprehensive coverage of testing the functional interfaces of the smart card, the scheme constructs all the scenes in which each functional interface on the smart card can be applied in advance, eliminates the testing blind areas of the functional interfaces as much as possible, and achieves the optimal testing effect.
Step 2: determining a test scene of a functional interface to be tested, and inputting test data in the test scene, wherein the test scene is any application scene of the functional interface to be tested;
and step 3: judging whether the test scene can output an expected return value, if so, entering a step 4, and if not, entering a step 5;
and 4, step 4: calling a functional interface to be tested;
and 5: and sending alarm information so as to remind an engineer to correct in time.
Specifically, the function interface to be tested is any one of function interfaces on the smart card, a test scene to be applied by the function interface to be tested is determined firstly, the test scene is any one of application scenes of the function interface to be tested, test data is input in the test scene, the general test data is set by an engineer in advance according to the characteristics of the test scene, if the test scene can output an expected return value, the function interface to be tested can be applied in the test scene, and the function interface to be tested is called at the moment; if the output return value is not in accordance with the expectation, alarm information is sent to remind an engineer that a problem possibly exists in the functional interface code to be tested. The invention calls the functional interfaces, analyzes the functional interfaces according to the test scene, and comprehensively tests each functional interface, so that problems can be found in time at the early stage of the project, and the quality of the project is improved.
The invention provides a method for testing functions of a smart card, which comprises the steps of constructing all application scenes of N functional interfaces, wherein N is a positive integer; determining a test scene of a functional interface to be tested, and inputting test data in the test scene, wherein the test scene is any application scene of the functional interface to be tested; and judging whether the test scene can output an expected return value, if so, calling the functional interface to be tested, and if not, sending alarm information so as to remind an engineer to correct in time.
Therefore, in practical application, all application scenes of the functional interface are constructed in advance, the functional interface to be tested is tested through different test scenes, test blind areas are reduced, problems can be found in the early stage by adopting the scheme of the invention, the project quality is improved, and the project development cycle is further reduced to a certain extent.
As a preferred embodiment, the process of constructing all application scenarios of N functional interfaces specifically includes:
respectively checking the parameters and the code coverage of each functional interface, and marking the parameters of each functional interface with a TAG label;
checking application service scenes of a user, and marking a TAG label on each application service scene;
and constructing all application scenes of each functional interface by arranging and combining all the TAG labels.
Specifically, an engineer checks the parameters, the code coverage and the scenes of user application services of each functional interface, marks TAGs, arranges and combines the TAGs to obtain all application scenes of the N functional interfaces, has complete coverage area, ensures that no test blind area exists in the subsequent test process, and can test all functional points of the smart card in place.
As a preferred embodiment, after constructing all application scenarios of the N functional interfaces, before determining a test scenario of the functional interface to be tested, the method further includes:
respectively carrying out code encapsulation on the codes of each functional interface, and then marking TAG labels;
the process of inputting test data in the test scenario specifically includes:
and controlling the functional interface to be tested to be opened through a TAG label on the functional interface to be tested, and then inputting test data in a test scene.
Specifically, in the process of testing the functional interfaces, in order to ensure that the functional interfaces to be tested are not influenced by other functional interfaces, the invention packages the codes of each functional interface in advance to form a code module, then TAG labels are printed, wherein the TAG labels play a role in shielding so as to independently layer each functional interface, then the TAG labels control the functional interfaces to be tested to be in an open state before the functional interfaces to be tested are tested so as to carry out subsequent functional testing, and other functional interfaces except the functional interfaces to be tested are in a closed state, so that other functional interfaces except the functional interfaces to be tested can not influence the functional interfaces to be tested, when the functional interfaces to be tested have problems, an engineer can find the position of the functional interfaces to be tested in time without debugging the codes of other functional interfaces once, thereby reducing the project development cycle.
In summary, by adopting the scheme of the invention, the test development can be more completely, timely and correctly realized on the basis of analyzing the test scene for each functional interface, so that the whole project has more correctness and efficiency.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a system for testing functions of a smart card according to the present invention, including:
the system comprises a construction module 1, a processing module and a display module, wherein the construction module 1 is used for constructing all application scenes of N functional interfaces, and N is a positive integer;
the determining module 2 is used for determining a test scene of the functional interface to be tested and inputting test data in the test scene, wherein the test scene is any application scene of the functional interface to be tested;
the judging module 3 is used for judging whether the test scene can output an expected return value or not, if so, the calling module 4 is triggered, and if not, the alarming module 5 is triggered;
the calling module 4 is used for calling the functional interface to be tested;
and the alarm module 5 is used for sending alarm information.
As a preferred embodiment, the configuration module 1 is specifically configured to check parameters and code coverage of each functional interface, and mark the parameters of each functional interface with a TAG label;
checking application service scenes of a user, and marking a TAG label on each application service scene;
and constructing all application scenes of each functional interface by arranging and combining all the TAG labels.
As a preferred embodiment, the system further comprises an isolation module, configured to perform code encapsulation on the code of each functional interface, and then print TAG labels on the codes;
the determining module 2 is specifically configured to control the functional interface to be tested to open through the TAG on the functional interface to be tested, and then input test data in a test scenario.
In order to solve the above technical problem, the present invention further provides a device for testing functions of a smart card, comprising:
a memory for storing a computer program;
a processor for implementing the steps of any of the above-described test methods when executing the computer program.
In order to solve the above technical problem, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the above test methods.
For the introduction of the system, the apparatus and the readable storage medium for testing the functions of the smart card provided by the present invention, please refer to the above embodiments, which are not repeated herein.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (4)

1. A method of testing smart card functionality, comprising:
constructing all application scenes of N functional interfaces, wherein N is a positive integer;
determining a test scene of a functional interface to be tested, and inputting test data in the test scene, wherein the test scene is any application scene of the functional interface to be tested;
judging whether the test scene can output an expected return value, if so, calling the functional interface to be tested, and if not, sending alarm information so as to remind an engineer to correct in time;
the process of constructing all application scenarios of the N functional interfaces specifically includes:
respectively checking the parameters and the code coverage of each functional interface, and marking the parameters of each functional interface with an interface TAG label;
checking application service scenes of a user, and marking a scene TAG label on each application service scene;
constructing all application scenes of each functional interface by arranging and combining all the interface TAG labels and all the scene TAG labels;
after constructing all application scenarios of the N functional interfaces and before determining a test scenario of the functional interface to be tested, the method further includes:
respectively carrying out code encapsulation on the codes of each functional interface, and then respectively printing encapsulation TAG labels;
the process of inputting test data in the test scenario specifically includes:
and controlling the functional interface to be tested to open through a packaging TAG label on the functional interface to be tested, and then inputting test data in the test scene.
2. A system for testing the functionality of a smart card, comprising:
the system comprises a construction module, a display module and a control module, wherein the construction module is used for constructing all application scenes of N functional interfaces, and N is a positive integer;
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a test scene of a functional interface to be tested and inputting test data in the test scene, and the test scene is any application scene of the functional interface to be tested;
the judging module is used for judging whether the test scene can output an expected return value or not, if so, the calling module is triggered, and if not, the alarming module is triggered;
the calling module is used for calling the functional interface to be tested;
the alarm module is used for sending alarm information;
the construction module is specifically used for respectively checking the parameters and the code coverage of each functional interface and marking the parameters of each functional interface with an interface TAG label;
checking application service scenes of a user, and marking a scene TAG label on each application service scene;
constructing all application scenes of each functional interface by arranging and combining all the interface TAG labels and all the scene TAG labels;
the system also comprises an isolation module, a TAG module and a control module, wherein the isolation module is used for respectively carrying out code packaging on the codes of each functional interface and then respectively marking a packaging TAG label;
the determining module is specifically configured to control the functional interface to be tested to open through the TAG on the functional interface to be tested, and then input test data in the test scenario.
3. An apparatus for testing functionality of a smart card, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the test method as claimed in claim 1 when executing the computer program.
4. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the testing method according to claim 1.
CN201711022405.5A 2017-10-27 2017-10-27 Method, system, device and readable storage medium for testing functions of smart card Active CN107797930B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711022405.5A CN107797930B (en) 2017-10-27 2017-10-27 Method, system, device and readable storage medium for testing functions of smart card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711022405.5A CN107797930B (en) 2017-10-27 2017-10-27 Method, system, device and readable storage medium for testing functions of smart card

Publications (2)

Publication Number Publication Date
CN107797930A CN107797930A (en) 2018-03-13
CN107797930B true CN107797930B (en) 2021-04-23

Family

ID=61548226

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711022405.5A Active CN107797930B (en) 2017-10-27 2017-10-27 Method, system, device and readable storage medium for testing functions of smart card

Country Status (1)

Country Link
CN (1) CN107797930B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109739760B (en) * 2018-12-28 2022-07-08 东信和平科技股份有限公司 Code debugging test method and device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007026139A1 (en) * 2005-08-30 2007-03-08 Ecebs Limited Improved smartcard system
CN101042736A (en) * 2006-03-24 2007-09-26 中国银联股份有限公司 Smart card and method for accessing objects in smart card
CN101126793A (en) * 2007-09-18 2008-02-20 东信和平智能卡股份有限公司 Intelligent card test system and method
CN101833498A (en) * 2009-07-31 2010-09-15 北京伟晨豪嘉科技有限责任公司 Automatic detection system of embedded type system based on testing script technique
CN103678067A (en) * 2013-12-19 2014-03-26 大唐微电子技术有限公司 Test method and device for intelligent card power failure and tested device
CN106354648A (en) * 2016-09-06 2017-01-25 深圳市广和通无线股份有限公司 python automatic test framework system and test method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007026139A1 (en) * 2005-08-30 2007-03-08 Ecebs Limited Improved smartcard system
CN101042736A (en) * 2006-03-24 2007-09-26 中国银联股份有限公司 Smart card and method for accessing objects in smart card
CN101126793A (en) * 2007-09-18 2008-02-20 东信和平智能卡股份有限公司 Intelligent card test system and method
CN101833498A (en) * 2009-07-31 2010-09-15 北京伟晨豪嘉科技有限责任公司 Automatic detection system of embedded type system based on testing script technique
CN103678067A (en) * 2013-12-19 2014-03-26 大唐微电子技术有限公司 Test method and device for intelligent card power failure and tested device
CN106354648A (en) * 2016-09-06 2017-01-25 深圳市广和通无线股份有限公司 python automatic test framework system and test method

Also Published As

Publication number Publication date
CN107797930A (en) 2018-03-13

Similar Documents

Publication Publication Date Title
CN101126793B (en) Intelligent card test system and method
CN109034209B (en) Training method and device for active risk real-time recognition model
CN107526676B (en) Cross-system test method and device
CN107329861A (en) A kind of multiplex roles method of testing and device
CN108280119A (en) Page generation method, device and user terminal
CN107133174A (en) Test case code automatically generating device and method
CN111090431B (en) Data processing method and device
CN107678937A (en) Page compatibility detection method, device, server and medium
CN109145235B (en) Method and device for analyzing webpage and electronic equipment
CN107632869B (en) Method and equipment for loading user interface of POS application
CN109308263A (en) A kind of small routine test method, device and equipment
CN110221824B (en) Method and device for generating component
CN107797930B (en) Method, system, device and readable storage medium for testing functions of smart card
CN112068911A (en) Method, device, system, equipment and medium for generating electronic form
CN110414651A (en) Debug the method and device of smart card
CN109862083B (en) Method, device and equipment for activating Internet of things equipment
CN113505895B (en) Machine learning engine service system, model training method and configuration method
CN109598602A (en) Account checking method, device, equipment and computer readable storage medium
CN110347735A (en) The data forwarding of configurationization mends processing method, device and readable storage medium storing program for executing extremely
CN109800776A (en) Material mask method, device, terminal and computer readable storage medium
CN103838575A (en) Plug-in type page customization implementation method based on EXTJS frame
CN104866875B (en) A kind of smart card remote detection method and system
CN109857450A (en) A kind of verification service orchestration method and device
CN109491622B (en) Printing method applied to transaction terminal and transaction terminal
CN110020780A (en) The method, apparatus and electronic equipment of information output

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