[Robot Framework]เริ่มต้นทำData Driven ใน Robot Framework
- Nat Tantichatchawanwong
- Dec 14, 2018
- 1 min read
Data Driven Testing คืออะไร?
สามารถไปดูได้ที่: https://atlasarcadiacom.wixsite.com/babylon/single-post/2018/12/14/Data-Driven-TestingDDT-%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3
1. เริ่มทำkeyword ที่จะมาเป็นTemplateให้กับ Test Data ของเรา
โดยตัวอย่างจะตั้งตัวรับค่า 3 ตัวคือ x, y และ z

2.เขียน Test Step โดยตัวอย่างจะให้ ค่าxบวกกับค่าy และนำมาคูณกับค่าz หลังจากนั้นก็Log คำว่าDoneออกมา

3. เอา Keyword ที่เราทำมาใส่ที่ test case template

4. ลองใส่test dataและรัน test script ดู

Log ที่ได้ออกมาหลังจากการรัน




![[Tool]ASM Android Screen Monitor](https://static.wixstatic.com/media/9ba3b9_0f60667ce79e4e8698a93ded3177e686~mv2.png/v1/fill/w_447,h_250,fp_0.50_0.50,lg_1,q_35,blur_30,enc_avif,quality_auto/9ba3b9_0f60667ce79e4e8698a93ded3177e686~mv2.webp)
![[Tool]ASM Android Screen Monitor](https://static.wixstatic.com/media/9ba3b9_0f60667ce79e4e8698a93ded3177e686~mv2.png/v1/fill/w_220,h_123,fp_0.50_0.50,q_95,enc_avif,quality_auto/9ba3b9_0f60667ce79e4e8698a93ded3177e686~mv2.webp)
![[How-To]วิธีดู udid ของเครื่อง Android](https://static.wixstatic.com/media/9ba3b9_5b491ebcc32f471ca9a4aabd96d41832~mv2.png/v1/fill/w_447,h_250,fp_0.50_0.50,lg_1,q_35,blur_30,enc_avif,quality_auto/9ba3b9_5b491ebcc32f471ca9a4aabd96d41832~mv2.webp)
![[How-To]วิธีดู udid ของเครื่อง Android](https://static.wixstatic.com/media/9ba3b9_5b491ebcc32f471ca9a4aabd96d41832~mv2.png/v1/fill/w_220,h_123,fp_0.50_0.50,q_95,enc_avif,quality_auto/9ba3b9_5b491ebcc32f471ca9a4aabd96d41832~mv2.webp)
![[Tool] UI Automator Viewer](https://static.wixstatic.com/media/9ba3b9_effe26d321544e478df8d306901cccc1~mv2.png/v1/fill/w_447,h_250,fp_0.50_0.50,q_35,blur_30,enc_avif,quality_auto/9ba3b9_effe26d321544e478df8d306901cccc1~mv2.webp)
![[Tool] UI Automator Viewer](https://static.wixstatic.com/media/9ba3b9_effe26d321544e478df8d306901cccc1~mv2.png/v1/fill/w_220,h_123,fp_0.50_0.50,q_95,enc_avif,quality_auto/9ba3b9_effe26d321544e478df8d306901cccc1~mv2.webp)












![[Python] TypeError: String indices must be integers By Adding Pytest-runner](https://static.wixstatic.com/media/9f1b00_e1685a26d4214fdeb150a0008671b87b~mv2.jpg/v1/fill/w_274,h_250,fp_0.50_0.50,q_30,blur_30,enc_avif,quality_auto/9f1b00_e1685a26d4214fdeb150a0008671b87b~mv2.webp)
![[Python] TypeError: String indices must be integers By Adding Pytest-runner](https://static.wixstatic.com/media/9f1b00_e1685a26d4214fdeb150a0008671b87b~mv2.jpg/v1/fill/w_69,h_63,fp_0.50_0.50,q_90,enc_avif,quality_auto/9f1b00_e1685a26d4214fdeb150a0008671b87b~mv2.webp)
![[Python] TypeError: String indices must be integers By Fixing Damaged Packages](https://static.wixstatic.com/media/9f1b00_48a23fd1b86d4becae687ec4bc2a99f0~mv2.png/v1/fill/w_442,h_250,fp_0.50_0.50,lg_1,q_35,blur_30,enc_avif,quality_auto/9f1b00_48a23fd1b86d4becae687ec4bc2a99f0~mv2.webp)
![[Python] TypeError: String indices must be integers By Fixing Damaged Packages](https://static.wixstatic.com/media/9f1b00_48a23fd1b86d4becae687ec4bc2a99f0~mv2.png/v1/fill/w_69,h_39,fp_0.50_0.50,q_95,enc_avif,quality_auto/9f1b00_48a23fd1b86d4becae687ec4bc2a99f0~mv2.webp)







Comments