k6 - Iyo Yakanakisa Yemushandisi Chiitiko cheMutoro Kuedzwa

Iyo indasitiri yekuyedza kuita yakaona shanduko huru mumakore apfuura. Pachivanhu, kuyerwa kwemutoro kwakaitwa neinjiniya dzekuyedza kuita, pamwe neinjiniya dzeQA nevanoedza. Aya mabasa aiwanzoshanda sezvikamu zvakazvimiririra, vachiita kuyedza kwekuita kana ivo vagadziri vapedza kuvaka izvo zvinoshandiswa.

Nekugamuchirwa kwemitemo inonamira pakati pezvikwata zvekuvandudza software, kuyedza kwekuita sechiitiko kunotanga kwamberi mukugadziriswa, kunonzi chinja-kuruboshwe kuyedza . Panzvimbo pekusiira kuyedza kwekuita kune dhipatimendi reQA, zvikwata zve software zvino zvinoita kuyedza kwavo zvakazvimiririra kana mukubatana neinjiniya dzeQA.

Imwe bhenefiti yekuchinjisa kuyedzwa kuruboshwe kuwedzera kuri kuwedzera mukutora kwekuyedza kwekuita muzvikwata zve software. Asi vazhinji veava vashandisi vatsva vanoda maturusi anokodzera mushe mune avo kufambiswa kwemazuva ese , vachivabvumira edza nguva dzose nesimba shoma. Zvishandiso zvetsika senge JMeter uye LoadRunner hazvina kukodzera izvo zvakanaka, uye pachinzvimbo, ivo vari kutendeukira kuchizvarwa chitsva chematurusi, senge k6.

Kufumura k6

k6 ndeye mahara uye yakavhurika-sosi mutoro wekuyedza turu chinangwa chekuita kuyedza kwekuita chiitiko chinogutsa uye chinonakidza.

Chishandiso chinonyorwa, uye k6 bvunzo dzakanyorwa mu Javascript , uchipa kugona kunyora bvunzo dzako mune imwe yeanonyanyo kuzivikanwa mitauro yakatenderedza.

Mutauro une simba wekunyora uye API inoratidza chinodiwa chinja kutevedzera chaiwo-epasi mamiriro mune ako zvinyorwa. Sezvo mashandisiro uye masisitimu achiramba achichinja, kuve nekwaniso yekumisikidza bvunzo dzako kunowedzera zvakanyanya kugona kwekuyedza kwako.

img / performance / 81 / k6-the-best-developer-experience.png

k6 ndeye Command Line Chishandiso inowanikwa yeWindows, Linux, uye Mac. Neimwe nzira, kune yepamutemo Docker mufananidzo.

Kumhanyisa bvunzo yekuita ne k6 zvakapusa sekumhanyisa bash command:

img / performance / 81 / k6-the-best-developer-experience-2.png

Zvishoma zvinozivikanwa zvekunyora zvinyorwa ndezvi:

  • Yakasimba uye yakanyorwa-zvakanaka Javascript APIs yekuyedza kunyora
  • Yakadzika kugadzirisa kuburikidza nenzira dzakawanda dzekumisikidza
  • Mamiriro ezvinhu
  • Parameterization kuburikidza nemamiriro ekunze
  • Websockets inotsigira
  • Lifecycle zvikorekedzo zvekugadzirisa setup uye teardown
  • Macheki, metrics, tags, makuki…

Session rekodhi & vashanduri

Sematurusi akaomesesa ekuyedza mutoro, k6 ine rekodhi rekodhi iyo inogonesa kugadzirwa kwemiyedzo yemitoro kubva muchikamu chemushandisi. Iwe unongoda chete kupa iyo HAR faira kubva kubhurawuza kana mushandisi chikamu, uye rekodhi ichagadzira iyo k6 bvunzo yako. Izvi zvinonyanya kubatsira kana uri kurodha kuyedza mawebhusaiti .

Pamusoro pezvo, mamwe maturusi anogona kukubatsira kuti ugadzirise k6 bvunzo kubva kumatekinoroji akasiyana:

  • JMeter inoshandura: chinja JMeter .jmx faira ku k6 script.
  • Postman inoshandura: chinja Postman muunganidzwa kuita k6 script.
  • OpenAPI inoshandura: chinja Swagger / OpenAPI kududzirwa k6 script.
  • Browser yekuwedzera: gadzira k6 script kubva kubrowser chikamu. Inongowanikwa chete kune vashandisi veK6 Cloud.

Kunyangwe iwe usingade kushandisa rekodhi uye vashanduri kutanga kuyedza, maturusi aya anogona kubatsira kukwira timu yako mu k6, kana kunyora bvunzo dzako, nekukurumidza.

Session recorder uye shanduri

Mhedzisiro yekuona

Nokusingaperi, k6 inoburitsa mhedzisiro kuconsole. Pamusoro pezvo, kusanganisa kwakati wandei kunowanikwa kuti ikubatsire panguva yekuongorora uye kuona kwemhedzisiro yako.

  • Apache Kafka
  • k6 Gore
  • DataDog
  • InfluxDB + Grafana
  • JSON
  • NewRelic
  • StatsD

img / performance / 81 / k6-the-best-developer-experience-4.png

Kuenderera mberi uye otomatiki kuyedza

Munharaunda yekuyedza, otomatiki ndiyo yekupedzisira-chinangwa chemasangano mazhinji. Kana chishandiso chako nesisitimu zvachinja, kushandisa otomatiki uye kumhanyisa bvunzo kuchakubatsira kubata kudzoka kwekuita pakutanga

Zvinyorwa zvinopa magwara kune anonyanya kufarirwa maCI / CD maturusi, achikubvumidza iwe kuti usashanda nesimba kusanganisa k6 mune ako maCI mapaipi.

  • Azure Mapaipi
  • CircleCI
  • GitHub Zviito
  • GitLab
  • Jenkins
  • TeamCity

Iyo k6 timu inotenda kuti kugadzira kuyedza zvinangwa chinodikanwa chakakosha kune otomatiki. Kana uchimhanyisa otomatiki bvunzo, bvunzo yako yekutanga chinangwa chinofanira kuve chekutanga kugadzirisa kuita kwekutarisira kweiyo system yako, uye chechipiri, kukuzivisa kana iyo system ikasazadzisa zvinangwa zvekuita. Semuenzaniso, ichisimbisa izvo:

  • Nguva yekupindura 95% yezvikumbiro haisi pamusoro pe600ms.
  • Iyo system haina kuburitsa inopfuura 0.5% zvikanganiso.

Mu k6, iwe unotsanangura izvi zvinotarisirwa ne Zvikumbaridzo pamuedzo wako. Kana yako system ikasasvika kwavari, k6 inokuzivisa iwe nezve kutadza kudzorera isiri-zero yekubuda kodhi.

img / performance / 81 / k6-the-best-developer-experience-5.png

Kana iwe uchida kudzidza zvakawanda pamusoro penyaya iyi, verenga k6 gwara re mashandiro ekuedza otomatiki uye zvinyorwa zveThresholds.

k6 Gore

k6 Gore ndiyo yekutengesa SaaS chigadzirwa chinofambidzana neyakavhurika-sosi k6 chishandiso. k6 OSS yakasununguka kushandisa uye ine akati wandei kubatanidzwa kugadzirisa bvunzo dzemitoro mune yako mezvivakwa. Iyo k6 Cloud isarudzo yekusarudzika iyo inopa mutoro kuyedza zvivakwa uye masystem ekukubatsira iwe neyako kuita kwekuyedza kuyedza.

Kuti tinzwisise zvirinani kuti chii k6 Cloud, ngativerenge mashoma acho.

  • Scale inoedza yakatwasuka uye munzvimbo dzakasiyana dzenzvimbo.
  • Chengetedza uye fungidzira mhinduro dzekuedzwa.
  • Tsvaga maitiro ekuita otomatiki.
  • Correlate mhedzisiro pakati pebvunzo dzakasiyana.
  • Vashandisi veboardboard neiyo GUI bvunzo yekuvaka.
  • Ronga zvikwata uye bvunzo munzvimbo yepakati.
  • Ipa rutsigiro rwakazvipira.

k6 Gore

Nharaunda

Nharaunda yek6 inotsigira zvechokwadi uye inobatsira - simba riri shure kwekubudirira kweprojekti.

Kana iwe uri kutanga ne k6, usakanganwa kuvasvikira mukati Usimbe kana iyo nharaunda yemusangano kune chero mhando yemibvunzo. Kune akati wandei makwara uye zvikamu zvezvinyorwa zvakasiyana senge #grafana, #documentation, #feedback, #discussion, nezvimwe.

Kune avo vanofarira vekunze kweprojekiti, tevera chirongwa ichi mu GitHub .

Mhedziso

Iyi posvo inovavarira kuratidza intro ye k6 - chimwe chezvinhu zvinonyanya kufadza mutoro zvekuyedza maturusi. Kana iwe uchida kudzidza izvo zvimwe zvine k6 yekupa, tinokurudzira kuverenga iyo k6 Docs .

Iine makore mana chete ehupenyu, k6 yave ficha-yakapfuma uye inokwikwidza nemidziyo yakasimbiswa, kuwana stellar kutorwa mune vanogadzira, DevOps, uye kuyedza nharaunda.

Iyo k6 timu uye nharaunda yakavaka yekuvandudza-centric yekuyedza yekushandisa turu inosangana nezvinodiwa uye zvinodiwa zvenguva nyowani.