Skip to content

Commit c1f84eb

Browse files
committed
Updated prototypes.
1 parent 9fbd3b6 commit c1f84eb

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

README.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Use to initialize request data in pre-request scripts.
113113

114114
#### Prototype
115115
```JavaScript
116-
initialize(pm, name, process, onerror)
116+
utils.test.initialize(pm, name, process, onerror)
117117
```
118118

119119
#### Example
@@ -130,7 +130,7 @@ Use to run negative tests. By default, it will check the response's HTTP status
130130

131131
#### Prototype
132132
```JavaScript
133-
positive(pm, name, status, process, onerror)
133+
utils.test.positive(pm, name, status, process, onerror)
134134
```
135135

136136
#### Parameters
@@ -169,7 +169,7 @@ Use to run negative tests. By default, it will check the response's HTTP status
169169

170170
#### Prototype
171171
```JavaScript
172-
negative(pm, name, status, serviceCode, process, onerror)
172+
utils.test.negative(pm, name, status, serviceCode, process, onerror)
173173
```
174174

175175
#### Parameters
@@ -222,7 +222,7 @@ This function is intended for a rare case when you need to implement multiple te
222222

223223
#### Prototype
224224
```JavaScript
225-
neutral(pm, name, process, onerror)
225+
utils.test.neutral(pm, name, process, onerror)
226226
```
227227

228228
#### Example
@@ -273,7 +273,7 @@ Expects HTTP response to return a simple (not the JSON) data type, such as strin
273273

274274
#### Prototype
275275
```JavaScript
276-
text(pm)
276+
utils.expect.response.text(pm)
277277
```
278278

279279
#### Example
@@ -287,7 +287,7 @@ Expects HTTP response to return any JSON object. It can be a single element, a c
287287

288288
#### Prototype
289289
```JavaScript
290-
json(pm)
290+
utils.expect.response.json(pm)
291291
```
292292

293293
#### Example
@@ -301,7 +301,7 @@ Expects HTTP response to return a single JSON element (not a collection and not
301301

302302
#### Prototype
303303
```JavaScript
304-
one(pm)
304+
utils.expect.response.one(pm)
305305
```
306306

307307
#### Example
@@ -319,7 +319,7 @@ Expects HTTP response to return a JSON collection (can be empty or contain the s
319319

320320
#### Prototype
321321
```JavaScript
322-
many(pm, min = 0, max = -1)
322+
utils.expect.response.many(pm, min = 0, max = -1)
323323
```
324324

325325
#### Parameters
@@ -339,7 +339,7 @@ Expects HTTP response to return an empty JSON collection (but not `null`).
339339

340340
#### Prototype
341341
```JavaScript
342-
empty(pm)
342+
utils.expect.response.empty(pm)
343343
```
344344

345345
#### Example
@@ -353,7 +353,7 @@ Expects HTTP response to return a non-empty JSON collection (one or more items).
353353

354354
#### Prototype
355355
```JavaScript
356-
nonempty(pm)
356+
utils.expect.response.nonempty(pm)
357357
```
358358

359359
#### Example
@@ -367,7 +367,7 @@ Expects HTTP response to return a JSON collection with a single element (but not
367367

368368
#### Prototype
369369
```JavaScript
370-
unique(pm)
370+
utils.expect.response.unique(pm)
371371
```
372372

373373
#### Example
@@ -402,7 +402,7 @@ Expects the specified object to have a property with the given name.
402402

403403
#### Prototype
404404
```JavaScript
405-
exist(pm, data, name)
405+
utils.expect.property.exist(pm, data, name)
406406
```
407407

408408
#### Example
@@ -418,7 +418,7 @@ Expects the specified object to not have a property with the given name.
418418

419419
#### Prototype
420420
```JavaScript
421-
notexist(pm, data, name)
421+
utils.expect.property.notexist(pm, data, name)
422422
```
423423

424424
#### Example
@@ -434,7 +434,7 @@ Expects a named property of the specified object to be equal to the specific val
434434

435435
#### Prototype
436436
```JavaScript
437-
equal(pm, data, name, value)
437+
utils.expect.property.equal(pm, data, name, value)
438438
```
439439

440440
#### Parameters
@@ -491,7 +491,7 @@ Expects the named object property to be equal to the specified string value.
491491

492492
#### Prototype
493493
```JavaScript
494-
exact(pm, data, name, value, ignoreCase)
494+
utils.expect.property.string.exact(pm, data, name, value, ignoreCase)
495495
```
496496
#### Parameters
497497
* `ignoreCase`:
@@ -510,7 +510,7 @@ Expects the named object property to be contain the specified string value.
510510

511511
#### Prototype
512512
```JavaScript
513-
partial(pm, data, name, value, ignoreCase)
513+
utils.expect.property.string.partial(pm, data, name, value, ignoreCase)
514514
```
515515
#### Parameters
516516
* `ignoreCase`:
@@ -529,7 +529,7 @@ Expects the named object property to start with the specified string value.
529529

530530
#### Prototype
531531
```JavaScript
532-
start(pm, data, name, value, ignoreCase)
532+
utils.expect.property.string.start(pm, data, name, value, ignoreCase)
533533
```
534534
#### Parameters
535535
* `ignoreCase`:
@@ -548,7 +548,7 @@ Expects the named object property to end with the specified string value.
548548

549549
#### Prototype
550550
```JavaScript
551-
end(pm, data, name, value, ignoreCase)
551+
utils.expect.property.string.end(pm, data, name, value, ignoreCase)
552552
```
553553
#### Parameters
554554
* `ignoreCase`:
@@ -567,7 +567,7 @@ Expects the named object property to match the specified regular expression.
567567

568568
#### Prototype
569569
```JavaScript
570-
match(pm, data, name, value)
570+
utils.expect.property.string.match(pm, data, name, value)
571571
```
572572

573573
#### Example
@@ -625,7 +625,7 @@ utils.run.once(pm, "Client_Credentials_Flow_Tests", function() {
625625
### Trace logging
626626
Both, the [folder level](#folder-level-functions) and the [primary test functions](#primary-test-functions) already call the trace function to log the start and/or end of the operation, but if you want to add your own trace messages, you can do it via following function:
627627

628-
* `utils.trace.log(pm, message, level)
628+
* `utils.trace.log(pm, message, level)`
629629

630630
The `utils.trace.log` function takes the trace message and the log level values. It will compare the log level to the level initialized via one of the `utils.trace.set` functions (or the default) and if the specified level is the same or lower than the trace message will be logged; otherwise, it will be suppressed.
631631

@@ -651,7 +651,7 @@ Builds the name of the test to be used in primary test functions or elsewhere. T
651651

652652
#### Prototype
653653
```JavaScript
654-
name(pm, name, suffix)
654+
utils.name(pm, name, suffix)
655655
```
656656
#### Parameters
657657
* `name`:
@@ -673,7 +673,7 @@ Pauses script execution for the specified number of seconds or milliseconds.
673673

674674
#### Prototype
675675
```JavaScript
676-
wait(pm, timeout, seconds = true)
676+
utils.wait(pm, timeout, seconds = true)
677677
```
678678

679679
#### Parameters
@@ -694,7 +694,7 @@ Stops test execution.
694694

695695
#### Prototype
696696
```JavaScript
697-
stop(pm, timeout, seconds = true)
697+
utils.stop(pm, timeout, seconds = true)
698698
```
699699

700700
#### Example
@@ -708,7 +708,7 @@ Skips test execution to the specified test.
708708

709709
#### Prototype
710710
```JavaScript
711-
skip(pm, name)
711+
utils.skip(pm, name)
712712
```
713713

714714
#### Parameters

0 commit comments

Comments
 (0)