Cov txheej txheem:
Video: Kuv yuav siv JUnit hauv Jenkins li cas?
2024 Tus sau: Lynn Donovan | [email protected]. Kawg hloov kho: 2023-12-15 23:47
- Kauj ruam 1: Pib Jenkins hauv kev sib tham sib Terminal hom. Nco ntsoov tias qhov chaw nres nkoj 8080 tsis siv ntawm Docker host.
- Kauj ruam 2: Qhib Jenkins hauv Browser.
- Kauj ruam 3: Pre-Build JUnit Cov kev xeem tau thov los ntawm Gradle.
- Kauj ruam 4: Ntxiv JUnit Test Result Reporting rau Jenkins .
- Kauj Ruam 5: Txheeb xyuas qhov ua tsis tiav Kev Tshaj Tawm.
Hais txog qhov no, JUnit Jenkins yog dab tsi?
junit : Archive JUnit -formatted xeem tau Thaum qhov kev xaiv no yog configured, Jenkins tuaj yeem muab cov ntaub ntawv muaj txiaj ntsig zoo txog cov txiaj ntsig kev xeem, xws li cov txiaj ntsig kev xeem keeb kwm yav dhau los, lub vev xaib UI rau saib cov ntawv xeem, taug qab qhov ua tsis tiav, thiab lwm yam.
Qhov thib ob, Jenkins puas yog cov cuab yeej kuaj? Jenkins yog ib qho kev sib koom ua ke nrov nrov (CI) cuab yeej . Nws yog pub dawb rau siv, qhib qhov software, sau hauv Java. Jenkins tus muaj koob meej muaj ntau txhiab tus plugins kom ceev nrooj koj cov khoom tsim tau. Yooj yim muab, koj tuaj yeem siv nws hauv ib kuaj project automate koj kuaj nyob rau hauv ib tug agile txoj kev loj hlob.
Ib sab saum toj no, koj tshaj tawm cov txiaj ntsig hauv Jenkins li cas?
Nplooj ntawv xeem
- Koj tau mus rau nplooj ntawv Test Result los ntawm txhaj ib qho txuas txuas rau ntawm nplooj ntawv xwm txheej lossis keeb kwm ntawm koj qhov project Jenkins, lossis los ntawm txhaj rau Test Result hauv cov ntawv qhia zaub mov sab laug.
- Nyem ntxiv cov lus piav qhia kom qhia meej cov lus piav qhia rau kev xeem khiav.
JUnit tsab ntawv ceeb toom yog dab tsi?
JUnit yog ib qho ntawm cov qauv hauv chav tsev uas tau pib siv los ntawm ntau daim ntawv thov Java raws li lub hauv paus kev sim ntsuas. Los ntawm lub neej ntawd, JUnit kev ntsuam xyuas ua kom yooj yim qhia XML cov ntaub ntawv rau nws qhov kev xeem. Cov ntaub ntawv XML no tuaj yeem siv los tsim kev cai qhia raws li kev xeem yuav tsum tau.
Pom zoo:
Kuv yuav tswj cov neeg siv hauv Jenkins li cas?
Los ntawm lub neej ntawd Jenkins siv nws tus kheej cov ntaub ntawv rau kev tswj hwm tus neeg siv. Mus rau Cov Neeg ntawm Jenkins dashboard kom pom Cov Neeg Siv uas koj muaj, yog tias koj tsis tuaj yeem nrhiav kev xaiv ntxiv rau cov neeg siv ntawd, tsis txhob poob siab, nyeem rau. Mus rau Tswj Jenkins thiab nqes mus rau hauv qab, qhov kev xaiv thib ob yuav tsum yog Tswj Cov Neeg Siv
Kuv yuav ua li cas thiaj tsim tau ib daim ntawv qhia txog kev xeem JUnit hauv Jenkins?
VIDEO Tom qab ntawd, ib tus tuaj yeem nug, Kuv yuav tsim cov ntawv xeem hauv Jenkins li cas? Nyem rau 'Configure' thiab nqes mus rau 'Post Build Actions' thiab nyem rau ntawm 'Add Post Build Actions' daim ntawv teev npe. Peb tau tsim ib txoj haujlwm tshiab 'TestNGProject' nrog rau kev teeb tsa los khiav TestNG Kev sim thiab rau tsim TestNG Tshaj tawm tom qab ua tiav kev siv Jenkins .
Kuv yuav ua li cas thiaj li xeem JUnit hauv Jenkins?
Kauj ruam 1: Pib Jenkins hauv kev sib tham sib Terminal hom. Nco ntsoov tias qhov chaw nres nkoj 8080 tsis siv ntawm Docker host. Kauj ruam 2: Qhib Jenkins hauv Browser. Kauj ruam 3: Pre-Build JUnit Tests invoked by Gradle. Kauj ruam 4: Ntxiv JUnit Test Result Reporting to Jenkins. Kauj Ruam 5: Txheeb xyuas qhov ua tsis tiav Kev Tshaj Tawm
Kuv yuav siv cov ntawv pov thawj hauv Jenkins li cas?
Los ntawm Jenkins home page (piv txwv li Dashboard ntawm Jenkins classic UI), nyem Daim Ntawv Pov Thawj> System ntawm sab laug. Nyob rau hauv System, nyem lub ntiaj teb no daim ntawv pov thawj (tsis txwv) txuas kom nkag mus rau lub npe tam sim no. Nyem Ntxiv Daim Ntawv Pov Thawj ntawm sab laug
Kuv yuav siv Jenkins hauv Azure li cas?
Tsim Jenkins qhov kawg qhov kev pabcuam Qhib Cov Kev Pabcuam nplooj ntawv hauv Azure DevOps Services, qhib cov npe New Service Endpoint, thiab xaiv Jenkins. Sau ib lub npe rau kev sib txuas. Sau tus username thiab password rau koj tus account Jenkins. Xaiv Tshawb xyuas kev sib txuas los xyuas seb cov ntaub ntawv puas yog