Sun Microsystems Telephone Accessories 1.2 User Manual

Browse online or download User Manual for Software Sun Microsystems Telephone Accessories 1.2. Sun Microsystems Telephone Accessories 1.2 User's Manual

  • Download
  • Add to my manuals
  • Print
  • Page
    / 130
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews

Summary of Contents

Page 1 - Developers Guide

Java™ME TCK FrameworkDevelopers GuideVersion 1.2July 2007Sun Microsystems, Inc.www.sun.com

Page 2

x Java ME TCK Framework Developer’s Guide • July 2007

Page 3 - Contents

80 Java ME TCK Framework Developer’s Guide • July 2007OTATestClass name: com.sun.tck.midp.lib.OTATestThis is the base class for the Java SE technolog

Page 4

81APPENDIXBFramework BundleThis appendix describes the contents of the redistributables directory provided bythe Framework bundle. The contents of the

Page 5 - Contents v

82 Java ME TCK Framework Developer’s Guide • July 2007 tckbuild.jar - Utility classes used by TCK build. j2me-tck-framework_12.txt - Framework vers

Page 6

Appendix B Framework Bundle 83CoreThe following are core Framework files provided in the lib directory: j2mefw_jt.jar - Harness plug-in code.Most of

Page 7 - Contents vii

84 Java ME TCK Framework Developer’s Guide • July 2007 cldc_agent.jar - Standard harness agent for CLDC.Application model: MainCommunication channel

Page 8

Appendix B Framework Bundle 85 cldc_commClient.jar - Implementation of the Client interface for the CLDCdevice.This client uses HTTP for communicatio

Page 9

86 Java ME TCK Framework Developer’s Guide • July 2007Application model: XletPluggable communication channel applet_agent.jar - JavaTest agent for P

Page 10

Appendix B Framework Bundle 87Agent ClassesThe following are the agent classes and interfaces provided in the src directory: com/sun/cldc/communicati

Page 11 - Framework Keywords 94

88 Java ME TCK Framework Developer’s Guide • July 2007 com/sun/tck/midp/interview/VmAdvancedInterview com/sun/tck/midp/interview/VmInterview com/s

Page 12

Appendix B Framework Bundle 89This class provides an implementation of the harness distribution mechanism ontop of HTTP. com/sun/tck/midp/javatest/Mi

Page 13 - Code Examples

xiTablesTABLE 1-1 Configurations and Supported Test Types 8TABLE C-1 Framework Test Description Fields 92TABLE C-2 Framework Keywords 94

Page 14

90 Java ME TCK Framework Developer’s Guide • July 2007

Page 15 - Before You Read This Book

91APPENDIXCTest Description Fields andKeywordsThis appendix describes the Framework supported fields and keywords for testdescription files.The JavaTe

Page 16 - How This Book Is Organized

92 Java ME TCK Framework Developer’s Guide • July 2007TABLE C-1 lists the test description fields supported by the Framework and describeshow their v

Page 17 - Examples

Appendix C Test Description Fields and Keywords 93executeArgs An array of strings that are passed to the test classes being executed. Thearguments mig

Page 18 - Related Documentation

94 Java ME TCK Framework Developer’s Guide • July 2007KeywordsKeywords are tokens associated with specific tests. Keywords have the followingfunction

Page 19 - Sun Welcomes Your Comments

Appendix C Test Description Fields and Keywords 95runtime Identifies tests used with runtime products.trusted Identifies tests which must be run in a

Page 20

96 Java ME TCK Framework Developer’s Guide • July 2007

Page 21 - Introduction

97GlossaryThe definitions in this glossary are intended for Java Compatibility Test Tools (JavaCTT) and Java Technology Compatibility Kits (TCK). Some

Page 22

98 Java ME TCK Framework Developer’s Guide • July 2007appeals process A process for challenging the fairness, validity, accuracy, or relevance of one

Page 23 - Use of the Framework

Glossary 99boundary valueanalysis A test case development technique that entails developing additional test casesbased on the boundaries defined by pr

Page 24 - Connectivity Requirements

xii Java ME TCK Framework Developer’s Guide • July 2007

Page 25 - Resource Limitations

100 Java ME TCK Framework Developer’s Guide • July 2007distributed tests Tests consisting of multiple components that are running on both the devicean

Page 26

Glossary 101Java Platform, StandardEdition (Java SEplatform) A set of specifications that defines the desktop runtime environment requiredfor the depl

