Download - Barcamp Bangkhen :: Robot Framework
by Siam Chamnan Kit Co., Ltd. and Odd-e (Thailand) Co, Ltd.SPRINT3R
Robot Framework somkiat.cc
1
Introduction• Test automation framework
• For acceptance testing (ATDD)
• https://code.google.com/p/robotframework/
• Keyword-Driven Development
• Based on Python
• Open source
• Sponsor by Nokia Siemens Networks
2
ATDD Cycle
3
Architecture
4
Installation• Python 2.7/2.8
• pip
• Robot Framework
• Selenium for Robot Framework
5
Install Robot Framework• $pip install robotframework
• $pybot
6
Install Selenium• $pip install robotframework-selenium2library
https://code.google.com/p/robotframework-seleniumlibrary/7
Test Structure
8
Standard Libraries• Build in
• Operating System
• Screenshot
• Telnet
• String
• Collections
• Remote
• Dialog
• XML
• Process
http://robotframework.org/#test-libraries
External Libraries• Selenium2Library
• Android
• iOS
• Database
• FTP
• HTTP
• MongoDB
• SSH
• AutoItLibrary
• Swing
http://robotframework.org/#test-libraries
Selenium Keyword• Open Browser <url> <browser>
• Input Text <locator> <value>
• Click Button <locator>
• Click Link <locator>
• Close Browser
11
Selenium Keyword• Wait Until Page Contains <text>
• Page Should Contain <text>
• Title Should Be <text>
12
More
13
http://rtomac.github.io/robotframework-selenium2library/doc/Selenium2Library.html
Hello Robot• Create file hello.txt
• Run with
• $pybot hello.txt
14
Be careful
• Page Should Contain Google
4 spacebars
only 1 spacebar
15
Report
16
Report
17
Workshop• Create test case with Robot Framework
• Demo Login
18
SPRINT3R Siam Chamnankit Co., Ltd., Odd-e (Thailand) Co., Ltd. and Alliance
Feature ฟ้าประทาน
SPRINT3R Siam Chamnankit Co., Ltd., Odd-e (Thailand) Co., Ltd. and Alliance
Feature ฟ้าประทาน
http://localhost:7272/html
name=username_field
name=password_field
name=login_button
SPRINT3R Siam Chamnankit Co., Ltd., Odd-e (Thailand) Co., Ltd. and Alliance
ผ่าน คือ อะไร
username=demo
password=mode
http://localhost:7272/html/welcome.html
http://localhost:7272/html
ความต้องการัดล่ะ
SPRINT3R Siam Chamnankit Co., Ltd., Odd-e (Thailand) Co., Ltd. and Alliance
เขียน Acceptance Test กันเถอะ
SPRINT3R Siam Chamnankit Co., Ltd., Odd-e (Thailand) Co., Ltd. and Alliance
Question ?
24