Cov txheej txheem:

Selenium WebDriver ua li cas siv TestNG?
Selenium WebDriver ua li cas siv TestNG?

Video: Selenium WebDriver ua li cas siv TestNG?

Video: Selenium WebDriver ua li cas siv TestNG?
Video: Plob hau hle ntau ntau yog vim li cas?/Cause of alopecia(Hair loss)/ສາເຫດຂອງຜົມຫຼົ່ນ 2024, Kaum ib hlis
Anonim

Cov kauj ruam rau Tsim Cov Ntawv Tshaj Tawm Tshaj Tawm :

Ua ntej, tsim ib TestNG qhov project hauv dab noj hnub. Tam sim no download tau qhov twg tsev qiv ntawv cov ntaub ntawv los ntawm qhov txuas hauv qab no: https://extentreports.relevantcodes.com/ Ntxiv cov ntaub ntawv rub tawm hauv tsev qiv ntawv rau koj qhov project. Tsim ib chav java hais 'ExtentReportsClass' thiab ntxiv cov lej hauv qab no rau nws.

Hauv qhov no, koj ua li cas tsim kom muaj nyob hauv TestNG?

Cov kauj ruam rau Tsim Cov Ntawv Tshaj Tawm Tshaj Tawm : Ua ntej, tsim ib TestNG qhov project hauv dab noj hnub. Tam sim no download tau qhov twg tsev qiv ntawv cov ntaub ntawv los ntawm qhov txuas hauv qab no: https://extentreports.relevantcodes.com/ Ntxiv cov ntaub ntawv rub tawm hauv tsev qiv ntawv rau koj qhov project. Tsim ib chav java hais 'ExtentReportsClass' thiab ntxiv cov lej hauv qab no rau nws.

Qhov thib ob, peb tuaj yeem tsim cov ntawv qhia HTML hauv selenium WebDriver siv TestNG li cas? Ua raws li cov kauj ruam hauv qab no los tsim ReportNG HTML daim ntawv qhia.

  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.
  4. KAUJ RUAM 4: Ua koj qhov kev xeem thiab saib cov ntaub ntawv ReportNG.

Dhau li ntawm no, Selenium lub moj khaum ua ke nrog cov ntawv tshaj tawm li cas?

Tshaj Tawm Tshaj Tawm tuaj yeem siv ncaj qha rau hauv Selenium WebDriver los ntawm importing JAR cov ntaub ntawv - extentreports-java-2.41. 2. lub thawv uas tuaj yeem rub tawm ntawm no. Thaum cov ntaub ntawv ZIP tau rub tawm, rho tawm cov ntsiab lus ntawm ZIP cov ntaub ntawv rau hauv ib daim nplaub tshev.

Koj yuav ua li cas thiaj li ua tsis tau cov ntaub ntawv xeem hauv TestNG?

Cov kauj ruam ua raws li:

  1. Tom qab thawj zaug khiav ntawm qhov kev xeem automated khiav. Txoj nyem rau ntawm qhov project - Nyem rau Refresh.
  2. Ib daim nplaub tshev yuav raug generated hu ua "test-output" folder. Hauv "test-output" folder, koj tuaj yeem pom "testng-failed. xml"
  3. Khiav “testng-failed. xml" txhawm rau ua tiav qhov kev sim ua tsis tiav dua.

Pom zoo: