मुझे लगता है कि आप इसे जनवरी से हल कर लेंगे, लेकिन मैं कमांड लाइन उपकरण के साथ काम करता हूं, इसी तरह की समस्या मिली (त्रुटि संदेश differen है टी) और इसे हल किया जैसे मैं निम्नलिखित चरणों में समझाता हूं। मैं एक सफल परीक्षण चलाने तक अपने खाली परीक्षण के साथ एक डमी परियोजना बनाने से पूरी प्रक्रिया करता हूं।मुझे आशा है कि यह किसी के लिए उपयोगी हो सकता है:
प्रथम चरण, प्रोजेक्ट बनाने:,
android create test-project
--path MyExampleTest
--name MyExampleTest
--main ../MyExample
तीसरा कदम:
android create project
--name MyExample
--target "Google Inc.:Google APIs:17"
--path MyExample
--package com.example
--activity MyExampleActivity
दूसरा कदम परीक्षण परियोजना बनाने के लिए, अपनी प्रोजेक्ट निर्देशिका तक पहुंच, इसे बनाएं और जांचें कि प्रक्रिया सफलतापूर्वक समाप्त हो जाती है:
cd MyExample && ant debug
चौथा कदम, एमुलेटर को इसे स्थापित:
adb -s emulator-5554 install -r bin/MyExample-debug.apk
पांचवें कदम, अपने परीक्षण परियोजना निर्देशिका के लिए उपयोग और परीक्षण चलाने के लिए प्रयास करें:
cd ../MyExampleTest &&
adb shell am instrument -w com.example.tests/android.test.InstrumentationTestRunner
कि उपज:
INSTRUMENTATION_STATUS: id=ActivityManagerService
INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{com.example.tests/android.test.InstrumentationTestRunner}
INSTRUMENTATION_STATUS_CODE: -1
android.util.AndroidException: INSTRUMENTATION_FAILED: com.example.tests/android.test.InstrumentationTestRunner
at com.android.commands.am.Am.runInstrument(Am.java:676)
at com.android.commands.am.Am.run(Am.java:119)
at com.android.commands.am.Am.main(Am.java:82)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
at dalvik.system.NativeStart.main(Native Method)
छठी कदम, अपने उपकरण clases सूची और सुनिश्चित करें कि अपने वर्तमान परियोजना याद आ रही है:
adb shell pm list instrumentation
मेरी मशीन की पैदावार में यही:
instrumentation:com.android.emulator.connectivity.test/android.test.InstrumentationTestRunner (target=com.android.emulator.connectivity.test)
instrumentation:com.android.emulator.gps.test/android.test.InstrumentationTestRunner (target=com.android.emulator.gps.test)
instrumentation:com.android.example.spinner.tests/android.test.InstrumentationTestRunner (target=com.android.example.spinner)
instrumentation:com.android.smoketest.tests/com.android.smoketest.SmokeTestRunner (target=com.android.smoketest)
instrumentation:com.android.smoketest.tests/android.test.InstrumentationTestRunner (target=com.android.smoketest)
instrumentation:com.example.android.apis/.app.LocalSampleInstrumentation (target=com.example.android.apis)
आप देख सकते हैं, com.example.tests
नहीं करता है के लिए उपकरण अस्तित्व में नहीं है, इसलिए हमें इसे बनाना होगा।
सातवीं कदम, आप परियोजना का परीक्षण का निर्माण और जाँच कि इसे सफलतापूर्वक किया:
ant debug
आठवें कदम, यह एमुलेटर को स्थापित:
adb -s emulator-5554 install -r bin/MyExampleTest-debug.apk
नौवीं कदम, अपने उपकरण वर्गों की सूची बनाएं और अपनी परियोजना में से एक को देखें:
adb shell pm list instrumentation
पैदावार कि: दूसरी पर
instrumentation:com.android.emulator.connectivity.test/android.test.InstrumentationTestRunner (target=com.android.emulator.connectivity.test)
instrumentation:com.android.emulator.gps.test/android.test.InstrumentationTestRunner (target=com.android.emulator.gps.test)
instrumentation:com.android.example.spinner.tests/android.test.InstrumentationTestRunner (target=com.android.example.spinner)
instrumentation:com.android.smoketest.tests/com.android.smoketest.SmokeTestRunner (target=com.android.smoketest)
instrumentation:com.android.smoketest.tests/android.test.InstrumentationTestRunner (target=com.android.smoketest)
instrumentation:com.example.tests/android.test.InstrumentationTestRunner (target=com.example)
instrumentation:com.example.android.apis/.app.LocalSampleInstrumentation (target=com.example.android.apis)
देखो पिछले, instrumentation:com.example.tests
, यह जो हम चाहता था।
दसवीं कदम, चलाने के लिए अपनी परीक्षण:
adb shell am instrument -w com.example.tests/android.test.InstrumentationTestRunner
पैदावार कि:
Test results for InstrumentationTestRunner=
Time: 0.0
OK (0 tests)
सब है। अब अपने परीक्षणों को लागू करें, संकलित करें और सामान्य रूप से इंस्टॉल करें।इसके अतिरिक्त आप उन्हें पसंद निकाल सकते हैं:
adb shell pm uninstall com.example.tests
लेकिन आप उपकरण कक्षाएं फिर से बनाने के लिए एक ही गलती से बचने के लिए की आवश्यकता होगी।
आपदोनों परीक्षण और एप्लिकेशन निर्देशिका से से
adb install -r bin/<>-debug.apk
करना सुनिश्चित करें:
धन्यवाद, धन्यवाद की स्थापना रद्द करने के बाद परीक्षण शुरू करें कि आप Birei धन्यवाद! इंस्टॉल कार्रवाई ने मेरी समस्या हल की, क्योंकि यही वजह है कि मुझे "उपकरण जानकारी खोजने में असमर्थ" त्रुटि मिली थी – gsaslis
मैंने आपके रास्ते से जांच की लेकिन यह बिल्कुल काम नहीं कर रहा था। और एक और बात छठी चरण में मैं अपने प्रोजेक्ट का नाम इंस्ट्रूमेंटेशन सूची में देख पा रहा हूं लेकिन जब मैं परीक्षण चलाने की कोशिश कर रहा हूं तो यह ऊपर वर्णित जैसा त्रुटि देता है। क्रिप्या मेरि सहायता करे। –
क्या आपने ग्रेडल के समान कुछ किया है? – c3rin