[go: up one dir, main page]

CN105912463B - Smart card protocol Auto-Test System and method based on MP300 equipment - Google Patents

Smart card protocol Auto-Test System and method based on MP300 equipment Download PDF

Info

Publication number
CN105912463B
CN105912463B CN201610206730.6A CN201610206730A CN105912463B CN 105912463 B CN105912463 B CN 105912463B CN 201610206730 A CN201610206730 A CN 201610206730A CN 105912463 B CN105912463 B CN 105912463B
Authority
CN
China
Prior art keywords
order
test
link block
test lead
equipment
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
CN201610206730.6A
Other languages
Chinese (zh)
Other versions
CN105912463A (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 CN201610206730.6A priority Critical patent/CN105912463B/en
Publication of CN105912463A publication Critical patent/CN105912463A/en
Application granted granted Critical
Publication of CN105912463B publication Critical patent/CN105912463B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

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)
  • Debugging And Monitoring (AREA)

Abstract

The present invention provides a kind of smart card protocol Auto-Test System and method based on MP300 equipment, the method includes, testing tool calling test lead software is supplied to the api interface of user, scripting language's test script is used in the api interface by user, after the completion of user writes, the test script write in api interface is sent to test software by testing tool;Test lead software sends order to MP300 link block, and MP300 link block executes the order by operating MP300 equipment, and will return to value information and send test lead software to, and test lead software will return to value information again and return to its testing tool of calling.Present invention test is accurate, convenient and efficient.

Description

Smart card protocol Auto-Test System and method based on MP300 equipment
Technical field
The invention belongs to smart card the field of test technology, are related to the Auto-Test System and method of a kind of smart card protocol, More particularly to a kind of smart card protocol Auto-Test System and method based on MP300 equipment.
Background technique
The fast development of smart card it is deep change people's lives, it is convenient to bring for people's lives.Smart card After fabrication is complete, before investment application, it is necessary to test it.MICROPROSS company is generally used to provide The EMV series of tests tool operation MP300 equipment that MPManager tool or Integri company provide, surveys card Examination.Although MPManager can establish the testing engineering of user oneself, but many test results therein require manually to sentence Break, such as whether the range of waiting time WT (waiting time) meets the requirements.And since MPManager does not give outward User provides API (Application Programming Interface), so for can only be in MPManager tool Test script is run, in addition, the test script function for the user-defined format that MPManager tool provides is simple, is unable to satisfy use The demand of family multiple personal.For example, if operation one will be by relative complex some operations such as load CAP packet, authentications Test, MPManager tool are difficult to realize.Although EMV series of tests tool is in contrast, although it has accomplished full-automatic survey Examination, but it conceals test process, only provides test result, and also do not provide a user api interface, user cannot be allowed arbitrarily to exist Oneself think that the place of test carries out oneself desired test.Therefore, in the field of test technology of smart card, urgent need invents one kind Not only it can satisfy users ' individualized requirement, but also the test macro and method of test automation efficiency can be improved.
Summary of the invention
A kind of smart card protocol automatic test approach based on MP300 equipment, the method includes S1: testing tool tune It is supplied to the api interface of user with test lead software, uses scripting language's test script in the api interface by user, uses After the completion of family is write, the test script write in api interface is sent to test software by testing tool; S2: test lead software sends order to MP300 link block, and MP300 link block executes the life by operating MP300 equipment It enables, and value information will be returned and send test lead software to, test lead software will return to value information again and return to its test of calling Tool.Step S1 further includes that the test lead software includes being realized with com component method, is provided a user using com component Api interface, the scripting language call directly the api interface of com component offer.Wherein, step S2 further includes test lead software Order is converted into custom data format, and MP300 link block, MP300 connection mould are sent to by Socket Block calls the library function of MICROPROSS company offer to execute the life by device numbering and order number in the order It enables, return value information is converted into custom data format and passed through by MP300 link block after calling library function Socket sends test lead software to.Wherein custom data includes command information and returns to value information, and customized Data format in command information format and return value information format difference it is as follows: the information format of order are as follows: device numbering+ Order number+order data;The information format of return value are as follows: device numbering+order number+response data, wherein device numbering With a byte representation, the device object for executing this operation is represented, order one byte representation of number represents the order of execution, Device numbering and order number are all that user is customized, and each device numbering represents a kind of equipment, and each order number is then Represent an instruction of manipulation MP300 equipment.A Socket service device built in MP300 link block is opening MP300 connection Socket service is opened simultaneously when module, test lead is then a Socket client, Socket service device and Socket Client carries out data transmission by the self-defining data format, to realize that test lead passes through MP300 link block and MP300 Equipment interacts.
A kind of smart card protocol Auto-Test System based on MP300 equipment, the system comprises, MP300 equipment, test End, MP300 link block;Test lead includes interface unit, and the API that testing tool calls test lead software to be supplied to user connects Mouthful, scripting language's test script is used in the api interface by user, after the completion of user writes, testing tool will connect in API The test script write in mouthful is sent to test software as an order;MP300 link block includes communication unit and holds Row unit, test lead software communication unit send order to MP300 link block, and MP300 link block passes through execution unit Operation MP300 equipment executes the order, and sends return value information communication unit to test lead software, and test lead software again will It returns to value information and returns to the testing tool for calling it.The interface unit includes that test lead software includes using com component method It realizes, provides component using the interface that com component provides a user api interface, the scripting language calls directly com component and mentions The invocation component of the api interface of confession.The communication unit further includes that order is converted into the customized number of user by test lead software According to the transition components of format, and send by Socket the transfer assembly of MP300 link block to, MP300 link block passes through Device numbering and order in the order are numbered, and the library function for calling MICROPROSS company to provide executes the tune of the order With component, return value information is converted into custom data format and passed through by MP300 link block after calling library function Socket sends the interactive component of test lead software to.Wherein, the custom data in transition components includes order letter Breath and value information is returned to, and command information format in customized data format and return value information format difference are as follows: life The information format of order are as follows: device numbering+order number+order data;The information format of return value are as follows: device numbering+order is compiled Number+response data, wherein one byte representation of device numbering represents the device object for executing this operation, and order is numbered with one Byte representation represents the order of execution, and device numbering and order number are all that user is customized, and each device numbering represents one Kind equipment, and each order number then represents an instruction of manipulation MP300 equipment.MP300 connection mould further includes built-in one A Socket service device opens Socket service simultaneously when opening MP300 link block, and test lead then includes one Socket client, Socket service device and Socket client carry out data transmission by the self-defining data format, with Realize the interactive component that test lead is interacted by MP300 link block and MP300 equipment.
Intelligent card test system and method for the invention, by the link block connecting test end MP300 and MP300 equipment, Providing for user can need personalization to write the api interface of test script according to it, and be called directly using Java Library function in MPmanager operates MP300 equipment, realizes automation protocol test, saves test labor cost, improves Testing efficiency, meets the individual demand of user, realizes the monitoring to intelligent cards test overall process, and can be with Meaning selection test content, flexibility are very high.
Figure of description
Fig. 1: the principle assumption diagram of intelligent card test system of the present invention.
Specific embodiment
Presently in connection with Figure of description and specific embodiment during the present invention is further explained the test macro of smart card and Method.As shown in Figure 1, smart card protocol Auto-Test System of the invention mainly includes MP300 equipment, and test lead, MP300 Link block.MP300 link block is for operating MP300 equipment and the MP300 link block for communicating with test lead.Its Middle MP300 link block calls the library function carried in MP300, is directly carried out with MP300 equipment using the library function of the calling In addition communication, new library function is write without user.In addition, the communication of MP300 link block and test lead includes being counted According to the assignment with order.
MP300 link block is the graphic interface made of RCP (the Rich Client Platform) method of Java Unit.MICROPROSS company provides a set of and matched library function of MP300 equipment, and MP300 link block should by calling Library function can manipulate MP300 equipment.Since whether MPManager or EMV series of tests tool is all to call This set of library function interface realizes test, and therefore, MP300 link block can be equally used for the behaviour of EMV series of tests tool In control.In addition, due to the operating unit be by using JNA (Java Native Access) the method call library function, Then it realizes to allow and MP300 equipment is directly manipulated using Java.
The selection of MP300 link block is communicated using Socket mode with test lead.One built in MP300 link block Socket service device opens Socket service simultaneously when opening MP300 link block.Test lead is then a Socket Client.Socket service device carries out data transmission by following customized a set of data format with Socket client, with Realize the purpose that test lead is interacted by MP300 link block and MP300 equipment.
Wherein in one embodiment, customized data include order data and return value information data, and customized Data format in order information format and return value information format difference it is as follows:
The information format of order are as follows: device numbering+order number+order data;
The information format of return value are as follows: device numbering+order number+response data;
Wherein, one byte representation of device numbering represents the device object for executing this operation.Order one byte of number It indicates, represents the order of execution.Device numbering and order number are all that user is customized.Each device numbering represents one kind and sets It is standby, and each order number then represents an instruction of manipulation MP300 equipment.In one embodiment, MP300 equipment includes MP300TC3, then the order number that the device number for defining MP300TC3 is 01, SendAPDU is 0A, then sends one to card APDU instructs E0710000, the information format of this order are as follows: 010A04E0710000;If its return value is 9000, return value Information format are as follows: 010A029000.
Test method of the invention includes providing a user API by test lead software, test lead software is in user command Data carried out one parsing and encapsulation, user command is sent to MP300 link block, is utilized by MP300 link block The operating unit manipulates MP300 equipment;Test lead receives the return value from MP300 link block using the communication unit Data return to user after encapsulation.
Specifically, the test method includes, testing tool calls test lead software to be supplied to the api interface of user, by with Scripting language's test script is used at family in the api interface, and after the completion of user writes, testing tool will be compiled in api interface The test script finished writing is sent to test software as an order, and order is converted into the customized number of user by test lead software MP300 link block, device numbering and order of the MP300 link block by order are sent to according to format, and by Socket Number, the library function for calling MICROPROSS company to provide execute order;Likewise, after MP300 link block calls library function Value information will be returned to be converted into custom data format and send test lead software, test lead software to by Socket Value information will be returned again returns to its testing tool of calling.Wherein the test lead software of test method is real with com component method It is existing, API is provided a user using com component.Test script generally all uses scripting language, and scripting language can be adjusted directly The API provided with com component.Testing tool writes the API that test script calls test software to provide and carries out automation protocol survey It tries.
Test macro and method of the invention provides API to outside to user, calls API to reach by test script Control the purpose of MP300 equipment.Therefore, as long as the API that the test script of testing tool can call com component to provide Carry out protocol test.In addition, test macro and method of the invention also achieves automatic test: relatively past protocol test Means, test macro of the invention and method are more flexible, more simply.Protocol test script can voluntarily be write by user, this is just It gives user very big operating space, what packet is loaded, what application run, how much is parameter setting, and user can be clever according to need Setting living.After having write test script, as long as operation test script completes protocol test, and com component is tested The inspection of result may be implemented in the API of offer, to reduce artificial the step of comparing.In addition necessary artificial nucleus are to inspection, this hair Bright test macro method can at least reduce the time of protocol test sixty percent.

