Download - Unit test and ui testing with cucumber
![Page 1: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/1.jpg)
UINT TEST AND UI TESTING WITH CUCUMBER
andyang@Android Taipei
![Page 2: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/2.jpg)
ABOUT ME
▸
▸
▸
▸
![Page 3: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/3.jpg)
OUTLINE
▸
▸
![Page 4: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/4.jpg)
OUTLINE
▸
▸
▸
![Page 5: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/5.jpg)
SAMPLE CODE
GITHUB LINK
▸ Live Demo
▸ https://github.com/bng86/UnitTestDemo
![Page 6: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/6.jpg)
RESOURCES
▸
▸
![Page 7: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/7.jpg)
OVERVIEW
Unit Test
Integration Test
UI Test
androidTest
unit test
10%
20%
70%
![Page 8: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/8.jpg)
UNIT TEST
FIRST
▸ Fast
▸ Independent
▸ Repeatable
▸ Self Validating
▸ Timely
![Page 9: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/9.jpg)
UNIT TEST
▸
![Page 10: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/10.jpg)
UNIT TEST
▸
![Page 11: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/11.jpg)
UNIT TEST
▸
![Page 12: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/12.jpg)
UNIT TEST
▸
![Page 13: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/13.jpg)
UNIT TEST
TIPS
▸
▸ ( Assertion)
▸
![Page 14: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/14.jpg)
UINT TEST
TIPS 3A
▸ Arrange
▸ Act
▸ Assert
![Page 15: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/15.jpg)
3A PRACTICE
![Page 16: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/16.jpg)
UNIT TEST
JUNIT 4
▸ @Test
▸ @Setup
▸ @Before
▸ @After
▸ @BeforeClass
▸ @AfterClass
![Page 17: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/17.jpg)
UNIT TEST
JUNIT 4
BeforeClass
AfterClass
Before
After
Test A
Test B
1
2
3
4
5
6
7
8
![Page 18: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/18.jpg)
UNIT TEST
ANDROID STUDIO SET UP JUNIT 4
![Page 19: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/19.jpg)
Unit Test Live Demo
![Page 20: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/20.jpg)
UI TESTING
▸ UI Testing -> Do the right thing
▸ Unit Testing -> Do the thing Right
▸
▸ UI Testing
▸
▸
![Page 21: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/21.jpg)
CUCUMBER
CHERKIN
▸ a business readable, domain specific language
▸ used for documentation and automated testing
![Page 22: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/22.jpg)
CUCUMBER
CHERKIN
![Page 23: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/23.jpg)
CUCUMBER
CHERKIN
▸ Feature -
▸ Scenario -
▸ Given - arrange
▸ When - act
▸ Then - assert
![Page 24: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/24.jpg)
CUCUMBER
CHERKIN
▸ And
![Page 25: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/25.jpg)
CUCUMBER
CHERKIN
▸ Background
![Page 26: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/26.jpg)
CUCUMBER
CHERKIN
▸ Scenario Outline
![Page 27: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/27.jpg)
UI TESTING
ANDROID STUDIO CUCUMBER PLUGIN
▸ preferences -> plugins -> search Cucumber for Java
![Page 28: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/28.jpg)
UI TESTING
ANDROID STUDIO CUCUMBER PLUGIN
▸
▸
▸ auto formater
▸
▸ step test method
![Page 29: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/29.jpg)
UI TESTING
ANDROID STUDIO SET UP ESPRESSO WITH CUCUMBER
![Page 30: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/30.jpg)
UI Test With Cucumber Live Demo
![Page 31: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/31.jpg)
RefactoringLive Demo
![Page 32: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/32.jpg)
RECAP
▸ FIRST
▸
▸ 3A
▸ JUNIT4
▸ Cucumber
![Page 33: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/33.jpg)
TDDLive Demo
![Page 35: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/35.jpg)
▸
▸ 19:00 ~ 22:00
▸ @
▸
▸ 7/30( ) Workshop: Firebase app
![Page 36: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/36.jpg)
▸ 30 TDD
▸ https://cucumber.io/docs/reference
▸ https://github.com/cucumber/cucumber-jvm/tree/master/android
▸ https://google.github.io/android-testing-support-library/docs/espresso/
![Page 37: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/37.jpg)
Q&A
![Page 38: Unit test and ui testing with cucumber](https://reader034.vdocuments.mx/reader034/viewer/2022051006/58f9ad78760da3da068b988c/html5/thumbnails/38.jpg)
THANKS