TS 70 DB Sanity
Test Specification: Database support Specification
Author: Tomas Musil
Version: 1.0
Introduction: Covering basic scenarios for NetBeans database support. These can be tested against whatever database you connect.
Setup: Install IDE along with Glassfish server, this ensures that you have Java DB available .
Contents |
Test suite: DB basic operations
Purpose: Test basic DB operations with Java DB
Setup: Start IDE with fresh userdir.
- Check Java DB is present
- Open Windows | Services
- EXPECTED RESULT:
Under Databases, Java DB node is present, contains Sample DB as child node.
- Connect to Java DB Sample DB
- Expand Java DB node, select Sample DB node
- Invoke "Connect" from popup
- EXPECTED RESULT:
IDE should create new connection, its node appeared under Databases node.
- Rename connection
- Select node representing connection to Sample DB
- Invoke "Rename" from popup
- Rename connection to something meaningful, e.g. "sample"
- EXPECTED RESULT:
Connection can be renamed.
- Disconnect/Connect connection
- From popup on "sample" connection, invoke "disconnect" - icon changes, connection is stopped
- From popup on "sample" connection, invoke "connect" - icon changes, connection is stared
- EXPECTED RESULT:
When connection is active, its node can be expanded, contains schemas in DB.
Test suite: MySQL server
Purpose: Test basic DB operations with MySQL server. IDE should autodetect if you have standard MySQL installation.
Setup: Start IDE with fresh userdir, ensure you have MySQL server installed and running.
- Check MySQL DB is present
- Open Windows | Services
- EXPECTED RESULT:
Under Databases, MySQL is present.
- MySQL properties
- Invoke popup on MySQL node
- Open properties dialog
- Check properties, if everything was recognized by IDE, fill in password if necessary, close dialog.
- EXPECTED RESULT:
Settings are now correct, connection succeeds. Databases nodes can be displayed if you expand MySQL node.
Test suite: Oracle DB server, remote connection
Purpose: Test creating new connection to Oracle DB server.
Setup: Start IDE with fresh userdir. Have prepared credentials for connecting to some remote Oracle DB
- Creating connection
- Open Windows | Services
- Expand Drivers node, select Oracle Thin
- Invoke Connect using from popup
- Notice missing driver file, follow instructions, download driver and add it. After that, you should be able to proceed.
- Fill in connection details on following panel. Test connection by button. Proceed to next panel
- Confirm default schema
- EXPECTED RESULT:
Connection can be established, can be connected/disconnected, renamed. Under connection node are schemas displayed, under schema you are able to list databases, views and procedures
- View/Edit stored procedures
- Connect to Oracle DB
- Expand HR schema (or any other test schema in your DB), Procedures node
- Invoke View/Edit on some procedure, function and trigger node
- EXPECTED RESULT:
Code can be properly viewed in separate window. In case od editing, sql editor is opened, and changes after running code are reflected.
Test suite: Table/Data manipulation
Purpose: Test manipulation with data on table level
Setup: Start IDE with fresh userdir. Have some DB connection, e.g. to Java DB
- Creating new table
- Connect to DB
- Invoke Create table from popup on Tables node
- Type table name, fill in two or three columns (use various data types)
- EXPECTED RESULT:
Table is created, is present under Tables node
- View data from table
- Invoke View data from popup on some populated table
- EXPECTED RESULT:
Data are shown in editor area.
- Add table row
- Invoke View data on table you've created
- Click on Insert Record in data viewer
- fill in data for first row
- Invoke Add row, fill in datador second row, confirm
- EXPECTED RESULT:
Data are added to table
- In-place editing of data
- in data viewer, choose some cell and edit value
- Cell value is marked green, two buttons are enabled - Commit record x Cancel edit
- Check that both buttons work correctly
- EXPECTED RESULT:
Changes can be committed, or rolled back
- Filtering data in data viewer
- type something into Matching rows textfield
- EXPECTED RESULT:
Data are filtred and only those rows where is match with textfield value are shown.
- Paging in data viewer
- View data on some table with lot of records
- Try page navigation - first, last, next previous
- Check that also Page size is reflected
- EXPECTED RESULT:
Data can be viewed by pages.
- Delete row
- View data on your table
- Select some row
- Click Delete records
- EXPECTED RESULT:
Row is deleted.
- Truncate data
- View data on your table
- Click Truncate table
- EXPECTED RESULT:
All data are deleted.