第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

范圍報(bào)告 4 - Java

范圍報(bào)告 4 - Java

慕斯709654 2023-12-30 16:16:44
嘗試生成一個(gè)范圍報(bào)告,這將使我能夠運(yùn)行一套測(cè)試類(lèi)并將輸出作為一個(gè)報(bào)告給出。我當(dāng)前的代碼運(yùn)行在 fin 中,它將運(yùn)行我的 testNG.xml 文件并成功運(yùn)行我的套件中的所有測(cè)試類(lèi)。然而,范圍報(bào)告本身似乎只保存最后運(yùn)行的測(cè)試用例。我一生都無(wú)法弄清楚如何阻止它覆蓋,而是附加到它。舊版本的范圍報(bào)告使用 htmlreporter.setAppendExisting(true); 但這在范圍 4 中不存在..public class ExtentManager {    ExtentHtmlReporter htmlReporter;    ExtentReports extent;    ExtentTest parentTest;    ExtentTest childTest;    DriverManager driverManager;    WebDriver driver;    Screenshot screenshot;    Properties config;    String timeStamp = new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date());    /** Suite test as it will run, with Before/After instructions*/    @BeforeTest    public void beforeTest() throws IOException {        /**Create extent reports and configure html report*/        htmlReporter = new ExtentHtmlReporter(".//reports/ExtentReport"+timeStamp+".html");        extent = new ExtentReports();        extent.attachReporter(htmlReporter);        htmlReporter.config().setTheme(Theme.DARK);        htmlReporter.config().setDocumentTitle("Automation Testing");        htmlReporter.config().setReportName("My Report");        htmlReporter.config().setAutoCreateRelativePathMedia(true);        htmlReporter.config().setTimeStampFormat("HH:mm:ss");        screenshot = new Screenshot();        config = new Properties();        FileInputStream fis = new FileInputStream(System.getProperty("user.dir") + "/src/main/resources/Config.properties");        config.load(fis);    }    public ExtentReports getExtent(){        if(extent != null){            return this.extent;        } else {            return new ExtentReports();        }    }    @BeforeClass    public void beforeClass() {        /**Setup parent test, all child tests to follow         *will attach to it for html report*/        extent = getExtent();        parentTest = extent.createTest(getClass().getSimpleName());        driverManager = new DriverManager();        driver = driverManager.getWebDriver();        driver.manage().timeouts().pageLoadTimeout(15, TimeUnit.SECONDS);    }
查看完整描述

目前暫無(wú)任何回答

  • 0 回答
  • 0 關(guān)注
  • 131 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)