Skip to content

Commit 5b139fd

Browse files
committed
Release 0.7.8.1
Add more stats to Rundown Signed-off-by: Gopal S Akshintala <[email protected]>
1 parent 3463556 commit 5b139fd

File tree

6 files changed

+31
-8
lines changed

6 files changed

+31
-8
lines changed

README.adoc

Lines changed: 1 addition & 1 deletion
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.8
21+
:revoman-version: 0.7.8.1
2222

2323
'''
2424

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

src/integrationTest/resources/pm-templates/core/milestone/persona-creation-and-setup.postman_collection.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@
469469
"listen": "prerequest",
470470
"script": {
471471
"exec": [
472-
"pm.environment.set(\"salesRepPermSets\", \"'RevLifecycleManagementQuotePricesTaxes', 'ProductDiscoveryUser', 'ProductCatalogManagementViewer', 'ContextServiceRuntimePsl', 'Custom_Sales_Ops_Rep_Perm_Set'\")"
472+
"pm.environment.set(\"salesRepPermSets\", \"'RevLifecycleManagementQuotePricesTaxes', 'ProductDiscoveryUser', 'ProductCatalogManagementViewer', 'ContextServiceRuntimePsl', 'Custom_Sales_Rep_Perm_Set'\")"
473473
],
474474
"type": "text/javascript",
475475
"packages": {}

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,12 @@ object ReVoman {
116116
PostmanSDK(moshiReVoman, kick.nodeModulesPath(), regexReplacer, environment.toMutableMap())
117117
val stepNameToReport =
118118
executeStepsSerially(pmStepsDeepFlattened, kick, moshiReVoman, regexReplacer, pm)
119-
return Rundown(stepNameToReport, pm.environment, kick.haltOnFailureOfTypeExcept())
119+
return Rundown(
120+
stepNameToReport,
121+
pm.environment,
122+
kick.haltOnFailureOfTypeExcept(),
123+
pmStepsDeepFlattened.size,
124+
)
120125
}
121126

122127
private fun executeStepsSerially(
@@ -150,7 +155,12 @@ object ReVoman {
150155
pm.info = Info(step.name)
151156
pm.currentStepReport = preStepReport
152157
pm.rundown =
153-
Rundown(stepReports + preStepReport, pm.environment, kick.haltOnFailureOfTypeExcept())
158+
Rundown(
159+
stepReports + preStepReport,
160+
pm.environment,
161+
kick.haltOnFailureOfTypeExcept(),
162+
pmStepsFlattened.size,
163+
)
154164
pm.environment.putAll(regexReplacer.replaceVariablesInEnv(pm))
155165
val currentStepReport: StepReport = // --------### PRE-REQ-JS ###--------
156166
executePreReqJS(step, itemWithRegex, pm)

src/main/kotlin/com/salesforce/revoman/internal/json/MoshiReVoman.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ import com.squareup.moshi.adapters.Rfc3339DateJsonAdapter
2222
import dev.zacsweers.moshix.adapters.AdaptedBy
2323
import dev.zacsweers.moshix.adapters.JsonString
2424
import io.vavr.control.Either
25+
import java.lang.reflect.Type
26+
import java.util.*
2527
import org.http4k.format.ListAdapter
2628
import org.http4k.format.MapAdapter
2729
import org.http4k.format.ThrowableAdapter
2830
import org.http4k.format.asConfigurable
2931
import org.http4k.format.withStandardMappings
30-
import java.lang.reflect.Type
31-
import java.util.*
3232

3333
open class MoshiReVoman(builder: Moshi.Builder) {
3434
var moshi: Moshi = builder.build()
@@ -74,7 +74,8 @@ open class MoshiReVoman(builder: Moshi.Builder) {
7474
input?.let { lenientAdapter<PojoT>().fromJson(it) }
7575

7676
fun <PojoT : Any> toJson(
77-
input: PojoT?, serializeNulls: Boolean = false,
77+
input: PojoT?,
78+
serializeNulls: Boolean = false,
7879
sourceType: Type = input?.javaClass ?: Any::class.java,
7980
): String = lenientAdapter<PojoT>(sourceType, serializeNulls).toJson(input)
8081

src/main/kotlin/com/salesforce/revoman/output/Rundown.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,21 @@ data class Rundown(
1616
@JvmField val stepReports: List<StepReport> = emptyList(),
1717
@JvmField val mutableEnv: PostmanEnvironment<Any?>,
1818
private val haltOnFailureOfTypeExcept: Map<ExeType, PostTxnStepPick?>,
19+
@JvmField val providedStepsToExecuteCount: Int,
1920
) {
2021
@get:JvmName("immutableEnv") val immutableEnv: Map<String, Any?> by lazy { mutableEnv.toMap() }
2122

23+
@get:JvmName("executedStepCount") val executedStepCount: Int by lazy { stepReports.size }
24+
25+
@get:JvmName("httpFailureStepCount")
26+
val httpFailureStepCount: Int by lazy { stepReports.count { !it.isHttpStatusSuccessful } }
27+
28+
@get:JvmName("unsuccessfulStepCount")
29+
val unsuccessfulStepCount: Int by lazy { stepReports.count { !it.isSuccessful } }
30+
31+
@get:JvmName("executionFailureStepCount")
32+
val executionFailureStepCount: Int by lazy { stepReports.count { it.failure?.isLeft ?: false } }
33+
2234
@get:JvmName("firstUnsuccessfulStepReport")
2335
val firstUnsuccessfulStepReport: StepReport? by lazy {
2436
stepReports.firstOrNull { !it.isSuccessful }

0 commit comments

Comments
 (0)