TS 61 Properties

Properties Test Specification for Properties

Author: Emanuel Hucka, Jaromir Uhrik, Jiri Prox, Jana Maleckova
Version: 6.1
Last update: 2008/01/31
Introduction: This is test specification of Properties module in NetBeans IDE. The Properties module have been used for creating and editing resource bundles. These resource bundles are used by Internationalization module i18n). This test specification is covering all module functionality.
Comments:

Contents


Test suite: Creating properties file in IDE

Purpose: Check properties file creations.
Setup: Started Ide with fresh userdir.

  1. Creating properties file from main window - default name
    1. Open New Wizard. Use menu File|New File... from main window.
    2. Select from wizard Other|Properties File and click Next button.
    3. There is set default file name and package name. Do not change these values.
    4. Confirm wizard.
    5. Wait to properties file appeared in Explorer.
    • EXPECTED RESULT: New properties file will be add (with default name - newproperties.properties ) to adequate place in Explorer and opened in editor.
  1. Creating properties file from main window
    1. Open New Wizard. Use menu File|New File... from main window.
    2. Select from wizard Other|Properties File and click Next button.
    3. Type file name and select folder to place the file.
    4. Confirm wizard.
    5. Wait to properties file appeared in Explorer.
    • EXPECTED RESULT: New properties file will be add to adequate place in Explorer and opened in editor.
  1. Creating properties file from Explorer
    1. In Explorer create new properties file. Right click on any folder and select in appeared context menu New | File...
    2. Select from wizard Other|Properties File and click Next button.
    3. Type name to appeared wizard.
    4. Confirm wizard. (Press Finish button.)
    • EXPECTED RESULT: New properties file will be created and opened in editor.
  1. Creating properties file from Explorer - same name
    1. There should be created file from previous case. Do not delete it.
    2. In Explorer create new properties file. Right click on any directory and select in appeared context menu New|File... Other|Properties File.
    3. Type name to appeared wizard.(as same name as previous case)
    4. Try confirm wizard. 'Finish' button should be disabled.
    5. Cancel wizard. (Click to 'Cancel' button.)
    • EXPECTED RESULT: File is not created.


Test suite: Editing properties file by editor

Purpose: Check behavior of properties file editing.
Setup:

  1. Edit new file in property editor - remove 1
    1. Open property editor with empty properties file. (Use popup menu in Explorer and select Open action)
    2. Try push Remove Property button.
    • EXPECTED RESULT: There is no exceptions and nothing happened.
  1. Edit new file in property editor - add property
    1. Use file from previous case. Empty properties file.
    2. Push button New Property.
    3. In appeared dialog open help. (Click to Help button.)
    4. Type key, value and comment to appropriate places.
    5. Close Help. Use cross in window border or close button.
    6. Confirm dialog. (Push Ok button.)
    • EXPECTED RESULT: Help window for "Adding a Property" context will be opened. New property will be appended into edited properties file.
  1. Edit new file in property editor - add property - same name
    1. Use file from previous case.(There is one property in this file)
    2. Add new property. Push button New Property.
    3. Type the same values as key, value and comment to appropriate places as previous case.
    4. Confirm dialog. Push Ok button.
    • EXPECTED RESULT: An Error dialog will appear with message like "Property <NAME> already exists in <LOCALE> locale". No property will be appended to property file.
  1. Edit new file in property editor - add property - cancel
    1. Use file from previous case.(There is one property in this file)
    2. Add new property. Push button New Property.
    3. Type key, value and comment to appropriate places
    4. Cancel dialog. Push Cancel button.
    • EXPECTED RESULT: Nothing happened. No property will be add to property file.
  1. Edit new file in property editor - remove
    1. Use file from previous case.
    2. Select one item (row) in properties editor. There may be selected last added item.
    3. Try push Remove Property button.
    4. Wait for Question dialog and confirm it.
    • EXPECTED RESULT: No exceptions will be thrown. Selected item will be deleted.
  1. Edit new file in property editor - remove - cancel
    1. Use file from previous case or create a new.
    2. Select one item (row) in properties editor. If there is no item in property editor create new one.
    3. Try push Remove Property button.
    4. Wait for Question dialog and cancel him. You should use Cancel button for this action.
    • EXPECTED RESULT: No exceptions will be thrown. Selected item will be not deleted.
  1. Edit file in classic editor - add property
    1. Open new property file in classic editor. (Use popup menu in Explorer and select Edit action)
    2. Add new property. Type to editor # Comment of key1 , press enter and type key1=value1 .
    3. Save file. Use shortcut Ctrl-s.
    • EXPECTED RESULT: All changes will be made correctly, new key, value and comment can be checked by Explorer or in Properties editor.
  1. Edit file in classic editor - remove property
    1. Use property file from previous case.
    2. Remove property (typed in previous case)
    3. Save file. Use shortcut Ctrl-s
    • EXPECTED RESULT: All changes will be made correctly, removed key, value and comment can be checked by Explorer or in Properties editor.
  1. Customize big properties file
    1. Open big properties file with about 5 thousands rows in it.
    2. Add some properties to this file. Use Add property button in properties editor or popup menu from Explorer or properties window.
    3. Remove some properties.
    • EXPECTED RESULT: All actions will be done in adequate time. Maximal time for each action is 3 sec.


Test suite: Customizing properties file from explorer

Purpose: Check customizing of all settings of properties.
Setup:

  1. Adding locale file from Explorer
    1. Use popup menu on properties file (group of locale files) in Explorer. Right click to properties file in Explorer.
    2. Select from popup menu Add Locale.
    3. Open help from appeared dialog. Click to Help button.
    4. Type values to Language code, Country code and Variant fields.
    5. Close help window.
    6. Confirm dialog. Press OK button.
    • EXPECTED RESULT: New locale will be add to properties file. For each locale exists one file on disk.
  1. Adding locale file from Explorer - same values
    1. Use the same properties file from previous case.
    2. Open popup menu on this group of properties files.(in Explorer)
    3. Select Add Locale menu.
    4. Type to appeared dialog the same values (the same locale, country and variant) as previous case
    5. Confirm dialog
    • EXPECTED RESULT: An Error dialog will appear with message like: "Language <LOCALE_NAME> already exists in this bundle". No locale will be created.
  1. Adding locale file from Explorer - cancel
    1. Use the same properties file from previous case.
    2. Open popup menu on this group of properties files.(in Explorer)
    3. Select Add Locale menu.
    4. Type any values to proper place
    5. Cancel dialog. Press Cancel button.
    • EXPECTED RESULT: No locale will be created.
  1. Customize locales from Explorer - add locale
    1. Select some properties bundle in explorer.
    2. Invoke Customize action from popup menu.
    3. In Customize Dialog open help. Click to Help button.
    4. Add locale. Click to Add Locale button and type values to appeared dialog.
    5. Confirm New Locale dialog.
    6. Close Customize Dialog.
    • EXPECTED RESULT: New locale will be add. New file is created.
  1. Customize locales from Explorer - remove locale
    1. Open Customize Dialog (see previous case).
    2. Remove locale. Select one locale in Locales list and click on Remove button. Default locale is not possible to remove!
    3. Close Customize Dialog.
    • EXPECTED RESULT: Selected locale will be removed.
  1. Add property to locale file from Explorer
    1. Open context menu of default locale file. (In Explorer right click to Default locale file.)
    2. Select Add property from context menu.
    3. Open help. Use for this action Help button in appeared dialog.(Dialog Add property.)
    4. Fill to dialog all values and confirm it. (Click to the OK button.)
    • EXPECTED RESULT: Dialog disappeared and changes will be put correctly into properties file. Help should disappeared with dialog Add property at the same time.
  1. Add property to locale file from Explorer - cancel
    1. Open context menu of default locale file. (In Explorer right click to Default locale file.)
    2. Select Add property from context menu.
    3. Fill to dialog all values and cancel it.
    • EXPECTED RESULT: Dialog disappeared and changes aren't made in properties file.
  1. Add property to locale file from Explorer - same name
    1. Open context menu of default locale file. (In Explorer right click to Default locale file.)
    2. Select Add property from context menu.
    3. Fill to dialog the same values as previous case and confirm it. (Click to the OK button.)
    • EXPECTED RESULT: Dialog will disappear and an Error dialog appears with message like: "Property <PROPERTY_KEY> already exists in locale Default". There are no changes in properties file.
  1. Customize locale from Explorer
    1. Open Customizer dialog on some locale. (Invoke action Customize on Default or other locale in Explorer.)
    2. Open help. (Click to Help button.)
    3. Add property. (Click to Add Key button)
    4. Fill New Property dialog. (Fill all values)
    5. Confirm this dialog (Click to OK button.)
    6. Close Customizer dialog.
    • EXPECTED RESULT: New property will be add into customized locale. Check it in explorer.
  1. Customize locale from Explorer - cancel
    1. Open Customizer dialog on some locale. (Invoke action Customize on Default or other locale in Explorer.)
    2. Add property. (Click to Add Key button)
    3. Fill New Property dialog. (Fill all values)
    4. Close this dialog (Click to Cancel button.)
    5. Close Customizer dialog.
    • EXPECTED RESULT: New property will not be add to customized property.
  1. Customize locale from Explorer - same values
    1. Open Customizer dialog on some locale. (Invoke action Customize on Default or other locale in Explorer.)
    2. Add property. (Click to Add Key button)
    3. Fill the same values as previous case to the New Property dialog.
    4. Confirm this dialog (Click to OK button.)
    5. Close Customizer dialog.
    • EXPECTED RESULT: An Error dialog will appear with message like: "Property <PROPERTY_KEY> already exists in <LOCALE_NAME> locale.".
  1. Customize locale from Explorer - remove property
    1. Open Customizer dialog on some locale. (Invoke action Customize on Default or other locale in Explorer.)
    2. Select some properties and remove them from file. Click on Remove Key button.
    3. Try remove property from empty properties file. The Remove Key button should be disabled.
    • EXPECTED RESULT: Property(-ies) will be removed from property file.
  1. Delete locale from Explorer - cancel
    1. Delete locale file from Explorer. (Click to locale file to remove and press Delete key or use Delete item from popup menu in Explorer window.)
    2. Cancel appeared dialog. (Click to No button)
    • EXPECTED RESULT: Nothing happened.
  1. Delete locale from Explorer 2
    1. Delete locale file from Explorer. (Click to locale file to remove and press Delete key or use Delete item from popup menu in Explorer window.)
    2. Confirm appeared dialog. (Click to Yes button.)
    • EXPECTED RESULT: Selected locale file will be deleted.
  1. Delete more locales from Explorer
    1. Create properties file with more locales. (min. 2 locales)
    2. Open these locales in classic editor
    3. Delete these locale files from Explorer. Select them and press Delete button
    4. Confirm dialog. Click to Yes button.
    • EXPECTED RESULT: All selected properties files (locales) will be closed and deleted.


Test suite: Customizing properties file from form editor

Purpose: Check behaviour of properties file customized from Form Editor.
Setup:

  1. Adding property from Form Editor
    1. Create a form file. Use New Wizard dialog. (On some package invoke action New| File/Folder,in opened dialog select Swing GUI Forms|JPanel Form and press Finish button).
    2. Wait for Form Editor Window appeared.
    3. Add JButton component from toolbar to JPanel.
    4. Go to properties window and customize property text.
    5. Wait to dialog text appeared.
    6. Change Select mode combo from StringEditor to Resource Bundle.
    7. Wait to dialog change his content
    8. Fill all required fields and confirm dialog.
    • EXPECTED RESULT: Key will be add to chosen properties file. You can create a new properties file from this dialog.
  1. Changing property from Form Editor
    1. Use the same JPanel from previous case.
    2. Click to JButton.
    3. Go to properties window and customize property text.
    4. In appeared dialog change name of value or comment.
    5. Confirm this dialog.
    • EXPECTED RESULT: JButton text will be changed to new property value. The property is changed in properties file too.


Test suite: Options, features of the text editor

Setup: Open some properties file in editor (text view of a properties file).

  1. Line Numbers
    1. Try to toggle line numbering on/off using main menu command "View > Show Line Numbers".
    • EXPECTED RESULT: Check if change is made correctly in editor.
  1. Code Templates
    1. Open options dialog
    2. Click on the Editor icon
    3. Go to Code Templates tab
    4. Select 'Properties' as a language
    5. Click on New and fill in Abbreviation, Description and Expanded text
    6. Go to editor and test new Abbreviation
    7. Open option dialog and modify Code Template created is previous steps
    8. Go to editor and test again this Abbreviation
    9. Open option dialog and remove Code Template created is previous steps
    10. Go to editor and test Abbreviation again
    • EXPECTED RESULT: Abbreviations (Code Templates) expands abbreviation to desired text when it is set. After deleting code template it doesn't work any more
  1. Macro Creating
    1. Open options dialog
    2. Click on the Editor icon
    3. Go to Macros tab
    4. Create new macro by clicking on New and filing in Name and the Code
    5. Test the new macro in properties editor
    • EXPECTED RESULT: The macro works in the editor as expected
  1. Macro Recording
    1. Open properties file in editor
    2. Click on Start Macro Recording button
    3. Perform some actions
    4. Click on Stop Macro Recording
    5. Fill in a name and a shortcut for this macro
    6. Test the new macro in properties editor
    • EXPECTED RESULT: The macro works in the editor as expected, it is added to macro list in the options dialog (for the right language)
  1. Macro Removing
    1. Open options dialog
    2. Click on the Editor icon
    3. Go to Macros tab
    4. There should be two macros created in previous test-cases. Remove them
    5. Test the macros in the editor
    • EXPECTED RESULT: The shortcuts assigned originally to the macros do nothing
  1. Syntax Coloring
    1. Open options dialog
    2. Click on the Fonts & Colors icon
    3. Select Syntax tab
    4. Select 'Properties' as language
    5. Try changing font and colors for each item in the Category list
    • EXPECTED RESULT: The preview is updated correctly, the changes are reflected in the editor
  1. Indentation
    1. Open options dialog
    2. Click on the Editor icon
    3. Go to Indentations tab
    4. Try to change several parameters (for example set right margin to a half value, see issue #129096, or tab size) on this tab.
    • EXPECTED RESULT: Check if all the changes of indentation are reflected in the editor.
  1. Shadow table cell
    1. Open options dialog
    2. Click on the Advanced Options button
    3. Expand path Options > Editing > Editor Settings, select "Properties Editor" node
    4. Set some color in "Shadow Table Cell" property, confirm the Options dialog
    5. Add new local to properties file
    6. Open default properties file in simple editor and add new key with value there
    7. Save file
    8. Open a properties file in the advance editor (choose Open action from the pop-up menu in the Projects view, you should see a table with keys and values).
    • EXPECTED RESULT: The background color of an empty cell is the same as the color you have chosen in the step 4.
  1. Line Height Correction
    1. Open options dialog
    2. Click on the Advanced Options button
    3. Expand path Options > Editing > Editor Settings, select "Properties Editor" node
    4. Set some value for the Line Height Correction (3.0 means that the line is 3x higher)
    5. Open a properties file in the simple editor (choose Edit from the pop-up menu in the Projects view, text editor is opened).
    • EXPECTED RESULT: The line height is changed according to the value you have chosen in the step 4.


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