nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #00588
Re: [Bug 591335] Re: NUnit-Addin: Commands at the beginning of a test are called before the TestStarted event method
Yes, I know.
With the Snapshot method I call a method in a second process different
from NUnit.exe (over .NET Remoting). The second process should profile
the memory of the first one (NUnit.exe).
Sebastian
Am 11.06.2010 um 07:56 schrieb Charlie Poole:
> Hi Sebastien,
>
> The EventListener addin runs in the same process as the tests.
>
> Charlie
>
> On Thu, Jun 10, 2010 at 10:44 PM, basti <sebastian.sz@xxxxxx> wrote:
>
>> Hi Charlie,
>>
>> Thanks for your quick answer.
>> I use the Snapshot method to get the current private memory usage of
>> the NUnit process, so it must be in the test methods.
>> It is for giving developers of unit tests the possibility to record
>> the memory usage at specific positions in their unit tests.
>>
>> Sebastian
>>
>>
>> Am 08.06.2010 um 22:41 schrieb Charlie Poole:
>>
>>> The EventListener methods are called asynchronously, without any
>>> guarantee of ordering except among the calls themselves.
>>> Specifically,
>>> there is no guarantee that the test has not yet started when
>>> TestStarted
>>> is called.
>>>
>>> This is because the intent of the interface is to allow reporting on
>>> tests, without permitting any disruption or other influence on the
>>> tests
>>> themselves.
>>>
>>> In your case, based on the method names, I imagine that you are
>>> creating
>>> a combined report using some info generated in the addin and other
>>> info
>>> from the calls within the test. You can only do this if you avoid
>>> making
>>> any assumptions as to ordering of the events. This is hard to do, of
>>> course, if you need the info to appear in some particular order. Can
>>> you
>>> simply call your Snapshot method from the addin itself?
>>>
>>> Charlie
>>>
>>> PS: It's best to have discussions on the nunit-discuss list rather
>>> than
>>> using the bug report system. This will be more helpful to you
>>> anyway,
>>> since more eyes will be on the problem.
>>>
>>> --
>>> NUnit-Addin: Commands at the beginning of a test are called before
>>> the TestStarted event method
>>> https://bugs.launchpad.net/bugs/591335
>>> You received this bug notification because you are a direct
>>> subscriber
>>> of the bug.
>>>
>>> Status in NUnit V2 Test Framework: Invalid
>>>
>>> Bug description:
>>> Hi NUnit team,
>>>
>>> I am writing a NUnit addin and I am wondering why the TestStarted
>>> event method is called after MemUnitClient.Snapshot() and
>>> MemUnitClient.Snapshot("in unit test 1 before stress") in
>>> UnitTest1() (see listing below). For me it is importand that the
>>> TestStarted method is called and executed first.
>>> Do you have any idea?
>>> I am using NUnit 2.5.5 with Visual Studio 2005 (C#) with GUI runner.
>>> I had the same problem with NUnit 2.5.3.
>>>
>>>
>>> // implemented in the NUnit addin DLL
>>> public void TestStarted(TestName testName)
>>> {
>>> // do something
>>> }
>>>
>>>
>>> // implemented in the Unit-Test-Assembly DLL
>>> [Test]
>>> public void UnitTest1()
>>> {
>>> MemUnitClient.Snapshot();
>>> MemUnitClient.Snapshot("in unit test 1 before stress");
>>> Stress(500000);
>>> MemUnitClient.Snapshot("in unit test 1 after stress");
>>>
>>> // do something
>>> }
>>>
>>>
>>> It would be great if you have an idea, because it is part of my
>>> master's thesis.... :)
>>>
>>> Thank you in advance.....it would be nice hearing from you.
>>>
>>> Sebastian
>>>
>>> To unsubscribe from this bug, go to:
>>> https://bugs.launchpad.net/nunitv2/+bug/591335/+subscribe
>>
>> --
>> NUnit-Addin: Commands at the beginning of a test are called before
>> the
>> TestStarted event method
>> https://bugs.launchpad.net/bugs/591335
>> You received this bug notification because you are a member of NUnit
>> Developers, which is subscribed to NUnit V2.
>>
>
> --
> NUnit-Addin: Commands at the beginning of a test are called before
> the TestStarted event method
> https://bugs.launchpad.net/bugs/591335
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in NUnit V2 Test Framework: Invalid
>
> Bug description:
> Hi NUnit team,
>
> I am writing a NUnit addin and I am wondering why the TestStarted
> event method is called after MemUnitClient.Snapshot() and
> MemUnitClient.Snapshot("in unit test 1 before stress") in
> UnitTest1() (see listing below). For me it is importand that the
> TestStarted method is called and executed first.
> Do you have any idea?
> I am using NUnit 2.5.5 with Visual Studio 2005 (C#) with GUI runner.
> I had the same problem with NUnit 2.5.3.
>
>
> // implemented in the NUnit addin DLL
> public void TestStarted(TestName testName)
> {
> // do something
> }
>
>
> // implemented in the Unit-Test-Assembly DLL
> [Test]
> public void UnitTest1()
> {
> MemUnitClient.Snapshot();
> MemUnitClient.Snapshot("in unit test 1 before stress");
> Stress(500000);
> MemUnitClient.Snapshot("in unit test 1 after stress");
>
> // do something
> }
>
>
> It would be great if you have an idea, because it is part of my
> master's thesis.... :)
>
> Thank you in advance.....it would be nice hearing from you.
>
> Sebastian
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/nunitv2/+bug/591335/+subscribe
--
NUnit-Addin: Commands at the beginning of a test are called before the TestStarted event method
https://bugs.launchpad.net/bugs/591335
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
Status in NUnit V2 Test Framework: Invalid
Bug description:
Hi NUnit team,
I am writing a NUnit addin and I am wondering why the TestStarted event method is called after MemUnitClient.Snapshot() and
MemUnitClient.Snapshot("in unit test 1 before stress") in UnitTest1() (see listing below). For me it is importand that the TestStarted method is called and executed first.
Do you have any idea?
I am using NUnit 2.5.5 with Visual Studio 2005 (C#) with GUI runner. I had the same problem with NUnit 2.5.3.
// implemented in the NUnit addin DLL
public void TestStarted(TestName testName)
{
// do something
}
// implemented in the Unit-Test-Assembly DLL
[Test]
public void UnitTest1()
{
MemUnitClient.Snapshot();
MemUnitClient.Snapshot("in unit test 1 before stress");
Stress(500000);
MemUnitClient.Snapshot("in unit test 1 after stress");
// do something
}
It would be great if you have an idea, because it is part of my master's thesis.... :)
Thank you in advance.....it would be nice hearing from you.
Sebastian
References