Imihlahlandlela ye-BDD nemikhuba emihle

I-BDD (Ukuthuthukiswa Kokuziphatha Okuqhutshwa) iyindlela yokwakha isoftware ngokuqhubekayo isibonelo ukuxhumana phakathi konjiniyela, ama-QAs nama-BA. Kulesi sihloko sixoxa ngemikhuba emihle ye-BDD ukuthola inzuzo enkulu.

Ngaphezu kwanoma yini enye, inhloso eyinhloko yezindlela ze-BDD ukukhuthaza ukuxhumana phakathi kwababambiqhaza bephrojekthi ukuze umongo wesici ngasinye uqondwe kahle ngawo wonke amalungu eqembu (okusho ukuqonda okwabiwe), ngaphambi kokuqala komsebenzi wentuthuko. Lokhu kusiza ekuhlonzeni izimo ezibalulekile endabeni ngayinye futhi kuqede nokungaqondakali kokudingekayo.

Ku-BDD, Izibonelo zibizwa ngokuthi ama-Scenarios. Izimo zakhiwe eduze kwe- Umongo-Isenzo-Umphumela iphethini futhi zibhalwe ngefomethi ekhethekile ebizwa ngokuthi UGherkin .

Izimo ziyindlela yokuchaza (ngesiNgisi esicacile) ukuthi isici esinikeziwe kufanele siziphathe kanjani ezimweni ezahlukahlukene noma ngamapharamitha wokufaka ahlukile.

Ngoba i-Gherkin ihlelekile, isebenza njengokucaciswa kanye nokufakwa ekuhlolweni okuzenzakalelayo, yingakho igama elithi 'Ukucaciswa Okusebenzisekayo'.

Liyini ifayili lesici futhi liqukethe ini

Amafayela wesici amafayela wombhalo ane- .isici extension, engavulwa nganoma yisiphi isihleli sombhalo futhi ifundeke nganoma yiliphi ithuluzi elazi i-BDD, njengeCucumber, JBehave noma iBehat.

Amafayela wesici kufanele aqale ngomongo wesici (okuyiyona ndaba ngokuyinhloko), alandelwe okungenani isimo esisodwa ngefomethi elandelayo

Isici: Eminye imibhalo eqondile kodwa echazayo yalokho okufiselekayo

Ukuze ubone inani lebhizinisi eliqanjwe igama
Njengomlingisi wohlelo ocacile
Ngifuna ukuthola umphumela ozuzisayo oqhubeka nenhloso

Isimo: Isimo esithile sebhizinisi esinqumekayo

Kunikezwe imibandela ethile
Futhi eminye imibandela
Lapho isenzo esithile ngomlingisi
Futhi esinye isenzo
Futhi esinye isenzo
Ngemuva kwalokho kutholakala umphumela ovivinywayo
Futhi okunye esingakuhlola kwenzeka futhi

Izimo ezikumafayela wesici kufanele zigxile kokuthi “ini” kunokuthi “kanjani”. Izimo kufanele zibe mfushane futhi zifike ephuzwini, ukuze umfundi akwazi ukuqonda ngokushesha inhloso yesivivinyo ngaphandle kokufunda izinyathelo eziningi ezingabalulekile.

Kungani kufanele sibhale amafayela wesici

Njengoba kushiwo ngaphambili, inhloso eyinhloko yenqubo ye-BDD ukukhuthaza ukuxhumana phakathi kwethimba elihambisa izinto. Inhloso yamafayela wesici ukubhala phansi izimo okukhulunywe ngazo ukuze kunikezwe inkomba yokuthi mningi kangakanani umsebenzi obandakanyekile ekwethuleni lesi sici. Amafayela wesici nawo angabashayeli bezivivinyo ezizenzakalelayo. Amafayela wesici nawo asebenza njengencazelo yokwenziwa (i-DoD), okusho ukuthi lapho zonke izimo sezenziwe futhi zahlolwa ngempumelelo, singamaka indaba ukuthi yenziwe.

Ngubani okufanele abhale amafayela wesici

Akunandaba ukuthi ngubani ngempela obhala / othayipha amafayela wesici, kungaba yinoma yiliphi iqembu leqembu lokulethwa, noma kunjalo, okuqukethwe (izimo) okuxoxwa ngakho ngabathathu be-Dev-QA-BA kuyingxenye ebalulekile yesici amafayela. Ukuthola ukuqonda okwabiwe ngokuhlanganyela kwesici kuyinto esemqoka.

Kufanele kubhalwe nini amafayela

Amafayela wesici kufanele abhalwe phakathi nezikhathi zokuzilungisa lapho kuxoxwa ngemininingwane yendaba ngayinye. Amafayela wesici aqukethe izimo kufanele abhalwe ngaphambi kokuqala kwentuthuko ukuze abathuthukisi kanye ne-QA babe nokuqonda okucacile ngenhloso yendaba. Kufanele kube nokuqonda okwabiwe ngendaba. Izimo zisebenza njengezidingo zentuthuko.

Kufanele kugcinwe kuphi amafayela

Kufanele kube nomthombo owodwa weqiniso osebenzela kokubili njengokucaciswa nokwenza okuzenzakalelayo, ngakho-ke kufanele kugcinwe endaweni ethile lapho wonke amalungu ethimba efinyelela kalula.

Ukusho lokho, ngoba amafayela wesici angabashayeli bezivivinyo ezizenzakalelayo, kufanele agcinwe kusistimu yokulawula imithombo (GitHub) ukuze noma yikuphi ukubuyekezwa kwamafayela wesici kuboniswe ngokushesha ezivivinyweni.

Kumalungu angewona ezobuchwepheshe angenakho okuhlangenwe nakho nge-Git, singahlala sisebenzisa ukuqina kwamafayili wesici okuzokhipha uhlu lwazo zonke izimo ezikhona ngaphandle kokusebenzisa amafayela wesici.

Kufanele siwabhale kanjani amafayela wesici

Ngokuvamile kunezindlela ezimbili zokubhala amafayela wesici - Okusetshenziswayo kanye nokuDalazayo

Okubalulekile isitayela sokubhala ifayili lesici, liyi-verbose kakhulu, iqukethe imininingwane esezingeni eliphansi nolwazi oluningi kakhulu.

Buhle: umuntu ofunda ifayili lesici angalandela igxathu negxathu

Umthengi: Ngenxa yemininingwane eminingi, umfundi angalahlekelwa iphuzu lendaba nezivivinyo. Ifayela lesici liba likhulu kakhulu, kunzima ukuligcina futhi kungenzeka lihluleke ngenxa yezibuyekezo ze-UI.

Ukumemezela isitayela sokubhala ifayili lesici lifushane futhi lisezingeni, liqukethe imininingwane efanelekile kuphela mayelana nendaba.

Buhle: Isitayela sokumemezela sifundeka kalula njengoba siqukethe izinyathelo ezimbalwa kulesi simo. Isifundi singaqonda kalula ubukhulu besivivinyo futhi sikhombe masinyane uma kukhona izinto ezibalulekile ezingekho.