6.2.9 Class ToolkitRegistry

11.133GPPRelease 1999Test specification for Subscriber Interface Module (SIM) Application Programme Interface (API) for Java cardTS

6.2.9.1 Method allocateTimer

Test Area Reference: API_2_TKR_ATIM.

6.2.9.1.1 Conformance requirement:

The method with following header shall be compliant to its definition in the API.

public byte allocateTimer() throws ToolkitException

6.2.9.1.1.1 Normal execution

  • CRRN1: the returned timer identifier shall be between 01 and 08 inclusive.
  • CRRN2: the returned timer identifier shall be different from a previously allocated but not released one.
  • CRRN3: The SIM Toolkit Framework shall trigger the applet when receiving an ENVELOPE(TIMER EXPIRATION) command for the allocated timer.
  • CRRN4: A call to isEventSet() method for EVENT_TIMER_EXPIRATION should return true if the applet has at least one timer allocated.

6.2.9.1.1.2 Parameters error

No requirements.

6.2.9.1.1.3 Context errors

  • CRRC1: Shall throw a ToolkitException with reason NO_TIMER_AVAILABLE if all the timers are allocated.
  • CRRC2: Shall throw a ToolkitException with reason NO_TIMER_AVAILABLE if the maximum number of timers have been allocated to this applet according to installation parameter.

6.2.9.1.2 Test suite files

Test Script: API_2_TKR_ATIM_1.scr

Test Applet: API_2_TKR_ATIM_1.java

API_2_TKR_ATIM_2.java

API_2_TKR_ATIM_3.java

Installation parameters:

For this test procedure the non-volatile memory of each instance is 200 (Hexa).

The maximum timer parameter value is as follows for each applet:

– applet 1 (API_2_TKR_ATIM_1): 8 timers.

– applet 2 (API_2_TKR_ATIM_2): 4 timers.

– applet 3 (API_2_TKR_ATIM_3): 0 timer.

Load Script: API_2_TKR_ATIM_1.ldr

The load script installs the 6 instances.

Cleanup Script: API_2_TKR_ATIM_1.clr

Parameter File: API_2_TKR_ATIM_1.par

6.2.9.1.3 Test procedure

Id

Description

API Expectation

APDU Expectation

1

Allocates up to 8 timers
(applet 1)

8 * allocateTimer().

No exception shall be thrown. Timer ID returned shall be between 01 and 08 inclusive. It shall be different after each call.

2

Allocate timers more than the maximum
(applet 1)

The applet 1 allocates 1 more timer.

Shall throw a ToolkitException with reason NO_TIMER_AVAILABLE.

3

Check applet is Triggered by ENVELOPE(TIMER_EXPIRATION) command
(applet1)

Send ENVELOPE(TIMER EXPIRATION) with all timers id (not in an increase order).

Calls releaseTimer(id) each time a timer expires.

Shall trigger each time an ENVELOPE(TIMER EXPIRATION) is sent to the SIM, for Timer ID = ’01’ to ’08’.

4

Allocate up to 4 timers
(applet 2)

4 * allocateTimer().

No exception shall be thrown. Each time, the returned timer identifier shall be between ’01’ and ’08’ inclusive. It shall be different after each call.

5

Allocate timers more than the maximum
(applet 3)

The applet 3 allocates 1 more timer.

Shall throw a ToolkitException with reason NO_TIMER_AVAILABLE.

6.2.9.1.4 Test Coverage

CRR number

Test case number

N1

1, 4

N2

1, 4

N3

3

N4

1

C1

2

C2

5

6.2.9.2 Method changeMenuEntry

Test Area Reference: API_2_TKR_CMETB_BSSBZBS.

6.2.9.2.1 Conformance requirement:

The method with following header shall be compliant to its definition in the API.

public void changeMenuEntry(byte id,

byte[] menuEntry,

short offset,

short length,

byte nextAction,

boolean helpSupported,

byte iconQualifier,

short iconIdentifier)

throws java.lang.NullPointerException,

java.lang.ArrayIndexOutOfBoundsException,

ToolkitException

6.2.9.2.1.1 Normal execution

  • CRRN1: The SIM Toolkit Framework shall dynamically update the menu stored in the ME by issuing a SET UP MENU proactive command. The later will reflect the changes done for the entry. The SIM Toolkit Framework shall use the data of the EF sume file in order to build the SET UP MENU command.
  • CRRN2: The default state of the changed menu entry is ‘enabled’.
  • CRRN3: a call to isEventSet() method on EVENT_MENU_SELECTION shall return true before and after the call.
  • CRRN4: if helpSupported was true then a call to isEventSet() method on EVENT_MENU_SELECTION_HELP_REQUEST event shall return true.
  • CRRN5: if helpSupported was true then after the completion of the SETUP MENU command, if an ENVELOPE(MENU_SELECTION_HELP_REQUEST) command is received by the SIM for this entry, then the SIM Toolkit framework shall trigger the applet.
  • CRRN6: if help supported was true, the SIM Toolkit Framework shall issue a SETUP MENU command with command qualifier = ’80’.
  • CRRN7: if helpSupported was false and if no entries is supporting help then a call to isEventSet() method on EVENT_MENU_SELECTION_HELP_REQUEST event shall return false.
  • CRRN8: if helpSupported was false and if no entries is supporting help then after the completion of the SETUP MENU command, if an ENVELOPE(MENU_SELECTION_HELP_REQUEST) command is received by the SIM, then the SIM Toolkit framework shall not trigger the applet.
  • CRRN9: The SIM Toolkit Framework shall supply in the SET UP MENU command with the icon identifier provided in the icon identifier list within the item icon identifier list Simple TLV if all the applets registered to the EVENT_MENU_SELECTION provide it.
  • CRRN10: The SIM Toolkit Framework shall set in the SET UP MENU command with the Icon list qualifier transmitted to the ME as ‘icon is not self explanatory’ if one of the applet registered prefers this qualifier.
  • CRRN11: If Next Action Indicator was different from ’00’, the SIM Toolkit Framework shall issue a SETUP MENU proactive command containing an Items Next Action Indicator simple TLV with the comprehension flag set to 0 as defined in GSM 11.14 [4].

6.2.9.2.1.2 Parameters error

  • CRRP1: Shall throw java.lang.NullPointerException – if menuEntry is null.
  • CRRP2: Shall throw java.lang.ArrayIndexOutOfBoundsException – if offset would cause access outside array bounds.
  • CRRP3: Shall throw java.lang.ArrayIndexOutOfBoundsException – if length would cause access outside array bounds.
  • CRRP4: Shall throw java.lang.ArrayIndexOutOfBoundsException – if both offset and length would cause access outside array bounds.

6.2.9.2.1.3 Context errors

  • CRRC1: Shall throw a ToolkitException with MENU_ENTRY_NOT_FOUND reason if the Menu Identifier isn’t associated to the calling applet instance.
  • CRRC2: Shall throw ALLOWED_LENGTH_EXCEEDED if the menu entry string is bigger than the allocated space.

6.2.9.2.2 Test suite files

Additional requirements for the GSM personalization:

– content of EF sume shall be:

– Title Alpha Identifier: "TOOLKIT TEST"

Test Script: API_2_TKR_CMETB_BBSSBZBS_1.scr

Test Applet: API_2_TKR_CMETB_BBSSBZBS_1.java

– entry ’01’ is "Init1".

– entry ’02’ is "Init2".

Installation parameter:

Same as default applet but with:

– Maximum text length for a menu entry: 15

– Maximum number of menu entries: 2

– Position / Identifier for each menu entry: ’01’/’01’,’02’/’02’

Load Script: API_2_TKR_CMETB_BBSSBZBS_1.ldr

Cleanup Script: API_2_TKR_CMETB_BBSSBZBS_1.clr

Parameter File: API_2_TKR_CMETB_BBSSBZBS_1.par

6.2.9.2.3 Test procedure

Id

Description

API Expectation

APDU Expectation

1

Applet changes the entry’s title by menuEntry buffer, with a greater length than the initial length

1- ChangeMenuEntry()with parameters:

Id = ’02’

MenuEntry = "UseAllBuffer"

Offset = 0

Length = menuEntry.length

NextAction = 0

HelpSupported = false

IconQualifier = 0

IconIdentifier = 0.

2- isEventSet(EVENT_MENU_SELECTION).

3- isEventSet(EVENT_MENU_SELECTION_HELP_REQUEST).

1- No exception shall be thrown.

2- shall return true.

3- shall return false.

The SIM shall issue a SETUP MENU proactive command which contains the new text for entry ID ’02’.

2

Changing the title with part of menuEntry buffer

1- changeMenuEntry()with parameters:

Id = ’01’

MenuEntry = "UsePartOfBuffer"

Offset = 3

Length = 12

NextAction = 0

HelpSupported = false

IconQualifier = 0

IconIdentifier = 0.

2- isEventSet(EVENT_MENU_SELECTION).

3- isEventSet(EVENT_MENU_SELECTION_HELP_REQUEST)

1- No exception shall be thrown.

2- Shall return true.

3- Shall return false.

The SIM shall issue a SETUP MENU proactive command which contains the new text for entry ID ’01’.

3

Length = 0

1- changeMenuEntry() for entry ’01’ and entry ’02’, with parameters:

Id = ’01’/’02’

MenuEntry = "LengthEquals0"

Offset = 0

Length = 0

NextAction = 0

HelpSupported = false

IconQualifier = 0

IconIdentifier = 0.

2- isEventSet(EVENT_MENU_SELECTION).

3- isEventSet(EVENT_MENU_SELECTION_HELP_REQUEST).

1- No exception shall be thrown.

2- Shall return true.

3- shall return false.

The SIM shall issue a SETUP MENU proactive command which contains for entry ’01’and entry ’02’, no text part.

4

Setting a next action indicator != 0

1- changeMenuEntry()with parameters:

Id = ’02’

MenuEntry = "NextActionIndic"

Offset = 0

Length = menuEntry.length

NextAction = ’10’ (SETUP CALL)

HelpSupported = false

IconQualifier = 0

IconIdentifier = 0

2- isEventSet(EVENT_MENU_SELECTION).

3- isEventSet(EVENT_MENU_SELECTION_HELP_REQUEST).

4- changeMenuEntry()with parameters:

Id = ’02’

MenuEntry = "NextActionIndic"

Offset = 0

Length = menuEntry.length

NextAction = ’10’ (SETUP CALL)

HelpSupported = true

IconQualifier = 0

IconIdentifier = 0

1- No exception shall be thrown.

2- Shall return true.

3- Shall return false.

The SIM shall issue a SETUP MENU proactive command which contains an Items Next Action Indicator list and which contains a command qualifier ’80’.

5

Checking applet is triggered by a MENU_SELECTION_HELP_REQUEST

Send ENVELOPE(MENU_SELECTION_HELP_REQUEST) with Item Identifier = ’02’

Applet is trigged by a MENU_SELECTION_HELP_REQUEST and the Item Identifier is 02

6

help supported=true

1- changeMenuEntry()with parameters:

Id = ’01’

MenuEntry = "HelpSupported"

Offset = 0

Length = menuEntry.length

NextAction = 0

HelpSupported = true

IconQualifier = 0

IconIdentifier = 0

2- isEventSet(EVENT_MENU_SELECTION).

3- isEventSet(EVENT_MENU_SELECTION_HELP_REQUEST).

1- No exception shall be thrown.

2- Shall return true.

3- Shall return true.

The SIM shall issue a SETUP MENU proactive command which contains a command qualifier ’80’.

7

Checking applet is triggered by a MENU_SELECTION_HELP_REQUEST

Send ENVELOPE(MENU_SELECTION_HELP_REQUEST) with Item Identifier = ’01’

Applet is trigged by a MENU_SELECTION_HELP_REQUEST and the Item Identifier is 01

8

Setting icons, help supported = false

1- changeMenuEntry() for entries ’01’,’02’, with parameters:

Id = ’01’/’02’

MenuEntry = "IconQualifier"

Offset = 0

Length = menuEntry.length

NextAction = 0

HelpSupported = false

IconQualifier = ’01’

IconIdentifier = ’02’ / ’01’

2- isEventSet(EVENT_MENU_SELECTION).

3- isEventSet(EVENT_MENU_SELECTION_HELP_REQUEST).

1- No exception shall be thrown.

2- Shall return true.

3- Shall return false.

The SIM shall issue a SETUP MENU proactive command which contains an Icon Identifier List.

9

MenuEntry is disabled

1- disableMenuEntry(’01’).

2- changeMenuEntry()with parameters:

Id = ’01’

MenuEntry = "EnableEntry"

Offset = 0

Length = menuEntry.length

NextAction = 0

HelpSupported = false

IconQualifier = 0

IconIdentifier = 0

3- isEventSet(EVENT_MENU_SELECTION).

4- isEventSet(EVENT_MENU_SELECTION_HELP_REQUEST).

1- No exception shall be thrown.

2- No exception shall be thrown.

3- Shall return true.

4- Shall return false.

The SIM shall issue a SETUP MENU proactive command which contains the entry. Without Icon identifier List Simple TLV

10

MenuEntry is null

changeMenuEntry()with:

MenuEntry = NULL

Shall throw java.lang.NullPointerException.

11

Offset causes access outside array bounds

Id = ’01’

MenuEntry = "Violation"

Offset = menuEntry.length +1

Length = 0

NextAction = 0

HelpSupported = false

IconQualifier = 0

IconIdentifier = 0

Shall throw java.lang.ArrayIndexOutOfBoundsException.

12

Big Offset causes access outside array bounds

Id = ’01’

MenuEntry = "Violation"

Offset = 255

Length = 1

NextAction = 0

HelpSupported = false

IconQualifier = 0

IconIdentifier = 0

Shall throw java.lang.ArrayIndexOutOfBoundsException.

13

Offset < 0 causes access outside array bounds

Id = ’01’

MenuEntry = "Violation"

Offset = -1

Length = 1

NextAction = 0

HelpSupported = false

IconQualifier = 0

IconIdentifier = 0

Shall throw java.lang.ArrayIndexOutOfBoundsException.

14

Length causes access outside array bounds

Id = ’01’

MenuEntry = "Violation"

Offset = 0

Length = MenuEntry.length + 1

NextAction = 0

HelpSupported = false

IconQualifier = 0

IconIdentifier = 0.

Shall throw java.lang.ArrayIndexOutOfBoundsException.

15

Length < 0 causes access outside array bounds

Id = ’01’

MenuEntry = "Violation"

Offset = 0

Length = -1

NextAction = 0

HelpSupported = false

IconQualifier = 0

IconIdentifier = 0.

Shall throw java.lang.ArrayIndexOutOfBoundsException.

16

Both offset and length causes access outside array bounds

Id = ’01’

MenuEntry = "Violation"

Offset  [1, MenuEntry.length]

Length = MenuEntry.length

NextAction = 1

HelpSupported = false

IconQualifier = 0

IconIdentifier = 0

Shall throw java.lang.ArrayIndexOutOfBoundsException.

.

17

Invalid ID used

Id = ’00’

MenuEntry = contains text, != null

Offset = 0

Length = menuEntry.length < 16

NextAction = 0

HelpSupported = false

IconQualifier = 0

IconIdentifier = 0

Shall throw a ToolkitException with MENU_ENTRY_NOT_FOUND reason code.

18

ID isn’t allocated to a menu entry of this applet instance

Id = ‘0A’

MenuEntry = contains text, != null

Offset = 0

Length = menuEntry.length < 16

NextAction = 0

HelpSupported = false

IconQualifier = 0

IconIdentifier = 0

Shall throw a ToolkitException with reason code: MENU_ENTRY_NOT_FOUND.

19

The text is bigger than the allocated space

Id = ’02’

MenuEntry = contains text, != null

Offset = 0

Length = menuEntry.length > 15

NextAction = 0

HelpSupported = false

IconQualifier = 0

IconIdentifier = 0

Shall throw a ToolkitException with reason code: ALLOWED_LENGTH_EXCEEDED.

20

With a smaller text length than the initial length

1. changeMenuEntry()with parameters:

Id = ’02’

MenuEntry = "Init"

Offset = 0

Length = menuEntry.length

NextAction = 0

HelpSupported = false

IconQualifier = 0

IconIdentifier = 0

2. isEventSet(EVENT_MENU_SELECTION)

3. isEventSet(EVENT_MENU_SELECTION_HELP_REQUEST)

1. No exception shall be thrown.

2. Shall return true.

3. Shall return false.

The SIM shall issue a SETUP MENU proactive command which contains the new text for entry ID ’02’.

6.2.9.2.4 Test Coverage

CRR number

Test case number

N1

1, 2, 3, 4, 6, 8, 9, 20

N2

9

N3

1, 2, 3, 4, 6, 8, 9, 20

N4

6

N5

7, 5

N6

6

N7

1, 2, 3, 4, 8, 9, 20

N8

To be checked in framework tests and insert cross reference here

N9

8, 9

N10

8

N11

4

P1

10

P2

11, 12, 13

P3

14, 15

P4

16

C1

17, 18

C2

19

6.2.9.3 Method clearEvent

Test Area Reference: API_2_TKR_CEVTB.

6.2.9.3.1 Conformance requirement

The method with following header shall be compliant to its definition in the API.

public void clearEvent(byte event)

throws ToolkitException

6.2.9.3.1.1 Normal execution

  • CRRN1: A call to isEventSet() method for a cleared event should return false after a call to clearEvent.
  • CRRN2:The SIM Toolkit Framework shall not trigger the applet on the occurrence of the cleared event anymore.
  • CRRN3: if event was EVENT_CALL_CONTROL_BY_SIM and after the call, no applet is registered to it, The SIM Toolkit Framework shall allow an applet to register to this event.
  • CRRN4: if event was EVENT_CALL_CONTROL_BY_SIM and one applet is still registered to these event, The SIM Toolkit Framework shall not allow an applet to register to this event.
  • CRRN5: if event was EVENT_MO_SHORT_MESSAGE_CONTROL_BY_SIM and after the call, no applet is registered to it, The SIM Toolkit Framework shall allow an applet to register to this event.
  • CRRN6: if event was EVENT_MO_SHORT_MESSAGE_CONTROL_BY_SIM and one applet is still registered to these event, The SIM Toolkit Framework shall not allow an applet to set this event.

6.2.9.3.1.2 Parameters error

  • CRRP1: Shall throw a Toolkit Exception with reason EVENT_NOT_ALLOWED if event was EVENT_MENU_SELECTION.
  • CRRP2: Shall throw a Toolkit Exception with reason EVENT_NOT_ALLOWED if event was EVENT_MENU_SELECTION_HELP_REQUEST.
  • CRRP3: Shall throw a Toolkit Exception with reason EVENT_NOT_ALLOWED if event was EVENT_TIMER_EXPIRATION.
  • CRRP4: Shall throw a Toolkit Exception with reason EVENT_NOT_ALLOWED if event was EVENT_STATUS_COMMAND.

6.2.9.3.1.3 Context errors

No requirements.

6.2.9.3.2 Test suite files

Test Script: API_2_TKR_CEVTB_1.scr

Test Applet: API_2_TKR_CEVTB_1.java

As default but applet registers to an event list which contains all defined events in GSM 03.19 [7] excepted those that aren’t allowed or supported by setEvent().

Load Script: API_2_TKR_CEVTB_1.ldr

Cleanup script: API_2_TKR_CEVTB_1.clr

Parameter File: API_2_TKR_CEVTB_1.par

6.2.9.3.3 Test procedure

Id

Description

API Expectation

APDU Expectation

1

Clear ALLOWED unregistered events

For events ranging from 1 to 127 excepted those that aren’t allowed (EVENT_MENU_SELECTION, EVENT_MENU_SELECTION_HELP_REQUEST, EVENT_TIMER_EXPIRATION, EVENT_STATUS_COMMAND),
the applet calls:

1- clearEvent() method

2- isEventSet() method

1- No exception is thrown each time.

2- Shall return false each time.

2

Clear registered events

1- For each ALLOWED and SUPPORTED events, the applet calls setEvent() method.

2- For events ranging from 1 to 127 excepted those that aren’t allowed, the applet calls:

2.1- clearEvent() method

2.2- isEventSet() method

1- No exception shall be thrown.

2.1- No exception shall be thrown.

2.2- Shall return false.

3

Clearing NOT ALLOWED events

For each event among:

EVENT_MENU_SELECTION, EVENT_MENU_SELECTION_HELP_REQUEST, EVENT_TIMER_EXPIRATION, EVENT_STATUS_COMMAND

1- The applet calls clearEvent(event) method.

1- Each time, clearEvent shall throw a Toolkit Exception with reason EVENT_NOT_ALLOWED.

4

Checking applet isn’t triggered by an ENVELOPE(SMS-PP DOWNLOAD) command

1 – reset and initialize the card

2 – An ENVELOPE(SMS-PP DOWNLOAD) is sent with a TAR referencing applet.

Applet is not trigged by an ENVELOPE(SMS-PP DOWNLOAD) command

6.2.9.3.4 Test Coverage

CRR number

Test case number

N1

1, 2

N2

4

N3

Framework

N4

Framework

N5

Framework

N6

Framework

P1

3

P2

3

P3

3

P4

3

6.2.9.4 Method disableMenuEntry

Test Area Reference: API_2_TKR_DMETB.

6.2.9.4.1 Conformance requirement

The method with following header shall be compliant to its definition in the API.

public void disableMenuEntry(byte id)

throws ToolkitException

6.2.9.4.1.1 Normal execution

  • CRRN1: A call to isEventSet() method on EVENT_MENU_SELECTION shall return the same result before and after the call to disableMenuEntry() method.
  • CRRN2: A call to isEventSet() method on EVENT_MENU_SELECTION_HELP_REQUEST shall return the same result before and after the call to disableMenuEntry() method.
  • CRRN3: After invocation of this method the SIM Toolkit Framework shall dynamically update the menu stored in the ME .
  • CRRN4: After invocation of this method, if there is no more enabled menu entries then the SIM Toolkit framework shall issue a SETUP MENU proactive command containing Item Data Object for Item 1 TLV with a length of zero and no value part.

6.2.9.4.1.2 Parameters error

No requirements.

6.2.9.4.1.3 Context errors

  • CRRC1: shall throw a ToolkitException with reason = ENTRY_NOT_FOUND if the menu entry doesn’t exist for this applet.

6.2.9.4.2 Test suite files

Additional requirements for the GSM personalization:

– content of EF sume shall be:

– Title Alpha Identifier: "TOOLKIT TEST"

Test Script: API_2_TKR_DMETB_1.scr

Test Applet: API_2_TKR_DMETB_1.java

Installation parameter:

Same as default applet but with:

– Maximum text length for a menu entry: 15

– Maximum number of menu entries: 2

– Position / Identifier for each menu entry: ’01’/’01’, ’02’/’02’

Load Script: API_2_TKR_DMETB_1.ldr

Cleanup script: API_2_TKR_DMETB_1.clr

Parameter File: API_2_TKR_DMETB_1.par

6.2.9.4.3 Test procedure

Id

Description

API Expectation

APDU Expectation

1

Check the menu state before
disabling a previously enabled entry
not registered to EVENT_MENU_SELECTION_HELP_REQUEST

1- reset and initialize the card

2- isEventSet(EVENT_MENU_SELECTION)

3- isEventSet(EVENT_MENU_SELECTION_HELP_REQUEST)

1- Shall return true

2- Shall return false

1- The SIM shall issue a SET UP MENU proactive command with entry ’01’ and ’02’.

2

Check the menu state after
disabling a previously enabled entry
not registered to EVENT_MENU_SELECTION_HELP_REQUEST

1- disableMenuEntry(’01’)

2- isEventSet(EVENT_MENU_SELECTION)

3- isEventSet(EVENT_MENU_SELECTION_HELP_REQUEST)

1- No exception shall be thrown.

2- Shall return true.

3- Shall return false.

3- The SIM shall issue a SET UP MENU proactive command with entry ’02’ only.

3

Check the menu before
disabling a previously enabled entry
registered to EVENT_MENU_SELECTION_HELP_REQUEST

1- change Menu Entry ’02’ to indicate help supported

2- isEventSet(EVENT_MENU_SELECTION)

3- isEventSet(EVENT_MENU_SELECTION_HELP_REQUEST)

2- Shall return true

3- Shall return true

3- The SIM shall issue a SET UP MENU proactive command with entry ’02’, indicating help supported.

4

Check the menu after
disabling a previously enabled entry
registered to EVENT_MENU_SELECTION_HELP_REQUEST

1- disableMenuEntry(’02’)

2- isEventSet(EVENT_MENU_SELECTION)

3- isEventSet(EVENT_MENU_SELECTION_HELP_REQUEST)

1- No exception shall be thrown.

2- Shall return true.

3- Shall return true.

3- The SIM shall issue a SET UP MENU proactive command with 1st Item TLV with a length of 0.

5

Disabling invalid entries

For ID ranging from ’00’ to ‘FF’ except ’01’ and ’02’, the applet calls disableMenuEntry(ID) method.

Each time a Toolkit Exception with MENU_ENTRY_NOT_FOUND reason code shall be thrown.

6.2.9.4.4 Test Coverage

CRR number

Test case number

N1

1, 2, 3, 4

N2

1, 2, 3, 4

N3

2, 4

N4

4

C1

5

6.2.9.5 Method enableMenuEntry

Test Area Reference: API_2_TKR_EMETB.

6.2.9.5.1 Conformance requirement

The method with following header shall be compliant to its definition in the API.

public void enableMenuEntry(byte id)

throws ToolkitException

6.2.9.5.1.1 Normal execution

  • CRRN1: A call to isEventSet() method on EVENT_MENU_SELECTION shall return the same result before and after the call to enableMenuEntry() method.
  • CRRN2: A call to isEventSet() method on EVENT_MENU_SELECTION_HELP_REQUEST shall return the same result before and after the call to enableMenuEntry() method.
  • CRRN3:The SIM Toolkit Framework shall dynamically issue a SETUP MENU proactive command which does contain an ITEM SIMPLE TLV object for this entry.

6.2.9.5.1.2 Parameters error

No requirements.

6.2.9.5.1.3 Context errors

  • CRRC1: shall throw a ToolkitException with reason = MENU_ENTRY_NOT_FOUND if the menu entry doesn’t exist for this applet.

6.2.9.5.2 Test suite files

Additional requirements for the GSM personalization:

– content of EF sume shall be:

– Title Alpha Identifier: "TOOLKIT TEST"

Test Script: API_2_TKR_EMETB_1.scr

Test Applet: API_2_TKR_EMETB_1.java

Installation parameter:

Same as default applet but with:

– Maximum text length for a menu entry: 15

– Maximum number of menu entries: 2

– Position / Identifier for each menu entry: ’01’/’01’, ’02’/’02’

Load Script: API_2_TKR_EMETB_1.ldr

Cleanup script: API_2_TKR_EMETB_1.clr

Parameter File: API_2_TKR_EMETB_1.par

6.2.9.5.3 Test procedure

Id

Description

API Expectation

APDU Expectation

1

Check menu state before
enabling a previously disabled entry
not registered to EVENT_MENU_SELECTION_HELP_REQUEST

1- isEventSet(EVENT_MENU_SELECTION)

2- isEventSet(EVENT_MENU_SELECTION_HELP_REQUEST)

3- disableMenuEntry(’01’)

1- Shall return true

2- Shall return false

3- No exception shall be thrown.

3- The SIM shall issue a SET UP MENU proactive command with entry ’02’ only.

2

Check menu state after
enabling a previously disabled entry
not registered to EVENT_MENU_SELECTION_HELP_REQUEST

1- enableMenuEntry(’01’)

2- isEventSet(EVENT_MENU_SELECTION)

3- isEventSet(EVENT_MENU_SELECTION_HELP_REQUEST)

1- No exception shall be thrown.

2- Shall return true.

3- Shall return false.

3- The SIM shall issue a SET UP MENU proactive command with entry ’01’ and ’02’.

3

Check menu state before
enabling a previously enabled entry
registered to EVENT_MENU_SELECTION_HELP_REQUEST

1- change Menu Entry ’02’ to indicate help supported

2- isEventSet(EVENT_MENU_SELECTION)

3- isEventSet(EVENT_MENU_SELECTION_HELP_REQUEST)

4- disableMenuEntry(’02’)

2- Shall return true

3- Shall return true

4- No exception shall be thrown

4- The SIM shall issue a SET UP MENU proactive command with entry ’01’. The help information available flag.is not verified

4

Check menu state after
enabling a previously enabled entry
registered to EVENT_MENU_SELECTION_HELP_REQUEST

1- enableMenuEntry(’02’).

2- isEventSet(EVENT_MENU_SELECTION)

3- isEventSet(EVENT_MENU_SELECTION_HELP_REQUEST)

1- No exception shall be thrown.

2- Shall return true.

3- Shall return true.

3- The SIM shall issue a SET UP MENU proactive command with entries ’01’ and ’02’ indicating help supported.

5

Enabling invalid entries

For ID ranging from ’00’ to ‘FF’ except ’01’ and ’02’, the applet calls enableMenuEntry(ID) method.

Each time a Toolkit Exception with MENU_ENTRY_NOT_FOUND reason code shall be thrown.

6.2.9.5.4 Test Coverage

CRR number

Test case number

N1

1 2, 3, 4

N2

1, 2, 3, 4

N3

1, 2, 3, 4

C1

5

6.2.9.6 Method getEntry

Test Area Reference: API_2_TKR_GETY.

6.2.9.6.1 Conformance requirement:

The method with following header shall be compliant to its definition in the API.

public static ToolkitRegistry getEntry()

throws ToolkitException

6.2.9.6.1.1 Normal execution

  • CRRN1: returns a reference to the applet ToolkitRegistry object of the calling applet.
  • CRRN2: Each successive call to getEntry() method shall return the same object.

6.2.9.6.1.2 Parameters error

No requirements.

6.2.9.6.1.3 Context errors

No requirements.

6.2.9.6.2 Test suite files

Test Script: API_2_TKR_GETY_1.scr

Test Applet: API_2_TKR_GETY_1.java

Load Script: API_2_TKR_GETY_1.ldr

Cleanup script: API_2_TKR_GETY_1.clr

Parameter File: API_2_TKR_GETY_1.par

6.2.9.6.3 Test procedure

Id

Description

API Expectation

APDU Expectation

1

Installation

In the constructor, the applet instance calls the getEntry() method.

Returns a not null ToolkitRegistry instance.

2

Check it returns the same entry

The applet calls the getEntry() method again.

Returns the same ToolkitRegistry instance as for test case 1.

6.2.9.6.4 Test Coverage

CRR number

Test case number

N1

1

N2

2

6.2.9.7 Method getPollInterval

Test Area Reference: API_2_TKR_GPOL.

6.2.9.7.1 Conformance requirement

The method with following header shall be compliant to its definition in the API.

public short getPollInterval()

6.2.9.7.1.1 Normal execution

  • CRRN1: shall return a value between 1 and 15300 if applet is registered to EVENT_STATUS_COMMAND event.
  • CRRN2: shall return POLL_NO_DURATION value (0) if the toolkit applet is not registered to EVENT_STATUS_COMMAND event.

6.2.9.7.1.2 Parameters error

No requirements.

6.2.9.7.1.3 Context errors

No requirements.

6.2.9.7.2 Test suite files

Test Script: API_2_TKR_GPOL_1.scr

Test Applet: API_2_TKR_GPOL_1.java

Load Script: API_2_TKR_GPOL_1.ldr

Cleanup script: API_2_TKR_GPOL_1.clr

Parameter File: API_2_TKR_GPOL_1.par

6.2.9.7.3 Test procedure

Id

Description

API Expectation

APDU Expectation

1

Applet isn’t registered to EVENT_STATUS_COMMAND

getPollInterval().

Shall return 0.

2

Requesting max duration

1- requestPollInterval(15300)

2- Reset and initialize the card

3- getPollInterval()

1- No exception shall be thrown.

3- Shall return a value between 1 and 15300.

3

Requesting System Duration

1- requestPollInterval(POLL_SYSTEM_DURATION)

2- Reset and initialize the card

3- getPollInterval().

1- No exception shall be thrown.

3- Shall return a value between 1 and 15300.

4

Requesting no Duration

1- requestPollInterval(POLL_NO_DURATION)

2- Reset and initialize the card

3- getPollInterval().

1- No exception shall be thrown.

3- Shall return 0.

6.2.9.7.4 Test Coverage

CRR number

Test case number

N1

2, 3

N2

1, 4

6.2.9.8 Method initMenuEntry

Test Area Reference: API_2_TKR_IMET_BSSBZBS.

6.2.9.8.1 Conformance requirement:

The method with following header shall be compliant to its definition in the API.

public byte initMenuEntry(byte[] menuEntry,

short offset,

short length,

byte nextAction,

boolean helpSupported,

byte iconQualifier,

short iconIdentifier)

throws java.lang.NullPointerException,

java.lang.ArrayIndexOutOfBoundsException,

ToolkitException

6.2.9.8.1.1 Normal execution

  • CRRN1: The SIM Toolkit Framework shall automatically update the menu stored in the ME by issuing a SETUP MENU proactive command. The later will reflect the changes done for the entry. The SIM Toolkit Framework shall use the data of the EF sume file in order to build the SET UP MENU command.
  • CRRN2: a call to isEventSet() method on EVENT_MENU_SELECTION shall return true after the 1st successful call (without an exception).
  • CRRN3: if helpSupported was true then a following call to isEventSet() method on EVENT_MENU_SELECTION_HELP_REQUEST event shall return true .
  • CRRN4: if helpSupported was true then after the completion of the SETUP MENU command, if an ENVELOPE(MENU_SELECTION_HELP_REQUEST) command is received by the SIM for this entry, then the SIM Toolkit framework shall trigger the applet.
  • CRRN5: if help supported was true, the SIM Toolkit Framework shall issue a SETUP MENU command with command qualifier = ’80’.
  • CRRN6: if helpSupported was false and there isn’t any menu entry supporting help then a call to isEventSet() method on EVENT_MENU_SELECTION_HELP_REQUEST event shall return false.
  • CRRN7: The SIM Toolkit Framework shall supply in the SET UP MENU command with the icon identifier provided in the icon identifier list within the item icon identifier list Simple TLV if all the applets registered to the EVENT_MENU_SELECTION provide it.
  • CRRN8: The SIM Toolkit Framework shall set in the SET UP MENU command with the Icon list qualifier transmitted to the ME as ‘icon is not self explanatory’ if one of the applet registered prefers this qualifier.
  • CRRN9: If Next Action Indicator was different from ’00’, the SIM Toolkit Framework shall issue a SETUP MENU proactive command containing an Items Next Action Indicator simple TLV with the comprehension flag set to 0.
  • CRRN10: After the completion of the SETUP MENU command, if an ENVELOPE (MENU_SELECTION) command is received by the SIM for this identifier, then the SIM Toolkit framework shall trigger the applet.

