Re: ExceptionMethod Attribute
"Charlie Poole" <[email protected]> Fri, 29 Aug 2008 10:36:36 -0700
| Newsgroups | gmane.comp.windows.dotnet.nunit.devel |
|---|---|
| Message-ID | <007501c909fd$cb211a90$6401a8c0@ferrari> |
This is a multi-part message in MIME format. --===============0616748856== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0076_01C909C3.1EC24290" This is a multi-part message in MIME format. ------=_NextPart_000_0076_01C909C3.1EC24290 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Currently, no. There are several feature requests for enabling special processing when a test fails, so we'll probably have one eventually. For this special case, I'm wondering if taking a screen shot could be part of the assert itself. As a workaround, the best you can currently do is to use a boolean ranOK flag. Set it false in SetUp and true at the end of each test. Take your screenshot in teardown. Charlie _____ From: [email protected] [mailto:[email protected]] On Behalf Of Daaron Dwyer Sent: Friday, August 29, 2008 5:46 AM To: [email protected] Subject: [nunit-developer] ExceptionMethod Attribute Hello All, Is there an attribute I can set on the test or fixture level indicating a method to run when a test fails? I'd like to grab a screenshot before the teardown. Thanks! Daaron ------=_NextPart_000_0076_01C909C3.1EC24290 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Dus-ascii"> <META content=3D"MSHTML 6.00.6000.16705" name=3DGENERATOR></HEAD> <BODY> <DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20 class=3D234093217-29082008>Currently, no. There are several feature = requests for=20 enabling special processing when a</SPAN></FONT></DIV> <DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN = class=3D234093217-29082008>test=20 fails, so we'll probably have one eventually. For this special case, I'm = wondering if </SPAN></FONT></DIV> <DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN = class=3D234093217-29082008>taking=20 a screen shot could be part of the assert itself.</SPAN></FONT></DIV> <DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20 class=3D234093217-29082008></SPAN></FONT> </DIV> <DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN = class=3D234093217-29082008>As a=20 workaround, the best you can currently do is to use a boolean ranOK = flag.=20 Set</SPAN></FONT></DIV> <DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN = class=3D234093217-29082008>it=20 false in SetUp and true at the end of each test. Take your screenshot in = teardown.</SPAN></FONT></DIV> <DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20 class=3D234093217-29082008></SPAN></FONT> </DIV> <DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20 class=3D234093217-29082008>Charlie</SPAN></FONT></DIV><BR> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px = solid; MARGIN-RIGHT: 0px"> <DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft> <HR tabIndex=3D-1> <FONT face=3DTahoma size=3D2><B>From:</B>=20 [email protected]=20 [mailto:[email protected]] <B>On Behalf Of = </B>Daaron Dwyer<BR><B>Sent:</B> Friday, August 29, 2008 5:46 = AM<BR><B>To:</B>=20 [email protected]<BR><B>Subject:</B> = [nunit-developer]=20 ExceptionMethod Attribute<BR></FONT><BR></DIV> <DIV></DIV> <DIV dir=3Dltr>Hello All,<BR>Is there an attribute I can set on the = test or=20 fixture level indicating a method to run when a test fails?<BR>I'd = like to=20 grab a screenshot before the=20 teardown.<BR><BR>Thanks!<BR>Daaron<BR></DIV></BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_0076_01C909C3.1EC24290-- --===============0616748856== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ --===============0616748856== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ nunit-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nunit-developer --===============0616748856==--