1.在eclipse中創(chuàng)建項(xiàng)目恨胚;
2.選擇項(xiàng)目观堂,右擊 彈出菜單并選擇菜單:TestNG — Convert to TestNG;
image
3.勾選 Generate test.xml击吱,并設(shè)置testng.xml相關(guān)信息凹蜂;
image
4.設(shè)置好testng.xml相關(guān)信息后 可以點(diǎn)擊 【next】or【Finish】按鈕進(jìn)入下一步弟头;
5.再點(diǎn)擊【finish】按鈕,testng.xml文件創(chuàng)建成功踩验,可在主界面看到鸥诽;
6.雙擊 testng.xml文件 可對(duì)文件內(nèi)容進(jìn)行編輯;
7.testng.xml文件編輯完畢箕憾,選擇該文件牡借、右擊可運(yùn)行測(cè)試類;