Weitere ähnliche Inhalte
Ähnlich wie JCConf 2015 workshop 動手玩 Java 專案建置工具 (20)
Kürzlich hochgeladen (20)
JCConf 2015 workshop 動手玩 Java 專案建置工具
- 8. docker load
• docker load --input ${ }/jcconf_main.tar
• docker load --input ${ }/jcconf_client.tar
•
• docker images
• trunk/groovy_gradle
• vvoyer/docker-selenium-firefox-chrome
- 14. GebConfig
1. firefox {
2. driver = {
3. DesiredCapabilities capabilities = DesiredCapabilities.firefox()
4. def host = System.env.JCCONF_CLIENT_PORT_4444_TCP_ADDR ?: 'localhost'
5. def port = System.env.JCCONF_CLIENT_PORT_4444_TCP_PORT ?: '4444'
6.
7. if (host == 'localhost') {
8. new FirefoxDriver()
9. }
10. else {
11. URL url = new URL("http://$host:$port/wd/hub")
12. new RemoteWebDriver(url, capabilities)
13. }
14. }
15.}
16.
src/test/resources/GebConfig.groovy
- 20. Testing with Jenkins CI
• daily build
• code committed
• pull request
• before staging
• before release
• trigger manually
- 21. Jenkins CI with Real Browser ?
• PhantomJS(headless) is not real
?
?
HOW-TO
- 28. GebConfig
1. firefox {
2. driver = {
3. DesiredCapabilities capabilities = DesiredCapabilities.firefox()
4. def host = System.env.JCCONF_CLIENT_PORT_4444_TCP_ADDR ?: 'localhost'
5. def port = System.env.JCCONF_CLIENT_PORT_4444_TCP_PORT ?: '4444'
6.
7. if (host == 'localhost') {
8. new FirefoxDriver()
9. }
10. else {
11. URL url = new URL("http://$host:$port/wd/hub")
12. new RemoteWebDriver(url, capabilities)
13. }
14. }
15.}
16.
src/test/resources/GebConfig.groovy