qickrooms / flex-mojos

Automatically exported from code.google.com/p/flex-mojos
0 stars 0 forks source link

Stack traces not available in surefire reports #81

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a simple test that will fail either due to an assertion failure
or uncaught exception.
2. Run mvn test
3. The build results will correctly show that there was a test failure
however only the exception message is provided in the surefire reports; the
rest of the stack trace is lost.

What is the expected output? What do you see instead?

I expect for the full exception stack trace to be contained in the surefire
xml reports.  Instead only the exception message is captured.

What version of the product are you using? On what operating system?

v1.0 of the flex-super-pom
v0.85 of flexunit

Original issue reported on code.google.com by miked...@gmail.com on 8 Aug 2008 at 5:53

GoogleCodeExporter commented 9 years ago
This is a limitation of the flexunit listener. We will need to make a fix there 
so that the stack trace is returned to 
the client.

This will only be possible with the debug version of the flash player, as it 
will make available 
Error.getStackTrace()

Original comment by peter.royal@pobox.com on 28 Oct 2008 at 11:52

GoogleCodeExporter commented 9 years ago
as a temporary work-around, you can wrap your tests with a try/catch block that 
logs the stack trace with the 
'trace' function. you can then view the stack trace in the player logs.

Original comment by peter.royal@pobox.com on 28 Oct 2008 at 11:54

GoogleCodeExporter commented 9 years ago
@Peter

That made me curious...
| We will need to make a fix there so that the stack trace is returned to the 
client.

What do you mean?

Original comment by velo...@gmail.com on 29 Oct 2008 at 12:15

GoogleCodeExporter commented 9 years ago
I started looking at this. It would not be particularly difficult, just take a 
little work. If you look at any of the 
built-in graphical test runners, they grab the stack trace just fine. It just 
then needs to be transferred over the 
socket to the Java listener and from there exported to the maven console or 
some other useful place. In fact, it 
might already be being transferred and just not logged. I didn't get that far 
into it.

JUnitTestRunner sends the content to the listening Java socket, which is in 
FlexUnitMojo.java.

Original comment by RedB...@gmail.com on 29 Oct 2008 at 2:27

GoogleCodeExporter commented 9 years ago
as RedBugz indicates, the JUnitTestRunner needs to be updated to send the stack 
trace over the listening socket. 
then we can display them in the generated reports/etc

we'll likely need to fork the JUnitTestRunner to send the stack trace over the 
socket, since the code I have 
doesn't do that.

Original comment by peter.royal@pobox.com on 29 Oct 2008 at 4:19

GoogleCodeExporter commented 9 years ago
peter martin promises to get the flexunit ant task code (which would include 
the JUnitRunner) into SVN near the 
end of november,, 
http://weblogs.macromedia.com/pmartin/archives/2008/07/new_flexanttask.html#comm
ents

but, given that we just need the JUnitRunner, and its fairly simple, I think we 
might be better off just doing our 
own?

Original comment by peter.royal@pobox.com on 29 Oct 2008 at 3:03

GoogleCodeExporter commented 9 years ago
That was fixed on the new test-support.

Is available for some time:
http://blog.flex-mojos.info/2008/11/09/advanced-unit-testing-support-flexunit-fu
nit-and-asunit/

VELO

Original comment by velo...@gmail.com on 10 Jan 2009 at 2:05