[Aurora] New JUnit Integration

What is new about the JUnit integration? Where can I find docs or
information to help me explore this? On a quick scan, I didn't find
anything in the properties or menus, but maybe I missed something?

Thanks,
Paul
-



Paul Hodgetts -- President, Principal Consultant
Agile Logic -- www.agilelogic.com
Consulting, Coaching, Training -- On-Site & Out-Sourced Development
Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA

0

Paul Hodgetts wrote:
> What is new about the JUnit integration? ..

Try and create a JUnit run profile. You'll notice the SwingUI/TextUI is
no longer there. There are replaced by the new one.

I just posted a request to have them back, next to the newbie, for the
nostalgic ones, like me.

Alain Ravet

0

Alain Ravet wrote:

Try and create a JUnit run profile. You'll notice the SwingUI/TextUI is
no longer there. There are replaced by the new one.


Ah, OK, I see that they have a new interface. Is that all that is new?
Not to be ungrateful, but I was hoping for something that let me switch
back and forth between the main class and the test class (like the JUnit
plug-in), create stub methods for main class methods (or create test
methods for those non-test-first folks), and maybe associate multiple test
methods with a main class method, and, and... ;)

I just posted a request to have them back, next to the newbie, for the
nostalgic ones, like me.


Yeah, the new interface is a bit disorienting, being used to the stock
JUnit ones. We'll see, maybe I'll get used to it.

Regards,
Paul
-



Paul Hodgetts -- President, Principal Consultant
Agile Logic -- www.agilelogic.com
Consulting, Coaching, Training -- On-Site & Out-Sourced Development
Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA

0

Maybe in the meantime just add your request to the JUnit Plugin or even
better participate ;)
The plugin already creates sub methods for main class methods doesn't it?
Just navigate and it will great the method.
If you have more than one test]]> it will navigate to the first one
first. Once you are already in a test method it will stay even you swap back
and forth. Or least it should ;)

BTW one good thing they did for the TDDers out there is that now LVCS is
labeled with the result of a test run so you can rollback to a green bar
with confidence.

Jacques
"Paul Hodgetts" <phodgetts@agilelogic.com> wrote in message
news:a87i6v0gj2pku019a3rd1sbiir9pcvk1iu@4ax.com...

Alain Ravet wrote:

>

Try and create a JUnit run profile. You'll notice the SwingUI/TextUI is
no longer there. There are replaced by the new one.

>

Ah, OK, I see that they have a new interface. Is that all that is new?
Not to be ungrateful, but I was hoping for something that let me switch
back and forth between the main class and the test class (like the JUnit
plug-in), create stub methods for main class methods (or create test
methods for those non-test-first folks), and maybe associate multiple test
methods with a main class method, and, and... ;)

>

I just posted a request to have them back, next to the newbie, for the
nostalgic ones, like me.

>

Yeah, the new interface is a bit disorienting, being used to the stock
JUnit ones. We'll see, maybe I'll get used to it.

>

Regards,
Paul
-----
Paul Hodgetts -- President, Principal Consultant
Agile Logic -- www.agilelogic.com
Consulting, Coaching, Training -- On-Site & Out-Sourced Development
Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA

>


0

I like the new JUnit-UI and its integration in IDEA. In earlier versions of IDEA the JUnit-UI was often in the way when one wanted to check the code. Now its nicely integrated.

And it even looks better. The original UI looks somehow bulky and one error in it is, that the test run numbers get truncated when you have more than 500 runs or so.

And notice that you can right-click on a failed testmethod in the tester and have it retested without having to run the hole bunch of tests again.

Also notice that the output in the output-view is filtered to your selection. You can see the output for the hole collection of tests, for a test case and finally for a test method.

So, I think its more than make-up.

0

Yes, it is not just make-up.
Don't miss assertEquals(String, String) support (difference panel for multi-line strings). It has exotic applications: I use it to compare arrays and lists (first convert both to lines and compare than perform true comparation - just to be sure).

Dyoma.

0

This sounds like a useful feature, I hate having to scroll a big long
toString output to see what is different. I can't seem to find this feature
though, how do you actually see the difference panel?

btw, I love the new JUnit UI!


"Dmitry Peshehonov" <dyoma@intellij.com> wrote in message
news:16670103.1047300303163.JavaMail.jrun@is.intellij.net...

Yes, it is not just make-up.
Don't miss assertEquals(String, String) support (difference panel for

multi-line strings). It has exotic applications: I use it to compare arrays
and lists (first convert both to lines and compare than perform true
comparation - just to be sure).
>

Dyoma.

>


0

Try this :

The output tab will contain a "]]>" link that pops up a diff window.

Maas

0

hmmm that's weird, it doesn't show up for me. Is this in build 802?


"Maas van den Berg" <jiveadmin@jetbrains.com> wrote in message
news:5791793.1047339507323.JavaMail.jrun@is.intellij.net...

Try this :
public void testMultiLineDiff() { > String s1 = "line1\nline2\nline3"; > String s2 = "line1\nline2\nline2a\nline3"; > > assertEquals(s1,s2); > } > ]]>
The output tab will contain a "<Click to see difference>" link that pops

up a diff window.
>

Maas



0

There are two requirements:
1. You use JUnit 3.8 (one wich shipped with Idea)
2. Your target JDK is 1.2 or higher.
If your project satisfies both requirements it seems to be a bug.

0

Thx, that was my problem, I had an older version of JUnit in my project's
classpath. It would be nice if the difference panel would handle more than
just Strings but it's a really nice start. :)

"Dmitry Peshehonov" <dyoma@intellij.com> wrote in message
news:2226002.1047379526400.JavaMail.jrun@is.intellij.net...

There are two requirements:
1. You use JUnit 3.8 (one wich shipped with Idea)
2. Your target JDK is 1.2 or higher.
If your project satisfies both requirements it seems to be a bug.



0

It would be nice if the difference panel would handle more than
just Strings but it's a really nice start. :)


What other types could be compared in such way?

--
Valentin Kipiatkov
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"


"S. Robinson" <me@privacy.net> wrote in message
news:b4l31m$40k$1@is.intellij.net...

Thx, that was my problem, I had an older version of JUnit in my project's
classpath. It would be nice if the difference panel would handle more

than

just Strings but it's a really nice start. :)

>

"Dmitry Peshehonov" <dyoma@intellij.com> wrote in message
news:2226002.1047379526400.JavaMail.jrun@is.intellij.net...

There are two requirements:
1. You use JUnit 3.8 (one wich shipped with Idea)
2. Your target JDK is 1.2 or higher.
If your project satisfies both requirements it seems to be a bug.

>
>


0

The properties of an object could be compared assuming the object followed
the JavaBeans standard of provided getters for the values.

Possible another option is if the call to assertEquals(Object, Object)
method fails you could display the toString value of each object in the diff
panel. This would only work if the toString method provided output on
multiple lines, which they rarely do.


"Valentin Kipiatkov" <valentin@intellij.com> wrote in message
news:b4l48n$6se$1@is.intellij.net...

It would be nice if the difference panel would handle more than
just Strings but it's a really nice start. :)

>

What other types could be compared in such way?

>

--
Valentin Kipiatkov
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"

>
>

"S. Robinson" <me@privacy.net> wrote in message
news:b4l31m$40k$1@is.intellij.net...

Thx, that was my problem, I had an older version of JUnit in my

project's

classpath. It would be nice if the difference panel would handle more

than

just Strings but it's a really nice start. :)

>

"Dmitry Peshehonov" <dyoma@intellij.com> wrote in message
news:2226002.1047379526400.JavaMail.jrun@is.intellij.net...

There are two requirements:
1. You use JUnit 3.8 (one wich shipped with Idea)
2. Your target JDK is 1.2 or higher.
If your project satisfies both requirements it seems to be a bug.

>
>

>
>


0

Nice idea. However I'm not going to implement it right now. Please, post feature request, just not to forget it. If several people find it useful I implement it.
General difference panel does not seem to be a good UI solution in this case (you can easily implement such object to string convertion as utility method and use it).

0

>The properties of an object could be compared assuming the object followed
>the JavaBeans standard of provided getters for the values.

I don't think, this is a good solution, because getters might change
the object's state (e.g. lazy getters).

Tom

0

An option to have the old text based JUnit would be nice.

I had to rollback to the previous version because my 1900 tests wouldn't run anymore - the machine just died.

0

Here's a link to the JUnit Integration Hope it helps http://www.soapui.org/Test-Automation/integrating-with-junit.html

_____________
agile software   development

0

请先登录再写评论。