Hi I am trying to BDD with my tests, (not really a specflow or cubumber type tests but I have copied its techniques to look and feel like BDD) but statements are just Report.Log( ReportLevel.None "message) embedded within test steps, put background and font style to differentiate rest of report logs.
From the attachment you can see my BBD scenarios My Question here, if a test fails, is there anyway I can make my scenario log go red or some different color?
Change color of report depending on condition or pass/fail
Change color of report depending on condition or pass/fail
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Change color of report depending on condition or pass/fail
Hey cruzez,
You could use a “Custom Report Template” in order to modify the look of your report.
Just modify following part of the RanorexReportX.css file if you want to change the color of the log messages:
Robert
You could use a “Custom Report Template” in order to modify the look of your report.
Just modify following part of the RanorexReportX.css file if you want to change the color of the log messages:
--> tr.Debug { color: gray; } tr.Warn { color: #333; background-color: #fffea7; } tr.Error { color: #fff; background-color: #d80000; font-weight: bold; } tr.Failure { color: #fff; background-color: #d80000; font-weight: bold; } tr.Success { color: green; }Regards,
Robert
Re: Change color of report depending on condition or pass/fail
Hi Robert, thanks for the response, I have already modified to custom template,
I made report.none to blue color.
tr.None {
color: #E5E4E2;
background-color: #151B8D;
font-style: italic
}
I was thinking in anyway I can make that blue color to have different one if condition in my tests fails or gives different result from expected. Something like this below
If condition = 1
tr.none { Color1, style 1}
else tr.none { color2, style 2}
I made report.none to blue color.
tr.None {
color: #E5E4E2;
background-color: #151B8D;
font-style: italic
}
I was thinking in anyway I can make that blue color to have different one if condition in my tests fails or gives different result from expected. Something like this below
If condition = 1
tr.none { Color1, style 1}
else tr.none { color2, style 2}
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Change color of report depending on condition or pass/fail
Hello cruzez,
I'm afraid that I do not correctly understand your issue. There are six different report levels (not including "None" and "Always") whose styles can be modified in the css file, why would you need to do something like this:
Robert
I'm afraid that I do not correctly understand your issue. There are six different report levels (not including "None" and "Always") whose styles can be modified in the css file, why would you need to do something like this:
Regards,If condition = 1tr.none { Color1, style 1}
else tr.none { color2, style 2}
Robert