Re: how to integrate nunit GUI into my application

"Charlie Poole" <[email protected]> Tue, 11 Nov 2008 10:12:08 -0800
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <005a01c94429$04c1d6d0$6401a8c0@ferrari>
This is a multi-part message in MIME format.

--===============4244043016495278359==
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_005B_01C943E5.F69E96D0"

This is a multi-part message in MIME format.

------=_NextPart_000_005B_01C943E5.F69E96D0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi Richard,
 
Sure thing. Just reference nunit-gui-runner.dll and call AppEntry.Main() for
the simplest case. For more complex cases, you may need to replace AppEntry
with your own class that does the same thing.
 
Charlie


  _____  

From: Zhu, Richard [mailto:[email protected]] 
Sent: Tuesday, November 11, 2008 6:16 AM
To: [email protected]
Subject: [Nunit-users] how to integrate nunit GUI into my application



Hi, there

 

Is there a way to integrate NUnit GUI as a form inside my own application?
We have an existing code base that I'm trying to build some test cases for.
The problem is that there are a lot of initialization required to get to the
point that a class can be operating properly. Instead of trying to mock all
the surrounding classes, which takes forever, I'm thinking of integrate
NUnit into our code structure, and call it up through a menu click. I worked
with CPPUnit before and vaguely remember you can do that with CPPUnit. Is it
possible to do this in NUnit?

 

Thanks for any feedback.

 

 

Richard Zhu

 


------=_NextPart_000_005B_01C943E5.F69E96D0
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns=3D"http://www.w3.org/TR/REC-html40" xmlns:v =3D=20
"urn:schemas-microsoft-com:vml" xmlns:o =3D=20
"urn:schemas-microsoft-com:office:office" xmlns:w =3D=20
"urn:schemas-microsoft-com:office:word" xmlns:m =3D=20
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.6000.16705" name=3DGENERATOR>
<STYLE>@font-face {
	font-family: SimSun;
}
@font-face {
	font-family: Cambria Math;
}
@font-face {
	font-family: Calibri;
}
@font-face {
	font-family: @SimSun;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.0in 1.0in 1.0in; }
P.MsoNormal {
	FONT-SIZE: 11pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: =
"Calibri","sans-serif"
}
LI.MsoNormal {
	FONT-SIZE: 11pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: =
"Calibri","sans-serif"
}
DIV.MsoNormal {
	FONT-SIZE: 11pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: =
"Calibri","sans-serif"
}
A:link {
	COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
	COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
	COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
	COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.EmailStyle17 {
	COLOR: windowtext; FONT-FAMILY: "Calibri","sans-serif"; mso-style-type: =
personal-compose
}
.MsoChpDefault {
	mso-style-type: export-only
}
DIV.Section1 {
	page: Section1
}
</STYLE>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1" />
 </o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=3DEN-US vLink=3Dpurple link=3Dblue>
<DIV><SPAN class=3D000191018-11112008><FONT face=3DArial color=3D#0000ff =
size=3D2>Hi=20
Richard,</FONT></SPAN></DIV>
<DIV><SPAN class=3D000191018-11112008><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D000191018-11112008><FONT face=3DArial color=3D#0000ff =
size=3D2>Sure=20
thing. Just reference nunit-gui-runner.dll and call AppEntry.Main()=20
for</FONT></SPAN></DIV>
<DIV><SPAN class=3D000191018-11112008><FONT face=3DArial color=3D#0000ff =
size=3D2>the=20
simplest case. For more complex cases, you may need to replace=20
AppEntry</FONT></SPAN></DIV>
<DIV><SPAN class=3D000191018-11112008><FONT face=3DArial color=3D#0000ff =
size=3D2>with=20
your own class that does the same thing.</FONT></SPAN></DIV>
<DIV><SPAN class=3D000191018-11112008><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D000191018-11112008><FONT face=3DArial color=3D#0000ff =

size=3D2>Charlie</FONT></SPAN></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> Zhu, Richard=20
  [mailto:[email protected]] <BR><B>Sent:</B> Tuesday, November =
11, 2008=20
  6:16 AM<BR><B>To:</B> =
[email protected]<BR><B>Subject:</B>=20
  [Nunit-users] how to integrate nunit GUI into my=20
  application<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV class=3DSection1>
  <P class=3DMsoNormal>Hi, there<o:p></o:p></P>
  <P class=3DMsoNormal><o:p>&nbsp;</o:p></P>
  <P class=3DMsoNormal>Is there a way to integrate NUnit GUI as a form =
inside my=20
  own application? We have an existing code base that I&#8217;m trying =
to build some=20
  test cases for. The problem is that there are a lot of initialization =
required=20
  to get to the point that a class can be operating properly. Instead of =
trying=20
  to mock all the surrounding classes, which takes forever, I&#8217;m =
thinking of=20
  integrate NUnit into our code structure, and call it up through a menu =
click.=20
  I worked with CPPUnit before and vaguely remember you can do that with =

  CPPUnit. Is it possible to do this in NUnit?<o:p></o:p></P>
  <P class=3DMsoNormal><o:p>&nbsp;</o:p></P>
  <P class=3DMsoNormal>Thanks for any feedback.<o:p></o:p></P>
  <P class=3DMsoNormal><o:p>&nbsp;</o:p></P>
  <P class=3DMsoNormal><o:p>&nbsp;</o:p></P>
  <P class=3DMsoNormal><B><SPAN style=3D"COLOR: navy">Richard =
Zhu</SPAN></B><SPAN=20
  style=3D"FONT-SIZE: 8pt"><o:p></o:p></SPAN></P>
  <P =
class=3DMsoNormal><o:p>&nbsp;</o:p></P></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_005B_01C943E5.F69E96D0--




--===============4244043016495278359==
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=/
--===============4244043016495278359==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Nunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nunit-users

--===============4244043016495278359==--