????Assert???????????? ?ж?????????????????????

???????????????в?????????????????????Outline???????Eclipse????У??????????window?????????????????ɡ????????????????????[Run As]???????Android JUnit Test????????????????????????

 

????3????????

????Console???????????????????????????????????System.out.println("aaa")??????????Java???????????console??????????????Android?????????console?д???????????????LogCat?д??????????Android?????н?????????????????Android.util.Log?????????????????log?????????????????????????????ERROR??WRAN??INFO??DEBUG??VERBOSE??????????????????????????????Log.e()??Log.w()??  Log.i()??   Log.d ()?? Log.v()??????????????ò?????????????????????????????????????????????????????????????????????????????????I ??????????IEW????????????????VD???????????????????

??????????д???????????????????????

package cn.csdn.android.junit;
import junit.framework.Assert;
import android.test.AndroidTestCase;
public class MyTest extends AndroidTestCase{
private final static String TAG = "myTag";
public boolean onTouchEvent(MotionEvent event) {
Log.i(TAG??"onkeyTouch");
showInfo("   "+ event.getX()+" "+ event.getY());
return super.onTouchEvent(event);
}


?????????Log??i??String tag??String sag????tag???????????????????????????????????????????????????????????????????????????????????????????????????????msag?????????????????????

????2????в??????з??????????????????????????????????“LogCat”?????????????????????????

 

???????????е?“??”?????????LogFilter???棬????????д????????????

 

???????“OK”????LogCat???????ж??????????“MyTest”?????????г????????????????????????