TS 60 DB

DB Test Specification for

Author: Martin Schovanek
Last update: 21/03/2005
Introduction: This test specification guides tester through all test cases of DB Explorer module.

Contents


Test suite: Add driver

Purpose: Tests add, delete driver operations.
Setup:

  1. Add, delete driver
    1. Open "Add JDBC Driver" dialog from popup menu "Add Driver..." on node Databases | Drivers
    2. Press Add button and in Select Driver dialog navigate to driver classes. Submit selected driver by Add button in the dialog. Check that path to driver jar/zip was added to "Driver File(s)" list, Driver Class was found and Name is appropriate. Try to remove driver and check whether all fields in the dialog were cleared. Add driver again and complete the action by OK button. New node should appear under Databases | Drivers.
    3. Add the same driver as in the previous step. It should be created with the same display name but with suffix "(1)".
    4. From popup menu open properties for driver. Check all properties are correct and try to change them and verify new values.
    5. Delete driver using popup menu item.
    • EXPECTED RESULT: Driver will be added and removed, properties are right.


Test suite: Connect to database

Purpose: Test connection to database from DB Explorer.
Setup: Add database drivers.

  1. Connection using existing database drivers
    1. Select driver - Select a node in Runtime | Databases | Drivers representing some supported database.
    2. Connection dialog - Pick Connect Using ... item in popup menu on selected node.
    3. Connection attributes - check name is the same as selected node, driver corresponds to selected database and database URL contains an appropriate template.

Press OK and check whether an error dialog is displayed expressing the reason of failure. Complete Database URL and test whether error dialog is shown with each combination of empty or invalid user name or password. In all cases the progress bar should reflect an activity and contain "Connection failed" at the end. Finally fill correct User Name and Password in. Press OK button. Progress bar should be moving and show "Connecting to database..." message. After connection is created, a node with connected icon should appear under the Databases node. Its display name contains Database URL, User Name and schema name.

    1. Duplicate connection - Try to create the same node which already exists. An error dialog should be arisen refusing it.
    2. Disconnect - Pick Disconnect item in popup menu on created database node. Icon of the node should change to "broken" image.
    3. Connect database - Pick Connect item in popup menu on created database node. The Connect dialog appears with User Name already in place and empty Password text field. Press OK and check whether an error dialog is displayed expressing the reason of failure. Type wrong password in the text field and againg check error message. In both cases the progress bar should reflect an activity and contain "Connection failed" at the end. Write correct password in and press OK. Icon of the node should change to "connected" state.
    4. Disconnect database - Pick Disconnect item in popup menu on created database node.
    5. Delete database connection - Pick Disconnect item in popup menu on created database node. Select "No" in a dialog which should show display name of a node which we are going to delete. Check the node is not deleted. Again pick Disconnect item and choose "Yes" in the confrimation dialog. The node should be removed from the tree.
    • EXPECTED RESULT: All actions are done correctly.
  1. Connection to other than default schema
    1. Connection - Repeat steps 1-3 from Connection without error checking and do not finish the connection.
    2. Choose schema - Switch to Advanced tab in New Database Connection dialog. Click button "Get Schemas". Connection should be established (see progress bar) and combo box is populated by schemas from database. Select other than default schema and press OK button.
    3. Check node - look at node in the tree. It should contains schema name in its name.
    4. Disconnect database - Pick Disconnect item in popup menu on created database node.
    • EXPECTED RESULT: All actions are done correctly.
  2. Remember password
    1. Connection - Repeat steps 1-3 from Connection without error checking but check "Remember password..." check box in the connection dialog. Finish connection.
    2. Disconnect and connect again using popup menu. No prompt should appear requestiong a password.
    • EXPECTED RESULT: All actions are done correctly.


Test suite: Table operations

