-
-
Save dragoonis/665343a9ea13eba127416aa8038d1f6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.doIf(session => session.contains("siriusRandomAssignedClientId")) { | |
// @todo - > jsonPath($.documents[*].id).findAll.transform.exists, found nothing - if finds nothing, don't error out. | |
exec( | |
http("ALL DOCUMENTS FOR A CLIENT") | |
.get("/api/v1/persons/${siriusRandomAssignedClientId}/documents?limit=999&sort=createdDate:desc,id:desc&filter=draft:0") | |
.headers(apiHeaders) | |
.check(status.is(200)) | |
.check(jsonPath("$.documents[*].id") | |
.ofType[String] | |
.findAll | |
.transform(s => util.Random.shuffle(s).apply(0)) | |
.saveAs("siriusRandomDocumentId") | |
) | |
) | |
.exitHereIfFailed | |
.doIf(session => session.contains("siriusRandomDocumentId")) { | |
exec( | |
http("GET DOCUMENT") | |
.get("/api/document/${siriusRandomDocumentId}/file") | |
.headers(pdfHeaders) | |
.check(status.is(200)) | |
) | |
.exitHereIfFailed | |
} // /doIf | |
} // /doIf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment