Unit Test
Unit Test
PL/SQL Development and Unit Testing with Oracle SQL Developer 3.0
Sue Harper Senior Principal Product Manager
The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracles products remains at the sole discretion of Oracle.
Agenda
SQL Developer 2.1 New Features SQL Developer 3.0 New Features Working with PL/SQL Remote Debugging Unit Testing Tuning Finding More Information
Database connections Browse, query, update objects SQL Worksheet Query Builder Data import and export Object export PL/SQL Database and User defined reports User defined extensions Third-party databases Migrations Oracle APEX integration TimesTen integration Files and source code control
5
PL/SQL Unit Testing Data Modeler Viewer Migration support for IBM DB2 UDB and Teradata Updated Data Grids
Manage columns, filter on data
Version Control support for Serena Dimensions, Perforce Updated filtering mechanism
Schema level, generated objects
Code editor
Syntax highlighting Code formatter Code insight (auto complete) Code folding Query Builder
Code snippets
Drag and drop code snippets Add and customize snippets
Code templates
Create Trigger
Table View Schema Database
10
Compiling
Inline error reporting
Debugging PL/SQL
Set breakpoints
Configure conditions
Compile for Debug Control program execution (Step into, over) Run to Cursor Inspect and modify variables Review
Smart data Data
12
Remote Debugging
In remote session
execute DBMS_DEBUG_JDWP.CONNECT_TCP (127.0.0.1, 4000) Execute procedure
In SQL Developer
Debug as normal
Use the environment variable SET ORA_DEBUG_JDWP=host=127.0.0.1;port=4000
13
Unit Testing
14
Tests Suites Reports Library Static and dynamic lookups Multi user repository based Code coverage Command line use Target any database
15
Input/Return
Static or Dynamic Values
Startups/TearDown
Table Copy/Restore Row Copy/Restore Custom
16
Startups/TearDown
Table Copy/Restore Row Copy/Restore Custom
Code Coverage Tests are run sequentially Startup and teardowns for tests can be turned off
17
18
Reports against the repository Users can query the repository directly
19
20
Inside SQL Developer simply change the Combo List Command line by passing arguments Results are stored in the repository
21
Tuning
22
SQL Developer provides a PL/SQL related utilities PL/SQL Hierarchical Profiler Extended Search using PL/SQL SQL Monitor SQL Developer PL/SQL Reports General refactoring APEX refactoring
23
Hierarchical Profiler
24
Searching
25
Real time view of SQL Use /*+MONITOR*/ Drill to view details Visual indicators for current step Queries over 5 seconds monitored DBMS_SQLTUNE.REPORT_SQL_MONITOR
26
27
Refactoring
28
Providing integration points to Oracle APEX Remote debugging Tuning SQL Refactoring PL/SQL code
29
30
Forums
SQL Developer forums.oracle.com/forums/forum.jspa?forumID=260
31
Summary
PL/SQL
Creating, editing, compiling and debugging
Unit Testing
Creating, Running, Reporting Batch processing
Refactoring
Convert APEX anonymous blocks into a Package
32
33
34