Statlight extensions

Aug 7, 2012 at 10:12 PM

Does AgUnit support statlight extensions? http://statlight.codeplex.com/wikipage?title=Extensibility%20Documentation&referringTitle=Documentation

 

Are there any additional/different steps I need to take to make it work?

Aug 7, 2012 at 11:41 PM

I haven't investigated it yet but I don't really see why it shouldn't work.

It might be looking in the main ReSharper folder though for the assembly.
I suggest you place it next to StatLight.Core.dll first, if that doesn't work, try putting it in the main ReSharper folder.

I can look into it if you want to ...

Aug 7, 2012 at 11:43 PM
Ok, it wasn't working when I put it in subfolder, I'll try the root one instead, and I'll try out the 0.6.1 version too.

cheers

--
Krzysztof Kozmic

On Wednesday, 8 August 2012 at 8:41 AM, SDeKock wrote:

From: SDeKock

I haven't investigated it yet but I don't really see why it shouldn't work.

It might be looking in the main ReSharper folder though for the assembly.
I suggest you place it next to StatLight.Core.dll first, if that doesn't work, try putting it in the main ReSharper folder.

I can look into it if you want to ...

Read the full discussion online.

To add a post to this discussion, reply to this email (agunit@discussions.codeplex.com)

To start a new discussion for this project, email agunit@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Aug 7, 2012 at 11:47 PM

Actually, it might also be looking in your test projects output folder ...

I'll have to get back to you on this, let me check it out.

Aug 7, 2012 at 11:48 PM
ok, thanks


--
Krzysztof Kozmic

On Wednesday, 8 August 2012 at 8:47 AM, SDeKock wrote:

From: SDeKock

Actually, it might also be looking in your test projects output folder ...

I'll have to get back to you on this, let me check it out.

Read the full discussion online.

To add a post to this discussion, reply to this email (agunit@discussions.codeplex.com)

To start a new discussion for this project, email agunit@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Aug 8, 2012 at 12:11 AM

I can confirm it looks in this folder:

C:\Program Files (x86)\JetBrains\ReSharper\v7.0\Bin\Extensions

I'm trying a test extension now.

Aug 8, 2012 at 12:14 AM
Ok, I'll try that folder too.

cheers,

@K
Aug 8, 2012 at 12:19 AM
I can confirm that when put in C:\Program Files (x86)\JetBrains\ReSharper\v7.0\Bin\Extensions the extension gets picked up and executed :)

Thanks for your help.

--
Krzysztof Kozmic

On Wednesday, 8 August 2012 at 9:11 AM, SDeKock wrote:

From: SDeKock

I can confirm it looks in this folder:

C:\Program Files (x86)\JetBrains\ReSharper\v7.0\Bin\Extensions

I'm trying a test extension now.

Read the full discussion online.

To add a post to this discussion, reply to this email (agunit@discussions.codeplex.com)

To start a new discussion for this project, email agunit@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Aug 8, 2012 at 12:19 AM
Edited Aug 8, 2012 at 12:20 AM

This worked for me:

 

using System.Windows.Forms;
using StatLight.Core.Events;

namespace TestStatLightExtension
{
    public class TestStatLightExtension : ITestingReportEvents
    {
        public void Handle(TestCaseResultServerEvent message)
        {
            MessageBox.Show("Hello world!");
        }

        public void Handle(TraceClientEvent message)
        {
        }

        public void Handle(BrowserHostCommunicationTimeoutServerEvent message)
        {
        }

        public void Handle(FatalSilverlightExceptionServerEvent message)
        {
        }

        public void Handle(UnhandledExceptionClientEvent message)
        {
        }
    }
}

However, if there's an exception, it gets sent to the ILogger of StatLight, which is implemented as a Debug.Write() in AgUnit, 
so you might not see it without the debugger attached.
You can try putting a Debug.Break() as the first line of the plugin to attach. That way you should get the JIT-debugging dialog ...

Aug 8, 2012 at 12:21 AM

Ok, great!

Aug 8, 2012 at 12:22 AM
ok,

is there a way for AgUnit to get access to ReSharper's internal logger and log there instead?

--
Krzysztof Kozmic

On Wednesday, 8 August 2012 at 9:19 AM, SDeKock wrote:

From: SDeKock

This worked for me:

using System.Windows.Forms;
using StatLight.Core.Events;

namespace TestStatLightExtension
{
    public class TestStatLightExtension : ITestingReportEvents
    {
        public void Handle(TestCaseResultServerEvent message)
        {
            MessageBox.Show("Hello world!");
        }

        public void Handle(TraceClientEvent message)
        {
        }

        public void Handle(BrowserHostCommunicationTimeoutServerEvent message)
        {
        }

        public void Handle(FatalSilverlightExceptionServerEvent message)
        {
        }

        public void Handle(UnhandledExceptionClientEvent message)
        {
        }
    }
}

However, if there's an exception, it gets sent to the ILogger of StatLight, which is implemented as a Debug.Write() in AgUnit, 
so you might not see it without the debugger attached.
You can try putting a Debug.Break() as the first line of the plugin to attach. That way you should get the JIT-debugging dialog ...

Read the full discussion online.

To add a post to this discussion, reply to this email (agunit@discussions.codeplex.com)

To start a new discussion for this project, email agunit@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Aug 8, 2012 at 12:27 AM

I don't think so, the tests are being executed in a process outside of devenv.exe (one of JetBrains.ReSharper.TaskRunner.*.exe depending on target platform).

It uses some remoting to communicate back, but I don't think there's any support for logging in it. 

The code runs in full trust so you can always just write to a file ...

Aug 8, 2012 at 12:29 AM
ok, that's good enough.

--
Krzysztof Kozmic

On Wednesday, 8 August 2012 at 9:27 AM, SDeKock wrote:

From: SDeKock

I don't think so, the tests are being executed in a process outside of devenv.exe (one of JetBrains.ReSharper.TaskRunner.*.exe depending on target platform).

It uses some remoting to communicate back, but I don't think there's any support for logging in it.

The code runs in full trust so you can always just write to a file ...

Read the full discussion online.

To add a post to this discussion, reply to this email (agunit@discussions.codeplex.com)

To start a new discussion for this project, email agunit@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com