-
Notifications
You must be signed in to change notification settings - Fork 32
Robot Framework part 1: Source Reader #2247
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
Robot Framework part 1: Source Reader #2247
Conversation
13a4751
to
c3df206
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 cannot check your branch to run your tests locally today but it looks great overall.
I left only 2 minor comments.
This adds language aware reading of test cases from *.robot files. Each Robot Framework test case gets represented as Function object in the internal StrictDoc model. We gain following features compared to language agnostic text reading: - sdoc can now have forward relations to specific test cases by test case name. - Relation markers with scope=function will automatically cover the range from test case start line to test case end line, and are linked with the function object. - An upcoming test result (output.xml) reader can automatically link test results with the related robot framework test cases. For parsing we use the public parsing API provided by the upstream project [1]. Thus "robotframework" becomes a dependency of strictdoc. Note: Language aware reading is turned on by SOURCE_FILE_LANGUAGE_PARSERS in strictdoc.toml. [1] https://robot-framework.readthedocs.io/en/latest/autodoc/robot.api.html
c3df206
to
0647af5
Compare
Checked the itests quickly. Everything looks great. Thanks for contributing strongly. |
I wonder if we should automatically add a role to the new test case function relations. I see similar already happens for test reports, where strictdoc automatically adds role "IsSatisfiedBy/Satisfies". @stanislaw @nicpappler How about this:
|
This was a quick coding placeholder. Feel free to change it to a more matching name. |
|
What is then the reverse name for this relation? |
That could best be answered by @nicpappler. If I understand correctly, there is no reverse name. SPDX assumes a
|
No better idea at the moment. I merely mentioned it to ask "if we do auto-assignment already in test report parsing, should we do it also in source code parsing?". |
We never discussed this in detail until now. One way of doing this would be to do Another approach could just be saying It is a great discussion point overall when it comes to synchronizing between what the SDoc does with its Parent/Child relations (forward and backward links) and what the SPDX does (I am not fully in the picture). @haxtibal At the same time, your implementation should not be blocked by this naming issue, so you could proceed without changing this aspect just yet. |
We currently do not have a SPDX relationship for a reverse trace from test to source or requirements yet. Also did not discuss it. The one that comes closest at the moment is hasInput. Please feel free to suggest a link/relationship name, I can take this to the SPDX meeting to get it into the SPDX version 3.1. |
This adds language aware reading of test cases from
*.robot
files. Each Robot Framework test case is represented asFunction
object in the internal StrictDoc model.We gain following features compared to language agnostic text reading:
output.xml
) reader can automatically link test results with the related robot framework test cases.For parsing we use the public parsing API provided by the upstream project. Thus "robotframework" becomes a dependency of strictdoc.
Note: Language aware reading is turned on by SOURCE_FILE_LANGUAGE_PARSERS in strictdoc.toml.