[jam 1.2] testing in android (dzmitry ivashnev)

Download [JAM 1.2] Testing in Android (Dzmitry Ivashnev)

Post on 29-Nov-2014

1.435 views

Category:

Technology

3 download

Embed Size (px)

DESCRIPTION

 

TRANSCRIPT

  • 1. Android testing framework Continuous Integration Summary Android email: 0xff0x666@gmail.com skype: oxffdx 9 2011 . xox Android Testing
  • 2. Android testing framework Continuous Integration SummaryOutline 1 2 Android testing framework 3 Continuous Integration Hudson xox Android Testing
  • 3. Android testing framework Continuous Integration SummaryOutline 1 2 Android testing framework 3 Continuous Integration Hudson xox Android Testing
  • 4. Android testing framework Continuous Integration Summary xox Android Testing
  • 5. Android testing framework Continuous Integration Summary xox Android Testing
  • 6. Android testing framework Continuous Integration SummaryUnit testing : Test case Assertions Mock objects Test case runner xox Android Testing
  • 7. Android testing framework Continuous Integration SummaryUnit testing : Test case Assertions Mock objects Test case runner xox Android Testing
  • 8. Android testing framework Continuous Integration SummaryUnit testing : Test case Assertions Mock objects Test case runner xox Android Testing
  • 9. Android testing framework Continuous Integration SummaryUnit testing : Test case Assertions Mock objects Test case runner xox Android Testing
  • 10. Android testing framework Continuous Integration SummaryOutline 1 2 Android testing framework 3 Continuous Integration Hudson xox Android Testing
  • 11. Android testing framework Continuous Integration SummaryWhat can I do TestCase - , . , . , . , "test" , . xox Android Testing
  • 12. Android testing framework Continuous Integration SummaryWhat can I do setUp() tearDown() , (xture). (assertEquals(), assertFalse(), assertNull(), ...). . xox Android Testing
  • 13. Android testing framework Continuous Integration Summary Junit public class CoverageTest extends TestCase { public void testBounding () { ArrayList < Circle > circles = new ArrayList < Circle >() ; circles . add ( new Circle ( new Point (.0 , .0) , 2.0) ) ; Coverage coverage = new Coverage ( circles ) ; Rectangle boundingRect = coverage . g e t B o u n d i n g R e c t a n g l e () ; assertEquals ( boundingRect .x , -2.0) ; assertEquals ( boundingRect .y , 2.0) ; assertEquals ( boundingRect . x + boundingRect . width , 2.0) ; assertEquals ( boundingRect . y - boundingRect . height , -2.0) ; } public void testIntersection () { ArrayList < Circle > circles = new ArrayList < Circle >() ; circles . add ( new Circle ( new Point (.0 , .0) , 2.0) ) ; Coverage coverage = new Coverage ( circles ) ; assertTrue ( coverage . isInIntersection ( new Point (.0 , .0) ) ) ; } } xox Android Testing
  • 14. Android testing framework Continuous Integration Summary F.I.R.S.T. ( Clean Code) (Fast) - . (Independent) - . (Repeatable) - . (Self-Validating) - , . (Timely) - . xox Android Testing
  • 15. Android testing framework Continuous Integration SummaryOutline 1 2 Android testing framework 3 Continuous Integration Hudson xox Android Testing
  • 16. Android testing framework Continuous Integration Summary JUnit ( 3) (*TestCase , asserts, mocks) (monkeyrunner - API python; Monkey:)) xox Android Testing
  • 17. Android testing framework Continuous Integration SummaryOutline 1 2 Android testing framework 3 Continuous Integration Hudson xox Android Testing
  • 18. Android testing framework Continuous Integration SummaryEclipse New->Project->Android->Android Test Project xox Android Testing
  • 19. Android testing framework Continuous Integration SummaryEclipse Test Project Name. Test Target: An existing Android project, Browse . Build Target. Application name. Package name. Finish. xox Android Testing

Recommended

View more >