Questions tagged [pex]

Microsoft Pex is a Visual Studio add-in that generates automated white-box tests for .NET Framework applications.

Microsoft Pex is a Visual Studio add-in that generates automated white-box tests for .NET Framework applications. Integrating into the Visual Studio code editor, Pex finds interesting input-output values of your methods, which you can save as a small test suite with high code coverage.

225 questions
0
votes
1 answer

PexObserve only records 255 characters

I am using Pex from the command line to find input values for test case generation. I use PexObserve to record certain values during execution. One of the values that I want to record is an XML-String. However, when parsing the XML I receive…
stklik
  • 834
  • 1
  • 8
  • 19
0
votes
1 answer

PEX: How would you test an equality method in pex?

So i'm here playing with PEX, it seems like a great idea. However I am having a few problems, such as I have no way to test an equals method using parameter unit tests. Maybe there is no way, maybe its a technique i haven't figured out yet. Someone…
John Nicholas
  • 4,778
  • 4
  • 31
  • 50
0
votes
1 answer

IntelliTest does not use PexArguments

I am trying to force IntelliTest to try specific parameters with the following code: [PexClass] public class Program { [PexMethod] [PexArguments((short)1234, "G", Alternate = true)] public string Format(short val, string format) { …
Rok
  • 451
  • 3
  • 21
0
votes
1 answer

Measuring test generation time in Pex

I would like to measure the time that Pex takes in generating unit tests for a specific C# function. How I can get such information?
Emma
  • 1
  • 1
0
votes
1 answer

Pex reuses values

I am using Pex to generate test cases. I have a function that looks similar to the one below: public void function(List list, List> listOfLists){ // do something with the lists (add values, remove them, ...) } However, I…
stklik
  • 834
  • 1
  • 8
  • 19
0
votes
1 answer

How do I inject assertion/assumptions in code under test?

For my research I am using Intellitest on Visual Studio 2015 Enterprise. I read that it is possible to add assumptions and assertions to the parametrized unit test that Intellitest generates. Unfortunately I also need to add assumptions and…
Pietro Braione
  • 1,123
  • 8
  • 22
0
votes
1 answer

Compatibility issue between VS2010, Pex, and SlimDX

I have downloaded June bits of Pex and June bits of SlimDX SDK. Installed them on my RTM VS2010 Premium. Pex explorations do not work. Reverting to Feb 2010 bits of SlimDX seem to cure the problem. I've asked the same question on Microsoft Forums…
GregC
  • 7,737
  • 2
  • 53
  • 67
0
votes
1 answer

Pex ignores default parameter assignment

I am using Pex to analyse function executions. However, I noticed that default parameters are not looked at. Here's an example of what I mean: public int bla(int x = 2) { return x * 2; } When I run Pex, it generates the test case for int result…
stklik
  • 834
  • 1
  • 8
  • 19
0
votes
0 answers

pants build store git metadata inside pex

is there a way to create a git metadata like (git commit #, branch , tag etc.,) in the pex file generated with Pants build ? if not , is there a way to hook into the goal of the pants build, so that i can generate the file which will then be…
Kamal
  • 325
  • 1
  • 3
  • 9
0
votes
1 answer

Pex Generated Tests Encoded UCS-2 Little Endian, Why, how to change?

HI there i noticed that when I generate a pex test solution the default encoding of the files is UCS-2 Little Endian, this is not really cool, because all the rest of the files are normally encoded with Windows ANSI (I m getting this info from…
roundcrisis
  • 17,276
  • 14
  • 60
  • 92
0
votes
1 answer

PEX executable VS 2015 RC

Is there a command line or API method to run explorations and generate tests for PEX in VS 2015? The docs for the previous version refer to a command line mode via pex.exe. There is a Microsoft.pex.exe that is installed with VS 2015 RC but when…
Simon Hardman
  • 476
  • 4
  • 14
0
votes
1 answer

Convert the Pex TestMethods of VS 2010 to the VS2013 with Microsoft Fakes

I am trying to convert the below pex testmethod to a normal unit test. Though I am planning to use Microsoft Fakes where it is required, I want to understand few things first. [TestMethod] [PexGeneratedBy(typeof(ErrorLogTest))] public void…
krrishna
  • 2,050
  • 4
  • 47
  • 101
0
votes
1 answer

Pex ignores [PexAssumeNotNull] and PexAssume.AreElementsNotNull()

I have the following PexMethod: [PexMethod] public bool fwAlertConfig_objectConfigExists( [PexAssumeUnderTest]WinCC target, [PexAssumeNotNull] List alertConfigObject, [PexAssumeNotNull] ref int configType, [PexAssumeNotNull]…
stklik
  • 834
  • 1
  • 8
  • 19
0
votes
1 answer

Can Moles be used to create a sealed class?

I am trying to mock my Linq To SQL classes. I have the following code: IQueryable vUser = (from aUser in _ctx.Users where aUser.UserName == userName select aUser); Clearly while doing a unit test _ctx.Users is null. I can…
Vaccano
  • 78,325
  • 149
  • 468
  • 850
0
votes
1 answer

Moles crashing when unit test debugging is being stopped

I'm using Pex and Moles Power Tools 0.94.51023.0 64-bit (en_visual_studio_2010_pex_0.94.51023.0_power_tools_x64_598803.exe) in Visual Studio 2010 SP1 (Windows 7 Enterprise 64-bit, all updates installed via Windows Update). Project is .NET 2.0,…
Jaded
  • 1,802
  • 6
  • 25
  • 38
1 2 3
14
15