Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide feature toggle for escaping test messages in report (#53) #128

Closed
GitSIPA opened this issue Sep 17, 2019 · 7 comments
Closed

Provide feature toggle for escaping test messages in report (#53) #128

GitSIPA opened this issue Sep 17, 2019 · 7 comments
Assignees
Labels
enhancement Hacktoberfest https://hacktoberfest.digitalocean.com/
Projects
Milestone

Comments

@GitSIPA
Copy link

GitSIPA commented Sep 17, 2019

Problem

With the release of #53 we noticed a problem in our test reports and the way we currently use GHPReporter with NUnit.

When we first started using GHPReporter we noticed that adding HTML elements and styling was possible for test messages. We thought it was a feature and took advantage of it.

We implemented a LogInterface on our side that nicely formats our test logs that are written during the test and adds HTML elements as well

Suggested/Requested Solution

In order to continue using the latest version of GHPReporter in the future, we would need some kind of feature toggle that we can set, so that escaping test messages is turned off for us.

If this is not possible, we would have to look for a different reporting solution for our tests, since the workaround to just keep an old verison of \src\js\ghpr.conroller is not a valid long term solution for us

Example of our Report Usage

due to corporate guidelines I had to anonymize parts of the screenshot

anonymized_report_screenshot

@elv1s42 elv1s42 self-assigned this Sep 17, 2019
@elv1s42 elv1s42 added this to ToDo (Prioritised) in Ghpr Common via automation Sep 17, 2019
@elv1s42
Copy link
Member

elv1s42 commented Sep 17, 2019

Hi @GitSIPA !

Thank you for this issue.
I think it's possible to add a new escapeTestOutput setting to turn off this feature for you.

Also adding custom logging seems to me quite a good feature too. I was thinking about it but didn't have enough time to implement it properly. The idea was to add custom logger to support real-time test messages (for example in markdown)

@elv1s42 elv1s42 moved this from ToDo (Prioritised) to InProgress (Dev/QA) in Ghpr Common Sep 23, 2019
@elv1s42
Copy link
Member

elv1s42 commented Sep 23, 2019

Hi @GitSIPA !
I've started initial implementation for escapeTestOutput property.

For the test output with some html tags we were not getting any output at all. For now the fix is done only on .js side of things, but the output will look more correct. Here is the example:
Output:
image

New result:
image

@elv1s42
Copy link
Member

elv1s42 commented Sep 23, 2019

If you want to try this locally now, you can do the following things:

  1. Add additional parameter to you settings file (ReportSettings.json file from src folder of your report):
    image
  2. Replace the content of ghpr.controller.js file from src/js folder with version from this branch
  3. Refresh the report page with cache refresh (using Ctrl+F5 keys)

@GitSIPA, please let me know if you want to try this out locally

Thank you

@GitSIPA
Copy link
Author

GitSIPA commented Sep 24, 2019

Hi @elv1s42 !

Thanks for implementing this enhancement.
I'll try it locally this week and give you feedback on how it works on our side.

thank you!

@elv1s42 elv1s42 added the Hacktoberfest https://hacktoberfest.digitalocean.com/ label Oct 2, 2019
@elv1s42
Copy link
Member

elv1s42 commented Oct 11, 2019

The changes are in master now, going to include them in the next release

@elv1s42 elv1s42 moved this from InProgress (Dev/QA) to Done (Aw. Release) in Ghpr Common Oct 11, 2019
@elv1s42 elv1s42 added this to the v0.9.9 milestone Oct 11, 2019
@elv1s42
Copy link
Member

elv1s42 commented Oct 18, 2019

This is now released as part of version 0.9.9.9

@elv1s42 elv1s42 moved this from Done (Aw. Release) to Released (NuGet package) in Ghpr Common Oct 18, 2019
@elv1s42 elv1s42 moved this from Released (NuGet package) to Archive in Ghpr Common Nov 14, 2019
@elv1s42
Copy link
Member

elv1s42 commented Nov 19, 2019

Released.
Please feel free to reopen this one a raise a new issue in case something is not working.

@elv1s42 elv1s42 closed this as completed Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Hacktoberfest https://hacktoberfest.digitalocean.com/
Projects
Ghpr Common
  
Archive
Development

No branches or pull requests

2 participants