Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support messages directly under test in output.xml #3762

Closed
@karkusviktor

Description

@karkusviktor

Running rebot aginst the following xml results in "failed: Incompatible XML element 'msg'." error message

<?xml version="1.0" encoding="UTF-8"?>
<robot>
  <suite source="suiteSource" name="suiteName">
        <test id="A" name="test A">
          <msg timestamp="20201116 08:29:45.100" level="WARN">Hi from test - doesn't work</msg>
          <kw name="log">
            <msg timestamp="20201116 08:29:45.100" level="WARN">Hi from keyword - does work</msg>
          </kw>
          <status status="PASS" starttime="20201116 08:29:45.130" endtime="20201116 08:29:45.140"></status>
        </test>
  </suite>
</robot>

It only works of the msg under test tag is removed even though it is valid according to the schema:

<xs:complexType name="test">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="kw" type="kw"/>
<xs:element name="msg" type="msg"/>
<xs:element name="doc" type="xs:string"/>
<xs:element name="tags" type="tags"/>
<xs:element name="timeout" type="timeout"/>
<xs:element name="status" type="status"/>
</xs:choice>
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="id" type="xs:string"/>
<xs:anyAttribute processContents="lax"/>
</xs:complexType>

<xs:complexType name="test">
<xs:all>
<xs:element name="kw" type="kw" maxOccurs="unbounded" minOccurs="0"/>
<xs:element name="msg" type="msg" minOccurs="0"/>
<xs:element name="doc" type="xs:string" minOccurs="0"/>
<xs:element name="tags" type="tags" minOccurs="0"/>
<xs:element name="timeout" type="timeout" minOccurs="0"/>
<xs:element name="status" type="status"/>
</xs:all>
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="id" type="xs:string"/>
<xs:anyAttribute processContents="lax"/>
</xs:complexType>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions