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

Information metadata on Interactive UI #1039

Merged
merged 7 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Testplan interactive UI now supplies information metadata to the info panel accessible on the toolbar. It contains runpath in addition to the ones used in the static report browser UI.
1 change: 1 addition & 0 deletions testplan/report/testing/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ class Meta:
meta = fields.Dict()
status = fields.String(dump_only=True)
runtime_status = fields.String(dump_only=True)
information = fields.List(fields.List(fields.String()))
tags_index = TagField(dump_only=True)
status_override = fields.String(allow_none=True)
counter = fields.Dict(dump_only=True)
Expand Down
1 change: 1 addition & 0 deletions testplan/runnable/interactive/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def http_handler_info(self):
def setup(self):
"""Set up the task pool and HTTP handler."""
self.target.make_runpath_dirs()
self.report.information.append(("runpath", self.target.runpath))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest move this to TestRunner define_runpath()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested moving it, it is not sufficient. The trick is that the interactive handler derives the runpath to its own report (created with _initial_report call) from the target. It does not really know any other way. So even if we move to TestRunner that just means that those objects will know about their runpath in information field, but the interactive handler works with a different report at top level.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. ihandler has its own top level report rather than using the report of the target (TestRunner).

btw, the report will be regenerated when we reload, I doubt we will lost the runpath info.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Info is persisted upon a check.

self.target._configure_file_logger()
self.logger.info(
"Starting %s for %s",
Expand Down
1 change: 1 addition & 0 deletions testplan/web_ui/testing/src/Report/InteractiveReport.js
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ class InteractiveReportComponent extends BaseReport {
filterBoxWidth={this.state.navWidth}
filterText={this.state.filteredReport.filter.text}
status={reportStatus}
report={this.state.report}
expandStatus={this.state.assertionStatus.globalExpand.status}
updateExpandStatusFunc={this.updateGlobalExpand}
handleNavFilter={this.handleNavFilter}
Expand Down
Loading
Loading