Skip to content

[SUREFIRE-2167] Simplify deserialization of elapsed time in TestSuiteXmlParser #2715

@jira-importer

Description

@jira-importer

Michael Osipov opened SUREFIRE-2167 and commented

The current code uses a convoluted solution based on NumberFormat which does not even correspond to the serialization code in StatelessXmlReporter. These days, we can use (Float#parseFloat() to deserialize the string representation of a float value since:

  • Easier to understand and this is not human output (separation of concerns)
  • It is much stricter than NumberFormat which ignores multiple decimal separators (This issue caused SUREFIRE-2165)

Affects: 3.1.0

Issue Links:

  • SUREFIRE-2175 Turn time attribute to xs:float in Surefire test report schema
    ("causes")

  • MINVOKER-341 Make elapsed time field type consistent with Maven Surefire

  • SUREFIRE-2164 Simplify serialization of elapsed time in StatelessXmlReporter

  • SUREFIRE-2165 TestSuiteXmlParser does not capture text per element causing concatenated text produced
    ("requires")

  • SUREFIRE-1533 surefire-test-report.xsd has too narrow a definition for testcase time attribute
    ("is required by")

  • SUREFIRE-2176 Invalid formatting of time attribute
    ("is depended upon by")

Backported to: 3.1.1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions