Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- val auth_test =
- exec(http("Login")
- .post("/").headers(header_0)
- .basicAuth("""email""", """pass""")
- // .formParam("email", "email")
- // .formParam("pass", "pass")
- // .formParam("", "Connexion")
- .check(status.is(200),currentLocation.is("https://www.facebook.com/"))
- ).pause(2)
- //doesn't work
- val auth_friend_Zone =
- exec(http("Friend_spaces").get("/profil").headers(header_0)
- .check(css("table.uiGrid._51mz tbody tr td div a", "href").findAll
- .saveAs("url_Friend"))
- .check(status.not(404), status.is(200), status.not(500)))
- .exec((session: Session) => {
- val urlFriends = session("url_Friend")
- .as[Seq[String]]
- val rnd_ex = randomPage.nextInt(urlFriends.length)
- session.set("randomFriendUrl", urlFriends(rnd_ex))
- })
- .exec(http("${randomFriendUrl}").get("${randomFriendUrl}"))
- .pause(2)
- val auth = scenario("Authentification").exec(
- auth_test,
- auth_friend_Zone
- // auth_profil_test
- )
- setUp(auth.inject(atOnceUsers(5))).protocols(httpConf)
- .assertions(
- global.responseTime.max.lt(1000),
- global.successfulRequests.percent.gt(97))
- }
Add Comment
Please, Sign In to add comment