Running one junit test method from package explorer

From: Kaj Hejer (kaj.heje..sit.uio.no)
Date: Tue Feb 22 2005 - 04:27:41 EST

  • Next message: Harald Niesche: "Re: XCode cant open WOLips projects"

    Hi!

    I'm doing some other javadevelopment in eclipse too (spring and so on
    :) and then I can run just one junit test method from package explorer
    by finding the testclass in package explorer and open it so I see all
    the methods it contains. Then I just right-click the testmethod I want
    to run and run->kunit test.

    When I try this for a testclass in a WO project (which is using some
    database stuff) in eclipse I get the following:

    com.webobjects.eoaccess.EOObjectNotAvailableException:
    databaseContextForModelNamed: cannot find model named skjema associated
    with this EOEditingContext
            at
    com.webobjects.eoaccess.EOUtilities.databaseContextForModelNamed(EOUtili
    ties.java:769)
            at Session.isProdDatabase(Session.java:348)
            at NettskjemaTestCase.setUp(NettskjemaTestCase.java:62)
            at com.codefab.wounittest.WOUTTestCase.runBare(Unknown Source)
            at junit.framework.TestResult$1.protect(TestResult.java:106)
            at junit.framework.TestResult.runProtected(TestResult.java:124)
            at junit.framework.TestResult.run(TestResult.java:109)
            at junit.framework.TestCase.run(TestCase.java:118)
            at
    org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
    stRunner.java:421)
            at
    org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRun
    ner.java:305)
            at
    org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRu
    nner.java:186)

    It seems that if I first run the testclass the "normal way" by defining
    a runsetup for it and then from the junit-view right-click some of the
    tests and select run, the test runs just fine.

    Should I add a feature request to wolips for the posibility to run a
    single junit test method in WO projects from package explorer or is
    this something that would be alot of work to implement?

    -Kaj :)



    This archive was generated by hypermail 2.0.0 : Tue Feb 22 2005 - 04:27:52 EST