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

Skip to content

Result model: Add message to keywords and control structures and remove doc from controls #4883

Closed
@pekkaklarck

Description

@pekkaklarck

Currently some control structures in the result model have a doc attribute that's represented in output.xml as a <doc> element. This attribute is used for storing information about removing or flattening items using --flattenkeywords and --removekeywords options. It's a rather strange attribute because it's not possible to set documentation for control structures in data. It's also also inconsistent that only some of the control structures have it.

On the other hand, control structures don't have a message attribute that would contain their possible failure message, they only have status. Keywords have in practice don't have message either. They do have the attribute, it is only used with teardowns to make possible to see the error message if a suite teardown fails.

To fix the above issues, we have decided to do the following:

  • Add message to all keywords and control structures and always store the possible failure message in it.
  • Use message also for storing information about flattening or removing items.
  • Remove doc from control structures.

The main benefit of these changes is making the result model simpler and more consistent. It is important in general, but it gets even more important now that we are adding JSON serialization support to it (#4847) and that format will likely be used also by external tools.

The doc attribute that control structures currently have won't be directly removed, but it will be deprecated as part of #4846. Old output.xml files with possible <doc> elements with control structures will still be supported. Whatever content <doc> contains will be added to message.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions