Re: PNunit..

202 views
Skip to first unread message

Charlie Poole

unread,
Dec 9, 2010, 10:26:46 AM12/9/10
to nunit-...@googlegroups.com, Hejib, Vinod IN BLR SISL
Hello Vinod,

Strangely, this is the first time I realized that you were writing to
me directly and
not through the mailing list. I am redirecting the answer to the list
and copying
you. Please continue through the list if you need more help.

On Thu, Dec 9, 2010 at 12:26 AM, Hejib, Vinod IN BLR SISL
<SH.V...@siemens.com> wrote:
> Dear Charlie,
>
>
>
> Good morning. First of all a great thanx to you for ur quick answers on
> pnunit, which helped me to progress.
>
> I am a tester who is working on nunit from past couple of years. I am
> primarily into Unit & Integration testing.
>
> I am new to pnunit & I am planning to use it for my unit testing.
>
>
>
>
>
> 1) NUnit-2.5.8.10295 has 3 folders: msi, sourcs & bin versions. According to
> you which one is the efficient & easy way to use & download for our testing.

You don't state what platform you are using. If it is Windows, I recommend you
use the msi. If it is Mac or Linux, you should use the binary zip.

As a tester who has no plans to modify NUnit, the source code is not what
you need and complicates your work to a large extent.

If you are using pnunit exclusively (not NUnit) then you may wish to download
the standalone version provided by the authors rather than use the version
that is bundled with NUnit. The NUnit version is modified so that it will work
with the copy of NUnit we release but no other changes are made.

>
>
> 2) I just tried to run the runpnunit.bat from the path
> \NUnit-2.5.8.10295\Bin-Version\NUnit-2.5.8.10295\bin\net-2.0 but got the
> exception.Ref - bmp1.

Runpnunit.bat is - of course - a test file used to run the pnunit tests. You
will need to create your own pnunit conf files and command for your
own tests.

> Can you help me how I can avoid the same.

We would need to have a the text of the stack trace to diagnose this further.
Please include text in your post rather than attaching images.

>
>
> 3)  If I want to add more tests, then do I need to use the src version also
> for building my Tests.cs file. & in test.conf whether I need to add all the
> tests individually as mentioned.

Of course, if you are writing tests you will need to create your own test
assembly and compile it. However, you don't need the source of NUnit
to do that - no more do you need the source of any other tool you use.

> Because as no of tests increases the test.conf updation becomes tedious.
> Ref: bmp2

Yes, pnunit requires detailed specification of each test to be run in parallel.
It is intended to be used in testing parallel communicating processes on
multiple machines, not for more casual testing.

>
>
> 4) As u mentioned after running the tests, we can only see the results on
> command prompt.(launcher window). But how I can get a Test Result File for
> pnunit run tests. (E.g TestResult.xml or by using Nant etc ).

NUnit creates a TestResult.xml file in it's console program. The pnunit launcher
is a separate console program and does not have this feature.

>
>
> 5) It will be really helpful if u let me know where I can get the detailed
> information or documents regarding how I can run my tests using pnunit step
> by step. It helps for our other testers also.

Consult the pnunit documentation here...
http://www.plasticscm.com/infocenter/technical-articles/pnunit.aspx

Note that both NUnit and pnunit are strongly oriented toward developers.
I don't recommend it for testers unless they also have developer skills.
In particular, parallel distributed testing is quite complex, so a rather
higher level of skill and knowledge is called for.

>
>
>
>
> I hope I am not disturbing you too much by asking too many questions. Pls
> let me know so that I can stop the same.

No problem, but please follow up on list rather than directly so that others
can assist and also benefit from the answers.

Charlie

>
>
>
> Regards
>
> Vinod
>
>
>
> ________________________________
> Important notice: This e-mail and any attachment there to contains corporate
> proprietary information. If you have received it by mistake, please notify
> us immediately by reply e-mail and delete this e-mail and its attachments
> from your system.
> Thank You.
>
>
> ---------- Forwarded message ----------
> From: Charlie Poole <cha...@nunit.com>
> To: "Hejib, Vinod IN BLR SISL" <SH.V...@siemens.com>
> Date: Wed, 8 Dec 2010 19:54:14 +0530
> Subject: Re: Regarding PNunit...
> Hello Vinod,
>
>> 1) It will be helpful if u guide me how I can use the pnunit from
>> NUnit-2.5.8.10295-src which I have downloaded. Ref: Jpg1.
>
> Since you downloaded the source, you will have to build it first. Is
> there some reason you prefer to use the source?
>
>> 2) After the download of nunit i am finding only .csproj files in all the
>> folders. I am not finding any exe files which are required to run the
>> pnunit. Ref: Jpg2
>
> Yes, that's because you have the source code, not the binary zip or
> windows install file.
>
>> 3) Do I need to rebuild the complete files which are present in the
>> downloaded nunit folders? If yes what is the order of rebuild. Ref: Jpg3
>
> You can build on Windows using Visual Studio, on Linux or Windows
> using MonoDevelop or on Linux or Windows using the NAnt build script.
> The order of the build is taken care of by the Solution file or the
> build script, depending on which method you use.
>
>> 4) Is it mandatory in remote machines that I should install VS along with
>> nunit to run the agents? If yes then do agents should run continuously when
>> launcher runs in Server?
>
> No, nothing is compiled in the remote machines.
>
>> 5) Can I put my separately built nunit Test assembly in the pnunit folder
>> to run additional new tests of they should be available as part of solution
>> files in the framework.
>
> Your tests can be anywhere you like so long as you use arguments and
> settings that tell pnunit where they are. NUnit (and pnunit) only use
> compiled
> assemblies when executing - there is no use of the source files.
>
>> 6) Where I can get the Test results file (folder path) after running the
>> tests using pnunit, in same & remote machines.
>
> The NUnit result file will be in the same directory as the test
> assembly. PNUnit results are displayed on the console.
>
> Perhaps we could give you better information if you indicated your
> past experience with NUnit and C# development. There seems
> to be some confusion in your mind over what happens at compile time
> versus execution time.
>
> Charlie
>
>> Regards
>> Vinod
>>
>> -----Original Message-----
>> From: charli...@gmail.com [mailto:charli...@gmail.com] On Behalf Of
>> Charlie Poole
>> Sent: Tuesday, December 07, 2010 8:53 PM
>> To: Hejib, Vinod IN BLR SISL
>> Subject: Re: Regarding PNunit...
>>
>> Hi Vinod,
>>
>> Neither nunit-console.exe nor nunit.exe are able to run pnunit tests. Only
>> the pnunit launcher is able to run them. Note that the download from
>> plasticscm uses an older version of NUnit. If you want the newest
>> features, use the version that is bundled with NUnit.
>>
>> In NUnit 3.0, we plan to integrate pnunit execution with NUnit, so that
>> you
>> will be able to use the nunit runners.
>>
>> In future
>>
>> On Mon, Dec 6, 2010 at 6:23 PM, Hejib, Vinod  IN BLR SISL
>> <SH.V...@siemens.com> wrote:
>>> Hello Charlie,
>>>
>>>
>>>
>>> I want to know how I can run latest PNunit using GUI Interface. Also I am
>>> unable to get the results file when I run the all pnunit tests using
>>> console.
>>>
>>> Currently I am using pnunit from
>>> http://www.plasticscm.com/infocenter/technical-articles/pnunit.aspx .
>>> Help
>>> me on the same.
>>>
>>>
>>>
>>> With Best Regards,
>>>
>>> Vinod
>>>
>>> --------------------------------------------------------
>>>
>>> Siemens Information Systems Limited,
>>>
>>> SSH/IIA
>>>
>>> No: 39, 41, 42.  Block - B, Salarpuria Infozone,
>>>
>>> Electronics City, Phase - II, Bengaluru - 560100
>>>
>>> Tel.:  +91(80) 67111420
>>>
>>> Fax.: +91(80) 67111600
>>>
>>> mailto.: sh.v...@siemens.com
>>>
>>>             www.siemens.co.in
>>>
>>>
>>>
>>> ________________________________
>>> Important notice: This e-mail and any attachment there to contains
>>> corporate
>>> proprietary information. If you have received it by mistake, please
>>> notify
>>> us immediately by reply e-mail and delete this e-mail and its attachments
>>> from your system.
>>> Thank You.
>>>
>>
>> Important notice: This e-mail and any attachment there to contains
>> corporate proprietary information. If you have received it by mistake,
>> please notify us immediately by reply e-mail and delete this e-mail and its
>> attachments from your system.
>> Thank You.
>>
>
>
> ---------- Forwarded message ----------
> From: Charlie Poole <cha...@nunit.com>
> To: "Hejib, Vinod IN BLR SISL" <SH.V...@siemens.com>
> Date: Wed, 8 Dec 2010 20:00:02 +0530
> Subject: Re: PNunit..
> On Wed, Dec 8, 2010 at 3:19 AM, Hejib, Vinod  IN BLR SISL
> <SH.V...@siemens.com> wrote:
>> Hello Charlie,
>>
>> Good morning.
>>
>>
>>
>> 1)       When I tried to run the runpnunit.bat from the folder it is
>> giving
>> me the error “pnunit-agent is not found, make sure u have given correct
>> name’.
>>
>> I think the pnunit-agent.exe & pnunit-launcher.exe should be in the same
>> path where this batch file is present.
>
> When NUnit is installed, these files are all in the same folder. Because you
> are
> using the source, it's up to you to either create an install or
> simulate it by copying
> files to an appropriate folder.
>
> As I said in the other post, it's not clear to me why you are working
> from source.
>
>> 2)   To run all the pnunit tests whether I need to run the batch file
>> runpnunit.bat  from D:\NUnit-2.5.8.10295\src\PNUnit folder or I need to
>> run
>>  pnunit-agent & pnunit-runner from D:\NUnit-2.5.8.10295\src\bin\Debug  on
>> a
>> command prompt. Because here there is no config file present.
>
> You can't run pnunit directly from the source tree without first creating an
> install image. In the install, the files you need are present.
>
>> 3)   When is the forecast date for nunit 3.0 relaese.
>
> The first public release be in the first or second quarter of 2011.
> Most likely,
> integration of pnunit won't be part of that first release, but (best
> guess) will take
> place later in the year.
>
> Charlie
>
>>
>>
>> Pls suggest me how I can progress on same.
>>
>>
>>
>>
>>
>>
>>
>> With Best Regards,
>>
>> Vinod
>>
>> --------------------------------------------------------
>>
>> Siemens Information Systems Limited,
>>
>> SSH/IIA
>>
>> No: 39, 41, 42.  Block - B, Salarpuria Infozone,
>>
>> Electronics City, Phase - II, Bengaluru - 560100
>>
>> Tel.:  +91(80) 67111420
>>
>> Fax.: +91(80) 67111600
>>
>> mailto.: sh.v...@siemens.com
>>
>>             www.siemens.co.in
>>
>>
>>
>> ________________________________
>> Important notice: This e-mail and any attachment there to contains
>> corporate
>> proprietary information. If you have received it by mistake, please notify
>> us immediately by reply e-mail and delete this e-mail and its attachments
>> from your system.
>> Thank You.
>>
>
>

Vinod

unread,
Dec 10, 2010, 12:49:02 AM12/10/10
to NUnit-Discuss
Dear charlie,
Thanx for the reply.I joined the group & i hope it will help me for
further discussions.

1) The NUnit-2.5.8.10295 has the source & bin version of pnunit.I
installed the the MSI version also. I understand from MSI i can run
the tests manually by referring the pnunit.tests.dll in a GUI.This
gives the test result file.

2)But can u suggest me how i can get the result file for pnunit which
i run using launcher on cmd prompt. Do i need to write the code? if
yes then which folder i have to refer.

3) As i mentioned if i want to add & run more tests in pnunit, i think
i need to use both src & bin versions of pnunit available in
NUnit-2.5.8.10295. Is that right? or i need to use any other project
files or folders apart from this.

4) Suppose i build my Test assembly independently from nunit source &
then i put it directly in NUnit-2.5.8.10295\Bin-Version
\NUnit-2.5.8.10295\bin\net-2.0O . Can i run my pnunit tests only with
bin version installed separately.

Rgds
vinod
> >>> mailto.: sh.vi...@siemens.com
> >> mailto.: sh.vi...@siemens.com
>
> >>            www.siemens.co.in
>
> >> ________________________________
> >> Important notice: This e-mail and any attachment there to contains
> >> corporate
> >> proprietary information. If you have received it by mistake, please notify
> >> us immediately by reply e-mail and delete this e-mail and its attachments
> >> from your system.
> >> Thank You.- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

Charlie Poole

unread,
Dec 10, 2010, 9:19:46 AM12/10/10
to nunit-...@googlegroups.com
Hello Vinod,

Welcome to the mailing list.

> Dear charlie,
> Thanx for the reply.I joined the group & i hope it will help me for
> further discussions.
>
> 1) The NUnit-2.5.8.10295 has the source & bin version of pnunit.I
> installed the the MSI version also. I understand from MSI i can run
> the tests manually by referring the pnunit.tests.dll in a GUI.This
> gives the test result file.

The source is for those developing NUnit/pNUnit. Since you are
using Windows and Visual Studio, the msi is your best choice.

No, you cannot run pnunit tests from the Gui. Of course, those tests
are NUnit tests and you can execute them, but they are not running
in parallel so they are not acting as pnunit tests when you do this.

To run pnunit tests - as pnunit tests - you can only use the pnunit
launcher program together with as many agents as you need.

> 2)But can u suggest me how i can get the result file for pnunit which
> i run using launcher on cmd prompt. Do i need to write the code? if
> yes then which folder i have to refer.

There is no xml output file from pnunit.

> 3) As i mentioned if i want to add & run more tests in pnunit, i think
> i need to use both src & bin versions of pnunit available in
> NUnit-2.5.8.10295. Is that right? or i need to use any other project
> files or folders apart from this.

No! you don't need the source of nunit or pnunit to run tests in any
circumstance. You only need the binaries of your tests together with
appropriate conf files.

> 4) Suppose i build my Test assembly independently from nunit source &
> then i put it directly in NUnit-2.5.8.10295\Bin-Version
> \NUnit-2.5.8.10295\bin\net-2.0O . Can i run my  pnunit tests only with
> bin version installed separately.

You should put your tests in their own output directory, together with
the conf files for pnunit. Of course, it's possible to copy them into the
nunit directory if you have the correct permission, but this is not normal.

I suggest you tell us why you are using pnunit. What is the objective
of your tests? You have indicated that you are not an experienced
C# developer, yet it seems you are trying to create a set of parallel,
distributed tests. This is not what we normally see people doing in
their first use of NUnit.

Charlie

> --
> You received this message because you are subscribed to the Google Groups "NUnit-Discuss" group.
> To post to this group, send email to nunit-...@googlegroups.com.
> To unsubscribe from this group, send email to nunit-discus...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nunit-discuss?hl=en.
>
>

Vinod

unread,
Dec 17, 2010, 6:08:11 AM12/17/10
to NUnit-Discuss

Dear Charlie,
thanx for ur earlier inputs.

When i tried to run the pnunit tests using runpnunit.bat file it gave
me following exception.

Stack Trace: " at PNUnit.Launcher.Launcher.Main(String[] args)"
System.NullReferenceException : {"Object reference not set to an
instance of an object."}

can just tell me how i can run tests without these errors. As u
already know i am using only pnunit binaries from
the path NUnit-2.5.8.10295\bin\net-2.0.

Rgds
vinod
> >> >> On Mon, Dec 6,- Hide quoted text -
>
> - Show quoted text -...
>
> read more »

Charlie Poole

unread,
Dec 17, 2010, 4:30:07 PM12/17/10
to nunit-...@googlegroups.com
Hello Vinod,

The runpnunit.bat script is used in testing PNUnit when modifying
it. It is not distributed as a part of NUnit, except in the source
distribution. To use it, you would build NUnit using the NAnt
build script and run it out of the build directory. It has no application
when building with Visual Studio and no user application at all.
That's why we don't distribute it with the normal NUnit installs.

I think you will have much more success with your questions if you
start at the beginning. Why are you using pNUnit? What is it that
you want to test? Then we can help you with more meaninful
answers.

Charlie

Vinod

unread,
Dec 18, 2010, 6:12:59 AM12/18/10
to NUnit-Discuss
Dear Charlie,

Thanx for ur Inputs.

Primarily we are having thousands of unit tests which we want to run
using pnunit on different machines.
To run my tests without much hurdles & to avoid above exceptions how i
can progress .

Can you jst suggest me little simple steps to run my unit tests using
pnunit.
Because i want to run my tests using pnunit without failing.

Waiting for ur reply.

Vinod

On Dec 18, 2:30 am, Charlie Poole <nunit...@gmail.com> wrote:
> Hello Vinod,
>
> ...
>
> read more »- Hide quoted text -

Charlie Poole

unread,
Dec 18, 2010, 10:48:26 AM12/18/10
to nunit-...@googlegroups.com
Hi Vinod,

If I understand correctly, you want to run tests in parallel for reasons of
efficiency. By running on multiple machines at one time, they will
run more quickly.

This is not what pNUnit is designed to do. :-(

This has been written about before on the list. In short, PNUnit requires
a great deal of effort to designate exactly which methods will run on
which machines. The effort is justified when using pNUnit for it's intended
purpose: to test a distributed program. For example, the authors of
pNUnit use it to simultaneously test clients and servers of their
Plastic SCM product. In such tests, the client code runs on one (or more)
machines and the server runs on a separate machine.

Using multiple machines to distribute the load of test execution is a
different problem and not one that pNUnit is intended to solve. Of
course, some parts of pNUnit would be useful in implementing such
a solution, and that's what we plan in future releases of NUnit. In
this case, the tests need to be automatically assigned to different
machines based on load, eliminating the requirement that each one
of thousands of tests be specified separately in the XML.

There is no feature like this in the present version of NUnit. However,
there are several workarounds you can use to run tests more quickly:

1. Separate tests into multiple assemblies and manually stage
each assembly on a separate machine. Of course, this requires
effort to set it up, but it is several orders of magnitude less effort
than setting up a pnunit configuration for every test case.

2. Use a category on each test fixture and manually stage separate
runs for each category on a different machine.

3. Manually stage runs on each machine specifying the namespaces
and fixtures to run on that machine.

4. Use NUnit's support for running each assembly in a separate appdomain
or process. This support is only available if you build NUnit and define
a compile-time constant. Note that in this case all tests will still run
on the same machine, which may not meet your needs. If the different
assemblies use the same external resources, this won't work but if
they are completely independent, you will see some gain in performance,
especially on multi-core machine.

I recommend you look at one of those solutions rather than trying to
make pNUnit do something it is not designed to do.

Charlie

Vinod Hejib

unread,
Dec 18, 2010, 10:31:17 PM12/18/10
to nunit-...@googlegroups.com
Dear Charlie,
Thanx for ur early reply. I am really thankful for ur detailed information & patience for providing me the solution.
 
Jst a clarification  u mentioned me to look at  one of those solutions which are given. Can u elaborate little bit & suggest me where i can get the available solution which u have mentioned.
 
Rgds
Vinod

Charlie Poole

unread,
Dec 19, 2010, 12:32:31 AM12/19/10
to nunit-...@googlegroups.com
Hi Vinod,

All the suggested solutions use NUnit. For #4 you need the source. I suggest
you consider them in order and pick the first one that meets your needs.

Charlie

Reply all
Reply to author
Forward
0 new messages