Sun Microsystems 1.2 manual
- Consulta online o descarga el manual de instrucciones
- 130 páginas
- 1.62 mb
Ir a la página of
manuales de instrucciones parecidos
-
TV Video Accessories
Sun Microsystems B200X BLADE
60 páginas 0.38 mb -
Server
Sun Microsystems DC200
8 páginas 0.12 mb -
Server
Sun Microsystems 240
26 páginas 0.92 mb -
Computer Accessories
Sun Microsystems Computer Accessories
78 páginas 0.68 mb -
Personal Computer
Sun Microsystems F815D
66 páginas 0.4 mb -
Server
Sun Microsystems CP3260
144 páginas 3.15 mb -
Server
Sun Microsystems X4600
63 páginas 4.64 mb -
TV Video Accessories
Sun Microsystems AND B100S
60 páginas 0.38 mb
Buen manual de instrucciones
Las leyes obligan al vendedor a entregarle al comprador, junto con el producto, el manual de instrucciones Sun Microsystems 1.2. La falta del manual o facilitar información incorrecta al consumidor constituyen una base de reclamación por no estar de acuerdo el producto con el contrato. Según la ley, está permitido adjuntar un manual de otra forma que no sea en papel, lo cual últimamente es bastante común y los fabricantes nos facilitan un manual gráfico, su versión electrónica Sun Microsystems 1.2 o vídeos de instrucciones para usuarios. La condición es que tenga una forma legible y entendible.
¿Qué es un manual de instrucciones?
El nombre proviene de la palabra latina “instructio”, es decir, ordenar. Por lo tanto, en un manual Sun Microsystems 1.2 se puede encontrar la descripción de las etapas de actuación. El propósito de un manual es enseñar, facilitar el encendido o el uso de un dispositivo o la realización de acciones concretas. Un manual de instrucciones también es una fuente de información acerca de un objeto o un servicio, es una pista.
Desafortunadamente pocos usuarios destinan su tiempo a leer manuales Sun Microsystems 1.2, sin embargo, un buen manual nos permite, no solo conocer una cantidad de funcionalidades adicionales del dispositivo comprado, sino también evitar la mayoría de fallos.
Entonces, ¿qué debe contener el manual de instrucciones perfecto?
Sobre todo, un manual de instrucciones Sun Microsystems 1.2 debe contener:
- información acerca de las especificaciones técnicas del dispositivo Sun Microsystems 1.2
- nombre de fabricante y año de fabricación del dispositivo Sun Microsystems 1.2
- condiciones de uso, configuración y mantenimiento del dispositivo Sun Microsystems 1.2
- marcas de seguridad y certificados que confirmen su concordancia con determinadas normativas
¿Por qué no leemos los manuales de instrucciones?
Normalmente es por la falta de tiempo y seguridad acerca de las funcionalidades determinadas de los dispositivos comprados. Desafortunadamente la conexión y el encendido de Sun Microsystems 1.2 no es suficiente. El manual de instrucciones siempre contiene una serie de indicaciones acerca de determinadas funcionalidades, normas de seguridad, consejos de mantenimiento (incluso qué productos usar), fallos eventuales de Sun Microsystems 1.2 y maneras de solucionar los problemas que puedan ocurrir durante su uso. Al final, en un manual se pueden encontrar los detalles de servicio técnico Sun Microsystems en caso de que las soluciones propuestas no hayan funcionado. Actualmente gozan de éxito manuales de instrucciones en forma de animaciones interesantes o vídeo manuales que llegan al usuario mucho mejor que en forma de un folleto. Este tipo de manual ayuda a que el usuario vea el vídeo entero sin saltarse las especificaciones y las descripciones técnicas complicadas de Sun Microsystems 1.2, como se suele hacer teniendo una versión en papel.
¿Por qué vale la pena leer los manuales de instrucciones?
Sobre todo es en ellos donde encontraremos las respuestas acerca de la construcción, las posibilidades del dispositivo Sun Microsystems 1.2, el uso de determinados accesorios y una serie de informaciones que permiten aprovechar completamente sus funciones y comodidades.
Tras una compra exitosa de un equipo o un dispositivo, vale la pena dedicar un momento para familiarizarse con cada parte del manual Sun Microsystems 1.2. Actualmente se preparan y traducen con dedicación, para que no solo sean comprensibles para los usuarios, sino que también cumplan su función básica de información y ayuda.
Índice de manuales de instrucciones
-
Página 1
Java ™ ME TCK F rame work De v elopers Guide V ersion 1.2 July 2007 Sun Microsystems, Inc. www .sun.com[...]
-
Página 2
Please Recycle Copyright 2007 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved. Test suite developer’s guide for the Java ME TCK Framework. THIS PRODUCT CONT AINS CONFIDENTIAL INFORMA TION AND TRADE SECRETS OF SUN MICROSYSTEMS, INC. USE, DISCLOSURE OR REPRODUCTION IS PROHIBITED WITHOUT THE PRI[...]
-
Página 3
iii Contents Preface xv 1. Introduction 1 Getting Started 1 Development Environment 3 Use of the Framework 3 T arget Environment 3 Connectivity Requirements 4 Resource Limitations 5 Framework Bundle 6 Framework Components 6 Framework Components on the Harness Side 7 Framework Components on the Device Side 7 Test Types 8 Automated T ests 9 Distribut[...]
-
Página 4
iv Java ME TCK Framework Developer’s Guide • July 2007 Writing an Automated Test 15 ▼ T o Create a Simple Automated T est 16 Building an Updated Simple Test Suite 19 ▼ T o Build an Updated T est Suite 19 Testing an Updated Simple Test Suite 20 ▼ T o T est an Updated T est Suite 20 3. T est Suite Construction 23 Test Suite Structure 23 tes[...]
-
Página 5
Contents v remote Attribute 44 remoteSource Attribute 45 executeArgs Attribute 45 Distributed T est Execution 46 Testing User Interfaces With Interactive Tests 48 Client T est Component 49 Remote T est Component 49 T est Description for Interactive T ests 49 Required Interactive T est Keywords 50 Interactive T est Execution 50 Example of an Interac[...]
-
Página 6
vi Java ME TCK Framework Developer’s Guide • July 2007 Marking T rusted T ests 62 Using an Attribute to Mark Double-Duty T ests 63 Granting or Denying Security Permissions 64 Granting Security Permissions 64 Denying Security Permissions 66 Adding Resource Files in Tests 67 Enabling Test Selection 70 Factors and Mechanisms for T est Selection 70[...]
-
Página 7
Contents vii CommServers 85 Messaging 85 T est Export Support Libraries 85 CDC Agents 85 src Directory 86 Framework Server Classes and Interfaces 86 Agent Classes 87 Digital Signer 87 Preverif ication Script 87 Java ME T echnology V ersion of Harness Classes 87 Basic Interview Classes Containing General Questions 87 Communication Channel 88 doc Dir[...]
-
Página 8
viii Java ME TCK Framework Developer’s Guide • July 2007[...]
-
Página 9
ix Figur es FIGURE 1-1 Framework Configuration for Standard Automated Tests 10 FIGURE 1-2 Framework Configuration for Distributed Tests 11 FIGURE 1-3 Framework Configuration for Interactive Tests 13 FIGURE 1-4 Framework Configuration for OTA Tests 14 FIGURE 4-1 Automated Test Execution 42 FIGURE 4-2 Distributed Test Execution 47 FIGURE 4-3 Interact[...]
-
Página 10
x Java ME TCK Framework Developer’s Guide • July 2007[...]
-
Página 11
xi T ables T ABLE 1-1 Configurations and Supported Test Types 8 T ABLE C-1 Framework Test Description Fields 92 T ABLE C-2 Framework Keywords 94[...]
-
Página 12
xii Java ME TCK Framework Developer’s Guide • July 2007[...]
-
Página 13
xiii Code Examples CODE EXAMPLE 3-1 Simple Test Suite testsuite.jtt File 24 CODE EXAMPLE 3-2 Simple Test Class 26 CODE EXAMPLE 4-1 Required Distributed Test Keyword 44 CODE EXAMPLE 4-2 remote Attribute 45 CODE EXAMPLE 4-3 remoteSource Attribute 45 CODE EXAMPLE 4-4 executeArgs Attribute With Multiple Environment Variables 46 CODE EXAMPLE 4-5 Require[...]
-
Página 14
xiv Java ME TCK Framework Developer’s Guide • July 2007 CODE EXAMPLE 4-19 Test Description That Grants Permissions for a Security Test 65 CODE EXAMPLE 4-20 deny Attribute in the Test Description 66 CODE EXAMPLE 4-21 Test Description That Denies Permissions for a Security Test 66 CODE EXAMPLE 4-22 Test That Requires an Image Resource 68 CODE EXA[...]
-
Página 15
xv Pr eface This guide describes how to use resour ces from the Java™ Platform, Micro Edition T echnology Configuration Kit Framework (Framework) to develop and configur e test suites and tests for Java Platform, Micro Edition (Java ME platform) technologies. Befor e Y ou Read This Book T o fully use the information in this document, you must rea[...]
-
Página 16
xvi Java ME TCK Framework Developer’s Guide • July 2007 ■ JavaT est Harness User ’ s Guide: Graphical User Interface This guide provides a description of using the harness Graphical-User Interface (GUI). This guide is available from the Java ME T echnology APIs and Docs web site at http://java.sun.com/javame/reference/apis.jsp . ■ JavaT e[...]
-
Página 17
Preface xvii Platform Commands This document does not contain information about basic platform commands and procedur es such as shutting down the system, booting the system, and configuring devices. Refer to the following for this information: ■ Software documentation that you received with your system ■ Solaris™ Operating System documentatio[...]
-
Página 18
xviii Java ME TCK Framework Developer’s Guide • July 2007 T ypographic Conventions This guide uses the following typographic conventions: Related Documentation When installed, the Framework includes a doc directory that contains both Framework and harness documentation in PDF and HTML format. The following documentation provides detailed inform[...]
-
Página 19
Preface xix Accessing Sun Documentation Online The Java Developer Connection™ program web site enables you to access Java platform technical documentation at http://java.sun.com/ . Sun W elcomes Y our Comments W e are interested in improving our documentation and welcome your comments and suggestions. Provide feedback to Sun at http://java.sun.co[...]
-
Página 20
xx Java ME TCK Framework Developer’s Guide • July 2007[...]
-
Página 21
1 CHAPTER 1 Intr oduction This chapter introduces using the Framework resour ces to develop test suites for the Java ME platform, including descriptions of the kinds of tests that a test suite can include. This chapter contains the following sections: ■ Getting Started ■ Use of the Framework ■ Framework Bundle ■ T est T ypes Getting Started[...]
-
Página 22
2 Java ME TCK Framework Developer’s Guide • July 2007 Note – The TCK Project Planning Guide and the Java T echnology T est Suite Development Guide documents were originally developed as part of a product used by the Java Community Process (JCP) Specif ication Leads. For that reason, these documents refer to JCP pr ocedures that might not appl[...]
-
Página 23
Chapter 1 Introduction 3 Development Envir onment The following tools and resources ar e the minimum software r equirements for the Framework development environment: ■ JDK, version 5.0 or later ■ JavaT est harness, version 3.2.2 or later For TCK development, download the latest Java Compatibility T est T ools (Java CTT) from the Java Community[...]
-
Página 24
4 Java ME TCK Framework Developer’s Guide • July 2007 Configuration (CDC) and a prof ile such as Mobile Information Device Profile (MIDP), Foundation Prof ile (FP), Personal Basis Profile (PBP), or Personal Prof ile (PP). ■ Conf iguration - CLDC and CDC are conf igurations that provides a basic set of libraries and virtual-machine features th[...]
-
Página 25
Chapter 1 Introduction 5 Resource Limitations Hardwar e resources on test devices ar e often limited. Resource constrained devices can quit operation when excess native resources ar e requested. The Framework can run tests on r esource constrained target devices with limited available memory and persistent storage. When developing test suites for t[...]
-
Página 26
6 Java ME TCK Framework Developer’s Guide • July 2007 Framework Bundle The Framework resour ces are packaged and provided to users as a zip bundle. When the bundle is unzipped the following directories and files are placed in the Framework root dir ectory: ■ doc - Contains the Java ME TCK Framework Developer ’ s Guide (PDF and HTML formats)[...]
-
Página 27
Chapter 1 Introduction 7 Framework Components on the Harness Side The following components are used for running CLDC, MIDP , and CDC tests in the Distributed, OT A, and Automated test configurations with the harness: ■ Execution server - Used in CLDC and MIDP Distributed and Automated test configurations. The execution server contains no internal[...]
-
Página 28
8 Java ME TCK Framework Developer’s Guide • July 2007 An agent is a separate program that works in conjunction with the harness to run tests on the device. In CDC, the agent is started once, and when started, in a loop, it uses the communication channel to the harness to download the test classes and to execute them on the device, and then repo[...]
-
Página 29
Chapter 1 Introduction 9 Automated T ests Automated tests for CLDC, MIDP , and CDC configurations execute on the test device without requiring user interaction. Automated tests can be queued up and run by the test harness and their results r ecorded without the user being pr esent. The configuration for standar d automated test execution is the mos[...]
-
Página 30
10 Java ME TCK Framework Developer’s Guide • July 2007 FIGURE 1-1 Framework Conf iguration for Standard Automated T ests Diagram of a standard automated test configuration. Distributed T ests Distributed tests are a special type of automated tests. Not only do they have a device side test component, which is executed under the control of a test[...]
-
Página 31
Chapter 1 Introduction 11 Distributed tests are typically slower (due to extra communication between remote components) and more complex than simple automated tests and should be used only when it’s not possible to write simple automated tests. FIGURE 1-2 illustrates the Framework configuration for running CLDC and MIDP distributed tests. Distrib[...]
-
Página 32
12 Java ME TCK Framework Developer’s Guide • July 2007 Interactive T ests Interactive tests are the tests that requir e some form of user interaction and cannot be executed without such interaction. From a design point of view , interactive tests are a subtype of distributed test. As a subtype of distribute test, interactive tests generally exe[...]
-
Página 33
Chapter 1 Introduction 13 FIGURE 1-3 Framework Conf iguration for Interactive T ests Diagram of the interactive test configuration. OT A T ests OT A tests are MIDP-specif ic tests that verify the over-the-air (OT A) application provisioning implementation. This includes obtaining, installing, and removing applications (MIDlet suites), and enforcing[...]
-
Página 34
14 Java ME TCK Framework Developer’s Guide • July 2007 OT A tests validate API functionality while the device is connected to a remote host (the PC or workstation where the harness runs). In this configuration, one part of the OT A test runs on the remote host (the PC or workstation wher e the harness runs) using a passive agent and the other p[...]
-
Página 35
15 CHAPTER 2 W riting a Simple Automated T est Automated test execution is the most common and simple of the test configurations that are run on the test device. User interaction is not r equired to run automated tests. The following instructions describe how to create a simple automated test and add it to an existing Framework supplied test suite.[...]
-
Página 36
16 Java ME TCK Framework Developer’s Guide • July 2007 ■ Each test case method must take no arguments, and must return a Status object that repr esents the outcome of the test case. The Status can be either Status.passed(String) or Status.failed(String) . ■ Developers must update the runTestCases() method to add the test cases that are exec[...]
-
Página 37
Chapter 2 Writing a Simple Automated T est 17 2. Save this f ile in the Simple T est Suite source as SimpleTestSuite/tests/pkg3/Test3.java . The pkg3 folder does not exist in SimpleTestSuite/tests and can be created by the test developer when saving Test3.java . Sources for the tests should be placed inside the tests directory of the test suite and[...]
-
Página 38
18 Java ME TCK Framework Developer’s Guide • July 2007 Note – The contents of this test description file corr espond to the Test3.java test class. 4. Save this f ile in the Simple T est Suite source as SimpleTestSuite/tests/pkg3/index.html . The index.html must be contained in the same directory as its test class (in this case, Test3.java) . [...]
-
Página 39
Chapter 2 Writing a Simple Automated T est 19 Building an Updated Simple T est Suite The following steps demonstrate how to build an updated test suite after adding a test. ▼ T o Build an Updated T est Suite After completing the procedures contained in “W riting an Automated T est” on page 15 , you must run the build to assemble the updated t[...]
-
Página 40
20 Java ME TCK Framework Developer’s Guide • July 2007 3. Enter the ant command to invoke the ant build script. The build creates a SimpleTestSuite-build dir ectory containing the test suite. After creating the updated test suite, you must test it (see “T esting an Updated Simple T est Suite” on page 20 ) before making the test suite availa[...]
-
Página 41
Chapter 2 Writing a Simple Automated T est 21 3. Use the Conf iguration Editor to provide conf iguration information required to run the updated test suite. 4. After you complete the interview , choose Run T est > Start on the T est Manager main menu to start the test suite. 5. Use the following command to start the WTK. If you answered the inte[...]
-
Página 42
22 Java ME TCK Framework Developer’s Guide • July 2007[...]
-
Página 43
23 CHAPTER 3 T est Suite Constr uction This chapter describes the organization and construction of a Java ME technology test suite that uses Framework resour ces. Additional information about constructing test suites for use with the JavaT est harness can be located in Chapters 4 and 8 of the JavaT est Architect’ s Guide . This chapter contains t[...]
-
Página 44
24 Java ME TCK Framework Developer’s Guide • July 2007 ■ lib directory ■ tests directory ■ classes directory ■ doc directory testsuite.jtt File The testsuite.jtt file is located in the r oot directory of the test suite. It provides a registry of information about the test suite and def ines test suite properties. The harness uses these [...]
-
Página 45
Chapter 3 T est Suite Construction 25 The testsuite.jtt file is located under the r oot directory of the Simple T est Suite. Y ou can also find it under the build/ directory of the Simple T est Suite source. lib Dir ectory The lib directory usually contains the javatest.jar file that pr ovides all of the classes requir ed to execute the harness, al[...]
-
Página 46
26 Java ME TCK Framework Developer’s Guide • July 2007 Organize the tests hierar chically the way you want them displayed in the test tree. The T est Manager in the harness displays the test hierarchy , enabling users to select and run specific gr oups of tests from the GUI. T est Class A test class or test source is a Java technology class tha[...]
-
Página 47
Chapter 3 T est Suite Construction 27 Additional examples (T est1.java and T est2.java)can be found in the following Simple T est Suite directories: ■ SimpleTestSuite/tests/sample/pkg1/ ■ SimpleTestSuite/tests/sample/pkg2/ T est Description f ile Each subdirectory that contains one or more test classes must also contain a corresponding test des[...]
-
Página 48
28 Java ME TCK Framework Developer’s Guide • July 2007 The classes directory generally contains following sub-dir ectories: ■ classes/preverified - Contains the preverif ied test classes. ■ classes/shared/testClasses.lst - The test class dependency file ( testClasses.lst ) provides information to the Framework test bundling infrastructure r[...]
-
Página 49
Chapter 3 T est Suite Construction 29 In the test description file, $testHost and $testPort ar e test environment variables and are r eplaced by actual values obtained from the test environment. ■ The test suite configuration interview must include a corresponding and appropriate question asking the user to specify the values of the host and port[...]
-
Página 50
30 Java ME TCK Framework Developer’s Guide • July 2007 1. Def ine the environment variable required by the test. In the example ( Test2.java ), the test case SampleStringValue() checks if the sampleValue that is passed in equals Hello . The harness requir es the sampleValue environment variable to run the test. Because the value for sampleValue[...]
-
Página 51
Chapter 3 T est Suite Construction 31 a. Create a class ( SampleInterview ) that is a subtype of the Interview class. The following code creates the SampleInterview class. b. Identify the new interview ( SampleInterview ) as a sub-interview of the parent interview . In the new sub-interview class, the constructor must take a reference to the parent[...]
-
Página 52
32 Java ME TCK Framework Developer’s Guide • July 2007 d. Use the setFirstQuestion method in the constructor to specify the f irst question in the sub-interview . The following setFirstQuestion code in the SampleInterview example specifies the f irst question. e. Specify the question type. The Question class is a base class that provides the di[...]
-
Página 53
Chapter 3 T est Suite Construction 33 f. Implement exporting the conf iguration value to the test environment. One of the goals of the interview is to export the configuration value to the test environment. Each question has an export() method that is used for this purpose. The following code in the SampleInterview example exports the value to the [...]
-
Página 54
34 Java ME TCK Framework Developer’s Guide • July 2007 h. Use the getNext() method to determine the next question in the sub- interview . Every question except the Final question must provide a getNext() method that determines the next (successor) question or null. Alternatively , if the Framework’s interview extension library is used, it’s[...]
-
Página 55
Chapter 3 T est Suite Construction 35 j. Use the FinalQuestion marker to identify the last question in the sub- interview . At the end of the sub-interview , have the last question return an instance of FinalQuestion . FinalQuestion is only a marker and does not have question text, More Info, or a getNext method. The following code in the SampleInt[...]
-
Página 56
36 Java ME TCK Framework Developer’s Guide • July 2007 4. Update the interview .properties (resource) f ile. All question text is located in the interview .properties file associated with the interview class files and is identified by a unique question key . The question key is based on a name assigned by the test developer and must uniquely id[...]
-
Página 57
Chapter 3 T est Suite Construction 37 a. Create a help directory under the directory where the interview classes are located. For this example, use the following location: SimpleTestSuite/src/sample/suite/help b. Create a helpset f ile ( sampleInterview.hs ) under the help directory . The helpset file specif ies the location of the map file for the[...]
-
Página 58
38 Java ME TCK Framework Developer’s Guide • July 2007 d. Create a map f ile ( sampleInterview.jhm )i nt h e default directory . The JavaHelp system uses IDs from a map f ile to identify both the location and the HTML files that it loads for the More Info system. Each Mor e Info file must have a corresponding entry in the map f ile of the form [...]
-
Página 59
Chapter 3 T est Suite Construction 39 e. Create the More Info topic f iles. The More Info topic f iles are provided in HTML format and displayed in the Configuration Editor ’s More Info pane. Refer to the JavaT est Architect’ s Guide for the procedur e for creating More Info topic f iles. The following is an example of a More Info f ile. Additi[...]
-
Página 60
40 Java ME TCK Framework Developer’s Guide • July 2007 Building a T est Suite Refer to Chapter 2 , “Building an Updated Simple T est Suite” on page 19 for the procedur e to build a Java ME technology test suite by using Framework resour ces.[...]
-
Página 61
41 CHAPTER 4 W riting T ests This chapter describes how to write different types of Java ME technology tests that use Framework resour ces and to set special properties requir ed by the tests. General information about the process of creating tests can be located in Chapters 5 and 6 of the Java T echnology T est Suite Development Guide . Additional[...]
-
Página 62
42 Java ME TCK Framework Developer’s Guide • July 2007 Automated T est Execution FIGURE 4-1 and the associated text are for CLDC and MIDP execution mode. In the diagram, arrows indicate the direction of dataf low between the device and the workstation. The numbered items indicate the sequence and the content of the dataflow . FIGURE 4-1 Automat[...]
-
Página 63
Chapter 4 Writing T ests 43 While the tests from the application bundle ar e loaded onto the device by the AMS, the execution server establishes the sequence in which the tests in the bundle are run. 5. sendTestResult - The agent returns the test r esults to the execution server . Items 3, 4, and 5 repeat until all tests in the application bundle a[...]
-
Página 64
44 Java ME TCK Framework Developer’s Guide • July 2007 The client test component must use the send and handleMessage methods in the J2MEDistributedTest class to send and receive messages to or from the other named components of the distributed test. Remote T est Component The remote test component of the distributed test must extend the com.sun[...]
-
Página 65
Chapter 4 Writing T ests 45 The following is an example of the remote attribute entry that must be added to the test description file. In the example, the remote attribute execution command is composed of the following values: ■ sample.pkg.SampleDistributedTest is the fully qualified name of the remote test class. ■ $ testMsgSwitch is an enviro[...]
-
Página 66
46 Java ME TCK Framework Developer’s Guide • July 2007 The following is an example of the executeArgs attribute entry in which the $testMsgSwitch and $timeOut environment variables are specif ied. Distributed T est Execution FIGURE 4-2 and the associated text are for MIDP execution mode. In the diagram, arrows indicate the dir ection of dataflo[...]
-
Página 67
Chapter 4 Writing T ests 47 FIGURE 4-2 Distributed T est Execution 1. getNextApp - The AMS issues a getNextApp command to the execution server on the workstation. The AMS implementation is device specific and must be provided by the licensee. 2. Application Bundle - The execution server sends an application bundle to the AMS. The AMS downloads and [...]
-
Página 68
48 Java ME TCK Framework Developer’s Guide • July 2007 5. Check or Send Message - The test sends either a message or a check message request to the Framework messaging service on the harness. 6. Get Message - The Framework messaging service on the harness sends the test a get message command. 7. Check or Send Message - The server-side test send[...]
-
Página 69
Chapter 4 Writing T ests 49 Client T est Component The client test component of the interactive test must extend the MidDistribInteractiveTest class. This is the base class for distributed interactive tests and extends the com.sun.tck.j2me.services.messagingService.J2MEDistributedTest class. The MidDistribInteractiveTest class provides all of the c[...]
-
Página 70
50 Java ME TCK Framework Developer’s Guide • July 2007 The test description might also include the remoteSource and executeArgs attributes. See “ remoteSource Attribute” on page 45 and “ executeArgs Attribute” on page 45 for a description and example of these attribute entries. Required Interactive T est Keywords The following is an exa[...]
-
Página 71
Chapter 4 Writing T ests 51 FIGURE 4-3 Interactive T est Execution 1. getNextApp - The AMS issues a getNextApp command to the execution server on the workstation. The AMS implementation is device specific and must be provided by the licensee. 2. Application Bundle - The execution server sends an application bundle to the AMS. The AMS downloads and [...]
-
Página 72
52 Java ME TCK Framework Developer’s Guide • July 2007 4. T est Name - The execution server returns the name of the next test in the application bundle that the AMS should run. While the tests from the application bundle are loaded onto the device by the AMS, the execution server establishes the sequence in which the tests in the bundle are run[...]
-
Página 73
Chapter 4 Writing T ests 53 T esting Application Pr ovisioning W ith OT A T ests Over-the-air (OT A) tests ar e MIDP-specific tests that verify an OT A application provisioning implementation. This includes obtaining, installing, and removing applications (MIDlet suites), and enforcing security requir ements. Each OT A test has an associated applic[...]
-
Página 74
54 Java ME TCK Framework Developer’s Guide • July 2007 done at the build time. If the test writer creates a JAR file or a JAD f ile with special information about the MIDlet suite as part of the bundle, the test writer must also create a manifest f ile ( .mf ). T est Description for OT A T ests The test description file for OT A tests must cont[...]
-
Página 75
Chapter 4 Writing T ests 55 remote Attribute The remote attribute specifies the execution command for the server test component. The following is an example of the remote attribute entry that must be added to the test description file. In the remote attribute, sample.pkg.OTA.OTATest1 is the test class of the server component and all other arguments[...]
-
Página 76
56 Java ME TCK Framework Developer’s Guide • July 2007 The following is an example of a test description for a trusted OT A test. See “ remote Attribute” on page 55 for a description of the values that must be set in the remote attribute for a trusted OT A test. <H1>Test Specifications and Descriptions for Test</H1> <HR> &[...]
-
Página 77
Chapter 4 Writing T ests 57 OT A T est Execution In FIGURE 4-4 , arrows indicate the dir ection of dataflow between the device and the workstation. The numbered items indicate the sequence and the content of the dataflow . <TABLE BORDER=1 CLASS=TestDescription> <TR> <TD> <B>title</B></TD> <TD> Over-the-Air [...]
-
Página 78
58 Java ME TCK Framework Developer’s Guide • July 2007 FIGURE 4-4 OT A T est Execution 1. Request an Action - The server-side test r equests an action from the test operator . 2. Action - The test operator action is sent to the AMS. 3. Request to Download T est Application - The AMS sends the OT A server a request for a download of a test appli[...]
-
Página 79
Chapter 4 Writing T ests 59 Example of OT A T est The following is an example of an OT A server component. In the example, the source of the MIDlet suite is named Test_MIDlet.java and the JAD file is Test_MIDlet.jad . The JAD file contains the manifest f ile and the Test_MIDlet.class . CODE EXAMPLE 4-12 Server T est Component Example public class O[...]
-
Página 80
60 Java ME TCK Framework Developer’s Guide • July 2007 T esting Security-Constrained Functionality W ith Security T ests This section addresses writing dif ferent types of security tests, using keywords and attributes to mark differ ent types of security tests, and using attributes in the test description to grant or deny the security permissio[...]
-
Página 81
Chapter 4 Writing T ests 61 T rusted T ests T rusted tests verify API implementation behavior for signed MIDlet suites. In most cases, these tests verify that specification assertions related to signed MIDlet suites are pr operly implemented. T rusted MIDlet suites can be permitted to access APIs that are considered sensitive or to which access is [...]
-
Página 82
62 Java ME TCK Framework Developer’s Guide • July 2007 If other keywords (such as positive ) are used, they would be included in the same line as the untrusted keyword. The following is an example of a test description file that uses runtime , positive , and untrusted keywor ds. Marking T rusted T ests When developing trusted tests, the test wr[...]
-
Página 83
Chapter 4 Writing T ests 63 The following is an example of adding a trusted keyword entry to a test description file. When other keywords (such as positive ) ar e used, they are included in the same line as the trusted keyword and separated by white space. Using an Attribute to Mark Double-Duty T ests When developing double-duty tests, test writers[...]
-
Página 84
64 Java ME TCK Framework Developer’s Guide • July 2007 Granting or Denying Security Permissions A security test might requir e that certain permissions be granted (or denied) for the test to pass. The test is run or not run accor ding to the permissions that a test writer grants or denies. Granting Security Permissions When writing security tes[...]
-
Página 85
Chapter 4 Writing T ests 65 The following is an example of a grant attribute and permissions added to a test description file. The value of the grant attribute is a list of space-separated permissions (in the example, javax.microedition.io.Connector.file.read and javax.microedition.io.Connector.file.write ) that must be granted by the security poli[...]
-
Página 86
66 Java ME TCK Framework Developer’s Guide • July 2007 Denying Security Permissions When writing security tests, a test writer can specify the permissions that the security policy must not grant in the protection domain for this test application to execute and pass. T est writers can specify the denied security permissions by including a deny a[...]
-
Página 87
Chapter 4 Writing T ests 67 Adding Resour ce Files in T ests T est writers must sometimes develop tests that require extra r esource f iles (such as image, data, or class files) for the test execution. When writing tests for CLDC and MIDP-based implementations, test writers can use the resources entry in the test description file to specify the loc[...]
-
Página 88
68 Java ME TCK Framework Developer’s Guide • July 2007 For example, the following test requir es a Duke.png to create the Image object for successful execution. For this test example, the following is a resources entry that might be added to the test description file. In the resources entry , the value of the resource ( shared/sample/pkg3/Duke.[...]
-
Página 89
Chapter 4 Writing T ests 69 The following is an example of a test description file containing a resources entry , directory , and f ile name. CODE EXAMPLE 4-24 T est Description That Includes Resources <HTML><HEAD> <TITLE>Test Specifications and Descriptions for Test2</TITLE> </HEAD> <BODY> <H1>Test Specifi[...]
-
Página 90
70 Java ME TCK Framework Developer’s Guide • July 2007 Enabling T est Selection T est selection in a test run is of value to a user when a test suite includes tests for optional features that wer e not implemented. Because the assumption of tests is that the target implementation must support these features, the implementation fails tests that [...]
-
Página 91
Chapter 4 Writing T ests 71 ■ selectIf expression in test description - This mechanism provides a flexible way for developers to make individual tests selectable ( com.sun.tck.j2me.javatest.ExprFilter ) by including a selectIf expression in test description. The test developer can include a selectIf expression in the test description file for a t[...]
-
Página 92
72 Java ME TCK Framework Developer’s Guide • July 2007 1. Add a selectIf entry to the test description f ile for a test class that users might be required to f ilter out of a test run. The following is an example of a selectIF entry added to a test description f ile. In the example, isFeatureSupported is an environment variable. Most environmen[...]
-
Página 93
Chapter 4 Writing T ests 73 <TR> <TD SCOPE="row"> <B>selectIf</B> </TD> <TD> isFeatureSupported </TD> </TR> </TABLE> </BODY> </HTML>[...]
-
Página 94
74 Java ME TCK Framework Developer’s Guide • July 2007 2. W rite an interview question that obtains the value of the environment variable from the user . T o obtain the value of environment variables from users, test developers must write an interview class and create the requir ed interview questions. If an interview class already exists in th[...]
-
Página 95
Chapter 4 Writing T ests 75 3. Add interview question .smry and .text entries to the .properties f ile. For each added interview question, the developer must cr eate corresponding .smry and .text entries in the resour ce file ( .properties ). The following is an example of the .smry and .text entries added for the new question. The .smry and .text [...]
-
Página 96
76 Java ME TCK Framework Developer’s Guide • July 2007 Question keys are cr eated in the following form: interview-class-name . question-name ■ The .smry entry specifies the question title (in the example, Feature Support ) that the Configuration Editor displays to the user . ■ The .text entry specifies the question text (in the example, Do[...]
-
Página 97
77 APPENDIX A T est API The following is the Java ME technology-specific API that every test developer must know: ■ Test ■ Status ■ MultiTest ■ J2MEDistributedTest ■ J2SEDistributedTest ■ DistribInteractiveTest ■ OTATest Test Interface name: com.sun.tck.cldc.lib.Test This is a Java ME technology version of the standard harness T est i[...]
-
Página 98
78 Java ME TCK Framework Developer’s Guide • July 2007 A test must also define main as follows: Defining main in this manner enables the test to also be run standalone, independent of the harness. Status Class name: com.sun.tck.cldc.lib.Status This is a Java ME technology version of the standard harness Status class. It embodies the result of a[...]
-
Página 99
Appendix A T est API 79 J2MEDistributedTest Class name: com.sun.tck.j2me.services.messagingService.J2MEDistributedTest This is the base class for distributed tests for the Java ME technology component of the test. Each distributed test has a unique name used for identification during message exchange. The send and handleMessage methods can be used [...]
-
Página 100
80 Java ME TCK Framework Developer’s Guide • July 2007 OTATest Class name: com.sun.tck.midp.lib.OTATest This is the base class for the Java SE technology component of an OT A test. It provides various convenience methods which trigger installation, execution, or removal of an application.[...]
-
Página 101
81 APPENDIX B Framework Bundle This appendix describes the contents of the redistributables directory pr ovided by the Framework bundle. The contents of the redistributables directory are or ganized in the following structure: ■ lib Directory ■ src Directory ■ doc Directory lib Dir ectory The lib directory contains the Framework JAR files and[...]
-
Página 102
82 Java ME TCK Framework Developer’s Guide • July 2007 ■ tckbuild.jar - Utility classes used by TCK build. ■ j2me-tck-framework_12.txt - Framework version marker (this file has no content). ■ midptck.ks - Standard keystor e containing default certificates used for MIDP application signing. CDC Agents Messaging CommServers CommService Comm[...]
-
Página 103
Appendix B Fr amework Bundle 83 Cor e The following are cor e Framework files provided in the lib dir ectory: ■ j2mefw_jt.jar - Harness plug-in code. Most of the Java SE platform code to support ME TCKs is in this file. ■ interviewlib.jar - Helper library for interview creation. CLDC and MIDP Execution The Framework provides the following two f[...]
-
Página 104
84 Java ME TCK Framework Developer’s Guide • July 2007 ■ cldc_agent.jar - Standard harness agent for CLDC. Application model: Main Communication channel: pluggable. Plug-ins The following are the plug-in .jar files pr ovided in the lib directory: ■ cldc_httpsrvr.jar - Implementation of the server interface for the harness plug-in. This serv[...]
-
Página 105
Appendix B Fr amework Bundle 85 ■ cldc_commClient.jar - Implementation of the Client interface for the CLDC device. This client uses HTTP for communication. ■ datagram_commClient.jar - Distributed test communication client interface implementation that uses datagrams for communication. CommServers The following are the CommServers .jar files pr[...]
-
Página 106
86 Java ME TCK Framework Developer’s Guide • July 2007 Application model: Xlet Pluggable communication channel ■ applet_agent.jar - JavaT est agent for Personal Prof ile. Application model: Applet Pluggable communication channel src Dir ectory The src directory contains the Framework test sour ces, test descriptions, precompiled Framework cla[...]
-
Página 107
Appendix B Fr amework Bundle 87 Agent Classes The following are the agent classes and interfaces provided in the src directory: ■ com/sun/cldc/communication/Client - Communication interface ■ com/sun/cldc/communication/MultiClient - Communication interface ■ com/sun/tck/midp/javatest/agent/MIDletAgent - Standard agent ■ com/sun/tck/cldc/jav[...]
-
Página 108
88 Java ME TCK Framework Developer’s Guide • July 2007 ■ com/sun/tck/midp/interview/VmAdvancedInterview ■ com/sun/tck/midp/interview/VmInterview ■ com/sun/tck/midp/interview/MidpTckInterview ■ com/sun/tck/midp/interview/MidpTckBaseInterview ■ com/sun/tck/midp/interview/ConnectionInterview ■ com/sun/tck/midp/interview/TrustedIntervie[...]
-
Página 109
Appendix B Fr amework Bundle 89 This class provides an implementation of the harness distribution mechanism on top of HTTP . ■ com/sun/tck/midp/javatest/MidBundler - MIDP-specific extension that builds on top of the generic CLDC mechanism. ■ com/sun/tck/midp/javatest/MessageSwitch - Support for distributed tests on MIDP . This class provides an[...]
-
Página 110
90 Java ME TCK Framework Developer’s Guide • July 2007[...]
-
Página 111
91 APPENDIX C T est Description Fields and Keywor ds This appendix describes the Framework supported fields and keywords for test description files. The JavaT est harness requir es that each test is accompanied by machine readable descriptive data in the form of test suite-specific name-value pairs contained in a test description file. The JavaT es[...]
-
Página 112
92 Java ME TCK Framework Developer’s Guide • July 2007 T ABLE C-1 lists the test description fields supported by the Framework and describes how their values are used by the harness when the tests are run. T ABLE C-1 Framework T est Description Fields Field Description title A descriptive string that identifies what the test does. The title app[...]
-
Página 113
Appendix C T est Description Fields and K eywords 93 executeArgs An array of strings that are passed to the test classes being executed. The arguments might be f ixed but often involve symbolic values that are substituted from the test environment (variables def ined elsewhere in the test environment). The r esult of substituting values can be seen[...]
-
Página 114
94 Java ME TCK Framework Developer’s Guide • July 2007 Keywor ds Keywords ar e tokens associated with specific tests. Keywords have the following functions: ■ Convey information to the harness about how to execute the tests ■ Serve as a basis for including and excluding tests during test runs Users specify keyword expr essions in the harnes[...]
-
Página 115
Appendix C T est Description Fields and K eywords 95 runtime Identifies tests used with runtime pr oducts. trusted Identifies tests which must be run in a trusted (operator , manufacturer , and trusted third party) security domain. untrusted Identifies tests which must be run in an untr usted (unidentified third party) security domain. T ABLE C-2 F[...]
-
Página 116
96 Java ME TCK Framework Developer’s Guide • July 2007[...]
-
Página 117
97 Glossary The definitions in this glossary ar e intended for Java Compatibility T est T ools (Java CTT) and Java T echnology Compatibility Kits (TCK). Some of these terms might have differ ent definitions or connotations in other contexts. This is a generic glossary covering all of Sun’s CTT s and TCKs, and therefore, it might contain some term[...]
-
Página 118
98 Java ME TCK Framework Developer’s Guide • July 2007 appeals process A process for challenging the fairness, validity , accuracy , or relevance of one or more TCK tests. T ests that are successfully challenged are either corr ected or added to the TCK’s exclude list . See also first-level appeals pr ocess , second- level appeals process , a[...]
-
Página 119
Glossary 99 boundary value analysis A test case development technique that entails developing additional test cases based on the boundaries defined by pr eviously categorized equivalence classes. class The prototype for an object in an object-oriented language. A class might also be considered a set of objects which shar e a common structure and be[...]
-
Página 120
100 Java ME TCK Framework Developer’s Guide • July 2007 distributed tests T ests consisting of multiple components that are r unning on both the device and the JavaT est harness host. Dividing test components between the device and JavaT est harness is often used for tests of communication APIs, tests that are heavily dependent on external r es[...]
-
Página 121
Glossary 101 Java Platform, Standard Edition (Java SE platform) A set of specifications that def ines the desktop runtime environment r equired for the deployment of Java technology applications. Java SE platform implementations are available for a variety of platforms, but most notably the Solaris and W indows operating systems. Java Application M[...]
-
Página 122
102 Java ME TCK Framework Developer’s Guide • July 2007 JavaT est harness A test harness developed by Sun to manage test execution and result reporting for a T echnology Compatibility Kit (TCK) . The harness conf igures, sequences, and runs test suites. The JavaT est harness provides flexible and customizable test execution. It includes everyth[...]
-
Página 123
Glossary 103 included according to the r eferencing rules set out in that platform edition specification. Other r eferenced specif ications must be referenced in their entirety . Program Management Off ice (PMO) The administrative structur e that implements the Java Community Process (JCP) program . protected API APIs that requir e that an applet h[...]
-
Página 124
104 Java ME TCK Framework Developer’s Guide • July 2007 structure-based testing A set of test development methodologies that are based on the internal structure or logic of the system under test, not the description, behavior , or requir ements of that system. This is commonly known as white-box or glass- box testing. Compatibility testing does[...]
-
Página 125
Glossary 105 test command template A generalized specification of a test command in a test envir onment . The test command is specified in the test envir onment using variables so that it can execute any test in the test suite regar dless of its arguments. test description Machine-readable information that describes a test to the test harness so th[...]
-
Página 126
106 Java ME TCK Framework Developer’s Guide • July 2007 work directory A directory associated with a specif ic test suite and used by the JavaT est harness to store f iles containing information about the test suite and its tests.[...]
-
Página 127
107 Index Symbols .jtx files, 100 A active agent, 97 active applet instance, 97 agent, 97 agent monitor, 97 AID, 98 all values, 97 AMS, 98 APDU, 98 API, 98 API member, 97 API member test, 97 appeals process, 98 first-level, 100 second-level, 103 Application IDentifier, 9 8 Application Management Software, 98 Application Programming Interface, 98[...]
-
Página 128
108 Ja va ME TCK F ramework Dev eloper’ s Guide • July 2007 I instantiation, 100 interactive tests, 10 0 ISO 7816-4, 9 8 J JAM, 101 JAR, 101 Java Application Manager, 10 1 Java Archive, 101 Java Community Process Pr ogram, 1 01 Java Compatibility T est T ools, 101 Java CTT, 1 01 Java Platform Libraries, 10 1 Java platform, Standard Edition, 101[...]
-
Página 129
Index 109 work directory, 106[...]
-
Página 130
110 Ja va ME TCK F ramework Dev eloper’ s Guide • July 2007[...]