-
Notifications
You must be signed in to change notification settings - Fork 144
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
Add support for test phases #2826
Comments
@psss I quickly checked a junit format and it seems like there is infrastructure to support subtests/phases |
According to |
FYI, I just tried to import https://github.com/testmoapp/junitxml/blob/main/examples/junit-basic.xml to RP and it went well, creating nested structures for testsuites. So at least from the RP perspective we may be fine. |
Note: Beakerlib executes |
Just FYI, I was experimenting with a nested structure of I have been searching for suitable alternative libraries, but so far, I haven't found any. Any ideas? |
Doing a fallback to own implementation should not be that hard, note that there is a nice way via attr/cattrs we use in Testing Farm and @janhavlin was working on it and could help porting it to tmt: |
Note breakers is able to produce the journal.xml in the breaker format as well as in the xunit. However, I was recently contacted by someone who was having an issue where the respective xml python module was missing which causes just an error and the xml file not being created. |
Regarding our implementation of the JUnit XML library, I was thinking that we might be able to directly use the junit_xml (approximately just 400-lines of code + unit tests). We could apply the necessary patches for "test suite inside a test suite", clean up the code, remove Python2 support, and add the type annotations. Then it should very easily integrate into the TMT. The license for junit_xml is the same as for TMT - the MIT license:
We would likely be fine by simply adding the copyright notice to the library file header and referencing to the original project repository. What are your thoughts on this? Do you think this could be a viable solution? |
As discussed on the stakeholder meeting, there are use cases related to tracking individual results of test "phases". These can be created using one of the following ways:
beakerlib
phase usingrlPhaseStart
andrlPhaseEnd
rstrnt-report-result
to submit a subresultWhen run in
Beaker
, therlPhaseEnd
command called during abeakerlib
test execution actually callsrlReport
which usesBEAKERLIB_COMMAND_REPORT_RESULT
command to report the result and, if I'm not mistaken, this defaults to usingrstrnt-report-result
. @sopos, please correct me if I'm wrong.The effect is that each
beakerlib
phase andrstrnt-report-result
call create a "subresult" which is shown in theBeaker
web interface under the actual test. The proposal is to add a similar support for subresults totmt
.Here are some more ideas caught from the brainstorm:
BEAKERLIB_COMMAND_REPORT_RESULT
and perform necessary actions on the guestcheck
attribute)avc
failures for each test phase separatelyjunit
format as the spec does not know subresultsAll in all it seems this would bring a substantial level of complexity (currently the test granularity was simply defined by the test metadata definition for each test) so we should discuss this well before jumping into the implementation.
Base Work
results.yaml
- Save the subresults for tmt-report-result #3200Report Plugins
huge_tree
option for thelxml
parser #3365rhts-report-result
alias for reportingbeakerlib
subresults #3372Problems
reportportal
report plugin withcustom
results #3360The text was updated successfully, but these errors were encountered: