STS 73 J2ME

J2ME Support Sanity Test Specification for NetBeans 7.3

Author: Štěpán Žebra
Version: 1.2
Last update: 10.10.2012
Introduction: Sanity test specification for testing Mobile and Embedded Java support. JavaME SDK is required for Mobility development. In NetBeans Full installer package, latest version of this SDK for each supported OS is bundled and pre-configured. To date, these are ME SDK 3.2 for Windows, ME SDK 3.0 for Mac and WTK 2.5.2 for Linux.
Comments: This document is heavily based on J2METestSpecificationSanity which is now obsolete.

Contents


Test suite: MIDP Project

Purpose: Test MIDP project support functionality.
Setup: NetBeans with Mobility module and JavaME Platform set up.

  1. MIDP Project creation
    1. Push the New Project... button on the main IDE toolbar. "New Project" wizard shows up.
    2. In the wizard, select "Java ME" category and "Mobile Application" project.
    3. Push the Next > button to proceed to the next step.
    4. In the second step, keep default values in all fields and push Next >.
    5. In the third step, check that valid MIDP emulator device is selected and push Next >.
    6. In the final step just push the Finish button.
    • EXPECTED RESULT: New Mobile Application is created and it's Midlet.java file is opened in the editor.
  2. MIDP Project run
    1. In "Projects" view, select the root node of the "MobileApplication1" project.
    2. Inovke Run popup menu action.
    3. Wait for the emulator window to show up and close it after the application is executed (confirm the "Hot Deployment" notification).
    • EXPECTED RESULT: The project is successfully built without errors and executed in mobile device emulator.
  3. MIDP Project closing/opening
    1. In "Projects" view, select the root node of the "MobileApplication1" project.
    2. Inovke Close popup menu action.
    3. Push the Open Project... button on the main IDE toolbar.
    4. In the "Open Project" dialog, locate and select "MobileApplication1" and push the Open Project button.
    • EXPECTED RESULT: After closing the project, the project contents disappears from "Projects" view and any project file opened in the editor is closed. After opening the project again, "MobileApplication1" is visible and responsive in the "Projects" view and any previously opened files in the editor are opened again.
  4. MIDP Project deletion
    1. In "Projects" view, select the root node of the "MobileApplication1" project.
    2. Inovke Delete popup menu action.
    3. Tick the "Also delete sources under "<projectpath>" folder" checkbox.
    4. Push the Yes button to confirm the project deletion.
    • EXPECTED RESULT: The project closed in the IDE and removed from the filesystem.


Test suite: IMP Project

Purpose: Test IMP project support functionality.
Setup: NetBeans with Mobility module and JavaME Platform set up.
Note: ME SDK 3.2 ONLY!

  1. IMP Project creation
    1. Push the New Project... button on the main IDE toolbar. "New Project" wizard shows up.
    2. In the wizard, select "Java ME" category and "Embedded Application" project.
    3. Push the Next > button to proceed to the next step.
    4. In the second step, keep default values in all fields and push Next >.
    5. In the third step, check that valid IMP emulator device is selected and push Next >.
    6. In the final step just push the Finish button.
    • EXPECTED RESULT: New Embedded Application is created and it's IMlet.java file is opened in the editor.
  2. IMP Project run
    1. In "Projects" view, select the root node of the "EmbeddedApplication1" project.
    2. Inovke Run popup menu action.
    3. Wait for the emulator window to show up and close it after the application is executed (confirm the "Hot Deployment" notification).
    • EXPECTED RESULT: The project is successfully built without errors and executed in mobile device emulator.
  3. IMP Project closing/opening
    1. In "Projects" view, select the root node of the "EmbeddedApplication1" project.
    2. Inovke Close popup menu action.
    3. Push the Open Project... button on the main IDE toolbar.
    4. In the "Open Project" dialog, locate and select "EmbeddedApplication1" and push the Open Project button.
    • EXPECTED RESULT: After closing the project, the project contents disappears from "Projects" view and any project file opened in the editor is closed. After opening the project again, "MobileApplication1" is visible and responsive in the "Projects" view and any previously opened files in the editor are opened again.
  4. IMP Project deletion
    1. In "Projects" view, select the root node of the "EmbeddedApplication1" project.
    2. Inovke Delete popup menu action.
    3. Tick the "Also delete sources under "<projectpath>" folder" checkbox.
    4. Push the Yes button to confirm the project deletion.
    • EXPECTED RESULT: The project closed in the IDE and removed from the filesystem.


Test suite: CDC Project

