Skip to content

Commit 9b13774

Browse files
committed
Doc edits
Signed-off-by: Gopal S Akshintala <[email protected]>
1 parent 1c5eb26 commit 9b13774

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

README.adoc

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ Leveraging it can mitigate writing a lot of code as we translate those manual st
9797

9898
____
9999
100-
* How _productive_ would it be, if you can plug your exported Postman collection template,
101-
that you anyway would have created for your manual testing, and execute them through your JVM tests?
100+
* How _productive_ would it be, if you could plug your exported Postman collection template,
101+
that you anyway would have created for your manual testing and executed through your JVM tests?
102102
103103
* How about a Universal API automation tool that promotes low code and low-cognitive-complexity and strikes a balance between flexibility and ease of use?
104104
@@ -185,8 +185,8 @@ such that you can seamlessly run more assertions on top of the run.
185185
[source,kotlin,indent=0,options="nowrap"]
186186
----
187187
Rundown(
188-
stepNameToReport: List<StepReport>,
189-
environment: PostmanEnvironment)
188+
val stepReports: List<StepReport>,
189+
val mutableEnv: PostmanEnvironment<Any?>)
190190
191191
StepReport(
192192
step: Step,
@@ -201,7 +201,7 @@ StepReport(
201201
<2> Snapshot of Environment at the end of each step execution. It can be compared with previous or next step environment snapshots to see what changed in this step
202202

203203
[.lead]
204-
`Rundown` has many convenience methods to ease applying further assertions on top of it.
204+
`Rundown` has many convenient methods to ease applying further assertions on top of it.
205205

206206
TIP: Other simple examples to see in Action: link:{integrationtestdir}/com/salesforce/revoman/integration/pokemon/PokemonTest.java[PokemonTest.java]
207207

@@ -287,11 +287,11 @@ assertThat(pqRundown.mutableEnv)
287287
"quoteCalculationStatusAfterAllUpdates", PricingPref.System.completeStatus));
288288
----
289289
<1> `revUp()` is the method to call passing a configuration, built as below
290-
<2> Supply the path (relative to resources) to the Template Collection JSON file
291-
<3> Supply the path (relative to resources) to the Environment JSON file
290+
<2> Supply the path (relative to resources) to the Template Collection JSON file/files
291+
<3> Supply the path (relative to resources) to the Environment JSON file/files
292292
<4> Supply any dynamic environment that is runtime-specific
293293
<5> <<Custom Dynamic variables>>
294-
<6> <<Pre-req and Post-res scripts>>
294+
<6> Node modules path (relative to resources) to be used inside <<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>>
@@ -310,11 +310,11 @@ ifndef::env-github[]
310310
include::{integrationtestdir}/com/salesforce/revoman/integration/core/pq/PQE2EWithSMTest.java[tag=pq-e2e-with-revoman-config-demo]
311311
----
312312
<1> `revUp()` is the method to call passing a configuration, built as below
313-
<2> Supply the path (relative to resources) to the Template Collection JSON file
314-
<3> Supply the path (relative to resources) to the Environment JSON file
313+
<2> Supply the path (relative to resources) to the Template Collection JSON file/files
314+
<3> Supply the path (relative to resources) to the Environment JSON file/files
315315
<4> Supply any dynamic environment that is runtime-specific
316316
<5> <<Custom Dynamic variables>>
317-
<6> <<Pre-req and Post-res scripts>>
317+
<6> Node modules path (relative to resources) to be used inside <<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>>
@@ -328,7 +328,7 @@ endif::[]
328328
== Debugging UX
329329

330330
[.lead]
331-
This tool has particular emphasis on Debugging experience. Here is what a debugger view of a <<Rundown>> looks like:
331+
This tool has a particular emphasis on the Debugging experience. Here is what a debugger view of a <<Rundown>> looks like:
332332

333333
image:rundown.png[Rundown of all steps]
334334

@@ -338,7 +338,7 @@ image:rundown.png[Rundown of all steps]
338338
image:step-report.png[Step Report]
339339

340340
[.lead]
341-
Here are the environment *key-value* pairs accumulated along the entire execution and appended to the environment from file and dynamicEnvironment supplied:
341+
Here are the environment *key-value* pairs accumulated along the entire execution and appended to the environment from the file and `dynamicEnvironment` supplied:
342342

343343
image:mutable-env.png[Mutable environment after the execution completion]
344344

@@ -366,7 +366,7 @@ image:pq-exe-logging.gif[Monitor Execution]
366366
=== Type Safety with flexible JSON <- -> POJO marshalling/serialization and unmarshalling/deserialization
367367

368368
* ReṼoman internally uses a modern JSON library called https://github.com/square/moshi[**Moshi**]
369-
* There may be a POJO that inherits or contains legacy types which are hard or impossible to serialize. ReṼoman lets you serialize such types through `globalSkipTypes`, where you can filter-out these legacy types from Marshalling/Unmarshalling, only focussing on fields that matter.
369+
* There may be a POJO that inherits or contains legacy types that are hard or impossible to serialize. ReṼoman lets you serialize such types through `globalSkipTypes`, where you can filter out these legacy types from Marshalling/Unmarshalling, only focussing on fields that matter.
370370
* The payload may not map to POJO, and you may need a custom types adapter for Marshalling/Unmarshalling. Moshi has it covered for you with its advanced adapter mechanism and ReṼoman accepts Moshi adapters via
371371
** `requestConfig` — For types present as part of request payload for qualified Steps
372372
** `responseConfig` — For types present as part of response payload for qualified Steps
@@ -432,15 +432,15 @@ You can plug in your java code
432432
to create/generate values for environment variables
433433
which can be populated and picked-up by subsequent steps.
434434
For example, you may want some `xyzId` but you don't have a Postman collection to create it.
435-
But instead, you have a Java utility to generate/create it.
435+
Instead, you have a Java utility to generate/create it.
436436
You can invoke the utility in a pre-hook of a step and set the value in `rundown.mutableEnv`,
437437
so the later steps can pick up value for `+{{xyzId}}+` variable from the environment.
438438

