selenium and xpressengine

14
XE UI Test with Selenium XE dev team - sol 111222목요일

Upload: sol-kim

Post on 03-Jul-2015

1.190 views

Category:

Documents


9 download

TRANSCRIPT

Page 1: Selenium and XpressEngine

XE UI Test with SeleniumXE dev team - sol

11년 12월 22일 목요일

Page 2: Selenium and XpressEngine

Selenium automates browsers. That's it.

웹 어플리케이션을 위한 자동화 UI테스팅 프레임웍.

테스트 작성 언어 : java, ruby, c#, python, perl, php ...

http://seleniumhq.com

Selenium 이란?

11년 12월 22일 목요일

Page 3: Selenium and XpressEngine

Selenium Remote Control

Selenium IDE

Selenium2 and WebDriver

Selenium Grid

11년 12월 22일 목요일

Page 4: Selenium and XpressEngine

Selenium 1 에서의 실질적 Server

HTMLSuite로 제한적 테스트 가능(Selenium AES & CI)

Selenium RC ?

11년 12월 22일 목요일

Page 5: Selenium and XpressEngine

WebDriver라는 또다른 UI테스팅 프레임웍과 통합.

Javascript Alert, Confirm 창, 파일 업로드 등 Selenium 1 보다 상세한 제어가 가능.

WebDriver의 안드로이드, 아이폰 driver로 모바일 테스트 가능.

Selenium Grid 기능으로 Selenium Hub와 여러 브라우져별 Selenium Server 구축 및 병렬 테스트 수행 가능.

Selenium 2 and WebDriver ?

11년 12월 22일 목요일

Page 6: Selenium and XpressEngine

Selenium IDE

TestSuite 작성을 도와주는 firefox plugin.

java, python, html 등 test case code로 export 가능.

Extended PHPUnit code로 exporting 지원 중단;;; (만들까?)

11년 12월 22일 목요일

Page 7: Selenium and XpressEngine

Firefox, Chrome, IE, Opera 등 브라우져가 실행 가능한 Windows, Mac 또는 Linux 가 필요, GUI가 없어도 HtmlUnit Driver를 이용하여 테스트가 가능함.

Selenium 이 실행 가능한 Java VM

XE가 실행 가능한 Apache, PHP, MySQL

Selenium 2 서버

11년 12월 22일 목요일

Page 8: Selenium and XpressEngine

배포전 다양한 환경에서의 실제 설치 테스트 가능. (Phing과 PHPUnit 이용)

MySQL / CUBRID, PHP4 / PHP5.2 / PHP5.3 등.

CI 서버와 연동하여 일일 테스트 가능.

개발중 수없이 해왔던 수작업 테스트를 자동화로 대체 가능.

XE Test...

11년 12월 22일 목요일

Page 9: Selenium and XpressEngine

php-webdriver-bindings 라는 PHP Client를 이용.

facebook 개발자가 만든 php-webdriver에 중대한! 버그가 있었음.

PHPUnit에서 사용하기 편리하도록 Wrapping.

XE 설치, 삭제 등.

Properties 파일을 통한 설정 연동.

소스 다운로드 => http://xe-tools.googlecode.com

Class XE_Selenium

11년 12월 22일 목요일

Page 10: Selenium and XpressEngine

getElementText($type, $value)

setElementText($type, $value, $text)

clickElement($type, $value)

getElementValue($type, $value)

$type = { id | name | cssSelector | xpath }

Class XE_Selenium

11년 12월 22일 목요일

Page 11: Selenium and XpressEngine

Selenium 2 & APM

<?php/* PHPUnit with Selenium Test Suit & Property */class XEInstallMySQLTest extends PHPUnit_Framework_TestCase{ ...}

Run PHPUnit

Result

Execute “UI Test”

11년 12월 22일 목요일

Page 12: Selenium and XpressEngine

install.properties<config> <selenium> <host>Selenium Server</host> <port>4444</port> <webdriver>chrome</webdriver> </selenium> <site> <url>http://uitest.com/%%PREFIX%%/</url><!-- test url, %%PREFIX%% will be changed to random string. --> <admin> <email>[email protected]</email> <userid>admin</userid> <nickname>admin</nickname> <password>123456</password> </admin> </site> <install> <path>/path/to/public_html/%%PREFIX%%/</path> <repositories> <repository> <path>/</path> <url>http://xe-core.googlecode.com/svn/branches/1.5.0/</url> </repository> <repository> <path>/modules/board</path> <url>http://xe-board.googlecode.com/svn/branches/1.4/</url> </repository> </repositories> <database> <type>mysql</type> <host>localhost</host> <port>3306</port> <user>selenium</user> <password>selenium</password> <database>selenium</database> </database> </install></config>

11년 12월 22일 목요일

Page 13: Selenium and XpressEngine

membertest.properties<config> <selenium> <host>Selenium Server</host> <port>4444</port> <webdriver>chrome</webdriver> </selenium> <site> <url>http://uitest.com/member/</url> <admin> <email>[email protected]</email> <userid>admin</userid> <nickname>admin</nickname> <password>123456</password> </admin> </site></config>

11년 12월 22일 목요일

Page 14: Selenium and XpressEngine

CI를 이용한 XE 설치 일일 테스트

11년 12월 22일 목요일