Purpose: Test CDC project support functionality.
Setup: NetBeans with Mobility module and JavaME Platform set up.
Note: ME SDK 3.2 & ME SDK 3.0 ONLY!

  1. CDC Project creation
    1. Push the New Project... button on the main IDE toolbar. "New Project" wizard shows up.
    2. In the wizard, select "Java ME" category and "CDC Application" project.
    3. Push the Next > button to proceed to the next step.
    4. In the second step, keep default values in all fields and push Next >.
    5. In the third step, check that valid CDC emulator device is selected and push Finish.
    • EXPECTED RESULT: New CDC Application is created and it's Main.java file is opened in the editor.
  2. CDC Project run
    1. In "Projects" view, select the root node of the "CdcApplication1" project.
    2. Inovke Run popup menu action.
    3. Wait for the emulator window to show up and close it after the application is executed (confirm the "Hot Deployment" notification).
    • EXPECTED RESULT: The project is successfully built without errors and executed in mobile device emulator.
  3. CDC Project closing/opening
    1. In "Projects" view, select the root node of the "CdcApplication1" project.
    2. Inovke Close popup menu action.
    3. Push the Open Project... button on the main IDE toolbar.
    4. In the "Open Project" dialog, locate and select "CdcApplication1" and push the Open Project button.
    • EXPECTED RESULT: After closing the project, the project contents disappears from "Projects" view and any project file opened in the editor is closed. After opening the project again, "MobileApplication1" is visible and responsive in the "Projects" view and any previously opened files in the editor are opened again.
  4. CDC Project deletion
    1. In "Projects" view, select the root node of the "CdcApplication1" project.
    2. Inovke Delete popup menu action.
    3. Tick the "Also delete sources under "<projectpath>" folder" checkbox.
    4. Push the Yes button to confirm the project deletion.
    • EXPECTED RESULT: The project closed in the IDE and removed from the filesystem.


Test suite: Visual Mobile Designer

Purpose: Test VMD availability and functionality.
Setup: NetBeans with Mobility module and JavaME Platform set up.

  1. Install VMD Plugin
    1. Invoke Tools | Plugins main menu action. "Plugins" manager shows up.
    2. Switch to the "Available Plugins (#)" tab in the manage.
    3. Tick the checkbox for "Visual Mobile Designer" and push Install.
    4. Proceed through the installer wizard until the installation is complete.
    • EXPECTED RESULT: The plugin is available and successfully installed.
  2. Create VMD Project
    1. Push the New Project... button on the main IDE toolbar. "New Project" wizard shows up.
    2. In the wizard, select "Java ME" category and "Mobile Application" project.
    3. Push the Next > button to proceed to the next step.
    4. In the second step, keep default values in all fields and push Next >.
    5. In the third step, check that valid MIDP emulator device is selected and push Next >.
    6. In the final step just push the Finish button.
    • EXPECTED RESULT: New Mobile Application is created, this time with HelloMIDlet.java VMD file, which is opened in the editor.


Test suite: Databinding

Purpose: Test that Databinding functionality is avilable and functional.
Setup: VMD project opened in the IDE.

  1. Add DataSet to mobile application
    1. In Projects tree, expand MobileApplication1 | Source Packages | hello node
    2. Double-click HelloMIDlet.java node
    • EXPECTED RESULT: HelloMIDlet.java is opened in Visual Designer
  2. Add DataSet to the MIDlet
    1. In Navigator, right-click Databinding node and invoke New/Add|DataSet popup menu command
    • EXPECTED RESULT: new dataSet subnode is displayed under Databinding node in Navigator
  3. Bind a Screen item to the DataSet
    1. In the Editor area switch HelloMIDlet in Visual Designer to Screen view
    2. Select stringItem (the text with "Hello" string) on Device Screen
    3. In Properties, push ellipsis button near Text property and open custom property editor dialog
    4. In "stringItem - Text" dialog select Databinding radio button, select dataSet in Datasets combo, type dataSet.text in "EL Read" entry field, press OK button to close the dialog
    • EXPECTED RESULT: <databinding> is displayed on StringItem on Device Screen and as value of Text property in Properties pane
  4. Customize DataSet and run the application in emulator
    1. Select datSet node in Navigator, right-click it and invoke "Go To Source" popup menu command
    2. Scroll down to getValue method and replace its body with "return "Greeting!";" statement
    3. Run the project in emulator
    4. Close the emulator
    • EXPECTED RESULT: Greeting is displayed on device screen in emulator


Test suite: SVG UI components support

