Cov txheej txheem:

Kuv yuav kho li cas TestNG daim ntawv qhia?
Kuv yuav kho li cas TestNG daim ntawv qhia?

Video: Kuv yuav kho li cas TestNG daim ntawv qhia?

Video: Kuv yuav kho li cas TestNG daim ntawv qhia?
Video: YUAV NTSEEG VAJTSWV LI CAS: NTSEEG PHAU VAJLUSKUB - KX. TXAWJ TEEV VAJ 2024, Kaum ib hlis
Anonim

Customize TestNG Cov kauj ruam qhia

  1. kho -emailable- qhia - qauv. html: Qhov no yog tus qauv html rau kho cov ntawv ceeb toom .
  2. loj-suite. xml: Ntxiv test listener hauv no TestNG suit xml.
  3. CustomTestNGReporter.
  4. Txoj cai nyem main-suite.xml, nyem "Run As -> TestNG Suite”
  5. Tom qab ua tiav, koj tuaj yeem pom kev cai -emailable- qhia .

Ib yam li ntawd, tsab ntawv ceeb toom email tau hauv TestNG yog dab tsi?

email tau - qhia . html: Qhov no yog lub ntsiab lus qhia ntawm qhov kev xeem ua tiav tam sim no uas muaj cov lus Test Case hauv ntsuab (rau cov ntawv xeem dhau) thiab xim liab (rau cov ntawv xeem ua tsis tiav) tseem ceeb.

Tsis tas li ntawd, TestNG puas tuaj yeem tsim los ntawm kab hais kom ua? Kev ua xeem . xml file via kab hais kom ua tso cai rau cov neeg siv los khiav ntau yam xeem xml cov ntaub ntawv ib txhij. xml suite los ntawm cov lus txib , peb yuav tsum sau peb qhov project code. Peb ua tau nrhiav tus lej sau los ntawm dab noj hnub hauv qab lub npe "bin" hauv qhov sib txuas java project.

Tom qab ntawd, ib tus tuaj yeem nug, Kuv yuav ua li cas thiaj tsim tau ib daim ntawv qhia hauv selenium?

Tsim cov ntaub ntawv ReportNG hauv Selenium WebDriver

  1. KAUJ RUAM 1: Rub tawm thiab ntxiv cov ntaub ntawv xav tau Jar Hauv Txoj Haujlwm Txoj Kev Tsim.
  2. KAUJ RUAM 2: lov tes taw lub neej ntawd mloog ntawm TestNG.
  3. KAUJ RUAM 3: Ntxiv ReportNG mloog rau testng. xml file.
  4. KAUJ RUAM 4: Ua koj qhov kev xeem thiab saib cov ntaub ntawv ReportNG.

Daim ntawv tshaj tawm yog dab tsi?

Selenium muab inbuilt qhia siv lub moj khaum xws li JUnit thiab TestNG. Tshaj Tawm Tshaj Tawm yog HTML customizable qhia tsim los ntawm Anshoo Arora uas tuaj yeem koom ua ke hauv Selenium WebDriver siv JUnit thiab TestNG lub moj khaum.

Pom zoo: