Skip to content

Instantly share code, notes, and snippets.

@robzienert
Created October 8, 2013 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robzienert/f226a8d2ee13adb3630c to your computer and use it in GitHub Desktop.
Save robzienert/f226a8d2ee13adb3630c to your computer and use it in GitHub Desktop.
val dentalOptionsChain =
// No need to request /app/consumer/options/dental: We've been redirected there already.
exec({ session => session.set("PRODUCT_TYPE", "DENTAL") })
.exec(http("DentalEnrollmentCartOptions")
.get("/app/consumer/api/enrollmentCart/optionsData")
.headers(headers_api)
.queryParam("_", getCacheInvalidation())
.queryParam("productType", "DENTAL")
)
.pause(179 milliseconds)
.exec(http("DentalPaymentScheduleDetails")
.get("/app/consumer/api/paymentScheduleDetails")
.headers(headers_api)
.queryParam("_", getCacheInvalidation())
)
.pause(47 milliseconds)
.exec(http("DentalProductOptions")
.get("/app/consumer/api/product/dentalOptions")
.headers(headers_api)
.queryParam("tier", "EMP")
.queryParam("_", getCacheInvalidation())
.check(jsonPath("$.quotes[0].product.bloomId") saveAs("DENTAL_PRODUCT_BLOOM_ID"))
)
.pause(devPause(2 minutes, 3 minutes))
.exec(http("DentalQuotedPaymentSchedule")
.post("/app/consumer/api/product/quotedPaymentSchedule")
.headers(headers_api_post)
.queryParam("_", getCacheInvalidation())
.body(ELFileBody("shopping/quoted-payment-schedule.json"))
)
.pause(devPause(20 seconds, 1 minute))
.exec(http("DentalSaveBenefitAndContinue")
.post("/app/consumer/options/saveBenefitAndContinue")
.headers(headers_post)
.param("selectedProductBloomId", "${DENTAL_PRODUCT_BLOOM_ID}")
.param("productType", "DENTAL")
.param("pageUri", "/options/dental")
.param("waive", "false")
.param("currentTier", "EMP")
.param("feedback", "")
.param("enrolledFamilyMembers[0].bloomId", "${FAMILY_MEMBER_BLOOM_ID}")
.param("enrolledFamilyMembers[0].type", "")
)
.pause(392 milliseconds)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment