Skip to content

Commit

Permalink
Improvement done in execution information provided with the HTML report
Browse files Browse the repository at this point in the history
  • Loading branch information
anibalinn committed Sep 2, 2024
1 parent d271c1c commit 6b2ed13
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
6 changes: 4 additions & 2 deletions behavex/outputs/bootstrap/css/behavex.css
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ ul.list-unstyled.scenario-step > li {
.table-scenario{
table-layout: fixed;
}
.hoverable-text:hover{
color: #FFFFFF;
.tooltip-info{
width: 300px !important;
max-width: 300px !important;
text-align: left !important;
}
20 changes: 17 additions & 3 deletions behavex/outputs/jinja/base.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="nav-item">
<div class="navbar-text" style="padding: 0;margin: 0;margin-top: 4px;">
<small class="hoverable-text"><b>Start time:</b> {{ execution_start_time }}</small><br>
<small class="hoverable-text">&nbsp;&nbsp;<b>End time:</b> {{ execution_end_time }}</small>
<div class="navbar-text" style="padding: 0;margin: 0;margin-top: 10px;">
<span class="glyphicon glyphicon-info-sign btn btn-info" data-toggle="tooltip_info"></span>
</div>
</li>
</ul>
Expand Down Expand Up @@ -131,6 +130,21 @@
);
});
$(document).ready(function() {
$('[data-toggle="tooltip_info"]').tooltip({
title: '<b>Execution Info:</b>' +
'<br>&nbsp;&nbsp;&nbsp;&nbsp;<b>Parallel processes:</b> {{ parallel_processes }}' +
'<br>&nbsp;&nbsp;&nbsp;&nbsp;<b>Parallel scheme:</b> {{ parallel_scheme }}' +
'<br><b>Times:</b>' +
'<br>&nbsp;&nbsp;&nbsp;&nbsp;<b>Execution start time:</b> {{ execution_start_time }}' +
'<br>&nbsp;&nbsp;&nbsp;&nbsp;<b>Execution end time:</b> {{ execution_end_time }}' +
'<br>&nbsp;&nbsp;&nbsp;&nbsp;<b>Execution time:</b> {{execution_time|pretty_print_time }}' +
'<br>&nbsp;&nbsp;&nbsp;&nbsp;<b>Scenarios duration:</b> {{fields_total['Duration']|pretty_print_time }}',
placement: "bottom",
template: '<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner tooltip-info"></div></div>',
html: true,
});
});
</script>
</body>
</html>
5 changes: 4 additions & 1 deletion behavex/outputs/report_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,11 @@ def export_result_to_html(
'report': report,
'tags': list(tags),
'scenarios': scenarios,
'parallel_processes': os.getenv('PARALLEL_PROCESSES', '1'),
'parallel_scheme': os.getenv('PARALLEL_SCHEME', 'scenario'),
'execution_start_time': execution_start_time,
'execution_end_time': execution_end_time
'execution_end_time': execution_end_time,
'execution_time': global_vars.execution_end_time - global_vars.execution_start_time
}
parameters_template.update(metrics_variables)
template_handler = TemplateHandler(global_vars.jinja_templates_path)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name='behavex',
version='4.0.1rc15',
version='4.0.1rc16',
license="MIT",
platforms=['any'],
python_requires='>=3.5',
Expand Down

0 comments on commit 6b2ed13

Please sign in to comment.