Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dash-dev] Running JUnit 4 tests on Athena

Hi,

I had the same error trying to run Junit4 tests with Athena.

Adding the following method to my test suite fixed the error:

	import junit.framework.JUnit4TestAdapter;

	public static junit.framework.Test suite() { 
	    return new JUnit4TestAdapter(MyTestSuite.class); 
	}

Thus I do also think that tests are run using Junit 3 test runner...


Dimitri.



Le mardi 15 décembre 2009 à 13:22 +0100, Nicolas Bros a écrit :
> I have created a JUnit 4 test suite:
> @RunWith(Suite.class)
> @SuiteClasses( { TestingTests.class })
> public class AllTests {
> }
> 
> And I reference it in the testing.properties of my releng project:
> testPluginsToRun=org.eclipse.gmt.modisco.tests
> org.eclipse.gmt.modisco.tests.suite=org.eclipse.gmt.modisco.tests.AllTests
> 
> I get an error from JUnit:
> Failure: No tests found in org.eclipse.gmt.modisco.tests.AllTests
> 
> I suspect that the tests are still being run by JUnit 3. Did I do
> something wrong?
> 
> On Fri, Dec 11, 2009 at 11:05 PM, Kim Moir <Kim_Moir@xxxxxxxxxx>
> wrote:
>         
>         The changes weren't in basebuilder.  There are changes are in
>         the test harness bundle in the test framework.  Also, the jdt
>         feature now includes two junit bundles with symbolic name
>         org.junit 3.8.2 and 4.7.0.  The old bundle with symbolic name
>         org.junit4 still exists in the jdt feature but it just points
>         to org.junit 4.7.0. 
>         
>         We also removed  the upper bounds for JUnit  in the manifests
>         of our test bundles. This doesn't impact other projects, but
>         is something to consider if you wish to run all your test
>         bundles to run under JUnit 4. 
>         
>         Kim 
>         
>         
>         
>         
>         Nick Boldt
>         <nickboldt@xxxxxxxxx> 
>         
>         12/11/2009 04:47 PM
>         
>         
>                      To
>         Tools for
>         Committer
>         Community
>         <dash-dev@xxxxxxxxxxx>, Kim Moir/Ottawa/IBM@IBMCA
>         
>         
>                      cc
>         
>                 Subject
>         Re: [dash-dev]
>         Running JUnit 4
>         tests on Athena
>         
>         
>         
>         
>         
>         
>         
>         
>         
>         Will the new JDT stuff make it into a basebuilder release
>         soon? If so I 
>         can move the default basebuilder on build.eclipse up to that
>         newer tag.
>         
>         Kim Moir wrote:
>         > 
>         > The appropriate orbit bundles are in Eclipse  builds >
>          N20091126-2000. 
>         >  So if you're consuming the JDT feature and the Eclipse Test
>         framework 
>         >  from a  recent build, the new JUnit bundles will be
>         included.
>         > 
>         > http://wiki.eclipse.org/Eclipse/Testing/JUnit4_Changes
>         > 
>         > Kim
>         > 
>         > 
>         > 
>         > *David Carver <d_a_carver@xxxxxxxxx>*
>         > Sent by: dash-dev-bounces@xxxxxxxxxxx
>         > 
>         > 12/11/2009 08:59 AM
>         > Please respond to
>         > Tools for Committer Community <dash-dev@xxxxxxxxxxx>
>         > 
>         > 
>         >                  
>         > To
>         >                  Tools for Committer Community
>         <dash-dev@xxxxxxxxxxx>
>         > cc
>         >                  
>         > Subject
>         >                  Re: [dash-dev] Running JUnit 4 tests on
>         Athena
>         > 
>         > 
>         >                  
>         > 
>         > 
>         > 
>         > 
>         > 
>         > I believe all you have to do is make sure you are using the
>         updated
>         > version of the eclipse test runner bundle, and the
>         appropriate orbit
>         > bundles.  I don't think there is any other change that needs
>         to occur,
>         > and nothing in Athena.   Haven't tested this yet though.
>         > 
>         > Dave
>         > 
>         > Nicolas Bros wrote:
>         >  > Hi,
>         >  >
>         >  > I recently received information that the Eclipse test
>         framework now
>         >  > supports JUnit 4.
>         >  > Does that make it possible to run JUnit 4 tests in
>         Athena?
>         >  > It not, is it planned for the near future?
>         >  > I am asking because all our tests are currently written
>         using JUnit 4,
>         >  > and we'd like to avoid having to adapt them to JUnit 3.
>         >  > --
>         >  > Nicolas Bros
>         >  > R&D
>         >  > tel: 06 75 09 19 88
>         >  > nbros@xxxxxxxxxxxxxxxx <mailto:nbros@xxxxxxxxxxxxxxxx>
>         >  > nbros.mia@xxxxxxxxx <mailto:nbros.mia@xxxxxxxxx>
>         >  > Mia-Software, 410 clos de la Courtine
>         >  > 93160 Noisy-le-Grand
>         >  > http://www.mia-software.com
>         >  > .: model driven agility :.
>         >  >
>         ------------------------------------------------------------------------
>         >  >
>         >  > _______________________________________________
>         >  > dash-dev mailing list
>         >  > dash-dev@xxxxxxxxxxx
>         >  > https://dev.eclipse.org/mailman/listinfo/dash-dev
>         >  >  
>         > 
>         > _______________________________________________
>         > dash-dev mailing list
>         > dash-dev@xxxxxxxxxxx
>         > https://dev.eclipse.org/mailman/listinfo/dash-dev
>         > 
>         > 
>         >
>         ------------------------------------------------------------------------
>         > 
>         > _______________________________________________
>         > dash-dev mailing list
>         > dash-dev@xxxxxxxxxxx
>         > https://dev.eclipse.org/mailman/listinfo/dash-dev
>         
>         -- 
>         Nick Boldt :: http://nick.divbyzero.com
>         Release Engineer :: Eclipse Modeling & Dash Athena
>         
>         
>         
>         _______________________________________________
>         dash-dev mailing list
>         dash-dev@xxxxxxxxxxx
>         https://dev.eclipse.org/mailman/listinfo/dash-dev
>         
> 
> 
> 
> -- 
> Nicolas Bros
> R&D
> tel: 06 75 09 19 88
> nbros@xxxxxxxxxxxxxxxx
> nbros.mia@xxxxxxxxx
> Mia-Software, 410 clos de la Courtine
> 93160 Noisy-le-Grand
> http://www.mia-software.com
> .: model driven agility :.
> _______________________________________________
> dash-dev mailing list
> dash-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/dash-dev



Back to the top