差異處
這裏顯示兩個版本的差異處。
rf:rf [2017/12/21 18:00] tony [解決問題] |
rf:rf [2023/06/25 09:48] |
||
---|---|---|---|
行 1: | 行 1: | ||
- | {{tag>RobotFramework}} | ||
- | ====== RobotFramework ====== | ||
- | RobotFramework是python-based的自動化測試框架,用於驗收測試。所有的測試案例都是透過Keyword(關鍵字)寫成,作者期望讓對程式語言不熟悉的測試人員也能輕鬆上手。實際上,以一個Web-based的應用程式而言,如果不夠熟悉XPath也不是那麼容易完成測試案例;再來實作的經驗,必定會影響測試案例品質,也會影響維護時間。在這裡的文章,是我的經驗分享。 | ||
- | ===== Article List ===== | ||
- | ==== 方便篇 ==== | ||
- | * [[.:rf:portable_robot_package|How to build portable robot-package?]] | ||
- | * [[.:rf:portable_robot_package2_selenium2|Portable robot-package with Selenium2Library]] | ||
- | * [[.:rf:ride|Run Testcases With RIDE]] | ||
- | * [[.:rf:blank_page|討人厭的BlankPage]] | ||
- | * [[.:rf:checkImcompatible|討人厭的CheckImcompatible]] | ||
- | * [[.:rf:testKeywords|節省那惱人的試驗時間]] | ||
- | * [[.:rf:useCustomizedFirefox|使用自己的Firefox做測試]] | ||
- | * [[rf:rf:reduceLog|改變寫法去減少不必要的Log]] @TODO@ | ||
- | * [[.:rf:convertFormat|轉換Test Suite的儲存格式]] | ||
- | * [[.:rf:remoteSelenium|Remote Selenium - 透過另外一台電腦的瀏覽器做測試]] | ||
- | * [[.:rf:seleniumGrid|Selenium Grid - 集中管理多個Selenium測試節點]] | ||
- | * [[.:rf:seleniumGrid:issues:browserCloseautomatically|Selenium Grid的鳥問題 - Session deleted due to client timeout]] | ||
- | ==== 基礎篇 ==== | ||
- | === 環境 === | ||
- | * [[.:rf:install_rf|How to install robotframework?]] | ||
- | * [[.:rf:installRIDEOnWin|How to install RIDE on Windows?]] | ||
- | * [[linux:software_installation:robot_framework:robot_ide|How to install RIDE on Ubuntu?]] | ||
- | * [[.:rf:setup_ride_line_separator|設定RIDE儲存的line separator]] | ||
- | === 功能 === | ||
- | * [[.:rf:useful_para|Useful Parameters]] | ||
- | * [[.:rf:tag|How to tag your testcases?]] | ||
- | * [[.:rf:setup_teardown|Setup and Teardown]] | ||
- | * [[.:rf:implTestingLibByJava1|How to implement a test library by java? (1) - Use existing libraies]] | ||
- | * [[.:rf:implTestingLibByJava2|How to implement a test library by java? (2) - Develope a new library]] | ||
- | * [[.:rf:webTestHelloWorld|Web Test HelloWorld]] | ||
- | * [[.:rf:gendoc|How to create the robotframework document?]] | ||
- | * [[.:rf:keyword_design|Keyword Design]] | ||
- | * [[.:rf:migrateToSelenium2Library|Migrate SeleniumLibrary to Selenium2Library]] | ||
- | === 語法 === | ||
- | * [[.:rf:condition_trap|Condition Trap]] | ||
- | * [[.:rf:click_and_wait|Click Something and Waiting]] | ||
- | * [[.:rf:for_loop|For Loop]] | ||
- | * [[.:rf:evaluate|Evaluate該怎麼用?]] | ||
- | * [[.:rf:open_browser|SeleniumLibrary - Open Browser]] | ||
- | * [[.:rf:return_boolean|如果回傳結果為TRUE或FALSE]] | ||
- | * [[.:rf:best_practice|Best Practice/Do與Don't]] | ||
- | ==== 應用篇 ==== | ||
- | === Keywords === | ||
- | * [[.:rf:wait_keywords|Wait Something Keywords]] 用等待關鍵字讓測試案例更可靠! (改進中) | ||
- | * [[.:rf:getSuiteDirectory|Get Suite Directory]] 以TestSuite路徑位置去做為相對路徑吧! | ||
- | * [[.:rf:fail_screenshot|Failure Screenshot]] 生死一瞬間,捕捉錯誤畫面。 | ||
- | * [[.:rf:check_variable|Is Variable Declared]] 如何確認變數是否有被宣告? | ||
- | * [[.:rf:retryKeyword|Retry Keyword]] 改進重試關鍵字! | ||
- | * [[.:rf:isAnArrayVariable|Is An Array Variable]] 如何確認變數內容是否為陣列變數? | ||
- | * [[.:rf:reserveFile|Reserve File]] 如何保留重要檔案並從Report中下載? | ||
- | * [[.:rf:runKWIfKWPorF|Run Keyword If Keyword Pass/Failed]] 如何讓關鍵字Pass/Failed時,執行對應動作? | ||
- | === Plugins === | ||
- | * [[.:rf:hot_key|How to test Hot Key in Robot?]] 註: 可改透過Import Library方式使用 | ||
- | * [[.:rf:expect|Test Interactive App]] 透過Expect測試交互式的CLI | ||
- | * [[.:rf:rfdoc|RFDoc]] Keyword文件集中搜尋瀏覽工具 | ||
- | * [[.:rf:rf+sikuli|RobotFramework+Sikuli(1)-Sikuli Script]] | ||
- | * [[.:rf:sikuliLibrary|RobotFramework+Sikuli(2)-Sikuli Library]] GUI測試請看它! | ||
- | === Special === | ||
- | * [[rf:rf:exe_javascript|Execute Javascript]] 蒐集使用過的腳本 | ||
- | ==== 解決問題 ==== | ||
- | * [[.:rf:qa|Q&A]] | ||
- | * [[.:rf:launch_ff_problem_on_win|Jython+Selenium2Library無法在Windows上啟動Firefox]] | ||
- | * [[.:rf:howToAssertMultipleTextNode|How to assert multiple text node?]] | ||
- | * [[.:rf:noActiveSessionProblem|No active session with ID problem]] | ||
- | === Choose File在Remote Selenium上的問題 === | ||
- | 如果透過Remote Selenium Server去執行測試,在跑Robot上的測試資料該如何讓遠端機器取得呢? 經過爬文發現,Selenium2Library的Choose File已解決這問題;如果是自己寫code使用selenium,可以參考第三個連結(through File Detector)。 | ||
- | * [[https://github.com/robotframework/Selenium2Library/issues/445|upload file on remote selenium server]] | ||
- | * [[https://github.com/robotframework/Selenium2Library/issues/449|Update documentation on Choose File to show that it supports remote uploading]] | ||
- | * [[http://sauceio.com/index.php/2014/01/remote-file-uploads-with-selenium-php/|Remote file uploads with Selenium & PHP]] | ||
- | 目前Windows上常常有卡住的問題,即使設定timeout也無法解決: | ||
- | * [[https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/3858|related issue]] 這個issue中有人使用2.4x版本,我們是使用2.48 | ||
- | 根據[[https://raw.githubusercontent.com/SeleniumHQ/selenium/master/cpp/iedriverserver/CHANGELOG|IE driver changelog]]內容,3.3版本後應該要有解。 | ||
- | ===== Resource ===== | ||
- | * [[http://code.google.com/p/robotframework/|RobotFramework Web Site]] | ||
- | * [[http://robotframework.googlecode.com/svn/trunk/doc/quickstart/quickstart.html|Robot Framework Quick Start Guide]] | ||
- | * [[http://code.google.com/p/robotframework-seleniumlibrary/|RobotFramework Selenium Web Site]] | ||
- | * [[https://github.com/robotframework/RIDE/wiki/Installation-Instructions|How to install RIDE?]] | ||
- | * [[http://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.html?r=2.7.4#automatic-variables|Builtin Variable]] | ||
- | * [[http://blog.mykhailo.com/2011/02/how-to-sikuli-and-robot-framework.html|Sikuli and Robotframework]] | ||
- | * [[http://sqa.stackexchange.com/questions/2267/drag-and-drop-using-selenium-ide|Drag and Drop using selenium ide]] | ||
- | * [[http://www.dotblogs.com.tw/corner/archive/2009/07/19/9583.aspx|Key Code]] | ||
- | * [[https://github.com/SeleniumHQ/selenium/blob/master/cpp/webdriver-server/keycodes.h|Key Code of Webdriver-server]] | ||
- | * [[https://groups.google.com/forum/?fromgroups#!forum/robotframework-users|Forum]] | ||
- | * [[http://baike.baidu.com/view/649815.htm|驗收測試之定義]] | ||
- | * [[http://wuxing.blog.51cto.com/134326/69114|測試種類之定義]] | ||
- | * [[http://blog.codecentric.de/en/2010/02/remote-screenshots-mit-selenium-und-dem-robot-framework/|Taking Remote Screenshots With Selenium And The Robot Framework]] | ||
- | * [[https://pypi.python.org/pypi/robotframework/|下載最新版本robotframework的地方]] | ||
- | * [[https://blog.codecentric.de/en/2012/02/recording-robot-framework-keywords-with-selenium-ide/|Recording Robot Framework Keywords with Selenium IDE]] - 將Selenium IDE腳本轉為Robot Keywords | ||
- | * [[http://robotframework.net/]] | ||
- | ===== Quality ===== | ||
- | * [[http://www.slideshare.net/pekkaklarck/robot-framework-dos-and-donts|Do ant Don't]] [[http://blog.castman.net/programming/2016/07/28/robotframework.html|中文介紹]] | ||
- | * [[http://code.google.com/p/robotframework/wiki/HowToWriteGoodTestCases|How to write good testcaes?]] | ||
- | ===== Resource - Selenium2Library ===== | ||
- | * [[http://stackoverflow.com/questions/6101461/how-to-force-selenium-webdriver-to-click-on-element-which-is-not-currently-visib|點擊invisible imte的問題]] | ||
- | * [[https://github.com/robotframework/Selenium2Library/wiki/Differences-From-SeleniumLibrary|Differences-From-SeleniumLibrary]] | ||
- | * [[http://stackoverflow.com/questions/5692173/selenium-1-to-selenium-2-migration|Selenium1 to Selenium2 migration]] | ||
- | * [[https://pypi.python.org/pypi/robotframework-selenium2library|Robotframework-Selenium2Library Web site]] | ||
- | * [[https://code.google.com/p/selenium/wiki/InternetExplorerDriver|Web Driver - IE]] |