Skip to content

Commit 9f8fb41

Browse files
committed
Release 0.40.0
- Pre-request support - Change $epoch to $timestamp - JSUtils as public function Signed-off-by: Gopal S Akshintala <[email protected]>
1 parent 426736f commit 9f8fb41

File tree

27 files changed

+1732
-1566
lines changed

27 files changed

+1732
-1566
lines changed

README.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ endif::[]
1616
:pmtemplates: src/integrationTest/resources/pm-templates
1717
:imagesdir: docs/images
1818
:prewrap!:
19-
:revoman-version: 0.34.3
19+
:revoman-version: 0.40.0
2020

2121
'''
2222

@@ -27,7 +27,7 @@ endif::[]
2727
[.lead]
2828
To start with, think of it as Postman for JVM (Java/Kotlin);
2929
that emulates this *Run* button on a collection through a Java program,
30-
essentially translating your manual testing into Automation, without any loss.
30+
essentially translating your manual testing into Automation, without any loss or resistance.
3131
But it's even better!
3232

3333
image::postman-run.png[]

build.gradle.kts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ plugins {
99
id("revoman.root-conventions")
1010
id("revoman.publishing-conventions")
1111
id("revoman.kt-conventions")
12-
id(libs.plugins.kover.pluginId)
13-
alias(libs.plugins.nexus.publish)
1412
alias(libs.plugins.moshix)
13+
alias(libs.plugins.node.gradle)
14+
alias(libs.plugins.kover)
15+
alias(libs.plugins.nexus.publish)
16+
alias(libs.plugins.gradle.taskinfo)
1517
}
1618

1719
dependencies {
@@ -54,6 +56,13 @@ testing {
5456
}
5557
}
5658

59+
node { nodeProjectDir = file("${project.projectDir}/js") }
60+
61+
tasks {
62+
check { dependsOn(npmInstall) }
63+
test { dependsOn(npmInstall) }
64+
}
65+
5766
koverReport { defaults { xml { onCheck = true } } }
5867

5968
moshi { enableSealed = true }

buildSrc/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ dependencies {
1717
implementation(libs.kotlin.gradle)
1818
implementation(libs.spotless.gradle)
1919
implementation(libs.detekt.gradle)
20-
implementation(libs.kover.gradle)
2120
implementation(libs.spotbugs.gradle)
2221
implementation(libs.testLogger.gradle)
2322
}

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.34.3"
9+
const val VERSION = "0.40.0"
1010
const val ARTIFACT_ID = "revoman"
1111
const val STAGING_PROFILE_ID = "1ea0a23e61ba7d"

docs/revoman.exe.log

Lines changed: 1364 additions & 1281 deletions
Large diffs are not rendered by default.

js/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"dependencies": {
3+
"lodash": "^4.17.21",
4+
"moment": "2.30.1"
5+
}
6+
}

libs.versions.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ spring = "5.3.31" # 5.3.31 Compatable with Java 11
2525
json-assert = "1.5.1"
2626
nexus-publish = "2.0.0-rc-2"
2727
kotlinx-datetime = "0.6.0-RC.2"
28+
node-gradle = "7.0.2"
2829
mockk = "1.13.10"
30+
gradle-taskinfo = "2.2.0"
2931

3032
# Common dependencies
3133
junit = "5.10.2"
@@ -74,7 +76,6 @@ kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.
7476
detekt-gradle = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" }
7577
spotless-gradle = { module = "com.diffplug.spotless:spotless-plugin-gradle", version.ref = "spotless" }
7678
spotbugs-gradle = { module = "com.github.spotbugs.snom:spotbugs-gradle-plugin", version.ref = "spotbugs" }
77-
kover-gradle = { module = "org.jetbrains.kotlinx.kover:org.jetbrains.kotlinx.kover.gradle.plugin", version.ref = "kover" }
7879

7980
[bundles]
8081
kotest = [
@@ -95,4 +96,6 @@ spotbugs = { id = "com.github.spotbugs", version.ref = "spotbugs" }
9596
testLogger = { id = "com.adarshr.test-logger", version.ref = "testLogger" }
9697
moshix = { id = "dev.zacsweers.moshix", version.ref = "moshix" }
9798
kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
99+
node-gradle = { id = "com.github.node-gradle.node", version.ref = "node-gradle" }
98100
nexus-publish = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "nexus-publish" }
101+
gradle-taskinfo = {id = "org.barfuin.gradle.taskinfo", version.ref = "gradle-taskinfo"}

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,10 @@ void revUpPQ() {
6767
"$quoteFieldsToQuery", "LineItemCount, CalculationStatus",
6868
"$qliFieldsToQuery", "Id, Product2Id",
6969
"$qlrFieldsToQuery", "Id, QuoteId, MainQuoteLineId, AssociatedQuoteLineId"))
70-
.customDynamicVariableGenerators(
71-
Map.of( // <5>
72-
"$quantity",
73-
(ignore1, ignore2, ignore3) ->
74-
String.valueOf(Random.Default.nextInt(10) + 1),
75-
"$requestName",
76-
(ignore1, currentStepReport, ignore3) ->
77-
currentStepReport.step.rawPMStep.getName()))
70+
.customDynamicVariableGenerator( // <5>
71+
"$unitPrice",
72+
(ignore1, ignore2, ignore3) -> String.valueOf(Random.Default.nextInt(999) + 1))
73+
.nodeModulesResourceRelativePath("js")
7874
.haltOnFailureOfTypeExcept(
7975
HTTP_STATUS,
8076
afterAllStepsContainingHeader("ignoreHTTPStatusUnsuccessful")) // <6>

src/integrationTest/resources/pm-templates/pq/[sm] pq.postman_collection.json

Lines changed: 62 additions & 64 deletions
Large diffs are not rendered by default.

src/integrationTest/resources/pm-templates/pq/[sm] user-creation-with-ps-and-setup-pq.postman_collection.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"name": "[sm] user-creation-with-ps-and-setup-pq",
55
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
66
"_exporter_id": "23827434",
7-
"_collection_link": "https://salesforce-734821.postman.co/workspace/Delphinus-%F0%9F%90%AC~8b8cf020-27dc-46b1-8de1-2b679073163c/collection/23827434-887a1603-ed57-4a39-ac5f-0d2c02d72767?action=share&source=collection_link&creator=23827434"
7+
"_collection_link": "https://salesforce-734821.postman.co/workspace/Delphinus-%25F0%259F%2590%25AC~8b8cf020-27dc-46b1-8de1-2b679073163c/collection/23827434-887a1603-ed57-4a39-ac5f-0d2c02d72767?action=share&source=collection_link&creator=23827434"
88
},
99
"item": [
1010
{
@@ -276,7 +276,7 @@
276276
"listen": "prerequest",
277277
"script": {
278278
"exec": [
279-
"pm.environment.set(\"billingAdminUserName\", \"billingAdmin4[email protected]\");"
279+
"pm.environment.set(\"billingAdminUserName\", pm.variables.replaceIn(\"billingAdmin-sm-{{$timestamp}}@revoman.org\"));"
280280
],
281281
"type": "text/javascript"
282282
}
@@ -386,7 +386,7 @@
386386
"listen": "prerequest",
387387
"script": {
388388
"exec": [
389-
"pm.environment.set(\"taxAdminUserName\", \"[email protected]\")"
389+
"pm.environment.set(\"taxAdminUserName\", pm.variables.replaceIn(\"taxAdmin-sm-{{$timestamp}}@revoman.org\"));"
390390
],
391391
"type": "text/javascript"
392392
}
@@ -486,7 +486,7 @@
486486
"listen": "prerequest",
487487
"script": {
488488
"exec": [
489-
"pm.environment.set(\"productAndPricingAdminUserName\", \"[email protected]\");"
489+
"pm.environment.set(\"productAndPricingAdminUserName\", pm.variables.replaceIn(\"productAndPricingAdmin-sm-{{$timestamp}}@revoman.org\"));"
490490
],
491491
"type": "text/javascript"
492492
}
@@ -596,7 +596,7 @@
596596
"listen": "prerequest",
597597
"script": {
598598
"exec": [
599-
"pm.environment.set(\"salesRepUserName\", \"[email protected]\");"
599+
"pm.environment.set(\"salesRepUserName\", pm.variables.replaceIn(\"salesRep-sm-{{$timestamp}}@revoman.org\"));"
600600
],
601601
"type": "text/javascript"
602602
}
@@ -2182,7 +2182,7 @@
21822182
"header": [],
21832183
"body": {
21842184
"mode": "raw",
2185-
"raw": "{\n \"ProductSellingModelId\": \"{{oneTimeProductSellingModelId}}\",\n \"Product2Id\": \"{{oneTimeProductId}}\",\n \"IsActive\": true,\n \"Pricebook2Id\": \"{{standardPricebookId}}\",\n \"UnitPrice\": \"{{unitPrice}}\"\n}",
2185+
"raw": "{\n \"ProductSellingModelId\": \"{{oneTimeProductSellingModelId}}\",\n \"Product2Id\": \"{{oneTimeProductId}}\",\n \"IsActive\": true,\n \"Pricebook2Id\": \"{{standardPricebookId}}\",\n \"UnitPrice\": \"{{$unitPrice}}\"\n}",
21862186
"options": {
21872187
"raw": {
21882188
"language": "json"
@@ -2452,7 +2452,7 @@
24522452
"header": [],
24532453
"body": {
24542454
"mode": "raw",
2455-
"raw": "{\n \"ProductSellingModelId\": \"{{evergreenProductSellingModelId}}\",\n \"Product2Id\": \"{{evergreenProductId}}\",\n \"IsActive\": true,\n \"Pricebook2Id\": \"{{standardPricebookId}}\",\n \"UnitPrice\": \"{{unitPrice}}\"\n}",
2455+
"raw": "{\n \"ProductSellingModelId\": \"{{evergreenProductSellingModelId}}\",\n \"Product2Id\": \"{{evergreenProductId}}\",\n \"IsActive\": true,\n \"Pricebook2Id\": \"{{standardPricebookId}}\",\n \"UnitPrice\": \"{{$unitPrice}}\"\n}",
24562456
"options": {
24572457
"raw": {
24582458
"language": "json"
@@ -2721,7 +2721,7 @@
27212721
"header": [],
27222722
"body": {
27232723
"mode": "raw",
2724-
"raw": "{\n \"ProductSellingModelId\": \"{{termedProductSellingModelId}}\",\n \"Product2Id\": \"{{termedProductId}}\",\n \"IsActive\": true,\n \"Pricebook2Id\": \"{{standardPricebookId}}\",\n \"UnitPrice\": \"{{unitPrice}}\"\n}",
2724+
"raw": "{\n \"ProductSellingModelId\": \"{{termedProductSellingModelId}}\",\n \"Product2Id\": \"{{termedProductId}}\",\n \"IsActive\": true,\n \"Pricebook2Id\": \"{{standardPricebookId}}\",\n \"UnitPrice\": \"{{$unitPrice}}\"\n}",
27252725
"options": {
27262726
"raw": {
27272727
"language": "json"
@@ -2897,7 +2897,7 @@
28972897
],
28982898
"body": {
28992899
"mode": "raw",
2900-
"raw": "{\"ParentProductId\": \"{{evergreenProductId}}\",\n \"ChildProductId\": \"{{termedProductId}}\", \n \"ParentSellingModelId\": \"{{evergreenProductSellingModelId}}\",\n \"ChildSellingModelId\": \"{{termedProductSellingModelId}}\",\n \"ProductRelationshipTypeId\": \"{{productRelationshipTypeId}}\"\n}"
2900+
"raw": "{\n \"ParentProductId\": \"{{evergreenProductId}}\",\n \"ChildProductId\": \"{{termedProductId}}\", \n \"ParentSellingModelId\": \"{{evergreenProductSellingModelId}}\",\n \"ChildSellingModelId\": \"{{termedProductSellingModelId}}\",\n \"ProductRelationshipTypeId\": \"{{productRelationshipTypeId}}\"\n}"
29012901
},
29022902
"url": {
29032903
"raw": "{{baseUrl}}{{versionPath}}/sobjects/ProductRelatedComponent",
@@ -2947,4 +2947,4 @@
29472947
}
29482948
}
29492949
]
2950-
}
2950+
}

0 commit comments

Comments
 (0)