Purpose: Verify the functionality allowing SVG UI components to be used in CLDC application.
Setup: VMD project opened in the IDE.

  1. Create and edit SVG file
    1. Press "New File..." button on the IDE toolbar
    2. Choose Other category and then "SVG File" in "File Types" list, press Next
    3. Check the new file name is newImage and Folder value is preset and valid then press Finish
    • EXPECTED RESULT: New SVG file is added in the project and opened in SVG composer
  2. Add UI elements to the SVG file
    1. Drag and drop "Text Field" form component from Patette on canvas in SVG composer
    2. Drag and drop Button form component from Patette on canvas in SVG composer
    3. Press "Save All Files" button on the IDE main toolbar
    • EXPECTED RESULT: both SVG text field and SVG button are displayed on canvas in SVG composer
  3. Add SVG Form to the MobileApplication1 project and attach SVG image to the form
    1. Select HelloMIDlet.java tab
    2. Make sure Visual Designer is switched to Flow mode (press Flow button on editor's toolbar if needed)
    3. Drag and drop "SVG Form" component from Palette on canvas
    4. Drag newImage.svg from Projects tree and drop it on svgForm displayed on canvas
    • EXPECTED RESULT: svgButton item is displayed under SVG Buttons category in svgForm element on canvas
  4. Make the svgForm a part of Mobile Application workflow
    1. Right-click 'form' component on canvas and invoke "New/Add | OK Command" popup menu command
    2. Bind okCommand item added to the form to svgForm element on canvas
    3. Bind svgButton item of svgForm to "Mobile Device" element on canvas
    • EXPECTED RESULT: The application workflow definition is completed
  5. Run the application in Emulator
    1. Press "Run Project" button on the IDE main toolbar
    2. In Emulator, press OK
    3. In Emulator, select OK button using cursor keys and push it by pessing Enter key on keyboard
    4. Exit the Emulator
    • EXPECTED RESULT: The application is complied and executed without errors


Test suite: Project Configurations

Purpose: Verify the ability of using multiple configurations of CLDC project
Setup: VMD project opened in the IDE.

  1. Add a new configuration
    1. In Projects tree, expand the project root node, select "Project Configurations" node, right-click it and invoke "Add Project Configuration" popup menu command
    2. In "Add Project Configuration" dialog, enter "MyConfiguration" in "New Configuration Name" entry field and press OK button
    • EXPECTED RESULT: MyConfiguration is created and selected in "Set Project Configuration" combobox on main IDE toolbar
  2. Modify the newly created comfiguration
    1. In Projects tree, right-click MobileApplication1 node and open the project properties
    2. In MobileApplication1 dialog, uncheck "Use Values from "DefaultConfiguration" ckeckbox
    3. Select DelaultCLDCPhone1 in Device combobox, press OK button
    • EXPECTED RESULT: Modifying of the configuration went smoothly
  3. Build many configurations of the CLDC project
    1. Right-click MobileApplication1 node in Projects tree and invoke "Batch Build" popup menu command
    2. In "Build Selected Project Configurations" dialog, check both DefaultConfiguration and MyConfiguration checkboxes and press OK
    3. Verify NetBeansProjects\MobileApplication1\dist folder contains the following files: MobileApplication1.jad, MobileApplication1.jar
    4. Verify NetBeansProjects\MobileApplication1\dist\MyConfiguration folder contains the following files: MobileApplication1.jad, MobileApplication1.jar
    • EXPECTED RESULT: Both configurations are built successfully
  4. Run different project configuratons in Emulator
    1. Make sure MyConfiguration is selected as current project configuration in combobox on main IDE toolbar
    2. Run the project
    3. Verify DefaultCldcPhone1 device emulator is executing the application
    4. Exit the emulator
    5. Select DefaultConfiguration as current project configuration in combobox on main IDE toolbar
    6. Run the project
    7. Verify ClamshellCldcPhone1 device emulator is executing the application
    8. Exit the emulator
    • EXPECTED RESULT: Both configurations are executed successfully


Test suite: Debugger

Purpose: Verify the functionality of the debugger in CLDC Project.
Setup: VMD project opened in the IDE.

  1. Set a breakpoint in MIDlet source
    1. Switch to HelloMIDlet.java
    2. Switch editor to Source view
    3. In java source editor, expand "Generated Method: startMIDlet" code folder
    4. Set breakpoint at line "switchDisplayable(null, getForm());"
    • EXPECTED RESULT: Breakpoint is successfully set
  2. Debug the project
    1. Press "Debug Project" button on main IDE toolbar
    • EXPECTED RESULT: The execution is stopped at the breakpoint
  3. Continue execution
    1. Press Continue button on the main IDE toolbar (Try the same also by using F5 shortcut)
    2. Exit the Emulator
    • EXPECTED RESULT: Execution can be stopped at breakpoint and then continued


Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo