CN102662806A - Adaptive testing method directed at different performance indicators of Java card - Google Patents

Adaptive testing method directed at different performance indicators of Java card Download PDF

Info

Publication number
CN102662806A
CN102662806A CN2012100492666A CN201210049266A CN102662806A CN 102662806 A CN102662806 A CN 102662806A CN 2012100492666 A CN2012100492666 A CN 2012100492666A CN 201210049266 A CN201210049266 A CN 201210049266A CN 102662806 A CN102662806 A CN 102662806A
Authority
CN
China
Prior art keywords
java card
test
testing
test terminal
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2012100492666A
Other languages
Chinese (zh)
Other versions
CN102662806B (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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN201210049266.6A priority Critical patent/CN102662806B/en
Publication of CN102662806A publication Critical patent/CN102662806A/en
Application granted granted Critical
Publication of CN102662806B publication Critical patent/CN102662806B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses an adaptive testing method directed at different performance indicators of a Java card, comprising the following steps of: 1) sending an application command of Java Card Applet which is used for testing performance to a Java card by a test terminal; 2) setting a required degree of accuracy on the test terminal; 3) setting the value of cycle test times to be 0 by the test terminal, setting the value of cycle test times to be 1 after testing the time spent by the Java card on executing the Java Card Applet, and testing execution time of the Java Card Applet of the Java card; 4) calculating a reasonable number of cycle test times C which is suitable for the performance testing by the test terminal by using a formula; 5) setting the value of cycle test times to be C, and testing execution time of the Java Card Applet after cycling the Java card C times; and 6) calculating the average value of the execution time of a test function by the test terminal by using the formula, wherein the average value is a final test result. The adaptive testing method of the invention has the advantages that the value of the cycle test times can be adaptively determined and testing process can be executed intelligently in the performance testing process of the Java card, the adaptive testing method is not influenced by changes of testing environment, and the like.

Description

