Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(report): report x:scenario and x:expect ID in XML report #770

Merged
merged 14 commits into from
Feb 15, 2020

Conversation

AirQuick
Copy link
Member

@AirQuick AirQuick commented Feb 5, 2020

  • XSpec compilers and reporters rely on generate-id() for ID generation. Consequently,

    • IDs have to be normalized when comparing the report HTMLs
    • template/function names in the compiled stylesheets/queries are not human-friendly
  • oXygen plugin uses a patched version of XSpec to generate a report XML like this:

    <x:scenario template-id="x019911a9-4764-325f-9c76-788ac5926e8f">

To ease those pain points, this pull request

  • generates less volatile IDs of x:scenario and x:expect
    • based on the element position in the gathered and unshared schenarios
  • writes the generated IDs in the report XML
    • similar to @template-id above, but under a different attribute name (@id) to better represent its characteristics
  • reuses IDs when formatting the report HTML
    • therefore the report HTML files in test/end-to-end/ no longer have to normalize @id.

@AirQuick AirQuick added this to the v1.6.0 milestone Feb 5, 2020
@commit-lint
Copy link

commit-lint bot commented Feb 5, 2020

Code Refactoring

  • generate less volatile ID of x:scenario and x:expect (46f96f4)
  • report: reuse x:scenario and x:expect ID when formatting HTML report (940604c)
  • report: more readable attribute(id) in HTML report (c1f0bfa)
  • report: remove unused attribute(id) from format-xspec-report-folding.xsl (1d7de63)
  • remove verbose local-name parameter from x:output-call (687e574)

Features

  • report: report x:scenario and x:expect ID in XML report (d7ccb51)

Tests

  • report: generate expected XML reports (589adc4)
  • report: do not normalize attribute(id) in HTML report (7dd93e2)
  • report: generate expected HTML reports (b9a1453)
  • xslt: provide external context file for generate-xspec-tests.xspec (c0b26a7)
  • schema: include generate-xspec-tests.xspec in schema test (41508fc)

Contributors

@AirQuick

@AirQuick
Copy link
Member Author

Merging this, as this doesn't change end-user facing behavior.

@AirQuick AirQuick merged commit 2504b05 into xspec:master Feb 15, 2020
@AirQuick AirQuick deleted the scenario-expect-id branch February 15, 2020 16:08
@AirQuick
Copy link
Member Author

@xspec/oxygen-xml-editor-xspec-support
In the next version of XSpec, the scenario ID will be readily available in the result XML, although you will still need to generate the ID by yourself using #734.

magwas pushed a commit to kode-konveyor/xspec that referenced this pull request Mar 22, 2020
@AirQuick AirQuick mentioned this pull request Apr 27, 2020
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant