pex-and-moles developed by Microsoft research team. Pex being an exploration tool explores and provides random inputs to the method in test to go in every branch of that code. Moles being an isolation framework isolates the code to be tested from all dependencies.
Questions tagged [pex-and-moles]
85 questions
0
votes
1 answer
Cant find Moles after installation
I've installed Pex & moles and was trying to follow the tutorial
but couldnt add a new items --> moles to the test project for some reason
cant find the file type there
i've tried to reinstall it few times unsuccessfully...
what can i do ?
thanks…

danfromisrael
- 2,982
- 3
- 30
- 40
0
votes
2 answers
Moling a type, keeping the original behaviour of a specific method
I'm using Microsoft Moles and am curious on the following topic:
Is there any way to set the behaviour
of a type (eg. to unimplemented) but
keep the original behaviour of a
single specific method?
My intention is to completely isolate the method…

Bernhard Hagmann
- 71
- 2
- 9
0
votes
1 answer
Why would an assert on a unit test with HostType("Moles") pass when run individually, but fail when run with a group of tests?
I recently got aboard the Pex & Moles bandwagon in order to test some logic with many elements that are static, non-virtual, sealed, etc. Recently, I've begun to see behavior I can't explain from a few of the tests.
A couple of the methods for an…

Scott Lawrence
- 6,993
- 12
- 46
- 64
0
votes
2 answers
Issues debugging Moles
I’m using visual studio 2008 and moles version 0.93. Everything works well except when I try to debug any test that uses a Moled type. The test skips all my breakpoints. And I get the following message in the output window:
Unable to attach. Check…

dalcantara
- 1,613
- 2
- 21
- 35
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
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
1 answer
TFS Build is failing while running Moles
My TFS 2010 Build is failing due to Moles framework. Its unable to generate sharepoint.moles assembly. Currently I am having Visual studio premium installed and Moles 64 bit on the Build server. Please note that this is a sharepoint 2010 project so…

user3225199
- 1
- 1
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
0
votes
1 answer
visual studio 2010 "surround with" hijacked by "pex and moles"
After I installed "Pex and Moles", used for automated testing, my "Surround with" (ctrl + k, s) in Visual Studio 2010 has been "hijacked" by the new add on.
This means I can only choose to insert a "PexClass for MSTest", which is kind of annoying…

mhgregersen
- 3
- 1
0
votes
1 answer
Many errors when "Add Moles Assembly for mscorlib"
I want to de-tour some method calls into the mscorlib assembly, so I tried to generate a Mole assembly for mscorlib. But it gives me thousands of errors.
I am using Win8+VS2010, VS2012 is installed on my box, too.
What I did is:
Step 0: Create an…

smwikipedia
- 61,609
- 92
- 309
- 482