Problem in running ant script for Androind instrumentation

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

Problem in running ant script for Androind instrumentation

Postby ansh.chauhan » Wed Jun 20, 2012 1:40 pm

I will try to explain my situation:

I have a library project, a sample project which references the library, and a test project which tests the sample app. This arrangement was necessary because there was (is?) no way to run JUnit tests against a library project.
i go this error

[exec] android.test.suitebuilder.TestSuiteBuilder$FailedToCreateTests:
[exec] Error in testSuiteConstructionFailed:
[exec] java.lang.RuntimeException: Exception during suite construction
[exec] at android.test.suitebuilder.TestSuiteBuilder$FailedToCreateTests.testSuiteConstructionFailed(TestSuiteBuilder.java:239)
[exec] at java.lang.reflect.Method.invokeNative(Native Method)
[exec] at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
[exec] at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
[exec] at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:520)
[exec] at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447)
[exec] Caused by: java.lang.reflect.InvocationTargetException
[exec] at com.IFSCaseStudy.services.net.test.MoneyTransferServiceTest.<init>(MoneyTransferServiceTest.java:20)
[exec] at java.lang.reflect.Constructor.constructNative(Native Method)
[exec] at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
[exec] at android.test.suitebuilder.TestMethod.instantiateTest(TestMethod.java:87)
[exec] at android.test.suitebuilder.TestMethod.createTest(TestMethod.java:73)
[exec] at android.test.suitebuilder.TestSuiteBuilder.addTest(TestSuiteBuilder.java:263)
[exec] at android.test.suitebuilder.TestSuiteBuilder.build(TestSuiteBuilder.java:185)
[exec] at android.test.InstrumentationTestRunner.onCreate(InstrumentationTestRunner.java:373)
[exec] at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4218)
[exec] at android.app.ActivityThread.access$3000(ActivityThread.java:125)
[exec] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071)
[exec] at android.os.Handler.dispatchMessage(Handler.java:99)
[exec] at android.os.Looper.loop(Looper.java:123)
[exec] at android.app.ActivityThread.main(ActivityThread.java:4627)
[exec] at java.lang.reflect.Method.invokeNative(Native Method)
[exec] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
[exec] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
[exec] at dalvik.system.NativeStart.main(Native Method)
[exec] Caused by: java.lang.NoClassDefFoundError: com.IFSCaseStudy.ui.screens.moneyTransfer.MoneyTransferController
[exec] ... 19 more
[exec]
[exec] Test results for InstrumentationTestRunner=.E
[exec] Time: 0.113
[exec]
[exec] FAILURES!!!
[exec] Tests run: 1, Failures: 0, Errors: 1
[exec]


Now i don't build is successfully created why i got this error at run time. Help me how i can give reference of the library project for test.
ansh.chauhan
Experienced Developer
Experienced Developer
 
Posts: 75
Joined: Tue May 27, 2008 7:04 am

Top

Return to General

Who is online

Users browsing this forum: No registered users and 6 guests