Page 27 - Chapter 1 Introduction 7

102 Java ME TCK Framework Developer’s Guide • July 2007JavaTest harness A test harness developed by Sun to manage test execution and result reportingf

Page 28 - Test Types

Glossary 103included according to the referencing rules set out in that platform editionspecification. Other referenced specifications must be referen

Page 29 - Automated Tests

104 Java ME TCK Framework Developer’s Guide • July 2007structure-basedtesting A set of test development methodologies that are based on the internalst

Page 30 - Distributed Tests

Glossary 105test commandtemplate A generalized specification of a test command in a test environment. The testcommand is specified in the test environ

Page 31 - Chapter 1 Introduction 11

106 Java ME TCK Framework Developer’s Guide • July 2007work directory A directory associated with a specific test suite and used by the JavaTestharnes

Page 32 - Interactive Tests

107IndexSymbols.jtx files, 100Aactive agent, 97active applet instance, 97agent, 97agent monitor, 97AID, 98all values, 97AMS, 98APDU, 98API, 98API membe

Page 33 - OTA Tests

108 Java ME TCK Framework Developer’s Guide • July 2007Iinstantiation, 100interactive tests, 100ISO 7816-4, 98JJAM, 101JAR, 101Java Application Manage

Page 34

Index 109work directory, 106

Page 35 - Writing an Automated Test

xiiiCode ExamplesCODE EXAMPLE 3-1 Simple Test Suite testsuite.jtt File 24CODE EXAMPLE 3-2 Simple Test Class 26CODE EXAMPLE 4-1 Required Distributed Te

Page 36

110 Java ME TCK Framework Developer’s Guide • July 2007

Page 37

xiv Java ME TCK Framework Developer’s Guide • July 2007CODE EXAMPLE 4-19 Test Description That Grants Permissions for a Security Test 65CODE EXAMPLE 4

Page 38

xvPrefaceThis guide describes how to use resources from the Java™ Platform, Micro EditionTechnology Configuration Kit Framework (Framework) to develop

Page 39 - WIRELESS_TOOLKIT=D:\\WTK25

xvi Java ME TCK Framework Developer’s Guide • July 2007 JavaTest Harness User’s Guide: Graphical User InterfaceThis guide provides a description of u

Page 40 - To Test an Updated Test Suite

Preface xviiPlatform CommandsThis document does not contain information about basic platform commands andprocedures such as shutting down the system,

Page 41

xviii Java ME TCK Framework Developer’s Guide • July 2007Typographic ConventionsThis guide uses the following typographic conventions:Related Document

Page 42

Preface xixAccessing Sun Documentation OnlineThe Java Developer Connection™ program web site enables you to access Javaplatform technical documentatio

Page 43 - Test Suite Construction

PleaseRecycleCopyright 2007 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved.Test suite develope

Page 44

xx Java ME TCK Framework Developer’s Guide • July 2007

Page 45

1CHAPTER1IntroductionThis chapter introduces using the Framework resources to develop test suites for theJava ME platform, including descriptions of t

Page 46 - Test Case

2 Java ME TCK Framework Developer’s Guide • July 2007Note – The TCK Project Planning Guide and the Java Technology Test Suite DevelopmentGuide documen

Page 47 - Test Description file

Chapter 1 Introduction 3Development EnvironmentThe following tools and resources are the minimum software requirements for theFramework development en

Page 48 - Interview

4 Java ME TCK Framework Developer’s Guide • July 2007Configuration (CDC) and a profile such as Mobile Information Device Profile(MIDP), Foundation Pro

Page 49

Chapter 1 Introduction 5Resource LimitationsHardware resources on test devices are often limited. Resource constrained devicescan quit operation when

Page 50

6 Java ME TCK Framework Developer’s Guide • July 2007Framework BundleThe Framework resources are packaged and provided to users as a zip bundle.When t

Page 51

Chapter 1 Introduction 7Framework Components on the Harness SideThe following components are used for running CLDC, MIDP, and CDC tests in theDistribu

Page 52

8 Java ME TCK Framework Developer’s Guide • July 2007An agent is a separate program that works in conjunction with the harness to runtests on the devi

Page 53

Chapter 1 Introduction 9Automated TestsAutomated tests for CLDC, MIDP, and CDC configurations execute on the testdevice without requiring user interac

