6 comments
Comment actions Permalink

I see the problem :(

It comes when you run tests from click on the gutter - first, ReSharper
finds the node with this name in the tree, and then runs it.

Currently, I only could suggest the trick to fix this problem:

For example, take this piece of code:





public void CompareIfEqual(int a, int b)
{
Assert.AreEqual(a,b);
}

1) During assembly explore, you generate the nodes following in the tree:
CompareIfEqual
CompareIfEqual(1, 2)
....
CompareIfEqual(4, 4)
2) During test run, you have to scan the method list and filter out
individual row tests if the whole method is given

This solution is not very accurate, but I do not see any other reasonable
solutions right now

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Albert Weinert" <newsH2-06@der-albert.com> wrote in message
news:1190wdwtfrsn0$.pkubb7mjedqa.dlg@40tude.net...

Hallo Eugene Pasynkov (JetBrains),

>
>> No, it will!
>> It is the responsibility of the TestAssembly derived class in pluginn to
>> parse the test name and run the concrete method
>

So, i do some more Testing and we are both right.

>

I open the TestFixture File, i go to a Test Method with parameters, i
click
with the mouse of the TestMethod-Symbol from ReSharper an choose "Run
MethodName". So the Runner GUI comes up, displays all Tests but don't run
the Test also UnitTestAssembly.Run() isn't called. I go back to the
Source,
run the complete TestFixture from the TextText Editor, the
UnitTestAssembly.Run() is called and it works as expected. Now i go back
to
the source and Run a parameterless method -> The specific Test runs
without
a problem (this even works if i put that a the first step ;)

>

From my sight i'm right, now to your sight :)

>

If i run the specific TestMethod with parameters from the Runner GUI, the
the Test Runs without a problem! So we are both right.

>

Regards

>

Albert



0
Comment actions Permalink

Hello Eugene Pasynkov (JetBrains),

1) During assembly explore, you generate the nodes following in the tree:
CompareIfEqual
CompareIfEqual(1, 2)
....
CompareIfEqual(4, 4)


This is known and i don't like it.

This solution is not very accurate, but I do not see any other reasonable
solutions right now


I see a solution ... ReSharper could simple run simple run the Test with
CompareIfEqual as methodname ;)

Regards

Albert

0
Comment actions Permalink

I suppose more reasonable solution will be done in ReSharper 3.0 - I'm going
to introduce another folding layer - nodes under test method

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Albert Weinert" <newsH2-06@der-albert.com> wrote in message
news:1g91f6mmcvsoh$.1gcz095roocgk.dlg@40tude.net...

Hello Eugene Pasynkov (JetBrains),

>
>> 1) During assembly explore, you generate the nodes following in the tree:
>> CompareIfEqual
>> CompareIfEqual(1, 2)
>> ....
>> CompareIfEqual(4, 4)
>

This is known and i don't like it.

>
>> This solution is not very accurate, but I do not see any other reasonable
>> solutions right now
>

I see a solution ... ReSharper could simple run simple run the Test with
CompareIfEqual as methodname ;)

>

Regards

>

Albert



0
Comment actions Permalink

Nope, thats not enough.

UnitRun can run only DLL, not source.
So when you ask ReSharper to run test by click on the gutter, it compile the
DLL, explore it, and then try to find the given test name in the test tree
(and then run that node in the tree).

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Albert Weinert" <newsH2-06@der-albert.com> wrote in message
news:11i3l2vg1yvt6.19vpflkgj5bpy.dlg@40tude.net...

Hallo Eugene Pasynkov (JetBrains),

>
>> I suppose more reasonable solution will be done in ReSharper 3.0 - I'm
>> going
>> to introduce another folding layer - nodes under test method
>

That's not needed, run simply the specific test, with the given methodname
and ignore the parameters. The Runner and the Plugin can handle it.

>

--
Freundliche Grüße

>

Albert Weinert
http://der-albert.com



0

Please sign in to leave a comment.