You are going to need to look at some of the CI ant examples. First, you need to be using the AIRCIListener, which both knows how to send results back to be written and second how to close the application when it was done.
However, this code by itself can not write the results. Our ant tasks also launch a small piece of Java code which listens for those results and writes them to the file system. You will need to make that work as well.
Hi Mike, thanks a lot for your answer. I was looking at the CI examples but I think I still don't understand how to get it to work with the AirCIListener. My main looks like this:
var core : FlexUnitCore = new FlexUnitCore();
Its just like in the examples, but flexunit still won't close and still won't write anything to disk. From your answer, if I understand correctly for the tests to run and have output written to disk I would have to have 2 executables running at the same time, one of them being my tests with flexunit and the other one being an executable that I must write myself in my language of choice which will listen on a specific port for the results which will be sent from the flexunit. My second executable will then get those results and write them down?
Your init looks fine and is correct.
However, yes, it requires another executable. The AIRCIListener sends information over a socket to a waiting executable that receives and writes those results to the disk. We have one written for you in Java already, should you want to use it. If you would like to take a look, here is the code:
Although it is part of out 'ant' package of tools, it is just Java code:
Since you are using AIR. If you wanted to, the other thing you could do is copy the AIRCIListener, and instead of having it send over the file system, you could use the AIR File API to write it directly to disk.
These tools were developed to work with Flash Player or AIR and Flash Player does not have that ability.
Take a look at: