Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android uiautomator runtest error didn't find class

recent i tryied getting started with android uiautomation testing.

The tutorial from the developer site I've worked through a few times and after having some problems and solving them now I have got a bigger issue.

I created a project, imported the two jar files and builded a java testcase scenario (the one from the tutorial.) after that I created an uitest projekt with shell command line. updated the build.xml created a jar file and pushed it onto my device.

As far as good everything worked nicely upon this point.

But tryin to run my tests with the command line:

adb -s <ANDROID_SERIAL> shell uiautomator runtest DeviceUnlocker.jar -c c.d.d.DeviceUnlocker

I only get the error:

INSTRUMENTATION_RESULT: shortMsg = java.lang.RuntimeException
INSTRUMENTATION_RESULT: longMsg=Didn't find class "c.d.d.DeviceUnlockingPseudoCodeTest on Path: /system/framework/android.test.runner.jar: /system/framework/uiautomator.jar:: /data/local/tmp/DeviceUnlocker.jar

INSTRUMENTATION_CODE: 0

like image 559
Erik Mueller Avatar asked Nov 11 '22 20:11

Erik Mueller


1 Answers

okay the easiest way is to only create inside eclipse a new android junit projekt.

i think this is more or less equal to uiautomator. and i think you might have the same oportunities ... correct me if i'm wrong...

uiautomator is still not running... and i also found some bugs in the uibuild.xml from android itself

<target name="test" description="Runs tests"> <!-- todo: fix this --> <fail message="Launching tests from Ant not supported yet" />

     <exec executable="${adb}" failonerror="true">
        <arg line="${adb.device.arg}" />
        <arg value="shell" />
        <arg value="uiautomator" />
        <arg value="runtest" />
        <arg value="${out.filename}" />
        <arg value="-e" />
        <arg value="class" />
        <arg value="com.android.uiautomator.samples.skeleton.DemoTestCase" />
    </exec>
</target>`

thanks for your help. for me uiautomator is no option anymore. regards

like image 54
Erik Mueller Avatar answered Nov 15 '22 04:11

Erik Mueller