Re: Load test dll dynamically at runtime
"Charlie Poole" <[email protected]> Tue, 26 Aug 2008 12:20:49 -0700
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <003201c907b0$e55a51f0$6401a8c0@ferrari> |
Hi Grishma, > Thanks Charlie for the quick response.. > > I think I did a bad job at specifying the problem. I want to > automatically launch the nunit.exe, load the dll > programmatically and run it (without user intervention like > selecting the assembly from the file menu). I agree that > multiple dlls can be loaded and executed, but from all the > dlls present only one dll is to be loaded and executed at a > time (as per user's choice done initially during > configuration. This can be in an XML file for Nunit to > automatically read, load the corresponding dll and run). At a > time only one dll is running. I do not want to show the other > dlls as it would seem that all dlls can be run one after the > other which is not possible. > > Could you point me to any specific API's from the Nunit dll > like nunit.core or something whose methods can help me > achieve this functionality. OK... I think I understand better now. The question of language is that "nunit.exe" indicates running the gui, which allows user interaction. I am now understanding that you don't really want to run the gui, but would simply like to load and run the core of nunit "headless" - without any gui. Is that right? There are apis you can use, but I want to be sure I understand the objective first. > Another approach that I was trying was to combine all the > test dll methods into one dll having different test suites. > This can be loaded in nunit.exe and the part I got stuck on > was how to include or exclude certain test suite without > restarting the nunit.exe. Restarting is not an option coz it > will lead to delays while exiting and loading the dll again. This is a bit confusing. NUnit already does this. There is no need to restart it or reload any dlls in order to change what tests are selected. > I hope you getting the essence here. My aim is to achieve as > much automation possible. It may be helpful if you can back away from your solution to explain for us what problem you are trying to solve. I think we're making some assumptions that don't match what you want to do. Charlie > Thanks in advance, > > Regards, > Grishma Khandwalla > > > > > "Charlie Poole" <[email protected]> > Sent by: [email protected] > > 08/25/2008 10:43 PM > > > To > <[email protected]>, > <[email protected]> > cc > > Subject > Re: [Nunit-users] Load test dll dynamically at runtime > > > > > > > Of course, I may not have understood your question, but it > seems that NUnit > already does what you want. > > The user can use File | Open to navigate to a particular > assembly and open it. > > Dlls are closed from the menu or when loading a new one. > > NUnit also supports loading multiple dlls. > > If I misunderstood, please try again. :-) > > Charlie > > > ________________________________ > > From: [email protected] > [mailto:[email protected]] On Behalf > Of [email protected] > Sent: Monday, August 25, 2008 6:20 AM > To: [email protected] > Subject: [Nunit-users] Load test dll dynamically at runtime > > > > Hi, > > I am using Nunit 2.4.7. I have many .dll files which contain > a number of test cases. I was trying to develop an > application which would allow the user to choose the .dll > file whose test cases are then executed. > > I am using the Nunit GUI, which is instantiated when the > application is initialized. I was wondering if there is any > option to unload the current dll from the nunit.exe and load > the new dll (selected by the user) into the same nunit.exe? > (without using the manual intervention). I specifically do > not want to close the GUI and open it again. Nor can multiple > .exe files can be invoked. > > I was playing around the idea of combining all the test cases > across multiple dlls into a single dll, but again I have no > leads on how to dynamically mask and unmask certain suite of > test cases without restarting the Nunit exe. > > Any help would be appreciated, > > Regards, > Grishma Khandwalla > -------------------------------------------------------------- > ----------- > 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=/____ ___________________________________________ > Nunit-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/nunit-users > > > ------------------------------------------------------------------------- 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=/