-
Notifications
You must be signed in to change notification settings - Fork 0
Tree organization
The extension offers two modes for organizing the tree in the Test Explorer: by file (default) or by Oracle schema.
Traditional organization, based on the file path in the workspace:
TestController
└── WorkspaceFolder
└── tests/
└── ut_my_tests.pks
├── Suite: My Feature Tests
│ ├── test_case_1
│ └── test_case_2
└── Suite: Another Suite
└── test_case_3
Groups tests by Oracle schema, extracted from the file path via regex:
TestController
├── Schema: APP
│ └── Package: UT_MY_TESTS
│ └── Suite: My Feature Tests
│ ├── test_case_1
│ └── test_case_2
└── Schema: LOGIC
└── Package: UT_BUSINESS_RULES
└── Suite: Business Rules
└── test_case_3

The schemaPattern is applied to the relative file path within the
workspace. The {schema} placeholder is replaced by a capture group.
| Project structure | schemaPattern | File | Extracted schema |
|---|---|---|---|
db/APP/tests/ut_foo.pks |
db/{schema}/** |
→ | APP |
db/LOGIC/tests/ut_bar.pks |
db/{schema}/** |
→ | LOGIC |
src/HR/tests/ut_hr.pks |
src/{schema}/tests/** |
→ | HR |
tests/ut_baz.pks |
db/{schema}/** |
→ | UNKNOWN |
Files that do not match the schemaPattern are grouped under the
"UNKNOWN" schema, which appears last in the tree. This makes it easy to
quickly identify files outside the expected convention.
Always include the {schema} placeholder in the pattern — without it there is
no capture group, so no schema can be extracted and every file ends up under
UNKNOWN.
- Use a consistent directory structure:
db/{schema}/tests/packages/ -
schemaPatternsupports**(any depth) and*(single level) - Schema names are converted to uppercase (case-insensitive like Oracle)
- Switching between
fileandschemaautomatically rebuilds the tree - Works with multi-root: each workspace folder maintains its own schemas
-
Run all tests in a schema: click the
Schema: APPnode and run -
Run a specific package: click the
Package: UT_MY_TESTSnode -
Toggle between modes: change
organizationand the tree is rebuilt on the next refresh -
Always include
{schema}: without the placeholder there is no capture group, so no schema is extracted and every file is grouped underUNKNOWN— there is no fallback tofilemode
When there is a configured connection (without prompt), the refresh
supplements file-based suites with suites discovered directly from the
database — useful for shared installs and CI where the .pks files are not in
the workspace.
-
DB-first (0.13.0 / PRD-74): the canonical source is
ut_runner.get_suites_info(utPLSQL ≥ 3.1.3); when the API is unavailable the extension falls back toALL_OBJECTS/ALL_SOURCE(PRD-43). Controlled by theutplsql.discovery.sourcesetting (auto|file|database). - The annotation cache behind
get_suites_infocan be rebuilt with theutPLSQL: Rebuild Annotation Cachecommand (PRD-77). - Schemas queried: union of schemas extracted from local suites with the
directories immediately below the
schemaPatternbase (e.g.,db/*) -
File takes priority in the merge (match by
packageName, case-insensitive): it keeps the localuri/line, while the database wins on description/tags -
UT_*packages (utPLSQL framework) are ignored - Suites from the database use the virtual URI
utplsql-db:/SCHEMA/PKG.pks, open read-only (source fromALL_SOURCE): they support execution and jump to failure (dbSourceProviderserves the virtual document for "Go to Error"); they have no CodeLens and no inline decorations - Silent fallback:
ALL_SOURCEinaccessible or Oracle unavailable → file-based discovery only
- Getting Started
- Usage
- Advanced Tools
- Reference
- Development
- Help
{ // Enable schema mode "utplsql.organization": "schema", // Glob pattern to extract the schema name // {schema} is the placeholder — the extension captures whatever is in this position "utplsql.organization.schemaPattern": "db/{schema}/**" }