6.2.9.8.1.2 Parameters error

  • CRRP1: Shall throw java.lang.NullPointerException – if menuEntry is null.
  • CRRP2: Shall throw java.lang.ArrayIndexOutOfBoundsException – if offset would cause access outside array bounds.
  • CRRP3: Shall throw java.lang.ArrayIndexOutOfBoundsException – if length would cause access outside array bounds.
  • CRRP4:Shall throw java.lang.ArrayIndexOutOfBoundsException – if both offset and length would cause access outside array bounds.

6.2.9.8.1.3 Context errors

  • CRRC1: Shall throw ALLOWED_LENGTH_EXCEEDED if the menu entry string is bigger than the allocated space.
  • CRRC2: Shall throw REGISTRY_ERROR if the menu entry cannot be initialized (e.g. no more item data in applet loading parameter).

6.2.9.8.2 Test suite files

Additional requirements for the GSM personalization:

– content of EF sume shall be:

– Title Alpha Identifier: "TOOLKIT TEST"

– Test case trigger: 1- Applet instantiation

2- Menu selection

3- Menu selection Help Supported

Test Script: API_2_TKR_IMET_BSSBZBS_1.scr

Test Applet: API_2_TKR_IMET_BSSBZBS_1.java

Installation parameter:

Same as default applet but with:

– Maximum text length for a menu entry: 15

– Maximum number of menu entries: 6

– Position / Identifier for each menu entry: ’01’/’01’, ’02’/’02’, ’03’/’03’, ’04’/’04’, ’05’/’05’, and ’06’/’06’

Load Script: API_2_TKR_IMET_BSSBZBS_1.ldr

Cleanup script: API_2_TKR_IMET_BSSBZBS_1.clr

Parameter File: API_2_TKR_IMET_BSSBZBS_1.par

6.2.9.8.3 Test procedure

Id

Description

API Expectation

APDU Expectation

1

NULL as parameter to menuEntry

MenuEntry = NULL

Shall throw a java.lang.NullPointerException.

2

Offset > menuEntry.length

MenuEntry = "ToolkitTest"

Offset = 12

Length = 0

Shall throw java.lang.ArrayIndexOutOfBoundsException.

3

Offset < 0

MenuEntry = "ToolkitTest"

Offset = -1

Length = 11

Shall throw java.lang.ArrayIndexOutOfBoundsException.

4

Offset = 255

MenuEntry = "ToolkitTest"

Offset = 255

Length = 11

Shall throw java.lang.ArrayIndexOutOfBoundsException.

5

Length = menuEntry.length+1

MenuEntry = "ToolkitTest"

Offset = 0

Length = 12

Shall throw java.lang.ArrayIndexOutOfBoundsException.

6

Length < 0

MenuEntry = "ToolkitTest"

Offset = 0

Length = -1

Shall throw java.lang.ArrayIndexOutOfBoundsException.

7

Offset + length > menuEntry.length

MenuEntry = "ToolkitTest"

Offset = 11

Length = 1

Shall throw java.lang.ArrayIndexOutOfBoundsException.

8

MenuEntry.length > size allocated at loading for each menu entry

MenuEntry = "ToolkitTest impossible"

Offset = 0

Length = 16

ALLOWED_LENGTH_EXCEEDED ToolkitException is thrown.

9

Successful call,
menuEntry is the whole buffer

1- initMenuEntry()

MenuEntry = "TOOLKIT TEST 1"

Offset = 0

Length = 14

NextAction = ’00’

HelpSupported = false

IconQualifier = ’00’

IconIdentifier = 0

2- isEventSet(EVENT_MENU_SELECTION)

1- No exception shall be thrown, Shall return ID ’01’.

2- Shall return true.

10

Successful call,
menuEntry part of a buffer

1- initMenuEntry()

MenuEntry = "1234567TOOLKIT TEST 2"

Offset = 7

Length = 14

NextAction = ’00’

HelpSupported = false

IconQualifier = ’00’

IconIdentifier = 0

2-isEventSet(EVENT_MENU_SELECTION_HELP_REQUEST)

1- No exception shall be thrown, Shall return ID ’02’.

2- Shall return false.

11

Successful call,
menuEntry with help supported

1- initMenuEntry()

MenuEntry = "TOOLKIT TEST 3"

Offset = 0

Length = 14

NextAction = ’00’

HelpSupported = true

IconQualifier = ’00’

IconIdentifier = 0

2- isEventSet(EVENT_MENU_SELECTION_HELP_REQUEST)

1- No exception shall be thrown, Shall return ID ’03’

2- Shall return true.

12

Successful call,
menuEntry with an Icon

MenuEntry = "TOOLKIT TEST 4"

Offset = 0

Length = 14

NextAction = ’00’

HelpSupported = false

IconQualifier = ’01’ [icon not self explanatory]

IconIdentifier = 1

1- No exception shall be thrown.

2- Shall return ID ’04’

13

Successful call,
menuEntry with a next action indication

MenuEntry = "TOOLKIT TEST 5"

Offset = 0

Length = 14

NextAction = ’24’ [Select Item]

HelpSupported = false

IconQualifier = ’00’

IconIdentifier = 0

1- No exception shall be thrown.

2- Shall return ID ’05’

14

Successful call,
length = 0

initMenuEntry()

MenuEntry = "ToolkitTest"

Offset = 0

Length = 0

NextAction = ’00’

HelpSupported = false

IconQualifier = ’00’

IconIdentifier = 0

No exception shall be thrown, Shall return ID ’06’.

15

Initialize more entry than allocated at loading

MenuEntry = "ToolkitTest"

Offset = 0

Length = 11

REGISTRY_ERROR
ToolkitException is thrown.

16

Dynamic update of the menu stored by the ME

Fetch

Card shall Send a SetUpMenu Proactive command:

[CommandQualifier]=help supported

[AlphaId]="TOOLKIT TEST"

[ItemId=1] = "TOOLKIT TEST 1"

[ItemId=2] = "TOOLKIT TEST 2"

[ItemId=3] = "TOOLKIT TEST 3"

[ItemId=4] = "TOOLKIT TEST 4"

[ItemId=5] = "TOOLKIT TEST 5"
[ItemId=6] = ""
[ItemsNextAction]=06000000002400

17

Check Applet is triggered by ENVELOPE(MENU_SELECTION) command

Menu Entry ID = ’01’

Applet is trigged by an ENVELOPE(MENU_SELECTION) command & Menu Entry ID = ’01’

18

Check Applet is triggered by ENVELOPE(MENU_SELECTION) command

Menu Entry ID = ’02’

Applet is trigged by an ENVELOPE(MENU_SELECTION) command & Menu Entry ID = ’02’

19

Check Applet is triggered by ENVELOPE(MENU_SELECTION) command

Menu Entry ID = ’03’

Applet is trigged by an ENVELOPE(MENU_SELECTION) command & Menu Entry ID = ’03’

20

Check Applet is triggered by ENVELOPE(MENU_SELECTION) command

Menu Entry ID = ’04’

Applet is trigged by an ENVELOPE(MENU_SELECTION) command & Menu Entry ID = ’04’

21

Check Applet is triggered by ENVELOPE(MENU_SELECTION) command

Menu Entry ID = ’05’

Applet is trigged by an ENVELOPE(MENU_SELECTION) command & Menu Entry ID = ’05’

22

Check Applet is triggered by ENVELOPE (MENU_SELECTION_HELP_REQUEST) command

Menu Entry ID = ’03’

Applet is trigged by an ENVELOPE(MENU_SELECTION_HELP_REQUEST) command & Menu Entry ID = ’03’

23

Check Applet is triggered by ENVELOPE(MENU_SELECTION) command

Menu Entry ID = ’06’

Applet is trigged by an ENVELOPE(MENU_SELECTION) command & Menu Entry ID = ’06’

