[Cucumber, Webrat] Error backtraces shown as HTML in console


#1

Since upgrading to Cucumber 0.1.99.19 I’ve noticed that the backtraces
appearing in the console output are of the form:

 Page load was not successful (Code: 500):

Followed by the dump of the rails error page. That page looks fine in
a browser, and it’s helpful enough to see it when save_and_open_page
does its thing, but I’m pretty used to reading plain old stacktraces
in the console - the HTML output is very hard to read.

Is this a known issue, or a feature, or have I just got something
configured wrong?

Matt W.
http://blog.mattwynne.net
http://www.songkick.com


#2

On Thu, Feb 5, 2009 at 10:38 AM, Matt W. removed_email_address@domain.invalid wrote:

Since upgrading to Cucumber 0.1.99.19 I’ve noticed that the backtraces
appearing in the console output are of the form:

Page load was not successful (Code: 500):

Followed by the dump of the rails error page. That page looks fine in a
browser, and it’s helpful enough to see it when save_and_open_page does its
thing, but I’m pretty used to reading plain old stacktraces in the console -
the HTML output is very hard to read.

Rails’ HTML error page or Cucumber’s HTML formatter? (The latter is
very rudimentary in 0.1.99).

Is this a known issue, or a feature, or have I just got something configured
wrong?

It’s an unknown issue (bug). Try --backtrace.

Please file a bug report.

Aslak


#3

On 5 Feb 2009, at 11:00, aslak hellesoy wrote:

browser, and it’s helpful enough to see it when save_and_open_page
does its
thing, but I’m pretty used to reading plain old stacktraces in the
console -
the HTML output is very hard to read.

Rails’ HTML error page or Cucumber’s HTML formatter? (The latter is
very rudimentary in 0.1.99).

Rails’ HTML error page. It comes up both in my browser (presumably
save_and_open_page doing its thing) and the same HTML is dumped to the
console.

For example, this is coming out in the console:

 <p>Extracted source (around line <b>#1</b>):
   <pre><code>1: &lt;% if concert.any_media? %&gt;
   2:   &lt;% media_summary_images do |images| %&gt;
   3:     &lt;div id=&quot;media&quot;&gt;
   4:       &lt;h3&gt;Photos from previous concerts&lt;/h3&gt;
   </code></pre></p>

Is this a known issue, or a feature, or have I just got something
configured
wrong?

It’s an unknown issue (bug). Try --backtrace.

Thanks for the suggestion. I tried that, it doesn’t seem to make any
difference.

Please file a bug report.

OK, but I am really surprised nobody else is getting this - it feels
more to me like I’ve got some configuration setting wrong, or a
mismatch in Cucumber / Webrat versions - our setup has been doing a
long while and doesn’t always have the very bleedingest edge (I think
we’re still on webrat 4.0, for example) and there is sometimes crufty
lying around that gets in the way.

Can anyone else confirm that with latest Cucumber and Webrat they
don’t get this behaviour?

Matt W.
http://blog.mattwynne.net
http://www.songkick.com


#4

Rails’ HTML error page. It comes up both in my browser (presumably
save_and_open_page doing its thing) and the same HTML is dumped to the
console.

Can anyone else confirm that with latest Cucumber and Webrat they
don’t get this behaviour?

I do see this behavior and it is specifically a Webrat issue.

I’m linking to the gist which I use to remedy it:
http://gist.github.com/68497

Hope that helps.