Open gurdenbatra opened 10 years ago
Have you found a work around for this?
Nope, I just lowered the grade thresholds :(
Hello there. If there's anything that can be done in TAP plug-in just let me know :o) Being busy with $work projects in the past months, but I have some tasks in Jenkins plug-ins too this week. Maybe I can take a look in TAP plug-ins issues/pull requests.
Bruno
Comparing both TAP files side-by-side the only thing that might be causing parse error is the colon right after preferences in "Using these CDN hostnames from your preferences: img.cdn-redfin.com". Not sure if Jenkins TAP parser is attempting to make preferences: ... an actual key-value entry. Is there a valid way to either escape such colon or surround the whole message value with (double)quotes?
Could be @marcelduran . Can you make a gist with the TAP stream, please? I'll debug it in tap4j to check what's going on.
@kinow You got it: https://gist.github.com/marcelduran/9157cd87f91732c907fe
Hi @marcelduran! Thanks!
The following YAML is not valid:
message: There are 2 static components that are not on CDN. <p>Using these CDN hostnames from your preferences: img.cdn-redfin.com</p>
offenders:
- "www.redfin.com: 1 component, 313.1K (313.1K GZip)"
- "pixel.quantserve.com: 1 component, 0.03K"
InstantYAML confirms that it is not valid due to that colon you mentioned earlier. The easiest way to fix it is by surrounding your message text with ", as below:
message: "There are 2 static components that are not on CDN. <p>Using these CDN hostnames from your preferences: img.cdn-redfin.com</p>"
offenders:
- "www.redfin.com: 1 component, 313.1K (313.1K GZip)"
- "pixel.quantserve.com: 1 component, 0.03K"
I tried that in tap-plugin, using the underlying tap4j code, and all looked good.
Does that sound like a doable solution?
Cheers
Awesome! It might work for that case but my concern is for cases where there are HTML attributes like:
message: "There are 2 static components that are not on CDN. <p>Using these CDN hostnames from your preferences: img.cdn-redfin.com</p><a href="some_link">More info</a>" offenders:
Can I escape inner quotes? How?
Hmm, you can try replacing
<p>Using these CDN hostnames...
By
<p>Using these CDN hostnames...
I think someone reported an issue for the TAP plug-in a year ago on that, but I can't recall what was the solution found at that time.
Would that work?
Well, back in the day, the offender list renderer was first designed for FF only and reused across several other platforms until landed in PhantomJS. It certainly needs some refactoring to be platform agnostic, therefore outputting clean messages. I'll take a look on it and will try to remove any html from output as a quick workaround. Thanks!
Has there been a fix to this issue? I'm experiencing now Jenkins TAP plugin v 2.0.1.
When I run this on Jenkins-
I get- TAP Extended Test Results: http://cl.ly/image/172Y2B2w3f3J TAP Test Results: http://cl.ly/image/3z3x0t1y0612
When I run the command without specifying the CDN-
I get results- TAP Extended Test Results: http://cl.ly/image/0X1t1j0A2h1l TAP Test Results: http://cl.ly/image/3w3A3B301c0x