Page 54 - Question getNext() {

iiiContentsPreface xv1. Introduction 1Getting Started 1Development Environment 3Use of the Framework 3Target Environment 3Connectivity Requirements 4R

Page 55

10 Java ME TCK Framework Developer’s Guide • July 2007FIGURE 1-1 Framework Configuration for Standard Automated TestsDiagram of a standard automated t

Page 56 - ■ The text for each question

Chapter 1 Introduction 11Distributed tests are typically slower (due to extra communication between remotecomponents) and more complex than simple aut

Page 57

12 Java ME TCK Framework Developer’s Guide • July 2007Interactive TestsInteractive tests are the tests that require some form of user interaction and

Page 58

Chapter 1 Introduction 13FIGURE 1-3 Framework Configuration for Interactive TestsDiagram of the interactive test configuration.OTA TestsOTA tests are

Page 59

14 Java ME TCK Framework Developer’s Guide • July 2007OTA tests validate API functionality while the device is connected to a remote host(the PC or wo

Page 60 - Building a Test Suite

15CHAPTER2Writing a Simple Automated TestAutomated test execution is the most common and simple of the test configurationsthat are run on the test dev

Page 61 - Writing Tests

16 Java ME TCK Framework Developer’s Guide • July 2007 Each test case method must take no arguments, and must return a Status objectthat represents t

Page 62 - Automated Test Execution

Chapter 2 Writing a Simple Automated Test 172. Save this file in the Simple Test Suite source asSimpleTestSuite/tests/pkg3/Test3.java.The pkg3 folder

Page 63 - With Distributed Tests

18 Java ME TCK Framework Developer’s Guide • July 2007Note – The contents of this test description file correspond to the Test3.java testclass.4. Save

Page 64 - Remote Test Component

Chapter 2 Writing a Simple Automated Test 19Building an Updated Simple Test SuiteThe following steps demonstrate how to build an updated test suite af

Page 65 - Chapter 4 Writing Tests 45

iv Java ME TCK Framework Developer’s Guide • July 2007Writing an Automated Test 15▼ To Create a Simple Automated Test 16Building an Updated Simple Tes

Page 66 - Distributed Test Execution

20 Java ME TCK Framework Developer’s Guide • July 20073. Enter the ant command to invoke the ant build script.The build creates a SimpleTestSuite-buil

Page 67 - Chapter 4 Writing Tests 47

Chapter 2 Writing a Simple Automated Test 213. Use the Configuration Editor to provide configuration information required torun the updated test suite

Page 68

22 Java ME TCK Framework Developer’s Guide • July 2007

Page 69 - Client Test Component

23CHAPTER3Test Suite ConstructionThis chapter describes the organization and construction of a Java ME technologytest suite that uses Framework resour

Page 70 - Interactive Test Execution

24 Java ME TCK Framework Developer’s Guide • July 2007 lib directory tests directory classes directory doc directorytestsuite.jtt FileThe testsuit

Page 71 - Chapter 4 Writing Tests 51

Chapter 3 Test Suite Construction 25The testsuite.jtt file is located under the root directory of the Simple Test Suite.You can also find it under the

Page 72

26 Java ME TCK Framework Developer’s Guide • July 2007Organize the tests hierarchically the way you want them displayed in the test tree.The Test Mana

Page 73

Chapter 3 Test Suite Construction 27Additional examples (Test1.java and Test2.java)can be found in the following SimpleTest Suite directories: Simple

Page 74 - Required OTA Test Keyword

28 Java ME TCK Framework Developer’s Guide • July 2007The classes directory generally contains following sub-directories: classes/preverified - Conta

Page 75 - OTA Test Description Examples

Chapter 3 Test Suite Construction 29In the test description file, $testHost and $testPort are test environmentvariables and are replaced by actual val

Page 76

Contents vremote Attribute 44remoteSource Attribute 45executeArgs Attribute 45Distributed Test Execution 46Testing User Interfaces With Interactive Te

Page 77 - OTA Test Execution

30 Java ME TCK Framework Developer’s Guide • July 20071. Define the environment variable required by the test.In the example (Test2.java), the test ca

Page 78 - FIGURE 4-4 OTA Test Execution

Chapter 3 Test Suite Construction 31a. Create a class (SampleInterview) that is a subtype of the Interviewclass.The following code creates the SampleI

Page 79 - Example of OTA Test

32 Java ME TCK Framework Developer’s Guide • July 2007d. Use the setFirstQuestion method in the constructor to specify the firstquestion in the sub-in

Page 80 - Testing Security-Constrained

Chapter 3 Test Suite Construction 33f. Implement exporting the configuration value to the test environment.One of the goals of the interview is to exp

Page 81 - Marking Untrusted Tests

34 Java ME TCK Framework Developer’s Guide • July 2007h. Use the getNext() method to determine the next question in the sub-interview.Every question e

Page 82 - Marking Trusted Tests

Chapter 3 Test Suite Construction 35j. Use the FinalQuestion marker to identify the last question in the sub-interview.At the end of the sub-interview

Page 83 - Chapter 4 Writing Tests 63

36 Java ME TCK Framework Developer’s Guide • July 20074. Update the interview .properties (resource) file.All question text is located in the intervie

Page 84 - Granting Security Permissions

Chapter 3 Test Suite Construction 37a. Create a help directory under the directory where the interview classes arelocated.For this example, use the fo

Page 85 - Chapter 4 Writing Tests 65

38 Java ME TCK Framework Developer’s Guide • July 2007d. Create a map file (sampleInterview.jhm)inthedefault directory.The JavaHelp system uses IDs fr

Page 86 - Denying Security Permissions

Chapter 3 Test Suite Construction 39e. Create the More Info topic files.The More Info topic files are provided in HTML format and displayed in theConf

Page 87 - Chapter 4 Writing Tests 67

vi Java ME TCK Framework Developer’s Guide • July 2007Marking Trusted Tests 62Using an Attribute to Mark Double-Duty Tests 63Granting or Denying Secur

Page 88

40 Java ME TCK Framework Developer’s Guide • July 2007Building a Test SuiteRefer to Chapter 2, “Building an Updated Simple Test Suite” on page 19 for

Page 89 - Chapter 4 Writing Tests 69

41CHAPTER4Writing TestsThis chapter describes how to write different types of Java ME technology tests thatuse Framework resources and to set special

Page 90 - Enabling Test Selection

42 Java ME TCK Framework Developer’s Guide • July 2007Automated Test ExecutionFIGURE 4-1 and the associated text are for CLDC and MIDP execution mode.

Page 91 - Chapter 4 Writing Tests 71

Chapter 4 Writing Tests 43While the tests from the application bundle are loaded onto the device by theAMS, the execution server establishes the seque

Page 92

44 Java ME TCK Framework Developer’s Guide • July 2007The client test component must use the send and handleMessage methods in theJ2MEDistributedTest

Page 93 - Chapter 4 Writing Tests 73

Chapter 4 Writing Tests 45The following is an example of the remote attribute entry that must be added to thetest description file.In the example, the

Page 94

46 Java ME TCK Framework Developer’s Guide • July 2007The following is an example of the executeArgs attribute entry in which the$testMsgSwitch and $t

Page 95 - Chapter 4 Writing Tests 75

Chapter 4 Writing Tests 47FIGURE 4-2 Distributed Test Execution1. getNextApp - The AMS issues a getNextApp command to the execution serveron the works

Page 96

48 Java ME TCK Framework Developer’s Guide • July 20075. Check or Send Message- The test sends either a message or a check messagerequest to the Frame

Page 97 - Test API

Chapter 4 Writing Tests 49Client Test ComponentThe client test component of the interactive test must extend theMidDistribInteractiveTest class. This

Page 98 - MultiTest

Contents viiCommServers 85Messaging 85Test Export Support Libraries 85CDC Agents 85src Directory 86Framework Server Classes and Interfaces 86Agent Cla

Page 99 - DistribInteractiveTest

50 Java ME TCK Framework Developer’s Guide • July 2007The test description might also include the remoteSource and executeArgsattributes. See “remoteS

Page 100

Chapter 4 Writing Tests 51FIGURE 4-3 Interactive Test Execution1. getNextApp - The AMS issues a getNextApp command to the execution serveron the works

Page 101 - Framework Bundle

52 Java ME TCK Framework Developer’s Guide • July 20074. Test Name - The execution server returns the name of the next test in theapplication bundle t

Page 102

Chapter 4 Writing Tests 53Testing Application Provisioning WithOTA TestsOver-the-air (OTA) tests are MIDP-specific tests that verify an OTA applicatio

Page 103 - CLDC and MIDP Execution

54 Java ME TCK Framework Developer’s Guide • July 2007done at the build time. If the test writer creates a JAR file or a JAD file with specialinformat

Page 104 - CommClients

Chapter 4 Writing Tests 55remote AttributeThe remote attribute specifies the execution command for the server testcomponent. The following is an examp

Page 105 - CDC Agents

56 Java ME TCK Framework Developer’s Guide • July 2007The following is an example of a test description for a trusted OTA test. See“remote Attribute”

Page 106

Chapter 4 Writing Tests 57OTA Test ExecutionIn FIGURE 4-4, arrows indicate the direction of dataflow between the device and theworkstation. The number

Page 107

58 Java ME TCK Framework Developer’s Guide • July 2007FIGURE 4-4 OTA Test Execution1. Request an Action - The server-side test requests an action from

Page 108 - Communication Channel

Chapter 4 Writing Tests 59Example of OTA TestThe following is an example of an OTA server component. In the example, thesource of the MIDlet suite is

Page 109

viii Java ME TCK Framework Developer’s Guide • July 2007

Page 110

60 Java ME TCK Framework Developer’s Guide • July 2007Testing Security-ConstrainedFunctionality With Security TestsThis section addresses writing diff

Page 111 - Keywords

Chapter 4 Writing Tests 61Trusted TestsTrusted tests verify API implementation behavior for signed MIDlet suites. In mostcases, these tests verify tha

Page 112 - Field Description

62 Java ME TCK Framework Developer’s Guide • July 2007If other keywords (such as positive) are used, they would be included in the sameline as the unt

Page 113

Chapter 4 Writing Tests 63The following is an example of adding a trusted keyword entry to a testdescription file.When other keywords (such as positiv

Page 114

64 Java ME TCK Framework Developer’s Guide • July 2007Granting or Denying Security PermissionsA security test might require that certain permissions b

Page 115 - Keyword Description

Chapter 4 Writing Tests 65The following is an example of a grant attribute and permissions added to a testdescription file.The value of the grant attr

Page 116

66 Java ME TCK Framework Developer’s Guide • July 2007Denying Security PermissionsWhen writing security tests, a test writer can specify the permissio

Page 117 - Glossary

Chapter 4 Writing Tests 67Adding Resource Files in TestsTest writers must sometimes develop tests that require extra resource files (such asimage, dat

Page 118

68 Java ME TCK Framework Developer’s Guide • July 2007For example, the following test requires a Duke.png to create the Image object forsuccessful exe

Page 119 - Glossary 99

Chapter 4 Writing Tests 69The following is an example of a test description file containing a resources entry,directory, and file name.CODE EXAMPLE 4-

Page 120

ixFiguresFIGURE 1-1 Framework Configuration for Standard Automated Tests 10FIGURE 1-2 Framework Configuration for Distributed Tests 11FIGURE 1-3 Frame

Page 121 - Glossary 101

70 Java ME TCK Framework Developer’s Guide • July 2007Enabling Test SelectionTest selection in a test run is of value to a user when a test suite incl

Page 122

Chapter 4 Writing Tests 71 selectIf expression in test description - This mechanism provides a flexibleway for developers to make individual tests se

Page 123 - Glossary 103

72 Java ME TCK Framework Developer’s Guide • July 20071. Add a selectIf entry to the test description file for a test class that usersmight be require

Page 124

Chapter 4 Writing Tests 73<TR><TD SCOPE="row"> <B>selectIf</B> </TD><TD> isFeatureSupported </TD>&

Page 125 - Glossary 105

74 Java ME TCK Framework Developer’s Guide • July 20072. Write an interview question that obtains the value of the environment variablefrom the user.T

Page 126

Chapter 4 Writing Tests 753. Add interview question .smry and .text entries to the .properties file.For each added interview question, the developer m

Page 127

76 Java ME TCK Framework Developer’s Guide • July 2007Question keys are created in the following form:interview-class-name.question-name The .smry en

Page 128

77APPENDIXATest APIThe following is the Java ME technology-specific API that every test developer mustknow: Test Status MultiTest J2MEDistributedT

Page 129 - Index 109

78 Java ME TCK Framework Developer’s Guide • July 2007A test must also define main as follows:Defining main in this manner enables the test to also b

Page 130

Appendix A Test API 79J2MEDistributedTestClass name:com.sun.tck.j2me.services.messagingService.J2MEDistributedTestThis is the base class for distribut

Comments to this Manuals

No comments