Skip to content

Commit dbd6785

Browse files
authored
Merge pull request #205 from carlos-granados/remove-prefix-and-short-summary-docs
docs: remove prefix and short summary docs
2 parents a67355c + b89d87b commit dbd6785

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

user_guide/command_line_tool/formatting.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ The following options are specific to the Pretty formatter:
116116
* ``multiline`` print out PyStrings and TableNodes in full. Boolean, defaults to true.
117117
* ``showOutput`` show the test stdout output as part of the formatter output. Should be one of the
118118
``ShowOutputOption`` enum values, defaults to ``ShowOutputOption::Yes``.
119+
* ``shortSummary`` show just a list of failing scenarios at the end of the output. If false, a full summary
120+
(which also includes a list of failing steps) will be printed. Defaults to true
119121

120122
Progress formatter
121123
^^^^^^^^^^^^^^^^^^
@@ -125,6 +127,8 @@ The following options are specific to the Progress formatter:
125127
* ``timer`` show time and memory usage at the end of the test run. Boolean, defaults to true.
126128
* ``showOutput`` show the test stdout output as part of the formatter output. Should be one of the
127129
``ShowOutputOption`` enum values, defaults to ``ShowOutputOption::InSummary``.
130+
* ``shortSummary`` show just a list of failing scenarios at the end of the output. If false, a full summary
131+
(which also includes a list of failing steps) will be printed. Defaults to false
128132

129133
Setting format options
130134
^^^^^^^^^^^^^^^^^^^^^^

user_guide/configuration/printing_paths.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ need to be different if you are running your code within a Docker container). So
2121
- For PhpStorm: ``phpstorm://open?file={relPath}&line={line}``
2222
- For VS Code: ``vscode://file/{absPath}:{line}``
2323

24+
``Remove Prefix``: This allows you to define a list of prefixes that need to be removed from paths
25+
when printing them. This affects only the visible paths, not the ones used in the editorUrl. This is
26+
useful if your feature or context files are located in some subfolders, for example ``tests/behat/features``
27+
and ``src/behat``. It is not very informative if these folders are always printed when printing paths
28+
and you may prefer to remove them
29+
2430
.. note::
2531

2632
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
4046
->withProfile((new Profile('default'))
4147
->withPathOptions(
4248
printAbsolutePaths: true,
43-
editorUrl: 'phpstorm://open?file={relPath}&line={line}'
49+
editorUrl: 'phpstorm://open?file={relPath}&line={line}',
50+
removePrefix: [
51+
'tests/behat/features',
52+
'src/behat',
53+
]
4454
));
4555
4656
They can also be set as command line options (notice that the editor URL will usually need to be quoted):
4757

4858
.. code-block:: bash
4959
50-
behat --print-absolute-paths --editor-url="phpstorm://open?file={relPath}&line={line}"
60+
behat --print-absolute-paths --editor-url="phpstorm://open?file={relPath}&line={line}" --remove-prefix=tests/behat/features,src/behat

0 commit comments

Comments
 (0)