3. Robotframework 이란?
범용 테스트 자동화 프레임워크
Keyword‐Driven 방식의 테스팅을 사용
End‐to‐End 인수 테스트
ATDD﴾Acceptance Test Driven Development﴿도구로서 사
용가능
Python으로 구현됨
Jython﴾JVM﴿, IronPython﴾.Net﴿에서도 실행가능
Python, java 언어로 기능을 확장할 수 있음
오픈소스
GitHub에 소스 존재
Apache License
5. 설치
node.js ﴾node‐v8.9.4‐x64.msi﴿
python 2.7 version 이상 사용
java 1.7 version 이상 사용
환경변수 설정
webdriver 위치, 파이썬 과 java 설치 위치
pip 설치
pip install robotframework
pip install robotframework‐selenium2library
실행
robot filename.robot
9. Dictionary Variables
&로 시작
﴾key,value﴿ 쌍을 가지는 자료구조
*** Variables ***
&{MEMBER} eric=21 liam=22 james=23 logan=24
*** Test Cases ***
Test Province
Should Be Equal &{MEMBER}[eric] 21
Should Be Equal ${MEMBER.eric} 21
11. For-Loop
for 루프안은 들여쓰기로 구분
들여쓰기할때 역슬래쉬﴾﴿ 사용
들여쓰기가 끝나는 지점이 for루프가 끝남
*** Variables ***
@{VALUES} cat dog
*** Test Cases ***
test for loop
:FOR ${var} IN @{VALUES}
Log To Console ${var}
14. Collections
for handling lists and dictionaries.
*** Variables ***
${L1} ['a']
${L2} ['a', 'b']
*** Test Cases ***
Test Collections
Append To List ${L1} xxx
Combine Lists ${L1} ${L2}
15. DateTime
for handling date and time values.
*** Keywords ***
Manipulate current time
${CurrentDate}= Get Current Date result_format=%Y‐%m‐%d %H:%M:%
${datetime} = Convert Date ${CurrentDate} datetime
Log To Console ${datetime.year}
Log To Console ${datetime.month}
Log To Console ${datetime.day}