(12) United States Patent (10) Patent No.: US 7,174,542 B2 Wang Et Al
Total Page:16
File Type:pdf, Size:1020Kb
US007 174542B2 (12) United States Patent (10) Patent No.: US 7,174,542 B2 Wang et al. (45) Date of Patent: Feb. 6, 2007 (54) SYSTEM AND METHOD XLET AND APPLET 2003/012 1003 A1* 6/2003 Soshalsky et al. .......... 715,513 MANAGER TESTING OTHER PUBLICATIONS (75) Inventors: Xiaozhong Wang, Santa Clara, CA Pawlan. Introducti Digital TV Applications P ing. Feb (US); Stanislav AVZan, Mountain View, aW an. introduction to Digit pplications Programming, Feb. CA (US) 2001. * cited by examiner (73) Assignee: Sun Microsystems, Inc., Santa Clara, Primary Examiner Kakali Chaki CA (US) A ssistant Examiner—InsunE. I KKang (*) Notice: Subject to any disclaimer, the term of this (74) Attorney, Agent, or Firm—Martine Penilla & patent is extended or adjusted under 35 Gencarella, LLP U.S.C. 154(b) by 774 days. (57) ABSTRACT (21) Appl. No.: 10/236,801 An invention is provided for an application manager testing (22) Filed: Sep. 5, 2002 interface that provides a public API usable by testing soft O O ware. The application manager testing interface allows test (65) Prior Publication Data ing Software to issue commands to an application manager US 2003/0196189 A1 Oct. 16, 2003 to test the life cycle and state management abilities of the application manager. A testing program capable of providing Related U.S. Application Data commands to test a life cycle of a dependent program controlled by an application manager is provided. In addi (60) Provisional application No. 60/372.248, filed on Apr. tion, an application manager testing interface is included 12, 2002. that is in communication with the testing program and the 51) Int. C application manager. The application manager testing inter (51) Int. Cl. face is capable of receiving the commands from the testing G06F 9/44 (2006.01) program and providing- the commands to the application (52) U.S. Cl. .........r irrir. 717/124; 717/126 manager. In this manner, the application manager can con (58) Field of Classification Search ......... 717. 124 135 trol the dependent program based on the commands. In one See application file for complete search history. aspect, the testing program can be controlled by the appli (56) References Cited cation manager. For example, the application manager can be an Xlet manager and the testing program is an agent Xlet, U.S. PATENT DOCUMENTS or the application manager can be an applet manager and the 2002fOO69263 A1* 6/2002 Sears et al. ................. TO9.218 testing program can be an agent applet. 2002/0133807 A1* 9, 2002 Sluiman ..................... 717/124 2002fO198868 A1* 12/2002 Kinzhalin et al. ............. 707/3 20 Claims, 7 Drawing Sheets 1. CaOC Ad2. Computer Xlet Manager Test Harness Agent Xlet cooz U.S. Patent Feb. 6, 2007 Sheet 1 of 7 US 7,174,542 B2 1. /OO JAVA APPLICATION FIG. 1 (Prior Art) U.S. Patent Feb. 6, 2007 Sheet 2 of 7 US 7,174,542 B2 U.S. Patent Feb. 6, 2007 Sheet 3 of 7 US 7,174,542 B2 - Personal Basis PrOfile PBP 306 304 CDC 302 FIG. 3 (Prior Art) U.S. Patent US 7,174,542 B2 HE5DVNVINLEITX U.S. Patent Feb. 6, 2007 s O / Vy N ØKOS ) / / c U.S. Patent Feb. 6, 2007 Sheet 6 of 7 US 7,174,542 B2 que6V??IX 4755 33eueufusal JeffeueWax J??nduo.O U.S. Patent Feb. 6, 2007 Sheet 7 Of 7 US 7,174,542 B2 1. 700 Provide Xlet Manager Testing Interface Specification 704 implement Xlet Manager Testing interface 706 Execute Test Harness and Agent Xlet 708 Provide Next Test to Agent Xlet 710 Exercise Test Xiet Using Agent Xlet and Xlet Manager Testing 712 Interface Yes J 714. No FIG. 7 US 7,174,542 B2 1. 2 SYSTEMAND METHOD XLET AND APPLET operation, the applet manager 110 controls the state and MANAGER TESTING execution of the applets 112. That is, the applet manager 110 determines when to load, start, and stop each applet 112. For CROSS REFERENCE TO RELATED example, a particular input applet 112 may be designed to APPLICATIONS create and open a small window that allows a user to input data. In this case, the applet manager 110 (browser) may This application claims the benefit of U.S. Provisional load the input applet 112 in response to a user making a Patent Application having Ser. No. 60/372.248, filed on Apr. particular selection on the browser 110 to enter data. 12, 2002, entitled “Method for Implementing Xlet Manager Similar to applets, Java based software for small devices Classes and Code for Executing the Same,” which is hereby 10 often require a separate software manager to execute prop incorporated by reference. erly. Generally, Java software for small devices is developed using Java 2 Micro Edition (J2ME), which is an edition of BACKGROUND OF THE INVENTION Java 2 for small devices such as PDAs and consumer appliances. One type of program often used in J2ME is the 1. Field of the Invention 15 Xlet, which is a program similar to an applet, which executes This invention relates generally to computer program within an Xlet manager. testing, and more particularly to applet and xlet manager FIG. 2B is a block diagram showing a conventional J2ME Software compatibility testing. Xlet based software environment 250. Similar to FIG. 2A, 2. Description of the Related Art the conventional Xlet based software environment 250 JavaTM, originally developed by Sun Microsystems, is an includes an OS layer 102', on which a JVM 104 and API object-oriented, multithreaded, portable, platform-indepen 106" are executed. However, the Xlet based software envi dent environment used to develop, test, and maintain soft ronment 250 includes an Xlet manager 254 that provides an ware programs. As used hereafter, any reference to Java will environment for Xlet programs 256 to execute. As with the be understood to contain the appropriate trademark refer applet manager of FIG. 2A, the Xlet manager 254 controls ence owned by Sun Microsystems Inc. To assure platform 25 the state and execution of the Xlets 256. Hence, the Xlet independence, Java implementations are often tested using manager 254 controls when each Xlet is loaded, paused, and methods that confirm consistency across multiple hardware active. platforms, operating systems, and other implementations of Unfortunately, because of the management software the same Java technology specification. This type of testing requirements, programs such as the applets 112 and Xlets generally is referred to as compatibility testing. 30 256 of FIGS. 2A and 2B are not easily accessible by testing FIG. 1 is an illustration showing a conventional Java programs. In particular, these programs have their life cycles based software environment 100. Java accomplishes plat managed by the applet manager 110 or the Xlet manager 254 form independence using a Java virtual machine (JVM) 104, software via methods defined in a life cycle interface that the which resides above the native operating system (OS) 102. applications implement. However, there is no public appli In addition, the Java based environment can include an 35 cation manager API available where the life cycle for the application programming interface (API) 106 that provides applets or Xlets is defined. Hence, there is no way for the additional functionality to Java applications 108 executing testing program to request the application manager to on the JVM 104. change the state of applets or Xlets, or query the application Generally, the Java program 108 comprises machine manager for the state of applets or Xlets. independent byte code, which is interpreted by the JVM 102 40 In view of the foregoing, there is a need for a testing before being run on a native instruction set of the target method that is capable of testing the application manage processor. In addition, the API 106 can provide libraries of ment functionalities of an application manager. Such as an functions, which the Java application 108 can use to perform applet manager or Xlet manager. The methods should pro specific tasks. In the example of FIG. 1, the Java application vide a mechanism for testing Software to test an application 108 is essentially a “standalone' program, which can create 45 manager's ability to manage the life cycles of the programs what it needs to execute. That is, the Java application 108 under its control. generally does not need other applications to execute prop erly. SUMMARY OF THE INVENTION Because of its 'standalone nature, a testing program can easily perform compatibility testing on the Java API 106 by 50 Broadly speaking, the present invention fills these needs loading a test that calls Java API 106 into JVM and monitor by providing an application manager testing interface that the tests behavior. However, not all Java based programs provides a public API usable by testing software. The are “standalone' applications. For example, Java programs application manager testing interface allows testing software have found extensive use on the World WideWeb, which is to issue commands to an application manager to test the life the Internet's multimedia information retrieval system. 55 cycle and state management abilities of the application These programs include Smaller programs, known as manager. In one embodiment, a system is disclosed for applets, that run in a Java enabled Web browser or applet testing an application manager. The system includes a test viewer. Such Java applets require an applet manager, such as ing program capable of providing commands to test a life the Java enabled browser, to execute properly. cycle of a dependent program controlled by an application FIG. 2A is a block diagram showing a conventional Java 60 manager. In addition, an application manager testing inter applet based software environment 200.