You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for test descriptions in the plugin. A test's description should be surfaced in the IDE — for example as a hint shown when hovering the cursor over a test (in the editor gutter, the test method name, or the test tree).
Background
In Testo, a test's description originates from the summary part of the test method's PHPDoc — the text before the first block annotation (a line starting with @).
Here the description of renders is Verifies the widget renders correctly.
Important
The description is not simply the PHPDoc text. It is computed at runtime and can be modified during the Testo pipeline (interceptors/plugins may rewrite it). This logic cannot be reproduced in the IDE plugin, so the plugin must not parse PHPDoc via PSI to derive it — it has to take the final value from the test runner.
Where the description comes from
The authoritative source is the runtime value emitted by the test runner. When running with --teamcity, Testo emits the description on testStarted as the metainfo attribute:
##teamcity[testStarted name='renders' locationHint='...' metainfo='Verifies the widget renders correctly.']
The plugin should read the description from this metainfo attribute.
Proposed UX
Surface the description in the test run tree (it arrives with testStarted).
Optionally show it as a hover tooltip over the corresponding test method / #[Test] element, using the value captured from the last run.
Notes
Multi-line descriptions are possible (the PHPDoc summary may span several lines); metainfo is escaped per the TeamCity service-message rules (|n for newlines, etc.).
The description may be empty (e.g. PHPDoc with only annotations) — in that case the metainfo attribute is omitted, and nothing should be shown.
Summary
Add support for test descriptions in the plugin. A test's description should be surfaced in the IDE — for example as a hint shown when hovering the cursor over a test (in the editor gutter, the test method name, or the test tree).
Background
In Testo, a test's description originates from the summary part of the test method's PHPDoc — the text before the first block annotation (a line starting with
@).Example:
Here the description of
rendersisVerifies the widget renders correctly.Important
The description is not simply the PHPDoc text. It is computed at runtime and can be modified during the Testo pipeline (interceptors/plugins may rewrite it). This logic cannot be reproduced in the IDE plugin, so the plugin must not parse PHPDoc via PSI to derive it — it has to take the final value from the test runner.
Where the description comes from
The authoritative source is the runtime value emitted by the test runner. When running with
--teamcity, Testo emits the description ontestStartedas themetainfoattribute:The plugin should read the description from this
metainfoattribute.Proposed UX
testStarted).#[Test]element, using the value captured from the last run.Notes
metainfois escaped per the TeamCity service-message rules (|nfor newlines, etc.).metainfoattribute is omitted, and nothing should be shown.