{"id":18449925,"url":"https://github.com/alincode/learngeb","last_synced_at":"2025-09-12T04:34:16.020Z","repository":{"id":21153899,"uuid":"24456338","full_name":"alincode/learngeb","owner":"alincode","description":"網站自動化測試之美","archived":false,"fork":false,"pushed_at":"2021-05-06T15:25:32.000Z","size":56409,"stargazers_count":45,"open_issues_count":2,"forks_count":17,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-07-19T05:23:34.963Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://alincode.github.io/learngeb/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alincode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-25T12:00:28.000Z","updated_at":"2025-03-05T08:14:22.000Z","dependencies_parsed_at":"2022-07-19T23:17:50.404Z","dependency_job_id":null,"html_url":"https://github.com/alincode/learngeb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alincode/learngeb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alincode%2Flearngeb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alincode%2Flearngeb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alincode%2Flearngeb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alincode%2Flearngeb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alincode","download_url":"https://codeload.github.com/alincode/learngeb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alincode%2Flearngeb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274753622,"owners_count":25342825,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T07:22:41.655Z","updated_at":"2025-09-12T04:34:15.979Z","avatar_url":"https://github.com/alincode.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 網站自動化測試之美\n\nLearning Web Test with Geb\n\n## 摘要\n\nGeb 是瀏覽器自動化（browser automation）的解決方案。\n\n以強大的 Selenium WebDriver 作為基礎，直接控制瀏覽器進行網站操作，而非模擬 HTTP 存取的方式，即使面對 AJAX 或是複雜的 RIA（Rich Internet Application）也能輕鬆駕馭。\n\n發揮 Groovy 程式語言作為 DSL（Domain-Specific Language）的優勢，建構出一套瀏覽器自動化專屬的語法，並提供類似 jQuery 的操作方法，存取網頁 DOM 節點更方便，撰寫測試程式更簡潔快速。\n\n可以用簡單的 Groovy Script 方式執行，也可以配合 Maven 或 Gradle 建置專案，能夠無縫整合 JUnit、Spock 或 TestNG 等測試框架，並且搭配 Jenkins CI 進行專案開發流程整合。\n\n## 課程／講座\n\n\u003c!--\u003ciframe src=\"//www.slideshare.net/slideshow/embed_code/41586026\" width=\"425\" height=\"355\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" style=\"border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;\" allowfullscreen\u003e \u003c/iframe\u003e--\u003e\n\n- 2017/06/02 [iThome - TESTING DAY](http://testing.ithome.com.tw/)\n- 2017/06/25 [iThome - 網站測試開發 with WebdriverIO 實戰講堂](http://learning.ithome.com.tw/course/pUG31cbVpdA)\n- [動手玩 Java 專案建置工具：以 Gradle 與 Docker 為例](http://jcconf.tw/2015/speaker/play-java-with-gradle-and-docker.html)\u003cbr/\u003e（發表於 [JCConf Taiwan 2015](http://jcconf.tw/2015/schedule-1.html) 由社群主辦 Java 開發者年會）\n- [淺談 Geb 網站自動化測試](http://www.slideshare.net/lyhcode/jcconf-2014gebtalk)\u003cbr/\u003e （發表於 [JCConf Taiwan 2014](http://jcconf.tw/2014/schedule.html) 由社群主辦 Java 開發者年會）\n- 企業培訓請聯繫【創科資訊】教學團隊 \u003calincode@gmail.com\u003e\n\n\u003c!--\n## 書評\n\n\u003e 本書所提及的自動測試流程與工具，在實作經驗上是完成專案的神兵利器，在現今的各型專案裡，自動化測試的重要性已遠比寫程式要來的更需要被優先考量，保持研發的熱情，也是自動化測試的價值，沒有正確導入自動化測試將會造成研發成本的多餘耗費。\n\n— Kalvar Lin, manager of Trend Micro research and development.\n\n\u003e Geb是以Groovy所開發的測試工具，底層可以採用Selenium的WebDriver來測試網頁應用程式。這場演講Teddy非常喜歡，講者口條清楚而且按部就班、深入淺出介紹Geb，從一開始如何用Geb測試簡單的網頁、讀取網頁中的元素，到利用Groovy語言的特性，採用Given、When、Then的格式將驗收測試的規格直接寫在測試案例中。講者提到他正在撰寫一本有關測試的書，相當值得期待。\n\n— Teddy, 泰迪軟體創辦人, 分享於搞笑談軟工部落格「[JCConf Taiwan 2014一日遊](http://teddy-chen-tw.blogspot.tw/2014/11/jcconf-taiwan-2014.html)」\n\n\u003e 測試，是開發的源頭，自動化的起點；說到測試，最複雜與困難的地方就屬 functional test，geb 正是專為解決複查前端測試問題的工具！目前在專案上的使用經驗來說，更加的節省測試以及開發上的人力，且一旦完成就成為穩定度的後盾，讓開發者免去重覆測試的消耗，專注於更有價值的開發，正向循環下，一步一步的強健專案體質！如果你被臭蟲或是不定時的系統異常搞的焦頭爛額，一定要試試！透過本書的閱讀，將帶給你前所未有的體驗！\n\n— 謝宗穎, 時間軸主任工程師\n--\u003e\n\n## 作者\n\n- 劉艾霖（軟體技術顧問）\n- 林彥宏（創科資訊創辦人）\n- 謝宗穎（創科資訊創辦人）\n\n這是一本開放源碼電子書，使用 GitBook 協作出版，本書全文與範例程式碼放在 GitHub 網站。\n\nhttps://github.com/alincode/learngeb\n\n## 如何透過網頁瀏覽此書？\n\n\u003chttps://alincode.github.io/learngeb/\u003e\n\n\u003c!-- ## 如何取得電子書？\n\n因為這本書還在「不斷長大」，請瀏覽這本書的專屬網站，取得最新發行的內容。\n\nhttp://learngeb.readbook.tw/\n\n也可以掃描 QR-Code 哦！\n\n![qrcode](qrcode.png)\n\n（用手機掃瞄條碼進入 Geb 電子書首頁） --\u003e\n\n## 勘誤回饋？\n\n如發現內容勘誤，請好心的大大協助我們更正，歡迎利用這些管道和我們聯繫：\n\n- 使用 [GitHub Issues](https://github.com/alincode/learngeb/issues) 回報錯誤\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falincode%2Flearngeb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falincode%2Flearngeb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falincode%2Flearngeb/lists"}