Skip to content

Commit f09809d

Browse files
authored
Update README.md
1 parent 0bf6366 commit f09809d

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,18 @@ For the sake of consistency, all `utils` functions expect the global `pm` object
2323
### Functions
2424
The `utils` functions are logically grouped in nested classes (namespaces) and include:
2525

26-
* [Folder level functions](#folder-level-functions) for setting up tests
27-
* [Primary test functions](#primary-test-functions) for testing request results
28-
* [Data validation functions](#data-validation-functions) for checking data returned from requests
29-
* [Trace functions](#trace-functions) for trace logging
30-
* [General purpose functions](#general-purpose-functions) for miscellaneour operations
26+
* [**Folder level functions**](#folder-level-functions) for setting up tests
27+
* [**Primary test functions**](#primary-test-functions) for testing request results
28+
* [**Data validation function**s](#data-validation-functions) for checking data returned from requests
29+
* [**Trace functions**](#trace-functions) for trace logging
30+
* [**General purpose functions**](#general-purpose-functions) for miscellaneour operations
3131

3232
## Folder level functions
33-
Use folder level functions to run test or pre-request code attached to test collection folders (not request scripts). Folder level functions are grouped under the `utils.run` namespace and include:
33+
Before we get to the overview of the folder level functions, let's summarize how folder scripts work. Folder scripts can be defined for pre-requests and post-requests. For each request in the test collection being executed, Postman first runs pre-request scripts defined in all request parent folders starting from the top level folder. Then Postman runs request's pre-request script, executes the request, and runs all post-request scripts defined in the parent folder just as it did with folder pre-requests. Finally, it runs request tests. And it is worth repeating: this logic gets executed for every request in the test collection. You may not need to run any scripts for any or all folders, which is fine: you simple do not add any code to them; but when you do, you may need to run the code once per test collection execution or for every request in the collection.
34+
35+
Use folder level functions to run test or pre-request code attached to test collection folders (but not request scripts).
36+
37+
Folder level functions are grouped under the `utils.run` namespace and include:
3438
* [utils.run.once](#utilsrunonce):
3539
Invokes code in the specified custom inline function once per test collection run.
3640
* [utils.run.always](#utilsrunalways):

0 commit comments

Comments
 (0)