TestWise 5 is released
I am happy to announce that TestWise 5 is released. One key feature of TestWise 5 is that users now have the flexibility to use any Gems in your test scripts with the full control of managing gems.
Select menu 'Tools' -> 'Show Ruby Gems' or run 'gem install' under 'C:\agileway\TestWise\vendor\ruby-runtime\bin'.
This also means that you can write test scripts with Capybara, Cucumber 2, ..., etc, with the simple and easy to use TestWise features. Of course, there are other new features and enhancements, which I will post them later.
However, The flexiblity comes with a scariface in TestWise 5: running selected test scripts against the current browser. TestWise 4 implemented this which was considered "isn't technically possible". Don't worry, you can still use TestWise 4 as needed, your license will work on both TestWise 4.6 and TestWise 5.
Here is a guide to get your test script to be compatible with both TestWise versions.
In test_helper.rb:
- change the way load TestWiseSupport in test_helper.rb
require "#{File.dirname(__FILE__)}/testwise_support.rb"
toif defined?(TestWiseRuntimeSupport) ::TestWise::Runtime.load_webdriver_support # for selenium webdriver support else require "#{File.dirname(__FILE__)}/testwise_support.rb" end
and changeinclude TestWiseSupport
tomodule TestHelper #... if defined?(TestWiseRuntimeSupport) # TestWise 5 include TestWiseRuntimeSupport else include TestWiseSupport # TestWise 4 end
- Also do the same for abstract_page.rb
changeinclude TestWiseSupport
toif defined?(TestWiseRuntimeSupport) include TestWiseRuntimeSupport else include TestWiseSupport end
- 'browser_type' and 'site_url' methods to have "ENV[...]"
def browser_type if $TESTWISE_BROWSER then $TESTWISE_BROWSER.downcase.to_sym elsif ENV["BROWSER"] ENV["BROWSER"].downcase.to_sym else RUBY_PLATFORM =~ /mingw/ ? "ie".to_sym : "firefox".to_sym end end alias the_browser browser_type def site_url(default = "http://agiletravel.herokuapp.com") $TESTWISE_PROJECT_BASE_URL || ENV['BASE_URL'] || default end
You may check out the AgileTravel Sample test projects