Sun Microsystems Telephone Accessories 1.2 Manual de usuario

Busca en linea o descarga Manual de usuario para Software Sun Microsystems Telephone Accessories 1.2. Sun Microsystems Telephone Accessories 1.2 User's Manual Manual de usuario

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 130
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente

Indice de contenidos

Pagina 1 - Developers Guide

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

Pagina 2

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

Pagina 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

Pagina 4

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

Pagina 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

Pagina 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

Pagina 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

Pagina 8

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

Pagina 9

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

Pagina 10

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

Pagina 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

Pagina 12

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

Pagina 13 - Code Examples

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

Pagina 14

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

Pagina 15 - Before You Read This Book

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

Pagina 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

Pagina 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

Pagina 18 - Related Documentation

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

Pagina 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

Pagina 20

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

Pagina 21 - Introduction

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

Pagina 22

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

Pagina 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

Pagina 24 - Connectivity Requirements

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

Pagina 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

Pagina 26

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

Pagina 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

Pagina 28 - Test Types

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

Pagina 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

Pagina 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

Pagina 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

Pagina 32 - Interactive Tests

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

Pagina 33 - OTA Tests

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

Pagina 34

Index 109work directory, 106

Pagina 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

Pagina 36

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

Pagina 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

Pagina 38

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

Pagina 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

Pagina 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,

Pagina 41

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

Pagina 42

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

Pagina 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

Pagina 44

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

Pagina 45

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

Pagina 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

Pagina 47 - Test Description file

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

Pagina 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

Pagina 49

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

Pagina 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

Pagina 51

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

Pagina 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

Pagina 53

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

Pagina 54 - Question getNext() {

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

Pagina 55

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

Pagina 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

Pagina 57

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

Pagina 58

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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 68

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

Pagina 69 - Client Test Component

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

Pagina 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

Pagina 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

Pagina 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

Pagina 73

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

Pagina 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

Pagina 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

Pagina 76

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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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.

Pagina 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

Pagina 92

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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 97 - Test API

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

Pagina 98 - MultiTest

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

Pagina 99 - DistribInteractiveTest

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

Pagina 100

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

Pagina 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

Pagina 102

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

Pagina 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

Pagina 104 - CommClients

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

Pagina 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”

Pagina 106

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

Pagina 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

Pagina 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

Pagina 109

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

Pagina 110

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

Pagina 111 - Keywords

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

Pagina 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

Pagina 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

Pagina 114

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

Pagina 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

Pagina 116

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

Pagina 117 - Glossary

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

Pagina 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

Pagina 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-

Pagina 120

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

Pagina 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

Pagina 122

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

Pagina 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

Pagina 124

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

Pagina 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

Pagina 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

Pagina 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

Pagina 128

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

Pagina 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

Pagina 130

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

Comentarios a estos manuales

Sin comentarios