Skip to content

Commit e07c288

Browse files
authored
Update README.md
1 parent 088df1a commit e07c288

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,19 @@ For a single ad-hoc test, the `utils` library will offer little value, but if yo
2525
* make it easier to figure out the cause of test failures
2626
* reduce code needed to validate returned results
2727

28+
With the `utils` library, implementing a positive test can be done with one line of code, such as:
29+
30+
```JavaScript
31+
utils.test.positive(pm, null, 200);
32+
```
33+
34+
And a negative test coul be as simple as:
35+
36+
```JavaScript
37+
utils.test.negative(pm, null, 400, "BadRequest");
38+
39+
```
40+
2841
## Usage
2942
To use the `utils` library, copy the [`utils.js`](utils.js) source code and paste it in the pre-request script of the test collection's root folder. Then you can call the `utils` functions from anywhere in the test code base.
3043

0 commit comments

Comments
 (0)