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
4
votes
0 answers

Why would running Pex Explorations result in ignoring a previously Pex-generated test method?

Code being tested: public class TestReader { public string Content { get; private set; } public void LoadFile(string fileName) { var content = FileSystem.ReadAllText(fileName); if (!content.StartsWith("test")) …
Jesslyn
  • 696
  • 10
  • 25
4
votes
1 answer

Pex and Moles For Commerical Purposes?

Can Pex & Moles be used for Commercial Purposes. If not, anyone has idea about when it will be for Commercial purpose. I would like to know is it worth spending effort in a real business situation. Thanks Senthil Gandhi
4
votes
4 answers

Is Pex and Moles project still active?

They used to release a two new versions a month but since October 2010 they haven't released a new one. I've found this. But the fact they have closed its support forum on MSDN makes me suspect the project is not going forward. We are using it for…
Hero
  • 1,423
  • 1
  • 10
  • 9
4
votes
1 answer

Can Tests be written in 3.5 MsTest Unit Test assemblies?

Hi: I've enjoyed playing around with Pex and Moles...now it's time to use it in earnest to cover an legacy app as much as possible. We've started by converted to .NET 3.5 (the client can't yet host in .NET 4.0) We noticed that we are having trouble…
Ciel
  • 41
  • 2
4
votes
2 answers

Do Pex and Moq work together nicley?

Has anyone tried this? I like moq and i like what pex is doing, but haven't tried them together. I'd prefer to use moq over moles in most cases I think but am curious to see if anyone has hit roadblocks? Do they play nice?
John Nicholas
  • 4,778
  • 4
  • 31
  • 50
4
votes
1 answer

Intellitest/Pex is attempting to create IEqualityComparers for private readonly Dictionary field in object

I created an empty class library project containing only this class. public class DictionaryDemo { private readonly Dictionary dictionary = new Dictionary(); public void Add(string key, int value) { …
Sam
  • 410
  • 2
  • 10
4
votes
1 answer

Package python script with pandas using PEX

I have a simple python script that depends on pandas. I need to package it with pex so it's executed without dependency installation. import sys import csv import argparse import pandas as pd class myLogic(): def __init__(self): pass…
Mohamed Ali JAMAOUI
  • 14,275
  • 14
  • 73
  • 117
4
votes
2 answers

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

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.
Niraj Trivedi
  • 2,370
  • 22
  • 24
4
votes
2 answers

How to use PEX with NUnit tests in VS 2010?

I am aware that the current release of PEX allows use with the NUnit framework. The thing is I can't configure it to use the NUnit framework. In the Options -> PEX: What Exactly do i have to put in the "TestFramework" and "TestFrameworkDirectory". I…
Tiago Veloso
  • 8,513
  • 17
  • 64
  • 85
3
votes
3 answers

Can't access information from configuration files when tests have host type "Moles"

We are having problems accessing information in .net configuration files (such as app.config and web.config) via unit tests when the unit tests have a host type of "Moles". It's causing quite a few headaches, so I hope someone has an idea on what…
Nicholas Hill
  • 306
  • 2
  • 18
3
votes
1 answer

Pex & Moles - Dependencey Injection

I'm new to Pex and Moles. I am trying to run Pex on my code but I am using Constructor injection. Is there a way of instructing Pex on how to inject the constructors? Edit public UserLogic(IUserRepository userRepository) { …
ministrymason
  • 1,783
  • 2
  • 20
  • 33
3
votes
1 answer

Running Unit Test with Microsoft Moles Host under Visual Studio 2010 Remote Test Agent in TFS Build

We would like to have our TFS automated CI build and test process use a remote test agent to run our tests separate from our build agent. On normal unit tests that do not use moles or moles host, we have no problems. However, when we include a moles…
John Dahle
  • 244
  • 1
  • 6
3
votes
0 answers

Pex error during the team build ( TFS 2010 Build )

We have been using pex and moles for unitest with TFS2010. Lately the pex and moles started to crash randomly during the test run. We couldn't reproduce this error on developer machine. Crash only happen on Team build servers. We are using version…
3
votes
1 answer

Why do I get indexoutofboundsexception when iterating PropertyInfo using pex?

I have the following method: public static T Deserialize(vRS rs) where T : class, new() { T o = new T(); Type tp = typeof(T); foreach (PropertyInfo pi in tp.GetProperties()) { string name = getBlParameterName(pi); Type…
3
votes
0 answers

The process cannot access the file because it is being used by another process

I ask this Question because it is Moles specific. Running VS2010 on Windows 7 64bit the VsHost of moles stays in the task manager, causing this message: Unable to copy file The process cannot access the file because it is being used by another…
user799821
  • 218
  • 2
  • 10
1 2
3
14 15