Sunday, April 20, 2014

Android program with eclipse write unit tests how total failure?


I had to learn C # not contacted by the eclipse wrote a tutorial program, and unit testing, unit testing is not always up and running, do not know what wrong it! ! ! ! ! ! ! ! Source here: netkf.net / lkf / ReadSaveFile.rar

Run as Android JUnit test Console view the following error:

[2013-09-15 17:00:49 - ReadSaveFile] ------------------------------
[2013-09-15 17:00:49 - ReadSaveFile]! Android Launch
[2013-09-15 17:00:49 - ReadSaveFile] adb is running normally
.[2013-09-15 17:00:49 - ReadSaveFile] ReadSaveFile does not specify a android.test.InstrumentationTestRunner instrumentation or does not declare uses-library android.test.runner in its AndroidManifest.xml



AndroidManifest.xml in full as follows:
  
package = "netke.net"
android: versionCode = "1"
android: versionName = "1.0">




android: icon = "@ drawable / ic_launcher"
android: label = "@ string / app_name">
android: label = "@ string / app_name"
android: name = ". MainActivity">







android: name = "android.test.InstrumentationTestRunner"
android: targetPackage = "netke.net" android: label = "aaa" />
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Select run as Android Application job
Reply:
cited a floor cheyan_517967268 reply:
select run as Android Application job

On the top floor
Reply:
Android applications are written in the end you still write Android junit procedures ah, how can you write so ah, the test program is a standalone application, you write it all together, what is this stuff ah. You're simply wrong to write the configuration file can be up and running on the strange, you look at the official example of the testing procedures.
Reply:
In most cases, the first procedure is to start from the familiar HelloWorld a language of the provisions.
Reply:
cited a floor cheyan_517967268 reply:
select run as Android Application job

Obviously run as Android Junit test
Reply:
You should create a Android Junit test applications!
Reply:

Obviously in the wrong position, which should be in the application! !
As follows:


package = "netke.net"
android: versionCode = "1"
android: versionName = "1.0">



android: icon = "@ drawable / ic_launcher"
android: label = "@ string / app_name">

android: label = "@ string / app_name"
android: name = ". MainActivity">







android: name = "android.test.InstrumentationTestRunner"
android: targetPackage = "netke.net" android: label = "aaa" />

No comments:

Post a Comment