Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Testing Bundles with JUnit, Easymock and Powermock

Gosh, I am really glad that I never copy-paste passwords!

The correct link is http://www.eclipse.org/tycho/sitedocs/tycho-surefire/tycho-surefire-plugin/test-mojo.html#includes

/Mikhail


From: "Mikhail Kalkov" <mikhail.kalkov@xxxxxxxxxxxxxx>
To: "Tycho user list" <tycho-user@xxxxxxxxxxx>
Sent: Wednesday, October 24, 2012 4:36:41 PM
Subject: Re: [tycho-user] Testing Bundles with JUnit, Easymock and Powermock

Hi Markward,

I don't know if this is related to your problem, but I once had a trouble getting tycho-surefire-plugin to see my tests. As it turned out, even though I use JUnit4, Tycho only looks for test classes named **/Test*.java **/*Test.java **/*TestCase.java and by default doesn't even check other files. The solution was to rename the test classes so that they match these patterns. According to docs, it should be possible to configure a different inclusion pattern too: [1].

[1] com.purplescout.lintsupport.test

Kind regards,
Mikhail Kalkov


From: "Markward Schubert" <markward.schubert@xxxxxxxxx>
To: "Tycho user list" <tycho-user@xxxxxxxxxxx>
Sent: Tuesday, October 23, 2012 3:26:10 PM
Subject: Re: [tycho-user] Testing Bundles with JUnit, Easymock and Powermock

Thanks Cristiano!

I did this just a moment ago and indeed, I get some further in the process, but now from three Tests only one is recognized as having executeable methods. Actually the two unrecognized ones are using the @RunWith(PowerMockRunner.class) testrunner. Seems to be some classloading-issue... found some discussion about the topic: http://stackoverflow.com/questions/10517217/powermock-leads-to-classnotfoundexception-for-junit-plugin-test-in-eclipse-when

I keep on fighting.


2012/10/23 Cristiano GaviĆ£o <cvgaviao@xxxxxxxxx>
Don't know about Easymock and Powermock, but in case of Junit, You must add a Require-Bundle: org.junit in your test bundle manifest.

cheers,

Cristiano

On 23/10/12 08:19, Markward Schubert wrote:
Hi folks!

Does anybody of you have some experience with doing plugin-testing with Junit, Easymock and Powermock?
I am a bit stuck right now. What I did is, I created a pluginproject, just wrapping all the necessary jars of the above mentioned libraries and their dependencies and added it to my p2 target.

When I then run verify, I get the message, stating:  "Could not determine test framework used by test bundle MavenProject".
It seems to manage to find my wrapper-plugin, but actually seems to search for some special dependency in order to figure out, I am using JUnit?

Of course I have a test-plugin created, as a fragment to my plugin to test.

Any Help is appreciated!

Cheers,
Markward


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user



_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top