I'm attempting to get my unit tests setup to run automatically with my Ant build and take one path or the other if they fail or not. I used the SampleCIProject as an example and got it to run just fine. However, when I recreate the structure in my project I am getting some weird behavior that I have wasted a lot of time trying to figure out. When I duplicate the SampleTest.as class my Ant build runs as expected. However if I throw an [Ignore] tag above the first test I get the java exception telling me it is expecting a number and getting "NaN'. It seems to be hit or miss depending on where I put the [Ignore] lines and the resulting exception. Also I find that if I put in only one test and [Ignore] it, when FlexUnit task executes and the TestRunner.swf pops up it stays up and hangs the process. It does not shut down automatically. Upon closing the swf the process does nto complete, just sits there in this hung state.
I'm not creating my own TestRunner.mxml as it seems to be automatically created. I did try creating my own but I notice that the resulting TestRunner.mxml in the dist folder is the one that is automatically generated vs the one I created.
I'm using the 4.1.0-beta2.19-sdk18.104.22.16883 build if that helps. Does anyone have any idea what's going on? If not, does anyone know how I can set myself up to debug the ant task and FlexUnit code so I can try to find out what's going on? I can't seem to even find if/where the java exception being thrown has a full stack trace sent to a log somewhere.
Please check how many test with the [Ignore] meta-tag do you have.
Some times this cause the RTE. Please run the ant without this meta-tag on the classes to confirm.
This sounds like an error in the CIListener to me. I will need to confirm, but the quick guess is that the Ignore is probably trying to output the time since the last test execution. Since it is the first one causing the problem, my guess is that the variable holding the time has not been initialized and is null. I am guessing the code concatenates that into some weird mess and probably sends it over to Java, which freaks out trying to interpret it into a number.
I won't be able to check for an hour or two, but if you want to verify yourself, I would look in the CIListener and look for ramifications of the testIgnored() method being called before whatever variable holds the time is initialized.
Another quick and dirty way to test would be to change the CIListener. It has a method, something like testTimeStr() which returns the time represented as a string. Just make it always return '0' and see if the problem goes away.