439439
==== Response Validations
440440

441441
* Post-Hooks are the best place to validate response right after the step.
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.
443-
* 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*]
443+
* If your response data structure is non-trivial and has 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

445445
=== Pre-req and Post-res scripts
446446

@@ -469,7 +469,7 @@ pm.environment.set("$quantity", _.random(1, 10)); // lodash doesn't need `requir
469469

470470
[TIP]
471471
====
472-
* `node_modules` adds a lot of files to check in. You may replace them with a single distribution file
472+
* `node_modules` adds a lot of files to check-in. You may replace them with a single distribution file
473473
474474
image::node_modules.png[]
475475
@@ -481,7 +481,7 @@ CAUTION: The recommendation is not to add too much code in <<Pre-req and Post-re
481481
[#_mutable_environment]
482482
=== Mutable Environment
483483

484-
* Environment is the only mutable-shared state across step executions, which can be used for data-passing between consumer and the library.
484+
* Environment is the only mutable-shared state across step executions, which can be used for data passing between the consumer and the library.
485485
* 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
==== Read Mutable Environment as Postman Environment JSON format
@@ -497,12 +497,12 @@ Each StepReport also has a `pmEnvSnapshot` to assert if a step has executed as e
497497
=== Compose Modular Executions
498498

499499
* You don't have to squash all your steps into one mega collection. Instead, you can break them into easy-to-manage modular collections. `ReVoman.revUp()` accepts a list of collection paths through `templatePaths()`
500-
* But that doesn't mean you have to execute all these templates in one-go. You can make multiple `ReVoman.revUp()` calls for different collection.
501-
* If you wish to compose these executions, you can do so by adding the previous execution's `mutableEnv` to current execution using `dynamicEnvironment` parameter. This also comes in handy when you wish to execute a common step (e.g. `UserSetup`) inside a test setup method and use that environment for all the tests.
500+
* But that doesn't mean you have to execute all these templates in one-go. You can make multiple `ReVoman.revUp()` calls for different collections.
501+
* If you wish to compose these executions, you can do so by adding the previous execution's `mutableEnv` to the current execution using the `dynamicEnvironment` parameter. This also comes in handy when you wish to execute a common step (e.g. `UserSetup`) inside a Test setup method and use that environment for all the tests.
502502

503503
=== Custom Dynamic variables
504504

505-
If the in-built dynamic variables don't fit your need, you can plug your own dynamic variable generator
505+
If the in-built dynamic variables don't fit your needs, you can plug your own dynamic variable generator
506506
to be invoked to generate a value for your custom variable-key in the template at runtime.
507507

508508
== USP
@@ -535,8 +535,8 @@ The above test doesn't just have low code, but also low in Cognitive Complexity
535535

536536
== Perf
537537

538-
This entire execution of **~75 steps**, which includes **10 async steps**, took a mere *122 sec* on localhost.
539-
This can be much better on auto-build environments.
538+
This entire execution of **~75 steps**, including **10 async steps**, took a mere *122 sec* on localhost.
539+
This can be much better in auto-build environments.
540540

541541
image:pq-revoman-test-time.png[Localhost Test time on FTest console for ~75 steps]
542542

@@ -549,7 +549,7 @@ to how your server responds or your network speed.
549549
The future looks bright with multiple impactful features in the pipeline:
550550

551551
* API metrics and Analytics
552-
* *It's built with extensibility* in mind. It can easily be extended to support other template formats, e.g., Kaiju templates used for availability testing.
552+
* *It's built with extensibility* in mind. It can easily be extended to support other template formats, such as Kaiju templates used for availability testing.
553553
* In-built polling support for Async steps
554554
* Payload generation
555555
* Flow control through YAML config
@@ -569,13 +569,13 @@ The future looks bright with multiple impactful features in the pipeline:
569569
=== Do I need to migrate all my existing TestUtils to Postman Collections?
570570

571571
You don't have to.
572-
This is a JVM first tool,
572+
This is a JVM-first tool,
573573
and you can interlace your TestUtils through <<#_plug_in_your_java_code_in_between_postman_execution,Pre-/Post-Hooks>>
574574

575575
=== Why not use https://learning.postman.com/docs/collections/using-newman-cli/command-line-integration-with-newman[Newman] or https://learning.postman.com/docs/postman-cli/postman-cli-overview/#comparing-the-postman-cli-and-newman[Postman CLI]?
576576

577577
* ReṼoman may be similar to Newman or Postman CLI when it comes to executing a Postman collection, but the _similarities end there_.
578-
* Newman or Postman CLI are built for node and cannot be executed within a JVM. Even if you are able to run with some hacky way, there is no easy way to assert results.
578+
* Newman or Postman CLI are built for node and cannot be executed within a JVM. Even if you are able to run in some hacky way, there is no easy way to assert results.
579579
* ReṼoman is JVM first that lets you configure a lot more, and gives you back a detailed report to assert in a typesafe way
580580

581581
== 🙌🏼 Consume-Collaborate-Contribute

0 commit comments

Comments
 (0)