TS 61 Internationalization

Test Specification for Internationalization

Author: Petr Felenda, Emanuel Hucka, Jana Maleckova
Version: 6.1
Last update: 2008/01/31
Introduction: This test specification covers functionality of Internationalization module.
Comments:

Contents


Test suite: Main Menu

Purpose: Only to check position and complete set of items in Main menu.
Setup: Started IDE with fresh userdir.

  1. Check menu Internationalize
    1. Check name of menu in Tools | Internationalization | Internationalize (from main window) if exists.
    2. Check the menu item if is enabled or disabled. (Enabled - java source is selected (resp. Disabled - java source isn't selected.)
    3. Click to this item
    4. Close appeared dialog
    • EXPECTED RESULT: Internationalize item is on the first place in Tools
  2. Check menu Insert Internationalized String...
    1. Check name of menu in Tools|Internationalization|Insert Internationalized String...
    2. Click to this item
    3. Close appeared dialog
    • EXPECTED RESULT: Insert Internationalized String... item is on second place in Tools
  3. Check menu Internationalization Wizard
    1. Check name of menu in Tools|Internationalization|Internationalization Wizard
    2. Click to this item
    3. Close appeared dialog
    • EXPECTED RESULT: Internationalization Wizard item is on third place in Tools
  4. Check menu Internationalization Test Wizard
    1. Check name of menu in Tools|Internationalization|Internationalization Test Wizard.
    2. Click to this item
    3. Close appeared dialog
    • EXPECTED RESULT: Internationalization Test Wizard item is on fourth place in Tools


Test suite: Internationalize

Purpose:
Setup:

  1. Internationalize - Open help and close
    1. Open Internationalize dialog. Use main menu Tools|Internationalization|Internationalize.
    2. Click on Help button
    3. Wait to help appeared (0-10s)
    4. Close help. Use small cross button on window frame.
    5. Close dialog. Click to Close button
    • EXPECTED RESULT: These actions work correctly.
  2. Internationalize - Select bundle name (doesn't work in 6.5, see issue 139712)
    1. Open Internationalize dialog.
    2. Type a path of existed properties file into Bundle Name text field . The file should exists and be mounted in explorer. Properties file's path in its filesystem can be specified with java packages as java class (tests.properties).
    • EXPECTED RESULT: Replace string is generated and is shown in Replace String field in dialog.
  3. Internationalize - Select bundle name - Browse
    1. Open Internationalize dialog
    2. Click to Browse button.
    3. Close it with button Cancel.
    4. Click to Browse button for second time.
    5. Find the properties file and click to OK button.
    • EXPECTED RESULT: Selected properties file's name is displayed in Bundle Name text field. Replace String text field contains re-generated internationalize string.
  4. Internationalize - Select bundle name - New
    1. Open the Internationalize dialog
    2. Click on the New button
    3. Select path in the appeared New Bundle dialog, where you want to store a new properties file.
    4. Type a name to the Object Name text field.
    5. Click on the Cancel button.
    6. Click on the New button for second time.
    7. Select path in appeared New Bundle dialog, where you want to store new properties file.
    8. Type a name to the Object Name text field.
    9. Click on the OK button.
    • EXPECTED RESULT: Nothing happened after the Cancel action invocation. New properties file's name is displayed in Bundle Name text field. Replace String text field contains re-generated internationalize string after confirmation of the New Bundle dialog.
  5. Internationalize - Change replace string format
    1. Open the Internationalize dialog.
    2. Select a bundle (see previous cases).
    3. Click on the Format... button.
    4. Change format in the Replace Code Format Editor. Try to use pre-set code formats in Replace Code Format combo box or try to write your code format.
    5. Confirm the dialog by the OK button.
    • EXPECTED RESULT: Replace String will contain appropriate replace string.
  6. Internationalize - Replace
    1. Select a java source file or open it in source editor. Source code must contains at least one hardcoded string (e.g. System.out.println("Hello")).
    2. Open Internationalize dialog.
    3. Click to Browse button.
    4. Find the properties file in the Select Resource Bundles dialog and press the OK button.
    5. Write some comment into the Comment text field.
    6. Check if the Key field contains default key name - hardcoded string with replaced whitespaces by '_' char.
    7. Check if the Value text field contains default value - hardcoded string from editor.
    8. Confirm the dialog with the Replace button.
    • EXPECTED RESULT: A new property will be append into selected properties file. It has appropriate key, value and comment values. Found hardcoded string in the source editor is replaced by appropriate replace string.


Test suite: Insert Internationalized String ...

Purpose:
Setup:

  1. Insert String - Open help and close
    1. Open Insert Internationalized String dialog. Use main menu Tools|Internationalization|Insert Internationalized String. You must have opened a java file in source editor, otherwise this menu is disabled.
    2. Press the Help button.
    3. Wait to help appeared (0-10s)
    4. Close help. Use small cross on the window frame.
    5. Close the dialog. Press the Close button.
    • EXPECTED RESULT: The dialog appeared and help window contained a help content.
  2. Insert String - Select bundle name (doesn't work in 6.5, see issue 139712)
    1. Open an Insert Internationalized String dialog.
    2. Type a path of existed properties file into Bundle Name text field . The file should exists and be mounted in explorer. Properties file's path in its filesystem can be specified with java packages as java class (tests.properties).
    • EXPECTED RESULT: Replace string is generated and is shown in the Replace String field in dialog.
  3. Insert String - Select bundle name - Browse
    1. Open an Insert Internationalized String dialog.
    2. Press the Browse button
    3. Select an existing properties file in the appeared Select Resource Bundles dialog.
    4. Close it by the Cancel button
    5. Press the Browse button once more
    6. Select an existing properties file in the appeared Select Resource Bundles dialog and press the OK button.
    • EXPECTED RESULT: The Bundle Name text field contains the properties file path.
  4. Insert String - Select bundle name - New
    1. Open an Insert Internationalized String dialog.
    2. Press the New button
    3. Select a package and write a name of new properties file to Object Name textfield in the appeared New Bundle dialog.
    4. Press the OK button of the dialog.
    • EXPECTED RESULT: The Bundle Name text field contains the properties file path.
  5. Insert String - Change replace string format
    1. Open an Insert Internationalized String dialog.
    2. Select bundle (see previous cases)
    3. Press the Format... button.
    4. Try to change format. If you would use the {arguments} tag than the Arguments button in Insert Internationalized String dialog will be enabled.
    • EXPECTED RESULT: Format should be changed accordant with your changes
  6. Insert String - Fill only comment
    1. Open an Insert Internationalized String dialog.
    2. Select bundle (see previous cases)
    3. Fill Comment in
    4. Confirm dialog with OK button
    • EXPECTED RESULT: Nothing will happen.
  7. Insert String - Fill only key
    1. Open an Insert Internationalized String dialog.
    2. Select bundle (see previous cases)
    3. Fill Key in
    4. Confirm dialog with OK button
    • EXPECTED RESULT: A new property will be add to selected properties file without comment and value. Only key and equal sign are present.You should check values in properties file. Internationalization string is add to source file.
  8. Insert String - Fill only value
    1. Open an Insert Internationalized String dialog.
    2. Select bundle (see previous cases)
    3. Fill Value in
    4. Confirm dialog with OK button
    • EXPECTED RESULT: Nothing will happen.
  9. Insert Internationalized String
    1. Open an Insert Internationalized String dialog.
    2. Select bundle (see previous cases)
    3. Fill in Comment, Key and Value text fields
    4. Confirm dialog with OK button
    • EXPECTED RESULT: A new property will be add to selected properties file with appropriate comment, key and value. Internationalization string is insert into source file.


Test suite: Internationalization Wizard

Purpose:
Setup:

  1. Select Sources
    1. Open Internationalization Wizard. Use main menu Tools|Internationalize|Internationalization Wizard.
    2. Select Source to Internationalize: Press Add Source(s) button and choose some source in Select Sources dialog. You can select whole packages or filesystem and all sources from a folder will be add to sources list.
    3. If you open Internationalization Wizard from Explorer or Source editor (you have selected java source file or opened it in editor) by popup menu Tools|Internationalize|Internationalization Wizard selected source will be automatically add to Select Source list.
    4. Press the Next button.
    • EXPECTED RESULT: Step 2: Select Resource for Sources will appear. The Next button is enabled if the Select Source list is not empty.
  2. Select Resources for Sources
    1. Continue of previous case. Step 2 of Internationalize Wizard: Select Resources for Sources.
    2. There are sources in the Source/Resource table.
    3. Select a resources for each one - select a source and press button Select Resource.
    4. Select properties file in Select Resource dialog and confirm the dialog.
    5. Repeat it for all sources or use the Select All to select a resource file for all sources.
    6. Press the Next button.
    • EXPECTED RESULT: Step 3 of Internationalization Wizard will appear. The Next button will be enabled after the all sources have selected their resource.
  3. Modify Found Strings
    1. Continue of previous case. Step 3 of Internationalize Wizard: Modify Found Strings.
    2. Select a source by Source combobox.
    3. Check all found hard-coded strings in the Found Hard-Coded Strings table.
    4. Each line of table has got a checkbox to select or unselect current string to internationalization.
    5. Columns Key and Value of the table are editable to allow to change these values.
    6. Each line ending with ... button which is opening Customize Property dialog.
    7. Press the Finish button.
    • EXPECTED RESULT: All found and selected hard-coded string will be replaced by appropriate internationalize string. Check it in source code.


Test suite: Internationalization Test Wizard

Purpose:
Setup:

  1. Select Test Sources
    1. Open Internationalization Test Wizard. Use main menu Tools|Internationalize|Internationalization Test Wizard.
    2. Select Source to Test for Missing Resources: Press Add Source(s) button and choose some source in Select Sources dialog. You can select whole packages or filesystem and all sources from a folder will be add to sources list.
    3. If you open Internationalization Test Wizard from Explorer or Source editor (you have selected java source file or opend it in editor) by popup menu Tools|Internationalize|Internationalization Test Wizard selected source will be automaticaly add to Select Source list.
    4. Press the Next button.
    • EXPECTED RESULT: Step 2: Select Resource for Source Files will appear. The Next button is enabled if the Select Source list is not empty.
  2. Select Rources for Test Sources
    1. Continue of previous case. Step 2 of Internationalize Wizard: Select Resource for Source Files.
    2. There are sources in the Source/Resource table.
    3. Select a resources for each one - select a source and press button Select Resource.
    4. Select properties file in Selecte Resource dialog and confirm the dialog.
    5. Repeat it for all sources or use the Select All to select a resource file for all sources.
    6. Press the Next button.
    • EXPECTED RESULT: Step 3 of Find Internationalized Strings With Missing Resource will appear. The Next button will be enabled after the all sources have selected their resource.
  3. Find Missing Keys
    1. Continue of previous case. Step 3 of Internationalize Wizard: Find Internationalized Strings With Missing Resource.
    2. Wizard panel contains only a message "All internationalized strings have their keys." if all keys in the sources are in selected properties files.
    3. If some unexist keys were found the panel contains Source combobox and Found Strings with Missing Keys table.
    4. Select a source by Source combobox.
    5. Check all found missing keys in the Found Strings with Missing Keys table.
    6. Each line of table has got a checkbox to select or unselect current string to internationalization.
    7. Column Value of the table is editable to allow to change its value.
    8. Press the Finish button.
    • EXPECTED RESULT: All found and selected missing keys will be add to selected properties files. Check it in source code and properties editor.


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