From d3b3b48f47d3eee343aadd34b6315810d847cd67 Mon Sep 17 00:00:00 2001 From: Carlos Granados Date: Fri, 10 Oct 2025 09:09:41 +0200 Subject: [PATCH 1/2] docs: remove prefix and short summary docs --- user_guide/command_line_tool/formatting.rst | 4 ++++ user_guide/configuration/printing_paths.rst | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/user_guide/command_line_tool/formatting.rst b/user_guide/command_line_tool/formatting.rst index 44b14ab..056f6a9 100644 --- a/user_guide/command_line_tool/formatting.rst +++ b/user_guide/command_line_tool/formatting.rst @@ -116,6 +116,8 @@ The following options are specific to the Pretty formatter: * ``multiline`` print out PyStrings and TableNodes in full. Boolean, defaults to true. * ``showOutput`` show the test stdout output as part of the formatter output. Should be one of the ``ShowOutputOption`` enum values, defaults to ``ShowOutputOption::Yes``. +* ``shortSummary`` show a short summary (with just a list of scenarios) or a long summary (with a list of steps). + Defaults to true (short summary) Progress formatter ^^^^^^^^^^^^^^^^^^ @@ -125,6 +127,8 @@ The following options are specific to the Progress formatter: * ``timer`` show time and memory usage at the end of the test run. Boolean, defaults to true. * ``showOutput`` show the test stdout output as part of the formatter output. Should be one of the ``ShowOutputOption`` enum values, defaults to ``ShowOutputOption::InSummary``. +* ``shortSummary`` show a short summary (with just a list of scenarios) or a long summary (with a list of steps). + Defaults to false (long summary) Setting format options ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/user_guide/configuration/printing_paths.rst b/user_guide/configuration/printing_paths.rst index b4ad74a..4371707 100644 --- a/user_guide/configuration/printing_paths.rst +++ b/user_guide/configuration/printing_paths.rst @@ -21,6 +21,12 @@ need to be different if you are running your code within a Docker container). So - For PhpStorm: ``phpstorm://open?file={relPath}&line={line}`` - For VS Code: ``vscode://file/{absPath}:{line}`` +``Remove Prefix``: This allows you to define a list of prefixes that need to be removed from paths +when printing them. This affects only the visible paths, not the ones used in the editorUrl. This is +useful if your feature or context files are located in some subfolders, for example ``tests/behat/features`` +and ``src/behat``. It is not very informative if these folders are always printed when printing paths +and you may prefer to remove them + .. note:: The path style can be different for the visible path and the one used in the editor URL. For example you @@ -40,11 +46,15 @@ These options can be set using the ``withPathOptions()`` function of the ``Profi ->withProfile((new Profile('default')) ->withPathOptions( printAbsolutePaths: true, - editorUrl: 'phpstorm://open?file={relPath}&line={line}' + editorUrl: 'phpstorm://open?file={relPath}&line={line}', + removePrefix: [ + 'tests/behat/features', + 'src/behat', + ] )); They can also be set as command line options (notice that the editor URL will usually need to be quoted): .. code-block:: bash - behat --print-absolute-paths --editor-url="phpstorm://open?file={relPath}&line={line}" + behat --print-absolute-paths --editor-url="phpstorm://open?file={relPath}&line={line}" --remove-prefix=tests/behat/features,src/behat From b89d87b5550f9ecd8613cb2e56731796f76eaf71 Mon Sep 17 00:00:00 2001 From: Carlos Granados Date: Sun, 12 Oct 2025 11:54:50 +0200 Subject: [PATCH 2/2] Update shortSummary description --- user_guide/command_line_tool/formatting.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/user_guide/command_line_tool/formatting.rst b/user_guide/command_line_tool/formatting.rst index 056f6a9..0f99813 100644 --- a/user_guide/command_line_tool/formatting.rst +++ b/user_guide/command_line_tool/formatting.rst @@ -116,8 +116,8 @@ The following options are specific to the Pretty formatter: * ``multiline`` print out PyStrings and TableNodes in full. Boolean, defaults to true. * ``showOutput`` show the test stdout output as part of the formatter output. Should be one of the ``ShowOutputOption`` enum values, defaults to ``ShowOutputOption::Yes``. -* ``shortSummary`` show a short summary (with just a list of scenarios) or a long summary (with a list of steps). - Defaults to true (short summary) +* ``shortSummary`` show just a list of failing scenarios at the end of the output. If false, a full summary + (which also includes a list of failing steps) will be printed. Defaults to true Progress formatter ^^^^^^^^^^^^^^^^^^ @@ -127,8 +127,8 @@ The following options are specific to the Progress formatter: * ``timer`` show time and memory usage at the end of the test run. Boolean, defaults to true. * ``showOutput`` show the test stdout output as part of the formatter output. Should be one of the ``ShowOutputOption`` enum values, defaults to ``ShowOutputOption::InSummary``. -* ``shortSummary`` show a short summary (with just a list of scenarios) or a long summary (with a list of steps). - Defaults to false (long summary) +* ``shortSummary`` show just a list of failing scenarios at the end of the output. If false, a full summary + (which also includes a list of failing steps) will be printed. Defaults to false Setting format options ^^^^^^^^^^^^^^^^^^^^^^