This project has moved and is read-only. For the latest updates, please go here.

<Tests>Parameter count mismatch.</Tests>


I am testing this tool for the first time and I am having trouble saving a Configuration file from the UI tool.

I created a new config, called it TestNameTopLeft (in the top left text box with label 'Test Name')
I added two new tests of type FileExistsTest

In the right hand panel for configuring test details (again including a field 'TestName'..?) , I create;

myTestToPass, configured to pass (the file is present at the expected location)

When I run the test in the UI, it passes as one would hope.

The issue is when I try to SaveAs, my config. I give it a name, myTest.xml in the dialogue, but the resultant xml contains:

<Name>TestNameTopLeft</Name><Description></Description><Tests>Parameter count mismatch.</Tests>

I checked out the source code and ran in debug and found that in method _configurationTestSuite.ToXmlString(), the obj.Serialize() method throws an error. On the way in, obj seems fully populated, except FileName null and Description which is "". Obj subsequently evaluates as NullOrEmpty.

The error caught on obj.Serialize() is here;

Unable to generate a temporary class (result=1).
error CS0019: Operator '!=' cannot be applied to operands of type 'string' and 'bool'

Deeper in, it seems to bail at;

serializerCache[typeof (T)].Serialize(stringWriter, obj);

I can't say I follow this - out of my depth

private static readonly ICacheList<Type, XmlSerializer> serializerCache =
        new CacheList<Type, XmlSerializer>(t => new XmlSerializer(t, extraTypesCache[t.Assembly]));


stephenhaunts wrote Sep 23, 2014 at 8:37 AM

hmm interesting. I have not seen it do that before when saving and I use the tool quite heavily.

I will check out your steps to reproduce and see if I can see what's happening.