在VS2017 / Mstest中运行并行测试 [英] Parallel Test running in VS2017/Mstest

查看:227
本文介绍了在VS2017 / Mstest中运行并行测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


Hey Guys, 

Hey Guys, 


最近遇到VS / MSTest问题并想知道是否有人有类似的问题。 

Ran into a problem recently with VS/MSTest and wondering if anyone has had a similar issue. 


我目前正在使用MSTest在c#中使用UI框架,过去几周我一直在实现selenium grid / Jenkins对于CI。 

I'm currently working on a UI framework in c# using MSTest and over the past few weeks I've been implementing selenium grid/Jenkins for CI. 


Seleni um网格有助于并行测试运行,但运行由MSTest完成。在过去的几周里,与VS一起运行的并行测试已停止工作。 

Selenium grid facilitates parallel test running but the running is done by MSTest. in the past few weeks parallel test running with VS has stopped working. 


没有对测试的结构或创建方式进行任何更改但是当多个驱动程序时实例已创建驱动程序A有效,直到创建驱动程序B,然后驱动程序B运行,而驱动程序A停止执行步骤。 

No changes have been made to how the tests are structured or created but when multiple driver instances are created Driver A works until Driver B is created then Driver B runs while Driver A stops executing steps. 


我开始认为这是一个bug使用WebDriver或MSTest本身,因为在没有任何代码更改的情况下工作停止工作的东西很奇怪。想知道是否有其他人有类似的问题。

I'm beginning to think it's a bug with WebDriver or MSTest itself as it's weird for something that was working to stop working without any code changes. Wondering if anyone else has had similar problems.


它已经为我工作了几个月而且我通过并行运行找到了一些问题所以很奇怪它有突然停止工作,没有任何变化。它最后一次工作大约2个月前。

It had been working for me for months and I had found some issues by running in parallel so it's strange that it has suddenly stopped working with no changes. It was last working around 2 months ago.


我尝试将解决方案中的每个静态方法/变量更改为不是静态的,因为我读过静态可能会导致问题但它没有帮助。 

I tried changing every static method/variable in the solution to not being static as I've read statics can cause problems but it didn't help. 


setup is 

使用Seleno的单元测试解决方案(Webdriver Nuget Package) 

在MSTest中使用单元测试编写的测试。  Page Object方法。

setup is 
Unit Test solution using Seleno (Webdriver Nuget Package) 
Tests written as unit tests using in MSTest. Page Object approach.


Driver:Chromedriver 2.33

Driver:Chromedriver 2.33


Chrome版本:   版本62.0.3202.75(官方版本)(64位)


使用解决方案中的.Testsettings文件启用并行测试运行 

Parallel test running enabled using a .Testsettings file in the solution 


与IE / IEDriverServer最新版本相同的事情让我觉得WebDriver可能是一个问题。 

same thing happening with latest version of IE/IEDriverServer which makes me think it may be WebDriver that is an issue. 



我们非常感谢任何帮助或想法。 

Any help or thoughts would be much appreciated. 


谢谢, 

Thanks, 



Graham

Graham

推荐答案

Hey Guys, 

Hey Guys, 

最近遇到VS / MSTest问题并想知道是否有人遇到类似的问题。 

Ran into a problem recently with VS/MSTest and wondering if anyone has had a similar issue. 

我目前正在使用MSTest在c#中使用UI框架过去几周我一直在实施selenium grid / Jenkins for CI。 

I'm currently working on a UI framework in c# using MSTest and over the past few weeks I've been implementing selenium grid/Jenkins for CI. 

Selenium网格促进了并行测试运行,但运行是由MSTest完成的。​​在过去的几周内并行测试运行VS已停止工作。 

Selenium grid facilitates parallel test running but the running is done by MSTest. in the past few weeks parallel test running with VS has stopped working. 

未对结构或创建测试的方式进行任何更改,但是在创建多个驱动程序实例时,驱动程序A一直有效,直到创建驱动程序B,然后驱动程序B当驱动程序A停止执行步骤时运行。 

No changes have been made to how the tests are structured or created but when multiple driver instances are created Driver A works until Driver B is created then Driver B runs while Driver A stops executing steps. 

我开始认为它是WebDriver或MSTest本身的一个错误,因为对于那些在没有任何代码更改的情况下停止工作的东西很奇怪想知道是否有其他人有过类似的问题s。

I'm beginning to think it's a bug with WebDriver or MSTest itself as it's weird for something that was working to stop working without any code changes. Wondering if anyone else has had similar problems.

它已经为我工作了好几个月而且我通过并行运行找到了一些问题所以奇怪的是它突然停止工作而没有任何变化。它是在2个月前的最后一次工作。

It had been working for me for months and I had found some issues by running in parallel so it's strange that it has suddenly stopped working with no changes. It was last working around 2 months ago.

我尝试将解决方案中的每个静态方法/变量更改为不是静态的,因为我读过静态可能会导致问题,但它没有帮助。 

I tried changing every static method/variable in the solution to not being static as I've read statics can cause problems but it didn't help. 

设置是 

使用Seleno的单元测试解决方案(Webdriver Nuget Package) 

作为单元测试编写的测试在MSTest中使用。 页面对象方法。

setup is 
Unit Test solution using Seleno (Webdriver Nuget Package) 
Tests written as unit tests using in MSTest. Page Object approach.

驱动程序:Chromedriver 2.33

Driver:Chromedriver 2.33

Chrome版本:   版本62.0.3202.75(官方版本)(64位)

Chrome version:  Version 62.0.3202.75 (Official Build) (64-bit)

使用解决方案中的.Testsettings文件启用并行测试运行 

Parallel test running enabled using a .Testsettings file in the solution 

最新版本的IE / IEDriverServer发生了同样的事情,这让我觉得它可能是WebDriver问题。 

same thing happening with latest version of IE/IEDriverServer which makes me think it may be WebDriver that is an issue. 

我们非常感谢任何帮助或想法。 

Any help or thoughts would be much appreciated. 

谢谢,  

Thanks, 

Graham


这篇关于在VS2017 / Mstest中运行并行测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