Tuesday, July 28, 2015
Create Parameterized Test Case
Introduction
This article describe how to create a parameterized test case in Rails / Minitest, so the test case can be used as a service with Jenkins via web page interface later.
Pre-Request
Use Remote Webdriver in Selenium
How to do
Create a testWithEnvParam method in test_helper, it receives an instance of test case, parse given 'browsers' parameters to an array, make a driver with respect to each element of the array then call 'doTest' method of the given test with the driver.
For more information, please refer to the two files below.
Added / Updated Files
Added parameterized_with_env_test.rb
Modified test_helper.rb
References
How to pass parameters to MiniTest::Unit::TestCase suite?
How do I convert a String object into a Hash object?
Calling a Function From a String With the Function's Name in Ruby
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment