Exclude a Folder from HTML reports

Exchange HTML report templates between users.
Post Reply
JuergenF
Posts: 331
Joined: Sun Jan 26, 2003 6:00 pm
Location: Germany, North Rhine-Westphalia

Exclude a Folder from HTML reports

Post by JuergenF »

Dear KS-Soft-Team,

I use the global settings for report generation.
And I'm very happy with that.
- It's easy to add a new field to all test
- or to change colors
- ..... <many other things>

Therefore I wouldn't like to use special settings for each folder.

The only thing I'm looking for is:
How to exclude a Folder (and maybe all its subfolders) from the Global reports.

Reason:
- In productive environment I need a folder for playing with new tests until they work as desired - without alerting the people that watch the reports.
- I'd like to group some tests/linked tests and draw conclusions from their results, without having the tests directly in the report. (looking forward to the new variable %::FolderName::BadTests%)
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

I think, you may use Custom HTML report with Java Script (specified inside body of the report) that checks %Folder%variable.
http://www.ks-soft.net/hostmon.eng/mfra ... CustomHTML

Test Items section should be like this:

Code: Select all

<SCRIPT type="text/javascript">
  var folder_name = '%Folder%';
  if (folder_name.indexOf('Filter_Folder_Name') == -1)
     document.write('%TestName%, %Reply%, etc.<BR>');
--></script>
Instead of 'Filter_Folder_Name' you should specify name of the folder, you want to exclude from the report.

Regards,
Max
JuergenF
Posts: 331
Joined: Sun Jan 26, 2003 6:00 pm
Location: Germany, North Rhine-Westphalia

Post by JuergenF »

Then I have to add that piece of code to what template ?

Or is it that I have to code the complete logic of creating the HTML report ?
That will be a few levels to high for an old man :oops:
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

Take it easy ;-) It is pretty simple.

You have to specify such code into the Test items area in "HTML Report Template" window (Invoked from "Report Profiles" window, the button next to "Report type" Combo box. Button is enabled when "Custom HTML" is selected).
Quote from the manual:
http://www.ks-soft.net/hostmon.eng/mfra ... CustomHTML
================
Test items
Provide HTML code for each test status. Here you may use test related macro variables (in addition to regular, user defined and date variables).
================

Actually, you do not have to exactly the same piece of code. You should adjuts HTML code to suit your needs. For instance, you may use another parameters, for Document.Write function, like

Code: Select all

Document.Write('<table><tr><td>%TestName%</td><td>%Reply%</td><td>%Status%</td></tr></table><BR>')
It is really the most flexible report type. I think, you should try to generate similar report by yourself to understand how it works.

Regards,
Max
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

The only thing I'm looking for is:
How to exclude a Folder (and maybe all its subfolders) from the Global reports
Simply choose "Use folder's own report settings" option (Folder Properties dialog)

Regards
Alex
JuergenF
Posts: 331
Joined: Sun Jan 26, 2003 6:00 pm
Location: Germany, North Rhine-Westphalia

Post by JuergenF »

Simply choose "Use folder's own report settings" option (Folder Properties dialog)
I've already tried that - and just a second time using a linked and a copied test.
But both tests are shown in the HTML report.

Can you explain in more detail.
I set for the Sub-Folder "Use folder's own report settings" but no other values
- NOT ckecked "Generate reports every" (1 min is set)
- NO Reports selected
- NO Execute action profile when complete
Last edited by JuergenF on Sat Dec 09, 2006 1:54 pm, edited 1 time in total.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

But both tests are shown in the HTML report.
Not sure I understand the problem. Usually reports show folder name and then list of tests. You see some tests without any folder? How it looks? Could you send report to support@ks-soft.net and explain what exactly is wrong?

Regards
Alex
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

PS How exactly you are creating reports? Manually? Using timer in the Options dialog (Reports page)? Built-in Scheduler? "Generate reports" action?
If you are using "Generate reports" action with "Recursive mode = Folder & all subfolders", HostMonitor will include all subfolders into the report. You should use "Folder & subfolder with inherited settings" recursive mode

Regards
Alex
JuergenF
Posts: 331
Joined: Sun Jan 26, 2003 6:00 pm
Location: Germany, North Rhine-Westphalia

Post by JuergenF »

"Normal" report shows
Folder: Root\
- Test11
- Test12
- Test13
Folder: Root\Sub1
- Test11 (LINK)
- Test22
- Test23

I would like to exclude from the report
Folder: Root\Sub1
- Test11 (LINK)
- Test22
- Test23

So the "new" report should only include
Folder: Root\
- Test11
- Test12
- Test13

How to exclude the folder "Sub1" with all its tests (and maybe its subfolders) from the HTML report

If it's not clear now, I can send screenshot or what files do you need ?

Many thanks for your help
JuergenF
Posts: 331
Joined: Sun Jan 26, 2003 6:00 pm
Location: Germany, North Rhine-Westphalia

Post by JuergenF »

KS-Soft wrote:PS How exactly you are creating reports? Manually? Using timer in the Options dialog (Reports page)? Built-in Scheduler? "Generate reports" action?
If you are using "Generate reports" action with "Recursive mode = Folder & all subfolders", HostMonitor will include all subfolders into the report. You should use "Folder & subfolder with inherited settings" recursive mode

Regards
Alex
Options | Reports | "Generate reports every 1 min"
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Options | Reports | "Generate reports every 1 min"
That's why HM includes all folders into report.
You may use the same option for Root folder (Folder Properties dialog) instead of "global" report generator. Also you may use built-in Sheduler and "Generate reports" action with "Folder & subfolder with inherited settings" recursive mode

Regards
Alex
JuergenF
Posts: 331
Joined: Sun Jan 26, 2003 6:00 pm
Location: Germany, North Rhine-Westphalia

Post by JuergenF »

KS-Soft wrote:
Options | Reports | "Generate reports every 1 min"
That's why HM includes all folders into report.
You may use the same option for Root folder (Folder Properties dialog) instead of "global" report generator.
That does the trick :P

I wasn't aware of the difference to create the reports from the global settings vs. doing that from the Toplevel folder.
Are there any hints in the manual ?

Many thanks

Juergen
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Are there any hints in the manual ?
H'm.. not sure

Regards
Alex
JuergenF
Posts: 331
Joined: Sun Jan 26, 2003 6:00 pm
Location: Germany, North Rhine-Westphalia

Post by JuergenF »

KS-Soft wrote:
Options | Reports | "Generate reports every 1 min"
That's why HM includes all folders into report.
You may use the same option for Root folder (Folder Properties dialog) instead of "global" report generator.
I'd like to ask for a new feature:
Even when I use "global" report generator (that setting has some advantages for me) I'd like to have an option to exclude a specific folder and subfolders from all (global) reports.

What I need is a place where I can store some tests that should not be shown in any reports (i.e. while I'm working on that tests). Maybe a folder that is called "NoReports" or something like that.

Many thanks

Juergen
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Even when I use "global" report generator (that setting has some advantages for me) I'd like to have an option to exclude a specific folder and subfolders from all (global) reports.
HostMonitor provides such option. Use Reports settings of the Root folder (Folder Properties dialog)
What I need is a place where I can store some tests that should not be shown in any reports (i.e. while I'm working on that tests). Maybe a folder that is called "NoReports" or something like that
"Noreports" report? H'm... almost impossible. HostMonitor should analyze all folders, all profiles, check report settings. How it should check custom HTML reports when you are using your own java script to filter test items? Then new feature "dynamic views" that will be implemented in new version, will bring new problems for such "noreports" report.
No, we will not do that

Regards
Alex
Post Reply