6.2.9.8.4 Test Coverage

CRR number

Test case number

N1

16

N2

9

N3

11

N4

22

N5

11, 16

N6

10

N7

12, 16

N8

12, 16

N9

13, 16

N10

9, 10, 11, 12, 13, 14, 17, 18, 19, 20, 21, 23

P1

1

P2

2, 3, 4

P3

5, 6

P4

7

C1

8

C2

14

6.2.9.9 Method isEventSet

Test Area Reference: API_2_TKR_IEVSB.

6.2.9.9.1 Conformance requirement

The method with following header shall be compliant to its definition in the API.

public boolean isEventSet(byte event)

6.2.9.9.1.1 Normal execution

  • CRRN1: shall return true if the event is set in the Toolkit Registry for the applet.
  • CRRN2: shall return false if the event isn’t set in the Toolkit Registry for the applet.

6.2.9.9.1.2 Parameters error

No requirements.

6.2.9.9.1.3 Context errors

No requirements.

6.2.9.9.2 Test suite files

Test Script: API_2_TKR_IEVSB_1.scr

Test Applet: API_2_TKR_IEVSB_1.java

Installation parameter:

Same as default applet but with:

– Maximum text length for a menu entry: 15

– Maximum number of menu entries: 1

– Position / Identifier for each menu entry: ’01’/’01’

– Maximum number of timers: 1

Load Script: API_2_TKR_IEVSB_1.ldr

Cleanup script: API_2_TKR_IEVSB_1.clr

Parameter File: API_2_TKR_IEVSB_1.par

6.2.9.9.3 Test procedure

Id

Description

API Expectation

APDU Expectation

1

Events aren’t set

Applet calls isEventSet() for each events ranging from 1 to 127 excepted EVENT_FORMATTED_SMS_PP_ENV and EVENT_MENU_SELECTION.

Shall return false each time.

2

For EVENT_FORMATTED_SMS_PP_ENV

isEventSet (EVENT_FORMATTED_SMS_PP_ENV)

Shall return true.

3

For EVENT_MENU_SELECTION

isEventSet (EVENT_MENU_SELECTION)

Shall return true

4

After clearing EVENT_FORMATTED_SMS_PP_ENV

1- clearEvent(EVENT_FORMATTED_SMS_PP_ENV)

2- isEventSet(EVENT_FORMATTED_SMS_PP_ENV).

1- No exception shall be thrown.

2- Shall return false.

5

Setting events

1- For each SUPPORTED and ALLOWED events for setEvent(), applet calls:

1.1- setEvent() method

1.2- isEventSet() method.

1.1- No exception shall be thrown.

1.2- Shall return true each time.

6

For EVENT_MENU_SELECTION_HELP_REQUEST

1- isEventSet (EVENT_MENU_SELECTION_HELP_REQUEST)

2- call changeMenuEntry with help supported

3- isEventSet (EVENT_MENU_SELECTION_HELP_REQUEST)

1- Shall return false.

3- Shall return true

7

For EVENT_TIMER_EXPIRATION

1- isEventSet(EVENT_TIMER_EXPIRATION)

2- call allocateTimer()

3- isEventSet(EVENT_TIMER_EXPIRATION)

1- Shall return false.

3- Shall return true

8

For EVENT_STATUS_COMMAND

1- isEventSet(EVENT_STATUS_COMMAND)

2- call requestPollInterval(POLL_SYSTEM_DURATION)

3- isEventSet(EVENT_STATUS_COMMAND)

1- Shall return false.

3- Shall return true

6.2.9.9.4 Test Coverage

CRR number

Test case number

N1

2, 3, 4, 5, 6, 7, 8

N2

1, 5, 6, 7, 8

6.2.9.10 Method releaseTimer

Test Area Reference: API_2_TKR_RTIMB.

6.2.9.10.1 Conformance requirement

The method with following header shall be compliant to its definition in the API.

public void releaseTimer(byte timerIdentifier)

throws ToolkitException

6.2.9.10.1.1 Normal execution

  • CRRN1: if it was the last allocated timer for the applet then a following call to isEventSet() method for EVENT_TIMER_EXPIRATION should return false.
  • CRRN2: if applet has timers allocated then a call to isEventSet(EVENT_TIMER_EXPIRATION) shall return true.
  • CRRN3: After invocation of the method the indicated timer shall be released and available for reallocation.
  • CRRN4: The applet is deregistered of the EVENT_TIMER_EXPIRATION for the indicated Timer Identifier.

6.2.9.10.1.2 Parameters error

  • CRRP1: shall throw a ToolkitException with INVALID_TIMER_ID reason if the timer identifier isn’t between 1 and 8.

6.2.9.10.1.3 Context errors

  • CRRC1: shall throw a ToolkitException with INVALID_TIMER_ID reason if the timer is valid but isn’t allocated to this applet.

6.2.9.10.2 Test suite files

Test Script: API_2_TKR_RTIMB_1.scr

Test Applet: API_2_TKR_RTIMB_1.java

Installation parameter:

As Default, except max timer which is set to 8.

Load Script: API_2_TKR_RTIMB_1.ldr

Cleanup script: API_2_TKR_RTIMB_1.clr

Parameter File: API_2_TKR_RTIMB_1.par

6.2.9.10.3 Test procedure

Id

Description

API Expectation

APDU Expectation

1

Releasing not allocated timers

For each timer ID ranging from ’00’ to ‘FF’, applet calls releaseTimer(ID).

Each time, method shall throw a ToolkitException with reason code INVALID_TIMER_ID.

2

Releasing allocated timers

1- 8 * allocateTimer() .

2- 7 * releaseTimer(id).

3- isEventSet(EVENT_TIMER_EXPIRATION)

1- No exception shall be thrown.

2- Each time, no exception shall be thrown.

3- Shall return true

3

Releasing invalid timer ID

1- releaseTimer(‘FF’) method

2- isEventSet(EVENT_TIMER_EXPIRATION)

1- Shall throw a ToolkitException with INVALID_TIMER_ID reason code.

2- Shall return true.

4

Releasing last timer

1- releaseTimer(last timer allocated)

2- isEventSet(EVENT_TIMER_EXPIRATION)

1- No exception shall be thrown.

2- Shall return false.

5

Checking we can allocate timers after they have been released

8 * allocateTimer().

No exception shall be thrown.

6

Releasing all timers.

For 1 to 8, releaseTimer(id).

No exception shall be thrown.

7

Checking applet isn’t triggered by ENVELOPE(TIMER_EXPIRATION) command

Send ENVELOPE(TIMER_EXPIRATION)

Applet is not trigged by an ENVELOPE(TIMER_EXPIRATION) command

6.2.9.10.4 Test Coverage

CRR number

Test case number

N1

4

N2

2, 3

N3

5, 6

N4

7

P1

1, 3

C1

Framework

6.2.9.11 Method requestPollInterval

Test Area Reference: API_2_TKR_RPOLS.

6.2.9.11.1 Conformance requirement

The method with following header shall be compliant to its definition in the API.

public void requestPollInterval(short duration)

throws ToolkitException

6.2.9.11.1.2 Normal execution

  • CRRN1: If duration is between 1 and 15 300 or equal to POLL_SYSTEM_DURATION, the applet registers to EVENT_STATUS_COMMAND.
  • CRRN2: If duration is POLL_NO_DURATION, the applet is deregistered from EVENT_STATUS_COMMAND.

6.2.9.11.1.2 Parameters error

  • CRRP1: the method should throw a ToolkitException with REGISTRY_ERROR reason if duration is > 15 300 or is < -1 (POLL_SYSTEM_DURATION).

6.2.9.11.1.3 Context errors

No Requirements.

6.2.9.11.2 Test suite files

Test Script: API_2_TKR_RPOLS_1.scr

Test Applet: API_2_TKR_RPOLS_1.java

Load Script: API_2_TKR_RPOLS_1.ldr

Cleanup script: API_2_TKR_RPOLS_1.clr

Parameter File: API_2_TKR_RPOLS_1.par

6.2.9.11.3 Test procedure

Id

Description

API Expectation

APDU Expectation

1

Requesting a value between 1 and 15300 s

1- isEventSet(EVENT_STATUS_COMMMAND)

2- requestPollInterval(duration) for boundaries values: 1, 255, 256, 15300.

3- isEventSet(EVENT_STATUS_COMMAND).

1- Shall return false.

2- No exception shall be thrown.

3- Shall return true.

2

Check Applet is triggered by a STATUS command

1- reset and card initialization

2- Send STATUS command

2- Applet is trigged by a STATUS command

3

Requesting POLL SYSTEM DURATION

1- isEventSet(EVENT_STATUS_COMMMAND).

2- RequestPollInterval(POLL_SYSTEM_DURATION).

3- IsEventSet(EVENT_STATUS_COMMAND).

1- Shall return true.

2- No exception shall be thrown.

3- Shall return true.

4

Check Applet is triggered by a STATUS command

1- reset and card initialization

2- Send STATUS command

2- Applet is trigged by a STATUS command

5

Requesting invalid duration

requestPollInterval(duration) for following values: 15301, 32767, -2, -32768

Each time, a ToolkitException with REGISTRY_ERROR reason code, shall be thrown.

6

Requesting POLL NO DURATION

1- isEventSet(EVENT_STATUS_COMMMAND)

2- requestPollInterval(POLL_NO_DURATION)

3- isEventSet(EVENT_STATUS_COMMAND)

1- Shall return true.

2- No exception shall be thrown.

3- Shall return false.

7

Check Applet isn’t triggered by an STATUS command.

1- reset and card initialization

2- Send STATUS command

2- Applet is not trigged by a STATUS command

6.2.9.11.4 Test Coverage

CRR number

Test case number

N1

1, 2, 3, 4

N2

6, 7

P1

5

6.2.9.12 Method setEvent

Test Area Reference: API_2_TKR_SEVTB.

6.2.9.12.1 Conformance Requirement

The method with following header shall be compliant to its definition in the API.

public void setEvent(byte id)

throws ToolkitException

6.2.9.12.1.1 Normal execution

  • CRRN1: a following call to isEventSet() method with the same event id shall answer true for the applet.
  • CRRN2: the SIM Toolkit Framework shall trigger the applet if an occurrence of the set event happens.
  • CRRN3: this method shall accept all the events defined in GSM 0319 excepted: EVENT_MENU_SELECTION, EVENT_MENU_SELECTION_HELP_REQUEST, EVENT_TIMER_EXPIRATION, EVENT_STATUS_COMMAND.

6.2.9.12.1.2 Parameters error

  • CRRP1: shall throw a ToolkitException with EVENT_NOT_SUPPORTED reason if event is 0.
  • CRRP2: shall throw a ToolkitException with EVENT_NOT_ALLOWED reason if event is EVENT_MENU_SELECTION.
  • CRRP3: shall throw a ToolkitException with EVENT_NOT_ALLOWED reason if event is EVENT_MENU_SELECTION_HELP_REQUEST.
  • CRRP4: shall throw a ToolkitException with EVENT_NOT_ALLOWED reason if event is EVENT_TIMER_EXPIRATION.
  • CRRP5: shall throw a ToolkitException with EVENT_NOT_ALLOWED reason if event is EVENT_STATUS_COMMAND.

6.2.9.12.1.3 Context errors

  • CRRC1: shall throw a ToolkitException with EVENT_ALREADY_REGISTERED if event is EVENT_CALL_CONTROL_BY_SIM but another applet is already registered to it.
  • CRRC2: shall throw a ToolkitException with EVENT_ALREADY_REGISTERED if event is EVENT_MO_SHORT_MESSAGE_CONTROL_BY_SIM but another applet is already registered to it.

6.2.9.12.2 Test suite files

Test Script: API_2_TKR_SEVTB_1.scr

Test Applet: API_2_TKR_SEVTB_1.java

API_2_TKR_SEVTB_2.java

Load Script: API_2_TKR_SEVTB_1.ldr

The load script installs the 2 instances.

Cleanup script: API_2_TKR_SEVTB_1.clr

Parameter File: API_2_TKR_SEVTB_1.par

6.2.9.12.3 Test Procedure

Id

Description

API Expectation

APDU Expectation

1

Applet 1 is triggered by ENVELOPE(SMS_ PP_FORMATTED) command.

Send ENVELOPE(SMS_PP_FORMATTED)

Applet 1 shall be triggered

2

Setting ALLOWED and SUPPORTED events

1- For all events defined in GSM 0319 (from 1 to 19) and allowed:
EVENT_PROFILE_DOWNLOAD, EVENT_FORMATTED_SMS_PP_ENV, EVENT_FORMATTED_SMS_PP_UPD, EVENT_UNFORMATTED_SMS_PP_ENV, EVENT_UNFORMATTED_SMS_PP_UPD, EVENT_FORMATTED_SMS_CB, EVENT_UNFORMATTED_SMS_CB, EVENT_CALL_CONTROL_BY_SIM, EVENT_MO_SHORT_MESSAGE_CONTROL_BY_SIM, EVENT_EVENT_DOWNLOAD_MT_CALL, EVENT_EVENT_DOWNLOAD_CALL_CONNECTED, EVENT_EVENT_DOWNLOAD_CALL_DISCONNECTED, EVENT_EVENT_DOWNLOAD_LOCATION_STATUS, EVENT_EVENT_DOWNLOAD_USER_ACTIVITY, EVENT_EVENT_DOWNLOAD_IDLE_SCREEN_AVAILABLE, EVENT_EVENT_DOWNLOAD_CARD_READER_STATUS

EVENT_EVENT_DOWNLOAD_LANGUAGE_SELECTION, EVENT_EVENT_DOWNLOAD_BROWSER_TERMINATION.

1.1- clearEvent(event)

1.2- isEventSet(event)

1.3- setEvent(event)

1.4- isEventSet(event)

1.5- clearEvent(event)

1.1- No exception shall be thrown.

1.2- Shall return false.

1.3- No exception shall be thrown.

1.4- Shall return true.

1.5- No exception shall be thrown.

3

Event 0

Call setEvent(0)

Shall throw a ToolkitException with EVENT_NOT_SUPPORTED reason code.

4

Setting EVENT_MENU_SELECTION

Call setEvent(EVENT_MENU_SELECTION)

Shall throw a ToolkitException with EVENT_NOT_ALLOWED reason code.

5

Setting EVENT_MENU_SELECTION_HELP_REQUEST

Call setEvent(EVENT_MENU_SELECTION_HELP_REQUEST)

Shall throw a ToolkitException with EVENT_NOT_ALLOWED reason code.

6

Setting EVENT_TIMER_EXPIRATION

Call setEvent(EVENT_TIMER_EXPIRATION)

Shall throw a ToolkitException with EVENT_NOT_ALLOWED reason code.

7

Setting EVENT_STATUS_COMMAND

Call setEvent(EVENT_STATUS_COMMAND)

Shall throw a ToolkitException with EVENT_NOT_ALLOWED reason code.

8

Setting EVENT_CALL_CONTROL_BY_SIM

Call setEvent(EVENT_CALL_CONTROL_BY_SIM)

No Exception shall be thrown

9

Setting EVENT_MO_SHORT_MESSAGE_CONTROL_BY_SIM

Call setEvent(EVENT_MO_SHORT_MESSAGE_CONTROL_BY_SIM)

No Exception shall be thrown

10

Check applet is triggered by an ENVELOPE(CALL_CONTROL_BY_SIM)

Trigger the applet

Applet is trigged by an ENVELOPE(CALL_CONTROL_BY_SIM)

11

Check applet is triggered by an ENVELOPE(MO_SHORT_MESSAGE_CONTROL_BY_SIM)

Trigger the Applet

Applet is trigged by an ENVELOPE(MO_SHORT_MESSAGE_CONTROL_BY_SIM)

12

Applet 2 is triggered by ENVELOPE(SMS_ PP_DOWNLOAD) command.

Trigger the applet 2

Applet 2 is trigged by an ENVELOPE(SMS_ PP_DOWNLOAD) command

13

Applet 2 registers to CALL_CONTROL_BY_SIM
but it is already assigned

setEvent(EVENT_CALL_CONTROL_BY_SIM)

Shall throw a ToolkitException with EVENT_ALREADY_REGISTERED reason code.

14

Applet 2 registers to MO_MESSAGE_CONTROL_BY SIM
but it is already assigned

setEvent(EVENT_MO_SHORT_MESSAGE_CONTROL_BY_SIM)

Shall throw a ToolkitException with EVENT_ALREADY_REGISTERED reason code.

6.2.9.12.4 Test Coverage

CRR number

Test case number

N1

2

N2

1, 8, 9, 10, 11, 12

N3

2, 4, 5, 6, 7

P1

3

P2

4

P3

5

P4

6

P5

7

C1

13

C2

14

6.2.9.13 Method setEventList

Test Area Reference: API_2_TKR_SEVL_BSS.

6.2.9.13.1 Conformance Requirement

The method with following header shall be compliant to its definition in the API.

public void setEventList(byte[] eventList,

short offset,

short length)

throws java.lang.NullPointerException,

java.lang.ArrayIndexOutOfBoundsException,

ToolkitException

6.2.9.13.1.1 Normal execution

  • CRRN1: for all events set successfully by this method, a call to isEventSet() method should return true.
  • CRRN2: the SIM Toolkit Framework shall trigger the applet if an occurrence of one of the successfully registered events happens.
  • CRRN3: this method shall accept all the events defined in GSM 0319 excepted: EVENT_MENU_SELECTION, EVENT_MENU_SELECTION_HELP_REQUEST, EVENT_TIMER_EXPIRATION, EVENT_STATUS_COMMAND.

6.2.9.13.1.2 Parameters error

  • CRRP1: shall throw a java.lang.NullPointerException if eventList is null.
  • CRRP2: shall throw a java.lang.ArrayIndexOutOfBoundsException if offset would cause access outside array bounds.
  • CRRP3: shall throw a java.lang.ArrayIndexOutOfBoundsException if length would cause access outside array bounds.
  • CRRP4: shall throw a java.lang.ArrayIndexOutOfBoundsException if both offset and length would cause access outside array bounds.
  • CRRP5: shall throw a ToolkitException with EVENT_NOT_SUPPORTED reason if event is 0.
  • CRRP6: shall throw a ToolkitException with EVENT_NOT_ALLOWED reason if eventList contains EVENT_MENU_SELECTION.
  • CRRP7: shall throw a ToolkitException with EVENT_NOT_ALLOWED reason if eventList contains EVENT_MENU_SELECTION_HELP_REQUEST.
  • CRRP8: shall throw a ToolkitException with EVENT_NOT_ALLOWED reason if eventList contains EVENT_TIMER_EXPIRATION.
  • CRRP9: shall throw a ToolkitException with EVENT_NOT_ALLOWED reason if eventList contains EVENT_STATUS_COMMAND.

6.2.9.13.1.3 Context errors

  • CRRC1: shall throw a ToolkitException with EVENT_ALREADY_REGISTERED if eventList contains EVENT_CALL_CONTROL_BY_SIM but another applet is already registered to it.
  • CRRC2: shall throw a ToolkitException with EVENT_ALREADY_REGISTERED if eventList contains EVENT_MO_SHORT_MESSAGE_CONTROL_BY_SIM but another applet is already registered to it.

6.2.9.13.2 Test suite files

Test Script: API_2_TKR_SEVL_BSS_1.scr

Test Applet: API_2_TKR_SEVL_BSS_1.java

API_2_TKR_SEVL_BSS_2.java

Load Script: API_2_TKR_SEVL_BSS_1.ldr

The load script installs the 2 instances.

Cleanup script: API_2_TKR_SEVL_BSS_1.clr

Parameter File: API_2_TKR_SEVL_BSS_1.par

6.2.9.13.3 Test Procedure

Id

Description

API Expectation

APDU Expectation

1

Applet 1 Registering all eventList buffer

EventList = all allowed events defined in GSM 0319:
EVENT_PROFILE_DOWNLOAD, EVENT_FORMATTED_SMS_PP_ENV, EVENT_FORMATTED_SMS_PP_UPD, EVENT_UNFORMATTED_SMS_PP_ENV, EVENT_UNFORMATTED_SMS_PP_UPD, EVENT_FORMATTED_SMS_CB, EVENT_UNFORMATTED_SMS_CB, EVENT_CALL_CONTROL_BY_SIM, EVENT_MO_SHORT_MESSAGE_CONTROL_BY_SIM, EVENT_EVENT_DOWNLOAD_MT_CALL, EVENT_EVENT_DOWNLOAD_CALL_CONNECTED, EVENT_EVENT_DOWNLOAD_CALL_DISCONNECTED, EVENT_EVENT_DOWNLOAD_LOCATION_STATUS, EVENT_EVENT_DOWNLOAD_USER_ACTIVITY, EVENT_EVENT_DOWNLOAD_IDLE_SCREEN_AVAILABLE, EVENT_EVENT_DOWNLOAD_CARD_READER_STATUS

EVENT_EVENT_DOWNLOAD_LANGUAGE_SELECTION, EVENT_EVENT_DOWNLOAD_BROWSER_TERMINATION.

1- For each event in EventList clearEvent(event)

2- setEventList(eventList)

Offset = 0

Length = eventList.lentgh

3- For all events in eventList isEventSet(event)

4- For each event in EventList clearEvent(event)

1- No exception shall be thrown.

2- No exception shall be thrown.

3- Each time shall return true.

4- No exception shall be thrown.

2

Registering part of eventList buffer

EventList = all allowed events defined in GSM 0319 (see test case 1).

1- For each event in EventList clearEvent(event)

2- setEventList(eventList, offset, length)

Offset > 0

Length = eventList.lentgh – offset

3- For all events in eventList:

isEventSet(event)

4- For each event in EventList: clearEvent(event)

1- No exception shall be thrown.

2- No exception shall be thrown.

3- Each time shall return true for events ranging from offset to offset+length else shall return false.

4- No exception shall be thrown.

3

Null buffer

EventList = null

Shall throw a java.lang.NullPointerException Exception

4

Out of bounds offset

Offset = eventList.length

Length = 1

Shall throw a java.lang.ArrayIndexOutOfBounds Exception

5

Out of bounds and big offset

Offset = 255

Length = 1

Shall throw a java.lang.ArrayIndexOutOfBounds Exception

6

Offset < 0

Offset = -1

Length = 1

Shall throw a java.lang.ArrayIndexOutOfBounds Exception

7

Out of bounds length

Offset = 0

Length = eventList.length + 1

Shall throw a java.lang.ArrayIndexOutOfBounds Exception

8

Out of bounds and big length

Offset = 0

Length = 255

Shall throw a java.lang.ArrayIndexOutOfBounds Exception

9

Length < 0

Offset = 0

Length = -1

Shall throw a java.lang.ArrayIndexOutOfBounds Exception

10

Out of bounds offset + Length

Offset + length > eventList.length + 1

Shall throw a java.lang.ArrayIndexOutOfBounds Exception

11

Event 0

Call setEventList(eventList) with eventList indicating event 0

Shall throw a ToolkitException with EVENT_NOT_SUPPORTED reason code.

12

EVENT_MENU_SELECTION

Call setEventList(eventList) with eventList indicating EVENT_MENU_SELECTION

Shall throw a ToolkitException with reason code EVENT_NOT_ALLOWED.

13

EVENT_MENU_SELECTION_HELP_REQUEST

Call setEventList(eventList) with eventList indicating EVENT_MENU_SELECTION_HELP_REQUEST

Shall throw a ToolkitException with reason code EVENT_NOT_ALLOWED.

14

EVENT_TIMER_EXPIRATION

Call setEventList(eventList) with eventList indicating EVENT_TIMER_EXPIRATION

Shall throw a ToolkitException with reason code EVENT_NOT_ALLOWED.

15

EVENT_STATUS_COMMAND

Call setEventList(eventList) with eventList indicating EVENT_STATUS_COMMAND

Shall throw a ToolkitException with reason code EVENT_NOT_ALLOWED.

16

Setting EVENT_CALL_CONTROL_BY_SIM

setEventList(List, 0, 2) with List containing

EVENT_CALL_CONTROL_BY_SIM & EVENT_MO_SHORT_MESSAGE_CONTROL_BY_SIM

Shall not throw an exception

17

Check applet is triggered by an ENVELOPE(CALL_CONTROL_BY_SIM)

Reset and initialize the card

Trigger the applet

Applet is trigged by an ENVELOPE(CALL_CONTROL_BY_SIM)

18

Check applet is triggered by an ENVELOPE(MO_SHORT_MESSAGE_CONTROL_BY_SIM)

Trigger the applet

Applet is trigged by an ENVELOPE(MO_SHORT_MESSAGE_CONTROL_BY_SIM)

19

Applet 2 registers to CALL_CONTROL_BY_SIM
but it is already assigned

setEventList(MonoEventList,0,1) with MonoEventList containing EVENT_CALL_CONTROL_BY_SIM

Shall throw a ToolkitException with EVENT_ALREADY_REGISTERED reason code.

20

Applet 2 registers to MO_SHORT_MESSAGE_CONTROL_BY_SIM
but it is already assigned setEventList(MonoEventList,0,1) with MonoEventList containing EVENT_MO_SHORT_MESSAGE_CONTROL_BY_SIM

Shall throw a ToolkitException with EVENT_ALREADY_REGISTERED reason code.

6.2.9.13.4 Test Coverage

CRR number

Test case number

N1

1, 2

N2

16, 17, 18

N3

1, 2, 11, 12, 13, 14, 15

P1

3

P2

4, 5, 6

P3

7, 8, 9

P4

10

P5

11

P6

12

P7

13

P8

14

P9

15

C1

19

C2

20