Introduction
This page details how to build and test the Ruby code in Selenium.
Details
The CrazyFunBuild
runs on a bundled JRuby jar and is based on Rake. Use the 'go' Rake
wrapper to run the targets. Unfortunately, rvm sets GEM_HOME and causes
trouble for our jruby-complete.jar. If you use rvm, you should disable
it (rvm use system) before using the go script.
Since this is just a wrapper for Rake, familiar commands (like go -T to list targets) all work.
Building
After making changes, you need to build the code (this is needed since we depend on other parts of the project):
-
./go //rb:firefox
-
./go //rb:chrome
- etc.
Build results go in the build/rb directory. You can play with your changes in irb from there:
irb -I build/rb/lib -r selenium-webdriver
Using/requiring the ruby code from rb/lib directly is not recommended.
Testing
Most of the Ruby targets should work on both MRI (using rake //rb:<target>) or the bundled JRuby jar (using ./go //rb:<target>).
One notable exception is the //rb:remote-test target, which relies on
being able to compile the server jar. You can however do the build with
JRuby/go, then use rake to run the tests.
For MRI, it's a good idea to run rake //rb:install-gems to make sure you have the dependencies installed.
./go //rb:unit-test |
Run unit tests for WebDriver. |
./go //rb:firefox-test |
Run integration tests for Firefox - replace "firefox" with any driver. |
./go //rb:rc-client-unit-test |
Run unit tests for selenium-client (Se 1.x/RC) |
./go //rb:rc-client-integration-test |
Run integration tests for selenium-client (Se 1.x/RC) |
Contributing
- Make your feature addition or bug fix.
- Add tests for it. This is important so we don't break it in a future version unintentionally.
- Create a patch: svn diff > my-feature.patch
- Create a new issue, attach the patch and add the Lang-Ruby label.
分享到:
相关推荐
Selenium gem ruby Selenium gem ruby Selenium gem ruby Selenium gem ruby Selenium gem ruby
博客“ruby+selenium-webdriver测试--第一个例子源代码”
ruby2.0.0+selenium-webdriver+watir-webdriver+rails离线备份,设置环境变量后可使用(未测试)
博客“ruby+selenium-webdriver测试-测试用例源代码”
9. Go to Cmd Prompt –> c:\Ruby192\bin>gem install selenium-client-1.2.18.gem Once you install selenium-client you should get the following conformation message: ' 1 gem installed ' Installing ri ...
博客“ruby+selenium-webdriver一步一步进行自动化测试------面向对象编程”对应源代码
:man::laptop: QA Ruby,Cucumber和Selenium自动化-Livelo网站 网站( https://www.livelo.com.br/ )的购物车功能中的Ruby,Cucumber和Selenium前端测试自动化。 测试的功能位于features/livelo_black_box....
selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium
ruby 2.00 selenium webdriver,watir webdriver 备份打包
博客“ruby+selenium-webdriver测试--多个测试用例”源代码
博客“ruby+selenium-webdriver测试-逻辑与数据分离”对应源代码
Selenium_v2.5 Selenium_v2.5 Selenium_v2.5 Selenium_v2.5Selenium_v2.5 Selenium_v2.5
selenium selenium selenium
selenium RC与selenium webdriver的区别
You start off by setting up the test development environment and gain tips on the advanced locater strategy and the effective use of the Selenium WebDriver API. After that, the use of design ...
Selenium是ThoughtWorks公司开发的一套基于WEB应用的测试工具,直接运行在浏览器中,模拟用户的操作,主要包括三个部分selenium-IDE,selenium-core,selenium-rc 。它可以被用于单元测试,回归测试,冒烟测试,集成...
You start off by setting up the test development environment and gain tips on the advanced locater strategy and the effective use of the Selenium WebDriver API. After that, the use of design ...
Selenium
selenium
一个关于selenium grid的基础教程