Izikhokelo ze-BDD kunye neZenzo eziBalaseleyo

I-BDD (uPhuculo lwendlela yokuziphatha eqhutywa kukuziphatha) yindlela yokusebenza yokuphucula isoftware ngokuqhubeka umzekelo unxibelelwano phakathi kwabaphuhlisi, ii-QAs kunye nee-BAs. Kule nqaku sixoxa ngezinye zeZenzo eziBalaseleyo zeBDD ukuze ufumane isibonelelo.

Ngaphezulu kwayo nayiphi na enye into, eyona njongo iphambili yendlela ye-BDD kukukhuthaza unxibelelwano phakathi kwabachaphazelekayo beprojekthi ukuze umxholo wenqaku ngalinye uqondwe ngokuchanekileyo ngawo onke amalungu eqela (okt ukuqonda okwabelwanayo), ngaphambi kokuqala komsebenzi wophuhliso. Oku kunceda ekuchongeni iimeko eziphambili zebali ngalinye kunye nokususa ukungangqinelani kwiimfuno.

Kwi-BDD, imizekelo ibizwa ngokuba zii-Scenarios. Imeko zakhiwe ngaku Umxholo wokuSebenza-isiPhumo iphethini kwaye zibhalwe kwifomathi ekhethekileyo ebizwa UGherkin .


Imeko yindlela yokuchaza (ngesiNgesi esicacileyo) ukuba inqaku elinikiweyo kufuneka liziphathe njani kwiimeko ezahlukeneyo okanye ngeeparameter ezahlukeneyo zokufaka.

Kuba iGherkin inesakhiwo, isebenza zombini njengenkcazo kunye negalelo kwiimvavanyo ezizenzekelayo, kungoko igama 'Ukucaciswa okuphumezayo'.


Yintoni ifayile yefayile kwaye iqulethe ntoni

Faka iifayile zeefayile zombhalo nge uphawu ulwandiso, olunokuvulwa ngawo nawuphi na umhleli wokubhaliweyo kwaye ufundeke nasiphi na isixhobo esaziwayo seBDD, njengeCucumber, JBehave okanye iBehat.

Iifayile zokubonisa kufuneka ziqale ngomxholo wenqaku (elibali ngokuyintloko), lilandelwe ubuncinci kwimeko enye kule fomathi ilandelayo

Phawu: Eminye imibhalo ecekeceke kodwa echazayo yoko kufunwayo

Ukuze ufumane ixabiso elichaziweyo leshishini
Njengomlingisi wenkqubo ecacileyo
Ndifuna ukufumana iziphumo eziluncedo eziqhubela phambili injongo


Imeko: Imeko ethile yeshishini enokuchazeka

Unikwe umqathango othile
Kwaye omnye umqathango
Xa isenzo esithile somdlali weqonga
Kwaye enye isenzo
Kwaye elinye inyathelo
Emva koko iziphumo ezithile ziyavavanywa
Kwaye enye into esinokuyijonga iyenzeka nayo

Imeko ezikwiifayile ezibonakalayo kufuneka zijolise kwi 'yintoni' kunokuthi 'njani'. Iimeko kufuneka zibe mfutshane kwaye ziye kwinqanaba, ukuze umfundi akwazi ukuqonda ngokukhawuleza injongo yovavanyo ngaphandle kokufunda amanyathelo amaninzi angabalulekanga.

Kutheni le nto kufuneka sibhale iifayile ezibonakalayo

Njengoko bekutshiwo ngaphambili, eyona njongo iphambili yenkqubo ye-BDD kukukhuthaza unxibelelwano phakathi kweqela lokuhambisa. Injongo yeefayile zenqaku kukushicilela iimeko ekuthethwa ngazo ukuze kuboniswe ukuba ungakanani umsebenzi obandakanyekayo ekuhambiseni inqaku. Iifayile zenqaku zikwangabaqhubi beemvavanyo ezizenzekelayo. Iifayile zokubonisa zikwasebenza njengenkcazo eyenziwe (i-DoD), oko kuthetha ukuba xa zonke iimeko zenziwe kwaye zavavanywa ngempumelelo, sinokumakisha ibali njengoko lenziwe.


Ngubani omele abhale iifayile ezibonakalayo

Ayisiyongxaki ukuba ngubani obhala / athabathe iifayile zefayile, inokuba leliphi na ilungu leqela lokuhambisa, nangona kunjalo, imixholo (iimeko) ezixoxwa ngabathathu be-Dev-QA-BA ziyinxalenye ebalulekileyo yenqaku iifayile. Ukufumana ukuqonda okufanayo okwabelanayo kwenqaku lelona nqaku liphambili.

Kufuneka iifayile zibhalwe nini

Iifayile zokubonisa kufuneka zibhalwe ngexesha leeseshoni zokulungisa amabali apho kuxoxwa khona ngebali ngalinye. Iifayile zokubonisa eziqukethe imeko kufuneka zibhalwe ngaphambi kokuba kuqalwe ukukhula ukuze abaphuhlisi kunye neQA babe nokuqonda okucacileyo ngenjongo yebali. Kufuneka kubekho ukuqonda okwabelwanayo ngebali. Imizekelo isebenza njengeemfuno zophuhliso.

Zigcinwa phi iifayile

Kuya kubakho umthombo omnye wenyaniso osebenza zombini njengokucaciswa kunye nokwenza okuzenzekelayo, ke ngoko kufuneka kugcinwe kwindawo apho onke amalungu eqela anokufikelela ngokulula.

Xa sele uthethile, kuba iifayile zeefayile zingabaqhubi beemvavanyo ezizenzekelayo, kufanelekile ukuba zigcinwe kwinkqubo yolawulo lomthombo (GitHub) ukuze naluphi na uhlaziyo kwiifayile zenqaku luboniswe kwangoko kwiimvavanyo.


Kumalungu angengawo obuchwephesha angenamava nge-Git, sinokuhlala sisenza iifayile ezomileyo eziza kuthi emva koko zikhuphe uluhlu lwazo zonke iimeko ezikhoyo ngaphandle kokusebenzisa iifayile.

Sifanele sibhale njani kwiifayile ezibonakalayo

Zimbini iindlela zokubhala iifayile zefayile -Ukunyanzeliswa kunye nokuBhengezwa

Kunyanzelekile Uhlobo lokubhala ifayile yefayile, isenzi kakhulu, iqulethe iinkcukacha zenqanaba elisezantsi kunye nolwazi oluninzi.

Eziluncedo: umntu ofunda ifayile yefayile unokulandela inyathelo ngenyathelo


Bendlela: Ngenxa yeenkcukacha ezininzi, umfundi unokulahla inqaku lebali kunye novavanyo. Ifayile yefayile iba nkulu kakhulu, kunzima ukuyigcina kwaye kunokwenzeka ukuba isilele ngenxa yohlaziyo lwe-UI.

Ukuxela Uhlobo lokubhala ifayile yefayile imfutshane kwaye inqaku, inolwazi kuphela malunga nebali.

Eziluncedo: Isitayile esichazayo siyafundeka ngakumbi njengoko sinamanyathelo amancinci kwimeko. Umfundi unokuwuqonda ngokulula umda wovavanyo kwaye achonge ngokukhawuleza ukuba akukho zinto ziphambili zilahlekileyo.