Claims (4)

1. a kind of smart card protocol automatic test approach based on MP300 equipment, it is characterised in that: the described method includes:
S1: testing tool calls test lead software to be supplied to the api interface of user, and script language is used in the api interface by user Speech writes test script, and after the completion of user writes, testing tool is ordered the test script write in api interface as one Order is sent to test software;
S2: test lead software sends order to MP300 link block, and MP300 link block is executed by operation MP300 equipment The order, and value information will be returned and send test lead software to, return value information is returned to call its again by test lead software Testing tool: order is converted into custom data format by test lead software, and is sent MP300 to by Socket and connected Connection module, MP300 link block call MICROPROSS company to provide by device numbering and order number in the order Library function execute the order, MP300 link block is called and will return to value information after library function and be converted into the customized number of user Test lead software is sent to according to format and by Socket;
Wherein custom data includes command information and returns to value information, and the life in custom data format Information format and return value information format is enabled to distinguish as follows: the information format of order are as follows: device numbering+order number+command number According to;The information format of return value are as follows: device numbering+order number+response data, wherein one byte representation of device numbering, The device object for executing this operation is represented, order one byte representation of number represents the order of execution, and device numbering and order are compiled It number is all that user is customized, each device numbering represents a kind of equipment, and each order number then represents manipulation MP300 equipment One instruction;
It is described MP300 link block is sent to by Socket to specifically include: a Socket clothes built in MP300 link block Business device, opens Socket service simultaneously when opening MP300 link block, and test lead is then a Socket client, Socket service device and Socket client are by custom data format progress data transmission, to realize test End is interacted by MP300 link block and MP300 equipment.
2. method according to claim 1, it is characterised in that: step S1 further includes that the test lead software includes with COM group Part method is realized, provides a user api interface using com component, the scripting language calls directly the API of com component offer Interface.
3. a kind of smart card protocol Auto-Test System based on MP300 equipment, it is characterised in that: the system comprises MP300 Equipment, test lead, MP300 link block;
Test lead includes interface unit, and testing tool calling test lead software is supplied to the api interface of user, by user at this Scripting language test script is used in api interface, after the completion of user writes, testing tool will write in api interface Test script is sent to test software as an order;
MP300 link block includes communication unit and execution unit, and test lead software communication unit sends order to MP300 and connects Connection module, MP300 link block operates MP300 equipment by execution unit and executes the order, and will return to value information communication unit Member sends test lead software to, and test lead software will return to value information again and return to its testing tool of calling;
The communication unit further includes that order is converted into the transition components of custom data format by test lead software, And sending the transfer assembly of MP300 link block to by Socket, MP300 link block is compiled by the equipment in the order It number is numbered with order, the library function for calling MICROPROSS company to provide executes the invocation component of the order, MP300 link block Calling will return to that value information is converted into custom data format and to send test lead to by Socket soft after library function The interactive component of part;
Wherein, the custom data in transition components includes command information and returns to value information, and user is customized Command information format and return value information format difference in data format is as follows: the information format of order are as follows: device numbering+life Enable number+order data;The information format of return value are as follows: device numbering+order number+response data, wherein device numbering is used One byte representation represents the device object for executing this operation, and order one byte representation of number represents the order of execution, if Standby number and order number are all that user is customized, and each device numbering represents a kind of equipment, and then generation is numbered in each order Table manipulates an instruction of MP300 equipment;
MP300 link block further includes a built-in Socket service device, when opening MP300 link block simultaneously Socket service is opened, test lead then includes a Socket client, and Socket service device and Socket client pass through institute State custom data format and carry out data transmission, with realize test lead by MP300 link block and MP300 equipment into The interactive component of row interaction.
4. system according to claim 3, which is characterized in that the interface unit includes that test lead software includes using COM Assembly method is realized, provides component using the interface that com component provides a user api interface, the scripting language calls directly The invocation component for the api interface that com component provides.
CN201610206730.6A 2016-05-20 2016-05-20 Smart card protocol Auto-Test System and method based on MP300 equipment Active CN105912463B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610206730.6A CN105912463B (en) 2016-05-20 2016-05-20 Smart card protocol Auto-Test System and method based on MP300 equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610206730.6A CN105912463B (en) 2016-05-20 2016-05-20 Smart card protocol Auto-Test System and method based on MP300 equipment

