3. 各个测试类:
  测试类一:
package com.mysession.test.cases;
import com.mysession.R;
import com.mysession.test.SessionActivityTest;
public class MyCase1 extends SessionActivityTest {
public void testCase1() {
openSessionActivity();
assertTextEqual(R.id.etUrl,
"http://172.20.230.5/iportal/samples/jsapi/mobile.html");
}
public void testCase3() {
openSessionActivity();
clickButton(R.id.btnLoad);
clickButton(R.id.btnHistory);
}
}
  测试类二:
package com.mysession.test.cases;
import com.mysession.R;
import com.mysession.test.SessionActivityTest;
public class MyCase2 extends SessionActivityTest{
public void testCase2() {
openSessionActivity();
clickButton(R.id.btnLoad);
}
}
  三. 有些动作(如点击menu)需要通过包robotium-solo-1.8.0.jar来完成。
  所以要在Build Path->Configure Build Path…中导入:robotium-solo-1.8.0.jar
  程序中:
  private Solo solo;
  solo = new Solo(getInstrumentation(),getActivity);
  可以使用solo了, 如:
  solo.clickOnMenuItem(text);
  solo.goBack();