Skip to content

Commit c5b4eca

Browse files
committed
Document omitting files starting with . or _ better
Fixes robotframework#3691
1 parent 61f7c51 commit c5b4eca

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

doc/userguide/src/ExecutingTestCases/BasicUsage.rst

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,17 @@ are illustrated in the examples below. Note that in these examples, as
6161
well as in other examples in this section, only the ``robot`` script
6262
is used, but other execution approaches could be used similarly.
6363

64-
__ `Test case files`_
65-
__ `Test suite directories`_
66-
__ `Setting the name`_
67-
__ `Test suite name and documentation`_
68-
6964
::
7065

7166
robot tests.robot
7267
robot path/to/my_tests/
7368
robot c:\robot\tests.robot
7469

70+
.. note:: When executing a directory__, all files and directories starting with
71+
a dot (:file:`.`) or an underscore (:file:`_`) are ignored and,
72+
by default, only files with the :file:`.robot` extension executed.
73+
See the `Selecting files to parse`_ section for more details.
74+
7575
It is also possible to give paths to several test case files or
7676
directories at once, separated with spaces. In this case, Robot
7777
Framework creates the top-level test suite automatically, and
@@ -87,6 +87,12 @@ example below::
8787
robot my_tests.robot your_tests.robot
8888
robot --name Example path/to/tests/pattern_*.robot
8989

90+
__ `Test case files`_
91+
__ `Test suite directories`_
92+
__ `Setting the name`_
93+
__ `Test suite name and documentation`_
94+
__ `Test suite directories`_
95+
9096
Using command line options
9197
--------------------------
9298

doc/userguide/src/ExecutingTestCases/ConfiguringExecution.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Selecting files to parse
1616
------------------------
1717

1818
When executing a single file, Robot Framework tries to parse and run it
19-
regardless the file extension. The file is expected to use the `plain text
19+
regardless the name or the file extension. The file is expected to use the `plain text
2020
format`__ or, if it has :file:`.rst` or :file:`.rest` extension,
2121
the `reStructuredText format`_::
2222

@@ -26,10 +26,11 @@ the `reStructuredText format`_::
2626

2727
__ `Supported file formats`_
2828

29-
When executing a directory, Robot Framework only parses files with the
30-
:file:`.robot` extension by default. If files have other extensions,
31-
the :option:`--extension (-F)` option must be used to explicitly tell the
32-
framework to parse also them. If there is a need to parse more
29+
When executing a directory__, Robot Framework ignores all files and directories
30+
starting with a dot (:file:`.`) or an underscore (:file:`_`) and, by default,
31+
only parses files with the :file:`.robot` extension. If files use other
32+
extensions, the :option:`--extension (-F)` option must be used to explicitly
33+
tell the framework to parse also them. If there is a need to parse more
3334
than one kind of files, it is possible to use a colon `:` to separate
3435
extensions. Matching extensions is case insensitive and the leading `.`
3536
can be omitted::
@@ -46,6 +47,8 @@ would mean that other files in that format are skipped.
4647
parsed by default. Starting from Robot Framework 3.2 HTML files
4748
are not supported at all.
4849

50+
__ `Test suite directories`_
51+
4952
Selecting test cases
5053
--------------------
5154

0 commit comments

Comments
 (0)