본문 바로가기
[android] Android unit and instrumentation tests tutorial [android] Android unit and instrumentation tests tutorial http://www.vogella.com/tutorials/AndroidTesting/article.html#what-to-test-on-android-applications 1. Introduction into Android testing 1.1. Testing Android applications -Android 의 unit testing 은 다음과 같이 두 가지로 나뉜다. Local unit tests : JVM 위에서 test 가 돈다.Instrumented unit test : Android System 을 요구하는 test -Local unit tests 는 Android device 에서 .. 2019. 2. 5.
[android] Espresso Tutorial [android] Espresso Tutorial http://www.vogella.com/tutorials/AndroidTestingEspresso/article.html 1. The Espresso test framework -Android testing framework 이며, UI test 를 쉽게 해준다.Google 이 2013년 10월에 첫 release 를 했고, 글 쓰는 시점에 2.0 이상이 release 되었으며 계속 유지보수 되고 있다. -Test 를 수행하기 전에 Activity 가 실행되었음을 보장한다. -single app test 가 주되지만, app 간의 테스트도 가능하다.너의 app 바깥쪽의 일을 테스트하는 것은 black box testing 만 가능하다. -Espresso.. 2019. 2. 4.
[android] JobIntentService 소개 (tutorial) [android] JobIntentService 소개 (tutorial) https://medium.com/til-kotlin/jobintentservice-for-background-processing-on-android-o-39535460e060https://developer.android.com/reference/android/support/v4/app/JobIntentService -JobIntentService 는 SupportLib 에 들어있다. -JobIntentService 는 Android O 부터는 JobScheduler 를 사용하고, Android O 이전 단말에서는 background service 를 사용한다. -Android O 이전 단말에서는 background 서비스가 즉각적.. 2018. 11. 28.
Efficient Android Threading #10 인텐트 서비스 Efficient Android Threading #10 인텐트 서비스 이 글은 Efficient Android Threading 의 일부 내용만 발췌한 내용입니다.자세한 내용은 책을 구입해서 보세용.12.1. 기본 사항 -IntentService 는 싱글 백그라운드 스레드에서 태스크를 실행한다.서비스가 실행 중인 경우, 인텐트는 백그라운드 스레드가 처리를 위해 준비될 때까지 큐에서 대기한다.실행 중이 아닌 경우 새로운 구성요소 생명주기가 시작되고, 더 이상 처리할 인텐트가 없을 때 구성요소의 생명주기가 끝난다. ( stopSelf 로 중지시킬 필요가 없다. 내부적으로 수행된다. )즉 실행할 태스크가 있는 동안에만 인텐트 서비스가 실행된다. -IntentSevice 에서 백그라운드 태스크 실행자는 핸들러.. 2018. 3. 26.
Efficient Android Threading #9 서비스 Efficient Android Threading #9 서비스 이 글은 Efficient Android Threading 의 일부 내용만 발췌한 내용입니다.자세한 내용은 책을 구입해서 보세용.11.1. 비동기 실행을 위해 서비스를 사용해야 하는 이유 -구성요소 생명주기와 스레드 생명주기의 분리호스팅 프로세스의 생명주기 서비스는 메모리 누수에 대한 위험과 너무 빨리 태스크가 종료될 위험을 모두 줄일 수 있다. 11.2. 지역, 원격, 전역 서비스 -전용 원격(다른 프로세스 사용) 서비스는 자신만의 UI 스레드를 가진다.따라서 서비스 UI 스레드는 클라이언트 구성요소의 UI 스레드의 실행을 지연하지 않는다.원격 서비스는 같은 힙 메모리 영역을 공유하지 않는다.따라서 클라이언트는 원격 메서드를 호출하는 데 바.. 2018. 3. 25.
[Android] 제대로 된 REST API 를 구축해보자. [Android] 제대로 된 REST API 를 구축해보자. reference : http://mytechaddiction.blogspot.kr/2014/02/rest-interaction-in-android.html?utm_source=Android+Weekly&utm_campaign=4254f212fb-Android_Weekly_91&utm_medium=email&utm_term=0_4eb677ad19-4254f212fb-337262377 Anti-Patterns 1. UI Thread 에서 API Call. 2. Activity 나 Fragment 등에서 Thread 를 만들어 요청 3. 결과를 Memory 에만 저장하여 사용. Decouple the UI from the http call. Act.. 2014. 3. 18.
반응형