Skip to content

Commit e970003

Browse files
committed
Minor doc updates
Signed-off-by: Gopal S Akshintala <[email protected]>
1 parent 6a0380a commit e970003

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.adoc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ TIP: Other simple examples to see in Action: link:{integrationtestdir}/com/sales
209209

210210
[.lead]
211211
ReṼoman isn't just limited to executing Collection like Postman;
212-
you can add more _bells & whistles_ 🔔:
212+
you can add more _bells and whistles_ 🔔:
213213

214214
ifdef::env-github[]
215215

@@ -291,7 +291,7 @@ assertThat(pqRundown.mutableEnv)
291291
<3> Supply the path (relative to resources) to the Environment JSON file
292292
<4> Supply any dynamic environment that is runtime-specific
293293
<5> <<Custom Dynamic variables>>
294-
<6> <<Pre-req and Tests scripts>>
294+
<6> <<Pre-req and Post-res scripts>>
295295
<7> <<Execution Control>>
296296
<8> <<#_type_safety_with_flexible_json_pojo_marshallingserialization_and_unmarshallingdeserialization, Request Config>>
297297
<9> <<#_type_safety_with_flexible_json_pojo_marshallingserialization_and_unmarshallingdeserialization, Response Config>>
@@ -314,7 +314,7 @@ include::{integrationtestdir}/com/salesforce/revoman/integration/core/pq/PQE2EWi
314314
<3> Supply the path (relative to resources) to the Environment JSON file
315315
<4> Supply any dynamic environment that is runtime-specific
316316
<5> <<Custom Dynamic variables>>
317-
<6> <<Pre-req and Tests scripts>>
317+
<6> <<Pre-req and Post-res scripts>>
318318
<7> <<Execution Control>>
319319
<8> <<#_type_safety_with_flexible_json_pojo_marshallingserialization_and_unmarshallingdeserialization, Request Config>>
320320
<9> <<#_type_safety_with_flexible_json_pojo_marshallingserialization_and_unmarshallingdeserialization, Response Config>>
@@ -442,13 +442,13 @@ so the later steps can pick up value for `+{{xyzId}}+` variable from the environ
442442
* If you have configured a strong type for your response through `responseConfig`, you can write type-safe validations by extracting your Strong type Object using `stepReport.responseInfo.get().<TypeT>getTypedTxnObj()` (if you have configured `responseConfig()` or `globalCustomTypeAdapters()`) or use `JsonPojoUtils.jsonToPojo(TypeT, stepReport.responseInfo.get().httpMsg.bodyString())` to convert it inline.
443443
* If your response data structure is non-trivial and have requirements to execute validations with different strategies like `fail-fast` or `error-accumulation`, consider using a library like https://github.com/salesforce-misc/Vador[*Vador*]
444444

445-
=== Pre-req and Tests scripts
445+
=== Pre-req and Post-res scripts
446446

447-
* Postman lets you write custom JavaScript in https://learning.postman.com/docs/writing-scripts/script-references/test-examples/[Pre-req and Tests tabs] that get executed before and after a step respectively. When you export the collection as a template, these scripts also come bundled.
447+
* Postman lets you write custom JavaScript in https://learning.postman.com/docs/writing-scripts/script-references/test-examples/[Pre-req and Post-res tabs] that get executed before and after a step respectively. When you export the collection as a template, these scripts also come bundled.
448448
* ReṼoman can execute this JavaScript on JVM. This support ensures that the Postman collection used for manual testing can be used *as-is* for the automation also, without any resistance to modify or overhead of maintaining separate versions for manual and automation.
449-
** Pre-req JS is executed as the first step before Unmarshall request.
450-
** Tests JS is executed right after receiving an HTTP response.
451-
* ReṼoman supports using `npm` modules inside your Pre-req and Tests JavaScript. You can install `npm` modules in any folder using traditional commands like `npm install <module>` and supply in the `Kick` config, the relative path of the parent folder that contains the `node_modules` folder using `nodeModulesRelativePath(...)`. Use those `npm` modules inside your scripts with `require(...)`, for example:
449+
** Pre-req JS script is executed as the first step before Unmarshall request.
450+
** Post-res JS script is executed right after receiving an HTTP response.
451+
* ReṼoman supports using `npm` modules inside your Pre-req and Post-res JS scripts. You can install `npm` modules in any folder using traditional commands like `npm install <module>` and supply in the `Kick` config, the relative path of the parent folder that contains the `node_modules` folder using `nodeModulesRelativePath(...)`. Use those `npm` modules inside your scripts with `require(...)`, for example:
452452

453453
.Install `moment` with npm
454454
[source,shellscript,indent=0,options="nowrap"]
@@ -476,13 +476,13 @@ image::node_modules.png[]
476476
* If `node_modules` is ignored on your git repo, you can force-add to check in using the command `git add -all -f <path>/node_modules`
477477
====
478478

479-
CAUTION: The recommendation is not to add too much code in Pre-req and Tests scripts, as it is not intuitive to troubleshoot. Use it for simple operations like set environment variables and use Post-Hooks JVM code for any non-trivial operations.
479+
CAUTION: The recommendation is not to add too much code in <<Pre-req and Post-res scripts>>, as it is not intuitive to troubleshoot. Use it for simple operations like set environment variables and use Post-Hooks JVM code for any non-trivial operations.
480480

481481
[#_mutable_environment]
482482
=== Mutable Environment
483483

484484
* Environment is the only mutable-shared state across step executions, which can be used for data-passing between consumer and the library.
485-
* This can be mutated (set key-value pairs) through <<Pre-req and Tests scripts>> (using `pm.environment.set()`) and <<#_pre_and_post_hooks,Pre-/Post-Hooks>> (using the reference `rundown.mutableEnv`) during execution.
485+
* This can be mutated (set key-value pairs) through <<Pre-req and Post-res scripts>> (using `pm.environment.set()`) and <<#_pre_and_post_hooks,Pre-/Post-Hooks>> (using the reference `rundown.mutableEnv`) during execution.
486486

487487
==== `pmEnvSnapshot` in each StepReport
488488
Each StepReport also has a `pmEnvSnapshot` to assert if a step has executed as expected and compare snapshots from different steps to examine the execution progress.
@@ -554,9 +554,9 @@ The future looks bright with multiple impactful features in the pipeline:
554554
* You can add a <<#_pre_and_post_hooks,pre-hook>> to the Step you are interested and add a debug point inside that. This gets hit before ReṼoman fires the request in that Step
555555
* You can get more adventurous by attaching revoman jar sources and directly adding conditional debug points inside this library source-code. You can search for logs in the source-code that indicate key operations to add conditional debug points with conditions like StepName etc.
556556

557-
=== Is there a way to Mark a Postman collection Step?
557+
=== Is there a way to add Metadata to a Postman collection Step?
558558

559-
* You can add key-value pairs to a Step Header (e.g., `ignoreHTTPStatusUnsuccessful=true`).
559+
* You can add key-value pairs to a Step's HTTP Headers section (e.g., `ignoreHTTPStatusUnsuccessful=true`).
560560
* You can use this information in <<#_step_picks,Step Picks>> or <<#_pre_and_post_hooks>> to identify a particular step to execute any conditional logic
561561

562562
=== Do I need to migrate all my existing TestUtils to Postman Collections?

0 commit comments

Comments
 (0)