本文介绍了无法使用selenium Web驱动程序将测试用例与来自单元测试项目的测试方法相关联的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我们使用 使用  我可以从visual studio执行测试 测试>测试探索>选择测试并单击运行。 我无法 将测试用例与单元测试项目中的测试方法相关联   这些是在单元测试项目中开发的。 我们正在使用 Visual Studio 2017专业版,我们可以在禁用模式下看到选项 '与测试用户关联'(测试>测试浏览>右击任何  单位测试方法  > 与测试用例相关联 )。 请建议关联测试用例的解决方案。 thanks  Satish 决方案 Hi Satish, 欢迎来到MSDN论坛。 我测试你的问题使用Visual Studio Professional 2017版本15.5.7,我可以在你身边重复你的问题。 请删除项目 参考文献下的以下程序集。 Microsoft.VisualStudio.TestPlatform.TestFramework Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions 然后,添加" Microsoft.VisualStudio.QualityTools.UnitTestFramework "程序集,重建解决方案。 在上述方法之后,选项"与测试用例相关联"将突出显示。 有人提交了反馈,你可以看看。 https ://developercommunity.visualstudio.com/content/problem/80374/cant-associate-net-framework-unit-test-to-test-cas.html 问候, JudyzhHi ,We are usingUnit test project for UI automation using I can execute test from visual studioTest >Test Explore > Select the Test and Click on Run.I am not able toAssociate the Test case to the Test method From Unit Test Project which were developed in Unit Test project.We are usingVisual Studio 2017 Professional version in this we are able to see the option‘Associate to Test case’ in disable mode ( Test > Test Explore > Right click on any unit Test method  > Associate to Test case).Please suggest the solution for associating the Test cases.thanks Satish 解决方案 Hi Satish,Welcome to the MSDN forum.I test your issue use Visual Studio Professional 2017 version 15.5.7, I can repro your issue in my side.Please remove following assemblies under projectReferences.Microsoft.VisualStudio.TestPlatform.TestFrameworkMicrosoft.VisualStudio.TestPlatform.TestFramework.ExtensionsThen, add "Microsoft.VisualStudio.QualityTools.UnitTestFramework" assembly, rebuild the solution.After above method, the option "Associate to Test Case" is display highlighting.Someone has submitted a feedback, you could take a look.https://developercommunity.visualstudio.com/content/problem/80374/cant-associate-net-framework-unit-test-to-test-cas.htmlRegards,Judyzh 这篇关于无法使用selenium Web驱动程序将测试用例与来自单元测试项目的测试方法相关联的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-13 11:53