Publications (2)

Publication Number Publication Date
CN105912463A CN105912463A (en) 2016-08-31
CN105912463B true CN105912463B (en) 2019-03-26

Family

ID=56745453

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610206730.6A Active CN105912463B (en) 2016-05-20 2016-05-20 Smart card protocol Auto-Test System and method based on MP300 equipment

Country Status (1)

Country Link
CN (1) CN105912463B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590462B (en) * 2021-06-15 2024-08-06 青岛本原微电子有限公司 DSP program running and debugging method based on Eclipse plug-in
CN116418706A (en) * 2023-03-13 2023-07-11 重庆长安汽车股份有限公司 Automatic test method, device and equipment for protocol conversion and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1848774A (en) * 2005-04-11 2006-10-18 华为技术有限公司 A system and method for remotely invoking communication components
CN102043709A (en) * 2009-10-22 2011-05-04 上海杉达学院 Software test system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7895565B1 (en) * 2006-03-15 2011-02-22 Jp Morgan Chase Bank, N.A. Integrated system and method for validating the functionality and performance of software applications

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1848774A (en) * 2005-04-11 2006-10-18 华为技术有限公司 A system and method for remotely invoking communication components
CN102043709A (en) * 2009-10-22 2011-05-04 上海杉达学院 Software test system

Also Published As

Publication number Publication date
CN105912463A (en) 2016-08-31

Similar Documents

Publication Publication Date Title
CN104484273B (en) The method of testing of application program, equipment and system
CN106021099A (en) System and method for achieving UI automatic test of intelligent terminal
CN101137170A (en) Software automatic testing instrument and method of embedded equipment
CN105912473B (en) Mobile APP automatically testing platform and test method based on BDD
CN104679513B (en) A device driver architecture development method in an intelligent terminal
CN102160037B (en) Design once, deploy any where framework for heterogeneous mobile application development
CN104778124B (en) A kind of software application automated testing method
US6862682B2 (en) Method and apparatus for making and using wireless test verbs
US20040177361A1 (en) Generic application program interface for native drivers
EP1677197A1 (en) Test case automatic generation method for testing proactive GSM applications on SIM card
CN100579261C (en) A method of simulating AT command reporting
CN102169447B (en) Method and corresponding system for registering and deregistering self-defined Shell
CN103399814B (en) The method and device of automatic test
CN101246448A (en) Automatized script implementing method
CN107526676A (en) A kind of cross-system method of testing and device
CN110362490A (en) Merge the automated testing method and system of iOS and Android mobile application
CN104881343A (en) Testing method and testing system
CN109445845A (en) Interface call method, device, computer equipment and storage medium
CN106598834A (en) UI (User Interface) testing method and device
CN108197019A (en) Test system, test equipment, the test method of smart card
CN109446097A (en) A kind of regression test case selection method, device, terminal and storage medium
CN105912463B (en) Smart card protocol Auto-Test System and method based on MP300 equipment
CN109992504A (en) A kind of server Redfish test method, system, terminal and storage medium
CN107368406A (en) The method, apparatus and equipment of test application program
CN106506805A (en) Head portrait of contact person generation method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant