Commit eb925633 authored by Xiaowu Zhang's avatar Xiaowu Zhang

jstestnode: get correct test result when global failure occur

parent 18db2316
......@@ -146,10 +146,15 @@ def main():
print ' '.join(body.xpath('//*[@id="qunit-testresult"]//text()'))
for elt in body.xpath('.//ol[@id="qunit-tests"]/li'):
test_name = '%s: %s' % (
elt.xpath('.//span[@class="module-name"]')[0].text,
elt.xpath('.//span[@class="test-name"]')[0].text
)
if (len(elt.xpath('.//span[@class="module-name"]'))):
test_name = '%s: %s' % (
elt.xpath('.//span[@class="module-name"]')[0].text,
elt.xpath('.//span[@class="test-name"]')[0].text
)
#global failure, like Uncaught ReferenceError: RSVP is not defined
else:
test_name = elt.xpath('.//span[@class="test-name"]')[0].text
print elt.get('class'), ''.join(elt.xpath('.//strong')[0].itertext())
# print elt.find_element_by_tag_name('ol').get_attribute('innerHTML')
......
......@@ -107,7 +107,7 @@ mode = 0644
[template-runTestSuite]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/runTestSuite.in
md5sum = 0a918eb070d28abfd33e0fcca26569ff
md5sum = a9544fa355e5da10fc20d7c927e4df07
output = ${buildout:directory}/runTestSuite.in
mode = 0644
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment