Skip to content

Commit c193f6b

Browse files
Update README.asciidoc (#96455) (#121028)
Co-authored-by: ARPIT SHARMA <[email protected]>
1 parent 8e9cccb commit c193f6b

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

Diff for: docs/README.asciidoc

+9-10
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,15 @@ used for its modifiers:
157157
* `// TESTRESPONSE[skip:reason]`: Skip the assertions specified by this
158158
response.
159159
* `// TESTSETUP`: Marks this snippet as the "setup" for all other snippets in
160-
this file. This is a somewhat natural way of structuring documentation. You
161-
say "this is the data we use to explain this feature" then you add the
162-
snippet that you mark `// TESTSETUP` and then every snippet will turn into
163-
a test that runs the setup snippet first. See the "painless" docs for a file
164-
that puts this to good use. This is fairly similar to `// TEST[setup:name]`
165-
but rather than the setup defined in `docs/build.gradle` the setup is defined
166-
right in the documentation file. In general, we should prefer `// TESTSETUP`
167-
over `// TEST[setup:name]` because it makes it more clear what steps have to
168-
be taken before the examples will work. Tip: `// TESTSETUP` can only be used
169-
on the first snippet of a document.
160+
this file. In order to enhance clarity and simplify understanding for readers,
161+
a straightforward approach involves marking the first snippet in the documentation file with the
162+
`// TESTSETUP` marker. By doing so, it clearly indicates that this particular snippet serves as the setup
163+
or preparation step for all subsequent snippets in the file.
164+
This helps in explaining the necessary steps that need to be executed before running the examples.
165+
Unlike the alternative convention `// TEST[setup:name]`, which relies on a setup defined in a separate file,
166+
this convention brings the setup directly into the documentation file, making it more self-contained and reducing ambiguity.
167+
By adopting this convention, users can easily identify and follow the correct sequence
168+
of steps to ensure that the examples provided in the documentation work as intended.
170169
* `// TEARDOWN`: Ends and cleans up a test series started with `// TESTSETUP` or
171170
`// TEST[setup:name]`. You can use `// TEARDOWN` to set up multiple tests in
172171
the same file.

0 commit comments

Comments
 (0)