testing tab and drilling to exceptions

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

testing tab and drilling to exceptions

WingIDE - User mailing list
Greetings,

I use the testing tab extensively, with nose class-based test cases.  The testing tab shows, in tree format, the testing files, classes within each file, and test methods in each class.  After running tests, the failed tests are marked with a red 'x' icon.  The typical failure mode occurs when assertion methods in the test case have failed. Expanding the test shows 'Exception: AssertionError: ...'

I would like to quickly drill to the line in the test that failed.  This isn't possible since clicking the test case name displays the first line of the test in an editor, and clicking the 'Exception' line jumps to the line in the python unittest stdlib that actually raised the exception.  I have to drill into the stacktrace, go to the bottom of the traceback and search backwards to find my test file -- the first instance of it is typically the line I want.

I haven't found it at all useful to drill into the assertX methods in the unittest stdlib.  Could the behaviour of the test tab instead link to the line in my test that failed?

Regards,

Andy Altepeter | Software Architect

227 Colfax Ave. N., Suite 148
Minneapolis, MN 55405
O: <a href="tel:612.520.7361" value="+16125207361" target="_blank">612.520.7361 x2131
M: <a href="tel:651.230.8053" target="_blank">651.230.8053

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|

Re: testing tab and drilling to exceptions

WingIDE - User mailing list
On 12/15/15 9:23 AM, Andy Altepeter via wingide-users wrote:
> I would like to quickly drill to the line in the test that failed.
> ...
> I haven't found it at all useful to drill into the assertX methods in
> the unittest stdlib.  Could the behaviour of the test tab instead link
> to the line in my test that failed?

Hi,

I agree that it should be easier to get to the exception and that Wing
should not drill into the assertX methods.  Going to the exception
should be put on the right-click popup menu and be the default action
when the exception: line is double-clicked, but I don't think it should
be the double-click action on the test name because that is used to go
to the test source regardless of if it failed or not.  Probably, Wing
should go to the exception if the failure icon is double-clicked, but
not if the name is double-clicked.

Thanks,

John

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|

Re: testing tab and drilling to exceptions

WingIDE - User mailing list
Hi John,

Thanks for your fast response!  What you proposed sounds good to me.  I don't know whether I would click the "x" very often and would probably prefer the full exception line since it's a larger click area.

Is there a setting in Wing where the exception traceback can be left expanded when only running a single test?  I Generally I write tests and make sure they pass, so I'm re-running the same test over and over, and the exception is always collapsed.  Or maybe subsequent test runs could remember the expand-state of the prior run? I get that expanding every exception when running many tests would be overwhelming and a poor experience.

Regards,
Andy

Andy Altepeter | Software Architect

227 Colfax Ave. N., Suite 148
Minneapolis, MN 55405
O: <a href="tel:612.520.7361" value="+16125207361" target="_blank">612.520.7361 x2131
M: <a href="tel:651.230.8053" target="_blank">651.230.8053

On Tue, Dec 15, 2015 at 9:57 AM, Wing IDE Support <[hidden email]> wrote:
On 12/15/15 9:23 AM, Andy Altepeter via wingide-users wrote:
I would like to quickly drill to the line in the test that failed.
...
I haven't found it at all useful to drill into the assertX methods in
the unittest stdlib.  Could the behaviour of the test tab instead link
to the line in my test that failed?

Hi,

I agree that it should be easier to get to the exception and that Wing should not drill into the assertX methods.  Going to the exception should be put on the right-click popup menu and be the default action when the exception: line is double-clicked, but I don't think it should be the double-click action on the test name because that is used to go to the test source regardless of if it failed or not.  Probably, Wing should go to the exception if the failure icon is double-clicked, but not if the name is double-clicked.

Thanks,

John



_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|

Re: testing tab and drilling to exceptions

WingIDE - User mailing list
On 12/15/15 3:33 PM, Andy Altepeter via wingide-users wrote:
> Is there a setting in Wing where the exception traceback can be left
> expanded when only running a single test?  I Generally I write tests and
> make sure they pass, so I'm re-running the same test over and over, and
> the exception is always collapsed.  Or maybe subsequent test runs could
> remember the expand-state of the prior run? I get that expanding every
> exception when running many tests would be overwhelming and a poor
> experience.

I think the thing to do here is to remember whether the exception was
expanded and don't collapse it.  We'll try to add this in a future version.

Thanks,

John

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide