Size: a a a

QA — Load & Performance

2019 October 23

T

Trisha in QA — Load & Performance
How can I replace this in code
источник

AV

Andrey Vasiliev in QA — Load & Performance
use feeder's
источник

T

Trisha in QA — Load & Performance
.body(StringBody(Source.fromFile(basePath+"10000.json").getLines.mkString).check()
источник

AV

Andrey Vasiliev in QA — Load & Performance
Trisha
{   "title": "test",   "location": "Global",   "market": "",   "documentType": "BU Document",   "businessUnit": "Core",   "seasonName": "FW21",   "id": "uuid",   "description": "",   "sections": [     {       "id": "uuid",       "title": "Section title",       "orderInPresentation": 0,       "slides": [         {           "id": "uuid",           "title": "Slide title",           "orderInSection": 0,           "previewUrl": "",           "widgets": []         }       ]     }   ] }
it’s body?
источник

T

Trisha in QA — Load & Performance
It a request body in rest API post request
источник

T

Trisha in QA — Load & Performance
I saw some feeder example << ‘UUID.randomUUID().toString’>>
источник

ΙΤ

Ιωάννης Τσεκούρι in QA — Load & Performance
Trisha
.body(StringBody(Source.fromFile(basePath+"10000.json").getLines.mkString).check()
источник

AV

Andrey Vasiliev in QA — Load & Performance
import java.util.UUID


val uuidfeeder: Iterator[Map[String, String]] = Iterator.continually(Map("uuid" -> UUID.randomUUID.toString))



.feed(uuidfeeder)
     .exec(
       http("comments_get")
         .post("/comments")
         .body(ElFileBody("path to file"))      )
источник

AV

Andrey Vasiliev in QA — Load & Performance
in file replase "id": "uuid" -> "id": "$uuid"
источник

VG

Viktor Ganeles in QA — Load & Performance
Вячеслав Смирнов
Завтра будет встреча по нагрузке. Чуть не забыл
Если кто запишет хотя бы аудио с первого доклада - будет здорово. Зачастую аудио даже без слайдов хорошо инфу даёт.
Я бы пришёл сам, но на четверг уже жена записалась на свои обучалки :)
источник

ΙΤ

Ιωάννης Τσεκούρι in QA — Load & Performance
Trisha
I saw some feeder example << ‘UUID.randomUUID().toString’>>
you can use any custom feeders like this

import scala.util.Random
val feeder = Iterator.continually(Map("email" -> (Random.alphanumeric.take(20).mkString + "@foo.com")))
источник

T

Trisha in QA — Load & Performance
Thank you.  🙏
источник

AV

Andrey Vasiliev in QA — Load & Performance
источник

T

Trisha in QA — Load & Performance
I appreciate it
источник

ΙΤ

Ιωάννης Τσεκούρι in QA — Load & Performance
Trisha
.body(StringBody(Source.fromFile(basePath+"10000.json").getLines.mkString).check()
i advise you to keep jsons in files
// myFileBody.json is a file that contains
// { "myContent": "${myDynamicValue}" }
.body(ElFileBody("myFileBody.json")).asJson
источник

ΙΤ

Ιωάννης Τσεκούρι in QA — Load & Performance
but if you want have different uuid in JsonObjects you should make feeders with different keys for each uuid
источник

T

Trisha in QA — Load & Performance
In Gatling I was doing something like .post(baseURI + GtmHibConstants.PRESENTATIONS).body(string body(source.fromfile(basePath+ "create.json").getLines.mkstring)). check (jsonpath("${uuid}").saveas(key="I'd")))
источник

T

Trisha in QA — Load & Performance
Before .post there is .exec(http())
источник

ΙΤ

Ιωάννης Τσεκούρι in QA — Load & Performance
Trisha
In Gatling I was doing something like .post(baseURI + GtmHibConstants.PRESENTATIONS).body(string body(source.fromfile(basePath+ "create.json").getLines.mkstring)). check (jsonpath("${uuid}").saveas(key="I'd")))
if you place your create.json in resources directory you can write
 .post(baseURI + GtmHibConstants.PRESENTATIONS)
.body(ElFileBody("create.json"))
.check(jsonPath("$.uuid) saveas (Id))
источник

ΙΤ

Ιωάννης Τσεκούρι in QA — Load & Performance
can you show your script?
источник