I am using the ElementTree library in python to parse an XML but unable to extract a field.
Parsing sample XML as shown below.
Here I want to check for failure and print corresponding testcase name.
From the below example I need to get output as featTest and featuTest
<?xml version='1.0' encoding='UTF-8' ?>
<testsuite name="" tests="5" failures="1" flakes="1" errors="0" skipped="0" time="339.777" hostname="localhost">
<testcase name="featTest" classname="test.urlOpenState.id" time="25.874">
<failure>java.lang.RuntimeException:
</failure>
</testcase>
<testcase name="savTest" classname="com.State.id" time="2.886" />
<testcase name="featuTest" classname="test.urlte.id" time="24.171" flaky="true">
<failure>java.lang.RuntimeException:
</failure>
</testcase>
<testcase name="feaTest" classname="test.urlte.id" time="4.645" />
<testcase name="quiest" classname="test.urls.id" time="9.008" />
</testsuite>
link to guide or any suggestion will be helpful.