'无法打开到127.0.0.1:7058&#39的TCP连接;在并行模式下运行selenium / capybara测试时(使用8个线程)

时间:2016-12-14 06:51:00

标签: multithreading firefox jenkins selenium-webdriver capybara

我们在Jenkins上使用8个线程以并行模式运行cukes但是由于跟随错误,大多数cukes都失败了。

错误:(连接被拒绝 - 连接(2)for" 127.0.0.1"端口7058)(Errno :: ECONNREFUSED) ./features/support/hooks.rb:3:in在之前'

参数

;WITH data
     AS (SELECT [set],
                superset,
                cs.Item,
                cs.ItemNumber
         FROM   (VALUES ('a,t,h', 'a,b,c,d,e,f' ),
                        ('a,h','a,b,c,d,e' )) tc ([set], superset)
                CROSS apply [Delimitedsplit8k]([set], ',') cs),
     cte
     AS (SELECT [set],
                superset,
                Item,
                Replace(',' + superset, + ',' + Item, '') AS result,
                ItemNumber
         FROM   data
         WHERE  ItemNumber = 1
         UNION ALL
         SELECT 
                d.[set],
                d.superset,
                d.Item,
                CASE
                  WHEN LEFT(Replace(',' + result, ',' + d.Item, ''), 1) = ',' THEN Stuff(Replace(',' + result, ',' + d.Item, ''), 1, 1, '')
                  ELSE Replace(',' + result, ',' + d.Item, '')
                END,
                d.ItemNumber
         FROM   cte c
                JOIN data d
                  ON c.superset = d.superset
                     AND d.ItemNumber = c.ItemNumber + 1)
SELECT TOP 1 WITH ties [set],superset,
                      (len(superset) -  len(Isnull(Stuff(result, 1, 1, ''), '')))/2 as Existing_in_set,
                      len(replace([set],',','')) -  ((len(superset) -  len(Isnull(Stuff(result, 1, 1, ''), '')))/2) as New
FROM   cte
ORDER  BY Row_number()OVER(partition BY superset ORDER BY ItemNumber DESC) 

hooks.rb

OS: Linux
Selenium : gem selenium-webdriver', '~> 2.53.4'
Capybara: gem 'capybara', '>= 2.10.0'
Browser: Firefox version 45.5.0

env.rb

1.Before do |scenario|
2.Capybara.reset_sessions!
3.  page.driver.browser.manage.window.maximize
4.  page.driver.browser.manage.delete_all_cookies
5.end

此致 阿贾伊

欢迎任何提议 提前感谢您的时间。

0 个答案:

没有答案