我有这段代码:
from selenium import webdriver
from pyvirtualdisplay import Display
display = Display(visible=0, size=(800,800))
display.start()
browser = webdriver.Chrome('/home/andrey/Downloads/chromedriver')
browser.get('http://www.google.com/')
try:
browser.find_element_by_id('gbw')
print ("Test Pass: ID found")
browser.find_element_by_id('lga')
print ("Test Pass: ID found")
except Exception as e:
print("Exception found",format(e))
raise Exception('jenkins')
我想导出此测试的测试报告(格式为xml)。我尝试使用Xunit,但我找不到一些例子,如何用Xunit导出测试报告。 Xunit