Delphi-RAG-Lint

drag-lint help

Unit Test Stub (symbol)

Since: 0.27.0-alpha

Uses generate-test to produce a unit-test skeleton for one qualified symbol.

Read this when a routine has no test yet: generate-test produces a unit-test skeleton for one qualified symbol, in DUnitX or DUnit style.

How to run it

Full flag list: generate-test in the CLI reference.

Flags

FlagArgumentMeaningDefault
--qname<Foo.TBar.Baz>
--framework
--dbPATH

Where to click

  • RAD Studio main menu: drag-lint > Generate & Export > Unit Test Stub (symbol)...
    1. Put the caret on the routine in the editor
    2. Choose drag-lint > Generate & Export > Unit Test Stub (symbol)...
    3. A unit-test skeleton for the symbol is generated
    4. From a shell: drag-lint generate-test --qname <Foo.TBar.Baz> [--framework dunitx|dunit] [--db PATH]

Details

Uses generate-test to produce a unit-test skeleton for one qualified symbol. Reach for it to scaffold a test file for a routine that has none.

Running it from the CLI

drag-lint generate-test --qname <Foo.TBar.Baz> [--framework dunitx|dunit] [--db PATH]

--qname is the fully qualified symbol; --framework selects dunitx or dunit.

What it needs

The --db flag is optional -- drag-lint auto-resolves the project's index when omitted. An index must still exist.

Example

Illustrative only:

drag-lint generate-test --qname MyApp.TCustomerOrder.Total --framework dunitx --db C:\Projects\MyApp\_D-RAG\MyApp.sqlite

This would produce a DUnitX test stub targeting the Total member of TCustomerOrder.


All features | CLI reference | IDE menus