Pex Not generating test case for PexArguments event with TestEmissionFilter set to all RRS feed

  • Question

  • I have a pex test with a method signature that looks like this:

    [PexMethod(MaxRuns = 200, TestEmissionFilter=PexTestEmissionFilter.All)]
    		[PexArguments("B", typeof(double), null)]
    		[PexArguments("J", typeof(Brush), null)]
    		[PexArguments("A", typeof(string), "!")]		
    		public void MyConverterTest(
    			object value,
    			Type targetType,
    			string parameter)

    When I run the pex exploration it finds 29 cases and shows me 100% coverage on it's dynamic code generation monitor.

    BUT when I run the tests it generates there are only 26(the three it's not generating are the three I gave arguments for), AND that leaves the tests when I run them at only 90% code coverage.  The code those tests aren't reaching would be reached with the arguments I passed in.

    If pex shows me 100% coverage in it's coverage monitor it needs to be sure to generate tests that give me 100% coverage.  I've searched these forums, the PexManual, pexConcepts, and PexTutorial documents and can't find a solution to this.  I did find the TestEmissionFilter property, but that didn't do anything except give me 3 more tests that don't increase code coverage at all.

    Please help.

    Wednesday, April 20, 2011 10:28 PM