A kind of self-adapting testing method to Java card different performance index
Technical field
The present invention relates to technical field of intelligent card, especially relate to a kind of self-adapting testing method to Java card different performance index.
Background technology
In recent years; The Java smart card with advantages such as the simplification of its good platform-neutral, the support of using, good security feature, Object oriented programming environment, application and development, application program dynamic download more; The every field in social life is widely used, and at numerous areas wide application prospect is arranged.For example, domestic local Bank Danamon card business development has 192 families to be local financial institution very rapidly in the 220 tame card sending mechanism of the whole nation, and local financial institution issued volume reaches 300,000,000, and trading volume accounts for about 1/5th of national total amount.In the face of huge card producing system like this, to the different business demand, selecting suitable card vendor is a difficult selection for the decision maker.This situation of Java card impels card developer and card provider more and more to pay attention to the test to the Java card performance.
At present, aspect the test of non-physical properties such as Java smart card stability, application function and basic security, majority adopts the PC/SC standards on the market.The PC/SC system is made up of three critical pieces: operating system, read write line (IFD), smart card (ICC).But in the concrete realization of its test, also there is not the recognized standard method.Comparatively method in common is; The JavaCard Applet that can embody a certain performance of Java card is installed on the card; Send a series of APDU order carrying out system testings through blocking outer terminal; At last to carry out time that test spent index as test result in blocking, its time set is present in outside the card, and is connected with Java card through card reader.Therefore, there is the interference of call duration time between card reader and the card in this Java card performance test methods based on PC/SC among its result.
For addressing this problem; Comparatively simple method is in a communication process of Java card and card reader, same performance to be carried out loop test; Get result's mean value then, so just can reduce call duration time proportion in test result, improve the precision of test result.Yet the value to cycle index in this loop test can't be confirmed fast and effectively: can once in several ten thousand times scope, whenever increase progressively test at a distance from certain number of times unit's (as 100 times) usually; During this time if stable value in the set of test result, occurred; Then stop test, and write down this stationary value as a result of; Perhaps directly blindly cycle index is increased to up to ten thousand times, also can more accurately obtain the execution time of instructing after averaging like this from the consideration of accuracy as a result.But which kind of method of front no matter, the cycle index of use all is targetedly, when test environment change (such as, change a card or test another performance), the possibility of result that uses same cycle index to obtain is inaccurate; They all possibly be with the long test duration be cost, this is unacceptable in substantive test.
And in fact, want to be met the test result of accuracy requirement, the required testing time of each item performance of same Java card is different.Compare with call duration time,, then need more testing time, otherwise test result will not reach accuracy requirement if the time that performance index spent is less; Otherwise, then need less testing time, otherwise will greatly reduce testing efficiency.
Summary of the invention
To above-mentioned technical matters, the present invention proposes a kind of self-adapting testing method to Java card different performance index.
In order to solve the problems of the technologies described above, technical scheme of the present invention is following;
A kind of self-adapting testing method to Java card different performance index comprises the steps:
1) the JavaCard Applet utility command that is used for performance test is sent in the test terminal to Java card;
2) needed precision is set in the test terminal;
3) test terminal for being provided with 0, being measured the loop test number of times Java card and is carried out said JavaCard Applet time T 0After, the loop test number of times for being provided with 1, is measured the said JavaCard Applet of Java card execution time T 1
4) utilize formula
Figure BDA0000139427880000031
test terminal to calculate the reasonable loop test number of times C that is fit to this performance test;
5) test terminal is made as C with the loop test number of times, measures the execution time T of Java card through C the said JavaCardApplet in circulation back C
6) calculate the execution time mean value of trial function according to formula
Figure BDA0000139427880000032
test terminal, said is final testing result.
Further, said test terminal judges whether to carry out next step according to the status word from the Java card feedback.
Beneficial effect of the present invention is:
Ease for use: this method can be carried out self-adaptation value and the intelligent test process of carrying out to cycle index in the Java card performance test, be easy to use and operate.
Versatility: this method is the influence of tested person environment (card, card reader and terminal device) change not, supports the test to different performance in different test environments of different Java card.
Controllability: result's that this method is surveyed number of significant digit is by cycle index decision, and the value of cycle index to be setting value calculating by accuracy requirement obtain, so can control the precision of test result through the adjustment accuracy requirement.
Clarity: this method seems quick and precisely on the value of cycle index, and to estimating the working time of whole test, seems more clear, clear and definite.
Credible: the precision of the adaptive testing gained net result of this method proves accurately through experiment.
Description of drawings
Fig. 1 is the operational process of performance cycle test;
Fig. 2 is a loop test framework of the present invention.
Embodiment
To combine accompanying drawing and specific embodiment that the present invention is done further explanation below.
Fig. 1 has indicated the main implementation of Java card performance test in card based on PC/SC: power up order is sent in the test terminal powers on the Java card sheet; Deng the selection utility command of redispatching after the initial work completion in the Java card; Choose the JavaCard Applet that is used for performance test, terminal test Automatic Program is then sent the cycle index order is set, after Applet receives this order in the card; Cycle index is set, if the terminal test program given in successful then return state word 90 00.The terminal test program is then sent and is started test command, picks up counting simultaneously.Execution performance test in the card, after the end, return state word 90 00.Last terminal records receives for 90 00 time, finishes timing simultaneously, and this performance test finishes.Twice timing gained mistiming is the execution time of trial function.
Embodiment one
FunctionTest () function as shown in Figure 2, as in needing performance test JavaCard Applet, to be provided with, the trial function of this function for carrying out is like an arithmetical operation or a cryptographic calculation; C (cycles) is the cycle index of operation FunctionTest () in the Java card.
Suppose that the minimum value that the note measuring error allows is a Δ when the used time is once tested in the calculating execution, true elapsed time is T, T 0Represent that then cycle index is at 0 o'clock, test the needed time, then claim the accuracy requirement of T/ Δ for test, be designated as p (precision, general value is 0.1,0.01,0.001), when p was 0.001, the precision that means test result was three position effective digitals.
According to following formula
T ‾ = T 0 + C × T C = T 0 C + T
Figure BDA0000139427880000052
Be measured value, T is an actual value, when
Figure BDA0000139427880000053
Promptly
Figure BDA0000139427880000054
The time, test is satisfactory, therefore will calculate C and the T that meets accuracy requirement 0, p, T be relevant, T can be measured through cycle index C=0 is set in the test terminal 0A pretreatment time value (having comprised call duration time) that does not contain the trial function execution time; Make C=1, measure execution time T 1, promptly carry out the required time (having comprised call duration time) of trial function one time.T then is the value that requirement is measured, and then can draw the approximate value of T:
T≈T 1-T 0
So
C > T 0 p × ( T 1 - T 0 )
For improving testing efficiency, getting difference is 1,
C = T 0 p × ( T 1 - T 0 ) + 1
This moment, C was the appropriate value of loop test number of times, tested the number of significant figures that obtains the result with its, can satisfy accuracy requirement.Accuracy requirement p is a relative notion, and is irrelevant with the concrete trial function execution time, for example, works as p=0.001, and the magnitude actual consuming time of trial function is a Millisecond, and then p is 0.001 millisecond.
For example the cycle index that is provided with of note is Cycles, below is the adaptive testing step of the Java card performance index of the present invention's proposition:
(1) setting accuracy requirement is an example to get 0.001 here;
(2) make Cycles=0, measure execution time T 0
(3) make Cycles=1, measure execution time T 1
(4) utilize formula C = T 0 ( T 1 - T 0 ) + 1 , Calculate C;
(5) through carrying out the SetCount method, make Cycles=C, carry out the StartTest method then and measure execution time T C
(6) calculate
Figure BDA0000139427880000062
and be final testing result, i.e. the execution time mean value of trial function.
The above only is a preferred implementation of the present invention; Should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the present invention's design; Can also make some improvement and retouching, these improvement and retouching also should be regarded as in the protection domain of the present invention.

Claims (2)

1. the self-adapting testing method to Java card different performance index is characterized in that, comprises the steps:
1) the JavaCard Applet utility command that is used for performance test is sent in the test terminal to Java card;
2) needed precision is set in the test terminal;
3) test terminal for being provided with 0, being measured the loop test number of times Java card and is carried out said JavaCard Applet time T 0After, the loop test number of times for being provided with 1, is measured the said JavaCard Applet of Java card execution time T 1
4) utilize formula
Figure FDA0000139427870000011
test terminal to calculate the reasonable loop test number of times C that is fit to this performance test;
5) test terminal is made as C with the loop test number of times, measures the execution time T of Java card through C the said JavaCardApplet in circulation back C
6) calculate the execution time mean value of trial function according to formula
Figure FDA0000139427870000012
test terminal, said is final testing result.
2. a kind of self-adapting testing method to Java card different performance index according to claim 1 is characterized in that said test terminal judges whether to carry out next step according to the status word from the Java card feedback.
CN201210049266.6A 2012-02-29 2012-02-29 Adaptive testing method directed at different performance indicators of Java card Active CN102662806B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210049266.6A CN102662806B (en) 2012-02-29 2012-02-29 Adaptive testing method directed at different performance indicators of Java card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210049266.6A CN102662806B (en) 2012-02-29 2012-02-29 Adaptive testing method directed at different performance indicators of Java card

Publications (2)

Publication Number Publication Date
CN102662806A true CN102662806A (en) 2012-09-12
CN102662806B CN102662806B (en) 2015-06-24

Family

ID=46772303

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210049266.6A Active CN102662806B (en) 2012-02-29 2012-02-29 Adaptive testing method directed at different performance indicators of Java card

Country Status (1)

Country Link
CN (1) CN102662806B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630668A (en) * 2014-12-01 2016-06-01 深圳市腾讯计算机系统有限公司 Test method and apparatus
CN106021088A (en) * 2015-07-10 2016-10-12 北京中电华大电子设计有限责任公司 Method and device for atomicity test on JAVA card
CN106339308A (en) * 2015-07-10 2017-01-18 北京中电华大电子设计有限责任公司 Test method of Java Card transaction mechanism
CN110008134A (en) * 2019-04-18 2019-07-12 上海计算机软件技术开发中心 A kind of Java card standard API method for testing security
CN114579208A (en) * 2022-05-05 2022-06-03 广州万协通信息技术有限公司 Self-adaptive adjustment execution speed increasing method for Java card

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060059548A1 (en) * 2004-09-01 2006-03-16 Hildre Eric A System and method for policy enforcement and token state monitoring
CN101821715A (en) * 2007-08-31 2010-09-01 金雅拓股份有限公司 System and method for browser-based access to smart cards

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060059548A1 (en) * 2004-09-01 2006-03-16 Hildre Eric A System and method for policy enforcement and token state monitoring
CN101821715A (en) * 2007-08-31 2010-09-01 金雅拓股份有限公司 System and method for browser-based access to smart cards

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吴刚: "基于JC3 Classic虚拟机的程序运行时间的估计", 《中国优秀硕士学位论文全文数据库信息科技辑》, 15 November 2011 (2011-11-15), pages 137 - 6 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630668A (en) * 2014-12-01 2016-06-01 深圳市腾讯计算机系统有限公司 Test method and apparatus
CN106021088A (en) * 2015-07-10 2016-10-12 北京中电华大电子设计有限责任公司 Method and device for atomicity test on JAVA card
CN106339308A (en) * 2015-07-10 2017-01-18 北京中电华大电子设计有限责任公司 Test method of Java Card transaction mechanism
CN110008134A (en) * 2019-04-18 2019-07-12 上海计算机软件技术开发中心 A kind of Java card standard API method for testing security
CN114579208A (en) * 2022-05-05 2022-06-03 广州万协通信息技术有限公司 Self-adaptive adjustment execution speed increasing method for Java card
CN114579208B (en) * 2022-05-05 2022-08-26 广州万协通信息技术有限公司 Self-adaptive adjustment execution speed increasing method for Java card

Also Published As

Publication number Publication date
CN102662806B (en) 2015-06-24

Similar Documents

Publication Publication Date Title
CN102662806A (en) Adaptive testing method directed at different performance indicators of Java card
Aldweesh et al. Performance benchmarking of smart contracts to assess miner incentives in Ethereum
Jääskelä et al. Terms of trade shocks: what are they and what do they do?
CN103001230B (en) Non-invasive power load monitoring and decomposing current mode matching method
Bornholt et al. The model is not enough: Understanding energy consumption in mobile devices
CN104253892B (en) The method of testing of the performance of application program and system in Intelligent mobile equipment
CN103605606B (en) A kind of embedded software test use-case batch execution method that can automatically change
CN204904449U (en) A half automatic checkout device for detecting bimodulus takes accuse electric energy meter expense accuse function
CN103095471A (en) Charging method based on usage amount in cloud operating system (OS)
CN105487960B (en) A kind of mobile terminal APP load energy consumption method for automatic measurement based on physics actual measurement
CN105894270A (en) Payment method and device
CN101441256A (en) Computer detection system of electrical energy meter production line
CN103944778B (en) A kind of distributed event injection device based on combined test collection
CN204989453U (en) A full automatic checkout device for detecting bimodulus takes accuse electric energy meter expense accuse function
CN105446877A (en) Method and apparatus for testing power consumption of mobile application
CN112382006A (en) Electricity price adjusting method, device and equipment
CN109407039B (en) Intelligent electric meter and system thereof, self-diagnosis method and fault detection method
CN102662807A (en) Java card stack performance test application program and making method for framework thereof
Belbute et al. Does final energy demand in Portugal exhibit long memory? A fractional integration analysis
CN103678114A (en) Apparatus and method for generating assertion, and apparatus and method for verifying processor
WO2019127081A1 (en) Power consumption stabilization method and apparatus for intelligent terminal, and electronic device
CN106210025A (en) Application program download determines method and device
CN105118182A (en) IC card intelligent water meter with tiered pricing function
EP2854096A2 (en) Scheduling operation of residential devices
CN116299650B (en) Neutron multiple distribution on-line reconstruction method based on digital acquisition

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant