2 Replies Latest reply: Aug 6, 2010 7:52 AM by Ken Gullaksen RSS

    Running tests within IntelliJ IDEA fails

    Ken Gullaksen Novice

      FileAssetTestCase.shouldBeAbleToReadFile() fails when running in from within IntelliJ IDEA

       

      Path to Test.properties is wrong when running tests from within IDEA

       

       

      • Is: /home/ken/dev/git/shrinkwrap/src/test/resources/org/jboss/shrinkwrap/api/asset/Test.properties
      • Should be: /home/ken/dev/git/shrinkwrap/api/src/test/resources/org/jboss/shrinkwrap/api/asset/Test.properties

       

      may be a bug in idea. Should working path really be the project path when running tests in a module?

       

       

       

      java.lang.IllegalArgumentException: File must exist: /home/ken/dev/git/shrinkwrap/src/test/resources/org/jboss/shrinkwrap/api/asset/Test.properties
      at org.jboss.shrinkwrap.api.asset.FileAsset.<init>(FileAsset.java:51)
      at org.jboss.shrinkwrap.api.asset.FileAssetTestCase.shouldBeAbleToReadFile(FileAssetTestCase.java:45)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
      at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:159)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:94)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:192)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:64)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)

       

       

       

       

      Is this an issue when running in eclipse as well?