Purpose: Test all table (view,index) operations with DB Explorer.
Setup: Connect to database.

  1. Create and delete table
    1. Connect to a database.
    2. Create new table - On selected database node | Tables pick Create Table ... item in popup menu.
    3. Fill dialog - Database name: Untitled, Validate at least one table column and press OK.
    4. Try various data types and all possible attributes of a column.
    5. Try to remove a column.
    6. Try to create invalid table (empty, invalid table name,..) and check if an error message is arisen.
    7. Delete table - Delete table using Delete popupmenu item
    • EXPECTED RESULT: All actions are done correctly.
  2. Grab and recreate table
    1. Grab table - Grab table to file using Grab Structure... popup menu item.
    2. Recreate table - Recreate table using Recreate Table ... popup menu item. Enter a different name of the table. It must have same structure as table which structure you have grabbed.
    3. Modify table script - Repeat again previous step but in the dialog Name the table push button edit table script. Modify the script and push OK. Check table is created as requested.
    4. Invalid table script - Edit table script as in previous step but invalidate it intentionally and push OK. An error dialog should be opened. Close it and check that Nam the table dialog is shown again to correct script.
    • EXPECTED RESULT: All actions are done correctly.
  3. Add, delete column
    1. Add column - On selected table pick Add Column ... item in its popup menu.
    2. Fill dialog - Fill dialog with valid data for selected column type. It must show a new node in your table. Some of databases has specific entering validations - for example: one of them supports add NULL columns only. Some databases do not refresh its table contents.
    3. Repeat - Repeat previous step for all data types and also for at least one column with null and/or unique and/or default and/or check and/or primary key property. Then check whether appropriate index is created.
    4. Delete column - Delete column using Delete popup menu item.
    • EXPECTED RESULT: All actions are done correctly.
  4. View data
    1. View data - View data from table on selected database node | Tables | selected table using View Data ... popup menu item
    • EXPECTED RESULT: Command Editor is opened and data are shown in table.
  5. Add, delete index
    1. Add index - On selected table and Indexes node pick Add index... item in its popup menu. Create one unique and one not unique index.
    2. Add column to index - select one of created indexes and call Add Column from its popup menu. Choose a column in Add To Index dialog and check whether it is added to index after confirmation.
    3. Delete index - Delete index using Delete popup menu item.
    • EXPECTED RESULT: All actions are done correctly.
  6. Execute command
    1. Open Command Editor - Open Command Editor using Execute Command ... popup menu item on a node that belongs to your database.
    2. Execute SQL Command - write an SQL command in Command text area. Execute it and check it is added to command history and its results are shown correctly.
    3. Test command history - write in different SQL command and execute it. Check it is added to command history. Now select previous command from command history and execute it. Repeat with the other command.
    • EXPECTED RESULT: All actions are done correctly.
  7. Add, delete view
    1. Add view - Add view into database using Add View ... popup menu item on Your database | Views. In opened dialog specify View name and SQL expression.
    2. View data - on created view call View Data popup item.
    3. Delete view - Delete view using Delete popup menu item.
    • EXPECTED RESULT: All actions are done correctly.


Test suite: Settings

Purpose: Checks if settings are in place and work.
Setup: Install clear DB module and connect to database.

  1. Check settings
    1. Verify default settings at Options > IDE Configuration > Server and External Tool Settings > Database Explorer
    2. Change settings.
    • EXPECTED RESULT: Default settings are "False, False, 100, 200" and all actions are done correctly.
  2. Test Debug mode
    1. Set debug mode on and try to add a column to a table. The output window should be opened displaying alter table SQL command.
    2. Set debug mode off, delete a column and check that SQL command is not logged into the Output window.
    • EXPECTED RESULT: SQL commands are properly logged into the Output window.
  3. Test Fetch limit
    1. Set fetch limit to a new value and view data of a table which has more rows than fetch limit. The Fetch Data dialog should be displayed. Check whether the new value is shown in the dialog.
    2. Try to close Fetch Data dialog by click on cross at the corner of the window.
    3. Try to click on No button. Only as much rows should be shown as fetch limit value is set.
    4. Repeat for a different values.
    • EXPECTED RESULT: Fetch data dialog should be shown and correct number of rows is fetched.
  4. Test Fetch step
    1. Set fetch step to a new value and view data of a table which has more rows than fetch limit and fetch step.
    2. Try to click Yes button several times. Every time it should load next "fetch step" rows.
    3. Try to click No button. It should close the dialog and display only desired number of rows.
    4. Try to click Fetch all. It should load all rows.
    5. Repeat for a different values.
    • EXPECTED RESULT: Fetch data dialog should be shown and correct number of rows is fetched.


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