You might have found the solution by now but I came across the same problem and posting my solution hoping it might help someone else.
Output statements are correctly included into html file when its get transformed and its shown when clicked on Test Name. But the real problem is when we click on Test Name, nothing happens. Click event is not working because script
tags for bootstrap js
file is not correctly transformed when converted to html.
So open html-report-bootstrap.xslt
in any editor and you will find the 3 .js files added as below at end:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.4/dist/umd/popper.min.js" integrity="sha384-q2kxQ16AaE6UbzuKqyBE9/u/KzioAlnx2maXQHiDX9d4/zp8Ok3f+M7DPm+Ib6IU" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.min.js" integrity="sha384-pQQkAEnwaBkjpqZ8RU1fF1AKtTcHJwFl3pblpTlHXybJjHpMYo79HY3hIi4NKxyj" crossorigin="anonymous"></script>
But when it gets transformed to html file, all 3 js files are added as below with self-closing script
tag and it doesn't work in Chrome / Firefox browsers. So click event on Test name doesn't work. Check this question here for more info.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js" />
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.4/dist/umd/popper.min.js" integrity="sha384-q2kxQ16AaE6UbzuKqyBE9/u/KzioAlnx2maXQHiDX9d4/zp8Ok3f+M7DPm+Ib6IU" crossorigin="anonymous" />
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.min.js" integrity="sha384-pQQkAEnwaBkjpqZ8RU1fF1AKtTcHJwFl3pblpTlHXybJjHpMYo79HY3hIi4NKxyj" crossorigin="anonymous" />
So as a temp solution for now, I modified the html-report-bootstrap.xslt
file and added some JS in between tags as below:
//include the full path
<script src="jquery.js">let x;</script>
<script src="popper.min.js">let y;</script>
<script src="bootstrap.min.js">let z;</script>
So now when it gets transformed to html there is no more self-closing script tag
and you can see your output statements when clicked on Test Name as below:
