Custom Report Formatting and Styles

Friday, April 27, 2018
Avatar

I'm converting a manual test report into a custom report in SpiraTest. I've had some success with getting the content into place, now I'd like to adjust the styling. I didn't see any provisions for a CSS file, so I tried to enter style attributes into tags. Most of it got deleted by the template editor.

For example, I have a table in the report footer. I added a style attribute to the table tag and specified a width parameter. That worked fine. I added other attributes such as border and alignment, but they were deleted as soon as I toggled the source button in the editor. Similarly, if I added a style tag with the desired stylesheet markup, it was deleted as soon as I switched out of source view.

I experimented for a while and found I could add an alignment parameter for example and, even though it was deleted, the changes did seem to take effect.

So, in greater detail, I added a width parameter, like so:

<table style="width:900px">...</table>

I generate a report as HTML, the width looked correct, and the page source looked just like I wrote it.

The data in each cell was centered and I wanted it aligned to the left. So I added a text-align parameter:

<table style="width:900px; text-align:left">...</table>

I saved and generated a report. The page source had the text-align parameter, but it was deleted from the report template.

So my questions are:

  • Is there someplace I can manage my own stylesheets in Spira or a path convention I can follow to add my own stylesheets?
  • Why do the SpiraTest template editors accept some style parameters and quietly delete others?
  • And when the template editor deletes some of my markup but uses it anyway, is it stored someplace where I can actually see what's being used and possibly modify it?

 

3 Replies
Friday, April 27, 2018
Avatar
re: deedub Friday, April 27, 2018

And, quick follow-up. I extracted the style tag from the <head> block of the page source before and after adding the text-align parameter as described in my original post and diffed the two. There were no changes to what appears to me as standard style definition used in the xslt templates provided in both the standard and custom sections of the SpiraTest report editor.

Monday, August 10, 2020
Avatar
re: deedub Friday, April 27, 2018

Hi deedub,

 

Did you ever get your answers?
(We are considering Spira and would like to know what it’s like trying to get useful reports from the system.)

Cheers and thanks,

Danny

Monday, August 10, 2020
Avatar
re: dvanderbyl Monday, August 10, 2020

Hey Danny,

Yours is the first reply.

I've long since given up on this particular task. Since then I've noticed that SpiraTest has pretty sketchy HTML/CSS support all around. Whenever I've tried to use anything beyond the most rudimentary markup anywhere in SpiraTest, most of it was simply ignored and deleted. For instance, I tried a number of times to use styling to enhance clarity and readability in incident descriptions and comments, only to be foiled by the general lack of support for standard HTML and CSS. I suspect they wrote an HTML parser from scratch to get their first product out the door and just haven't made it a priority to catch up with those standards.

Now I only use the source view to fix the formatting when I paste a link and SpiraTest tries to include all the text I type after it in the URL, (i.e., the closing anchor tag isn't inserted at the start of whitespace following the URL.) The rest of the time I simply pretend I don't know anything about formatting.

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Friday, April 27, 2018
  • Last Reply: Monday, August 10, 2020
  • Replies: 3
  • Views: 6511