Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
多次运行ruby(类)_Ruby_Minitest - Fatal编程技术网

多次运行ruby(类)

多次运行ruby(类),ruby,minitest,Ruby,Minitest,我正在尝试为我需要的每个驱动程序在sauce labs上运行minitest套件 我有一个类,看起来像: class test_suite class test < MiniTest::Test def setup setup stuff end #test suite def test_1 end def test_2 end def teardown end end end 还有一

我正在尝试为我需要的每个驱动程序在sauce labs上运行minitest套件

我有一个类,看起来像:

class test_suite
    class test < MiniTest::Test

    def setup
        setup stuff
    end

    #test suite
    def test_1
    end
    def test_2
    end

    def teardown
    end
 end
end
还有一个看起来很像的firefox驱动程序。我希望运行测试并调用测试类两次,以便运行看起来像这样(不是实际的输出):


总而言之。我想为我为测试而创建的每个selenium/sauce驱动程序运行一次测试集,而无需在运行之间手动更改驱动程序。

为什么不并行运行它们,以便您可以独立运行每个驱动程序测试,而无需考虑是否已运行另一个驱动程序测试?可能使用类似的方法。

我确实尝试过使用并行测试。很抱歉,我一整天都在尝试错误和谷歌搜索,现在我的脑子都乱七八糟了。我一定做错了什么。我需要使用基于rake的测试套件吗?有没有一种方法可以将此连接到minitest中?我尝试过minitest中提供的并行化选项,但我了解到某些Ruby解释器不允许它。我今天用谷歌搜索了我的大脑,明天我会再尝试一次,但是如果你有更多的信息或例子,你可以把我链接到那里,我将不胜感激。
CHROME45 = Selenium::WebDriver::Remote::Capabilities.chrome
CHROME45['version'] = "45.0"
CHROME45['platform'] = 'Windows 7'
person:tests$ ruby Test_Runner.rb "test.rb" 
Started with run options --seed 22245

ChromeDriver
Test_Suite::Test
test1..etc                                          PASS     (16.44s)

FireFoxDriver
Test_Suite::Test
test1..etc                                         PASS     (16.44s)

Finished in 16.44553s
2 tests, 6 assertions, 0 failures, 0 errors, 0 skips