无法将新存根添加到现有的单元测试项目中

编程入门 行业动态 更新时间:2024-10-25 14:28:23
本文介绍了无法将新存根添加到现有的单元测试项目中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在VS中

In VS

1.使用其中一个公共方法的上下文菜单创建参数化单元测试 - 创建一个新项目

1.create a parameterized unit test by using the context menu on one of the public methods – a new project is created

2。右键单击要测试的项目并选择"创建参数化单元" - 对话框出现

2. right click the project under test and select ‘create a parameterized unit’ – dialog comes up

问题1:pex尝试创建一个新的单元测试项目,并且不重用已经构建的存根的现有单元测试项目

Problem 1: pex attempts to create a new unit testing project and does not reuse the existing one with the stubs already built

问题2:尝试重命名后取消按钮在对话框上不起作用输出项目到现有项目(需要点击x)

Problem 2:cancel button does not work on the dialog after you attempt to rename the output project to an existing project (need to click the x)

推荐答案

问题(1)目前是设计的,因为参数化单元测试生成器不支持增量生成测试。换句话说,我们会生成重复的参数化单元测试,这些测试最终会变得一团糟。 将来,我们将挖掘现有的测试套件并仅针对不具备该方法的方法生成参数化单元测试有任何PexMethod。这可能不会在下一个版本中发生。 The problem (1) is currently by design because the parameterized unit test generator does not support incremental generation of tests yet. In other words, we would generate duplicate parameterized unit tests which would end up in a mess.In the future, we will mine the existing test suite and generate parameterized unit tests only for the method that do not have any PexMethod. This will probably not happen by the next release.

更多推荐

无法将新存根添加到现有的单元测试项目中

本文发布于:2023-11-14 11:31:28,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1587099.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:存根   单元测试   项目

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!