pex

How can I get PEX to auto-generate unit tests?

雨燕双飞 提交于 2019-12-05 20:14:18
How I can get PEX to auto-generate unit tests in Visual Studio 2013? I can auto-generate unit tests with PEX in visual studio 2010 and the menu was found by right clicking in the function body. We did not release a version for Visual Studio 2013. The good news is that you can now do that same auto-generation of unit tests in Visual Studio 2015 using the "Smart Unit Tests" feature. For Visual Studio 2013, they do provide PEX framework (lightweight version) named as CodeDigger. But CodeDigger is limited that it just generates a table of all the possible combinations of inputs and output. No

Can I use PEX with Visual Studio 2012?

浪子不回头ぞ 提交于 2019-12-05 11:12:58
I don't see any current information about the plans to make Pex work on Visual Studio 2012. I've tried to contact Microsoft, but I got no answer. So I decided to email Mary Jo Foley and here is what she got: Here’s your answer from a MS spokesperson on Visual Studio: “ We expect to have an update of Pex compatible with Visual Studio 2012/.NET 4.5 sometime in early 2013. An academic license would be first, a commercial license would come later. ” New Pex extension for Visual Studio 2012 Portable Libraries called Code Digger. Currently Code Digger only works with Portable Class Libraries and

While running PEX getting error

为君一笑 提交于 2019-12-04 16:54:07
First of all - awesome job on PEX !!! We are trying to do code explorations for one of our Office Add-In project. So, first of all let me ask yo this - Is this is feasible ? In other words can PEX help me with Add-In/VSTO projects ? Secondly, I trying to execute PEX on one of our Add-In methods and got the following error --- Description runtime context Microsoft.Pex.Engine.Libraries.MicrosoftVisualBasicLibrary+ProjectErrorRuntimeContextAttribute+Context failed to open runtime context Microsoft.Pex.Engine.Libraries.MicrosoftVisualBasicLibrary+ProjectErrorRuntimeContextAttribute+Context failed

Create NUnit test cases automatically from Pex

一个人想着一个人 提交于 2019-12-03 21:33:31
I need to create the NUnit Test case automatically from my .Net Solution file. Morover this needs to be done , from command line. I heard Pex create test cases automatically. Let know The following steps should get you there: Add a reference to Pex.NUnit.dll in your test project In your test project's AssemblyInfo.cs, add the attribute - [assembly: Pex.NUnit.PexNUnitPackage] Build your solution (either from Visual Studio or using msbuild from the command line) run Pex from the command line: pex.exe bin\Debug\TestProjectName.dll The tests are placed under reports\TestProjecName.#####.#####

workaround pex internal class

允我心安 提交于 2019-12-02 11:58:44
问题 Is there any way to make pex work when the classes under test are internal? how about sealed classes? I mean after all this type of tool is really good for API testing, you are likely to want to keep stuff at least internal sometimes. Thanks 回答1: Give the test assembly internal visibility through the InternalsVisibleToAttribute. Pex will then be able to 'see' internal types and test them. 来源: https://stackoverflow.com/questions/3167541/workaround-pex-internal-class

workaround pex internal class

孤者浪人 提交于 2019-12-02 03:36:53
Is there any way to make pex work when the classes under test are internal? how about sealed classes? I mean after all this type of tool is really good for API testing, you are likely to want to keep stuff at least internal sometimes. Thanks Peli Give the test assembly internal visibility through the InternalsVisibleToAttribute . Pex will then be able to 'see' internal types and test them. 来源: https://stackoverflow.com/questions/3167541/workaround-pex-internal-class

How Do You Configure Pex to Respect Code Contracts?

試著忘記壹切 提交于 2019-11-30 15:15:35
问题 Given the following example code, how can I configure Pex to respect my Code Contracts? public static IEnumerable<User> Administrators(this UserGroup userGroup) { Contract.Requires(userGroup != null); Contract.Requires(userGroup.UserList != null); return userGroup.UserList.Where(ul => ul.IsAdmin == true); } Current Problem: When I run Pex, it's still generating test cases which violate the specified code contracts. FYI: Here are the 'Code Contracts' settings in my csproj file. EDIT: Did

How to use PEX in Visual Studio 2012

房东的猫 提交于 2019-11-28 07:17:41
VS 2010 powertools installation helped to use PEX & Moles in VS 2010. Now with VS 2012, I understand that Moles becomes enriched as Fakes but hopefully PEX is retained, please confirm. Also, how to use PEX in 2012. What needs to be installed (like VS 2010 powertool) to get that working for 2012. Thanks !! As far as I know, they are waiting for a final version of Visual Studio 2012 to release a version of Pex compatible with it. I can't understand why Microsoft doesn't make this things clear... :/ Below are the comments from http://visualstudiogallery.msdn.microsoft.com/fb5badda-4ea3-4314-a723

C# - What does “\\0” equate to?

廉价感情. 提交于 2019-11-27 15:00:06
I am playing with Pex and one of the parameters it passes into my method is "\0" . What does that mean? My guess is an empty string ( "" ) based on the content of my method. However, if it is the same then why not just use "" instead of "\0" ? Anyone know what it is? '\0' is a " null character ". It's used to terminate strings in C and some portions of C++. Pex is doing a test to see how your code handles the null character, likely looking for the Poison Null Byte security exploit. Most C# code has nothing to fear; if you pass your string to unmanaged code, however, you may have problems. Edit

How to use PEX in Visual Studio 2012

╄→尐↘猪︶ㄣ 提交于 2019-11-27 01:47:16
问题 VS 2010 powertools installation helped to use PEX & Moles in VS 2010. Now with VS 2012, I understand that Moles becomes enriched as Fakes but hopefully PEX is retained, please confirm. Also, how to use PEX in 2012. What needs to be installed (like VS 2010 powertool) to get that working for 2012. Thanks !! 回答1: As far as I know, they are waiting for a final version of Visual Studio 2012 to release a version of Pex compatible with it. I can't understand why Microsoft doesn't make this things