Skip to content

Commit c75bd4e

Browse files
committed
Release 0.7.4.1
Rename nodeModulesRelativePath to nodeModulesPath Signed-off-by: Gopal S Akshintala <[email protected]>
1 parent 65098c3 commit c75bd4e

File tree

14 files changed

+31
-36
lines changed

14 files changed

+31
-36
lines changed

README.adoc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ endif::[]
1818
:pmtemplates: src/integrationTest/resources/pm-templates
1919
:imagesdir: docs/images
2020
:prewrap!:
21-
:revoman-version: 0.7.4
21+
:revoman-version: 0.7.4.1
2222

2323
'''
2424

@@ -266,7 +266,7 @@ final var pqRundown =
266266
.customDynamicVariableGenerator( // <5>
267267
"$unitPrice",
268268
(ignore1, ignore2, ignore3) -> String.valueOf(Random.Default.nextInt(999) + 1))
269-
.nodeModulesRelativePath("js") // <6>
269+
.nodeModulesPath("js") // <6>
270270
.haltOnFailureOfTypeExcept(
271271
HTTP_STATUS,
272272
afterAllStepsContainingHeader("ignoreHTTPStatusUnsuccessful")) // <7>
@@ -621,7 +621,7 @@ CAUTION: When a Step qualifies for more than one hook, hooks are executed in the
621621
* 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.
622622
** Pre-req JS script is executed as the first step before Unmarshall request.
623623
** Post-res JS script is executed right after receiving an HTTP response.
624-
* 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:
624+
* 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, an absolute or relative path (relative to Project directory) to the folder that contains the `node_modules` folder using `nodeModulesPath(...)`. Use those `npm` modules inside your scripts with `require(...)`, for example:
625625

626626
.Install `moment` with npm
627627
[source,shellscript,indent=0,options="nowrap"]
@@ -642,6 +642,8 @@ pm.environment.set('$randomFutureDate', futureDateTime.format('YYYY-MM-DD'))
642642
pm.environment.set("$quantity", _.random(1, 10))
643643
----
644644

645+
CAUTION: It is not supported to load `node_modules` from jar. For example, `/Users/username/some-path/revoman-root/build/libs/revoman-root-0.40.0.jar!/js` is an invalid path. link:https://graalvm.slack.com/archives/CN9L59P61/p1710937088860679?thread_ts=1710767437.443019&cid=CN9L59P61[Refer this known issue]
646+
645647
[TIP]
646648
====
647649
* `node_modules` Adds a lot of files to check in. You may replace them with a single distribution file

buildSrc/src/main/kotlin/Config.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
* ************************************************************************************************
77
*/
88
const val GROUP_ID = "com.salesforce.revoman"
9-
const val VERSION = "0.7.4"
9+
const val VERSION = "0.7.4.1"
1010
const val ARTIFACT_ID = "revoman"
1111
const val STAGING_PROFILE_ID = "1ea0a23e61ba7d"

src/integrationTest/java/com/salesforce/revoman/integration/core/bt2bs/MilestoneBillingE2ETest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import static com.google.common.truth.Truth.assertThat;
1010
import static com.salesforce.revoman.integration.core.bt2bs.ReVomanConfigForBT2BS.MILESTONE_CONFIG;
1111
import static com.salesforce.revoman.integration.core.bt2bs.ReVomanConfigForBT2BS.MILESTONE_SETUP_CONFIG;
12-
import static com.salesforce.revoman.integration.core.bt2bs.ReVomanConfigForBT2BS.USER_CREATION_AND_SETUP_CONFIG;
12+
import static com.salesforce.revoman.integration.core.bt2bs.ReVomanConfigForBT2BS.PERSONA_CREATION_AND_SETUP_CONFIG;
1313

1414
import com.salesforce.revoman.ReVoman;
1515
import java.util.Map;
@@ -24,7 +24,7 @@ void testMilestoneBillingE2E() {
2424
ReVoman.revUp(
2525
(rundown, ignore) ->
2626
assertThat(rundown.firstUnIgnoredUnsuccessfulStepReport()).isNull(),
27-
USER_CREATION_AND_SETUP_CONFIG,
27+
PERSONA_CREATION_AND_SETUP_CONFIG,
2828
MILESTONE_SETUP_CONFIG,
2929
MILESTONE_CONFIG);
3030
assertThat(CollectionsKt.last(mbRundown).mutableEnv)

src/integrationTest/java/com/salesforce/revoman/integration/core/bt2bs/ReVomanConfigForBT2BS.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ private ReVomanConfigForBT2BS() {}
2929

3030
// ## User creation and Setup
3131
static final String COLLECTION_PATH = "pm-templates/core/milestone/";
32-
private static final String USER_CREATION_AND_SETUP_COLLECTION_PATH =
32+
private static final String PERSONA_CREATION_AND_SETUP_COLLECTION_PATH =
3333
COLLECTION_PATH + "persona-creation-and-setup.postman_collection.json";
34-
static final Kick USER_CREATION_AND_SETUP_CONFIG =
34+
static final Kick PERSONA_CREATION_AND_SETUP_CONFIG =
3535
Kick.configure()
36-
.templatePath(USER_CREATION_AND_SETUP_COLLECTION_PATH)
36+
.templatePath(PERSONA_CREATION_AND_SETUP_COLLECTION_PATH)
3737
.environmentPath(ENV_PATH)
3838
.responseConfig(unmarshallCompositeGraphResponse(), unmarshallCompositeResponse())
3939
.hooks(ASSERT_COMPOSITE_GRAPH_RESPONSE_SUCCESS, ASSERT_COMPOSITE_RESPONSE_SUCCESS)
40-
.nodeModulesRelativePath(NODE_MODULE_RELATIVE_PATH)
40+
.nodeModulesPath(NODE_MODULE_RELATIVE_PATH)
4141
.haltOnFailureOfTypeExcept(
4242
HTTP_STATUS, afterStepContainingHeader(IGNORE_HTTP_STATUS_UNSUCCESSFUL))
4343
.insecureHttp(true)
@@ -69,7 +69,7 @@ HTTP_STATUS, afterStepContainingHeader(IGNORE_HTTP_STATUS_UNSUCCESSFUL))
6969
.haltOnFailureOfTypeExcept(
7070
HTTP_STATUS, afterStepContainingHeader(IGNORE_HTTP_STATUS_UNSUCCESSFUL))
7171
.globalCustomTypeAdapter(IDAdapter.INSTANCE)
72-
.nodeModulesRelativePath(NODE_MODULE_RELATIVE_PATH)
72+
.nodeModulesPath(NODE_MODULE_RELATIVE_PATH)
7373
.off();
7474

7575
// ## Milestone Config
@@ -86,6 +86,6 @@ HTTP_STATUS, afterStepContainingHeader(IGNORE_HTTP_STATUS_UNSUCCESSFUL))
8686
.haltOnFailureOfTypeExcept(
8787
HTTP_STATUS, afterStepContainingHeader(IGNORE_HTTP_STATUS_UNSUCCESSFUL))
8888
.globalCustomTypeAdapter(IDAdapter.INSTANCE)
89-
.nodeModulesRelativePath(NODE_MODULE_RELATIVE_PATH)
89+
.nodeModulesPath(NODE_MODULE_RELATIVE_PATH)
9090
.off();
9191
}

src/integrationTest/java/com/salesforce/revoman/integration/core/pq/PQE2EWithSMTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void revUpPQ() {
7878
.customDynamicVariableGenerator( // <5>
7979
"$unitPrice",
8080
(ignore1, ignore2, ignore3) -> String.valueOf(Random.Default.nextInt(999) + 1))
81-
.nodeModulesRelativePath("js") // <6>
81+
.nodeModulesPath("js") // <6>
8282
.haltOnFailureOfTypeExcept(
8383
HTTP_STATUS, afterStepContainingHeader("ignoreHTTPStatusUnsuccessful")) // <7>
8484
.requestConfig( // <8>

src/integrationTest/java/com/salesforce/revoman/integration/restfulapidev/RestfulAPIDevTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void restfulApiDev() {
2929
Kick.configure()
3030
.templatePath(PM_COLLECTION_PATH) // <2>
3131
.environmentPath(PM_ENVIRONMENT_PATH) // <3>
32-
.nodeModulesRelativePath("js")
32+
.nodeModulesPath("js")
3333
.off());
3434
assertThat(rundown.firstUnIgnoredUnsuccessfulStepReport()).isNull(); // <4>
3535
assertThat(rundown.stepReports).hasSize(4); // <5>

src/integrationTest/kotlin/com/salesforce/revoman/integration/apigee/ApigeeKtTest.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ class ApigeeKtTest {
1616
@Test
1717
fun `xml2js apigee`() {
1818
val rundown =
19-
ReVoman.revUp(
20-
Kick.configure().templatePath(PM_COLLECTION_PATH).nodeModulesRelativePath("js").off()
21-
)
19+
ReVoman.revUp(Kick.configure().templatePath(PM_COLLECTION_PATH).nodeModulesPath("js").off())
2220
assertThat(rundown.stepReports).hasSize(1)
2321
assertThat(rundown.firstUnsuccessfulStepReport).isNull()
2422
assertThat(rundown.mutableEnv["city"]).isEqualTo("San Jose")

src/integrationTest/kotlin/com/salesforce/revoman/integration/restfulapidev/RestfulAPIDevKtTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class RestfulAPIDevKtTest {
2020
Kick.configure()
2121
.templatePath(PM_COLLECTION_PATH) // <2>
2222
.environmentPath(PM_ENVIRONMENT_PATH) // <3>
23-
.nodeModulesRelativePath("js")
23+
.nodeModulesPath("js")
2424
.off()
2525
)
2626
assertThat(rundown.firstUnsuccessfulStepReport).isNull()

src/main/kotlin/com/salesforce/revoman/ReVoman.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,7 @@ object ReVoman {
113113
kick.dynamicEnvironmentsFlattened(),
114114
)
115115
val pm =
116-
PostmanSDK(
117-
moshiReVoman,
118-
kick.nodeModulesRelativePath(),
119-
regexReplacer,
120-
environment.toMutableMap(),
121-
)
116+
PostmanSDK(moshiReVoman, kick.nodeModulesPath(), regexReplacer, environment.toMutableMap())
122117
val stepNameToReport =
123118
executeStepsSerially(pmStepsDeepFlattened, kick, moshiReVoman, regexReplacer, pm)
124119
return Rundown(stepNameToReport, pm.environment, kick.haltOnFailureOfTypeExcept())

src/main/kotlin/com/salesforce/revoman/input/config/KickDef.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ internal interface KickDef {
3737

3838
fun dynamicEnvironments(): List<Map<String, String>>
3939

40-
fun nodeModulesRelativePath(): String?
40+
fun nodeModulesPath(): String?
4141

4242
@Value.Derived
4343
fun dynamicEnvironmentsFlattened(): Map<String, String> =

0 commit comments

Comments
 (0)