Spec file and folder status
A project usually has more spec files than fit in open editor tabs. The plugin can show each spec file's last result on the file's icon in the Project tool window, and a summary of a folder's spec files on the folder itself, so the state of the whole suite is visible from the tree.
Both read the same execution results, and each one has a separate setting: icons on the spec files, chevrons on the folders that hold spec files.
Spec file icons
Turn on Reflect execution status in spec file icons, under Settings → Tools → SpecBinder → Project view, and each spec file's icon shows how the file's last run went:
| Icon | Result | |
|---|---|---|
| Blue and teal | Every scenario passed | |
| Blue and red | A scenario stopped on an error — an exception other than a failed assertion | |
| Blue and amber | An assertion did not hold | |
| Blue and grey | A scenario was aborted: stopped before passing or failing | |
| Blue and a green triangle | Not run yet, changed since the last run, or no generated test class |
The worst scenario decides the icon: an error outranks a failure, which outranks an abort, which outranks a scenario not run, which outranks a pass. A scenario added or changed since the run counts as not run, and so does a file that the run covered only in part. An aborted scenario has a separate grey icon, so a scenario that stopped early is never mistaken for one still waiting to run.
These Project view icons keep the chevron shape whatever Icon style is chosen under Settings → Tools → SpecBinder → Execution results. That choice applies to the gutter and the editor toolbar, which is why the clips below show round status icons in the editor and chevrons in the tree.
Folder chevrons
Turn on Mark folders that contain spec files with a status chevron, on the same Settings page,
and each folder that holds spec files gets a small coloured ⟩ after the folder name. The colour
is the worst result of any spec file below the folder, at any depth, so a single failure shows on
a collapsed parent folder without opening any folder.
| Chevron | Meaning | |
|---|---|---|
| ⟩ | Teal | Every spec below passed |
| ⟩ | Red | A spec below stopped on an error |
| ⟩ | Amber | A spec below failed an assertion |
| ⟩ | Grey | A spec below was aborted |
| ▹ | Green triangle | A spec below has not run, has changed since the last run, or has no generated test class |
An error outranks a failure, which outranks an abort, which outranks a spec not run, which
outranks a pass. A folder with no spec files below is left
unmarked, and the folder's own icon and name do not change — the chevron is added after the name.
For a more visible mark, Use heavier chevrons draws the chevron as ❯ instead; the colours
and meanings stay the same (a not-run folder shows ▹ with either setting). The clips and the
screenshot below were taken with that setting on, so the chevrons in those pictures are the heavier ❯;
with the setting off, the same chevrons are the lighter ⟩ shown in the table.
When the icons change
Icons and chevrons are updated when an edited spec file is saved, and when a run finishes. Typing alone changes nothing in the Project view, so an unsaved edit never changes an icon.
Save a change to a scenario and the spec file changes to not run; undo the change, save again, and the file returns to passed. After a run the icons follow that run's results: the new report if the run wrote one, otherwise the results the IDE recorded.
If an icon looks out of date, choose Refresh SpecBinder Status from the Project view's context menu. On a spec file the command reads that spec's latest results again. On a folder the command does the same for every spec below the folder.