-
Notifications
You must be signed in to change notification settings - Fork 56
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
[ECO-4852] Gather spec items coverage information #1811
Conversation
0f52e40
to
1f5d217
Compare
fe3f050
to
657e484
Compare
1f5d217
to
15cc149
Compare
15cc149
to
ef29ffb
Compare
ef29ffb
to
8eb3a75
Compare
8eb3a75
to
0d7e54e
Compare
0d7e54e
to
595ab00
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a great start. I do have some concerns about how we're trying to apply heuristics in order to get around the fact that the spec, as currently written, doesn't allow us to gather great data about how much of it a given test suite implements. I think I’d prefer that we not try and hide these limitations, and then work on improving the spec.
`dox` is missing type declaration files in its bundle, and no types are available at `@types/dox`. However, the repository for the package has the `index.d.ts` file available [1], but it wasn't published to npm. So I just copied `index.d.ts` from the repo to our codebase for type definitions. [1] https://github.com/tj/dox/blob/master/index.d.ts
595ab00
to
a5824bb
Compare
Stop using arbitrary weight formula for test tags contribution towards spec coverage. Instead, display amount of tests with full coverage for a spec item, and amount of tests with partial coverage. Do not make an assumption in the script about what spec items should be explicitly tested or not regarding parent/children spec items. Instead provide a report for each spec item individually. This could be improved in the future once the spec document is accompanied with some metadata about the intended way of testing certain spec items.
This PR is based on #1806, please review that one first.
This PR introduces new
specCoverageReport.ts
script to gather spec items coverage by ably-js tests (from docstring tags) and compare them with the Ably features specification.Script fetches the latest spec from Ably specification repo using link to the textile file: https://raw.githubusercontent.com/ably/specification/main/textile/features.textile. Then parses textile file and docstrings in ably-js tests to output spec item coverage table.
This PR also adds new
Spec coverage report
workflow, which simply runsnpm run speccoveragereport
to output spec coverage report. See job output here.Here's the unformatted spec coverage data gathered based on test suite state for a1229af commit:
spec-coverage-result.json