Why testing?
Types of test
Architecting the app for testing
Using Model-View-Presenter pattern is good choice to “modularize” the app. This will make the testing much easier (we can test each layer separately).
Test pyramid
The “test pyramid” : Acceptance - 10% Integration - 20% Unit - 70%
This pyramid makes sense because: * integration tests are complexer * integration tests takes more time * if an integration test fails, we have much more things which can go wrong Implementing Unit tests Use Mockito to mock dependencies. Project structure: * Unit tests live in the folder “test” * UI test are located in “androidTest” Anatomy of a Unit Test * @RunWith(MockitoJUnitRunner.class) Here is specified the runner which should be used to run the test * @SmallTest, @MediumTest, @LargeTest @SmallTest is normally a Unit test, @MediumTest test more than one module, @LargeTest is usually an UI automation test * @Before Marks method which should be runned every time before a test is launched * @After Marks method which should be runned every time after a test to release resources, close files etc. * @Test This define a test method. It usually should follow the “Arrange-Act-Assert” pattern: – Arrange all necessary preconditions and inputs. – Act on the object or method under test. – Assert that the expected results have occurred. Running the tests Use “Unit Test” on Build variant menu. After this right click on the Test package folder and then on “Run tests…” (or Debug or Run with Coverage) Implementing Integration Tests In this article using Espresso. <Example>…
http://www.peterkroener.de/ecmascript-6-promises/ http://www.heise.de/developer/artikel/Asynchrone-Programmierung-mit-Promises-2084517.html?artikelseite=2
https://davidwalsh.name/promises
https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Promise
http://www.javascriptkit.com/javatutors/javascriptpromises.shtml
http://blog.egorand.me/reliable-functional-tests-with-espresso-and-dagger/
Udi Cohen “Speed up your app” http://blog.udinic.com/2015/09/15/speed-up-your-app
Artikel ist wirklich interessant → richtig durcharbeiten : Approaching Android with MVVM https://medium.com/ribot-labs/approaching-android-with-mvvm-8ceec02d5442
Principles of mobile app design Make a check of Avril, T4T or Wiatrack Pro (see the last page of this guide) http://think.storage.googleapis.com/docs/principles-of-mobile-app-design-engage-users-and-drive-conversions.pdf
Droidcon SF Advanced Techniques for concurrency and memory management https://speakerdeck.com/nhachicha/droidcon-sf-advanced-techniques-for-concurrency-and-memory-management https://www.youtube.com/watch?v=m8i9omiw9aM
http://peirr.com/writing-android-tests-with-espresso-test-recorder/
https://blog.stylingandroid.com/permissions-part-2/
https://blog.stylingandroid.com/permissions-part-3/
https://blog.stylingandroid.com/permissions-part-4/
http://saulmm.github.io/from-design-to-android-part1
Nice article about performance, which should be reread AND IMPLEMENTED http://blog.nimbledroid.com/2016/04/20/pushing-limits-of-app-startup-time.html
https://www.raywenderlich.com/6729-android-jetpack-architecture-components-getting-started
https://labs.ribot.co.uk/fast-and-reliable-ui-tests-on-android-17c261b8220c#.uhhke5et6