> I don't know much about testing frameworks other than mustella, so I'm > mostly asking dumb questions. I don't have a fully-formed plan on how to > test all of this stuff, so I'm not saying you made the wrong decision. I'm > just curious. How do I test the AS Side? Does this mean I have two > versions of each test?
With this solution, you don't test the AS side (yet). Unless we write a meta-layer that is interpreted by both an AS functional testing framework (mustella?) and a JS functional testing framework (marmotinni?), there is no framework Google knows about that does functional testing on both AS and JS based on the same test data/file. > I was just looking at the compiler.jx.tests trying to figure out where to > add more tests. These seem like feature tests to me, do you agree? Yet we > are using Junit to run them. I haven't used FlexUnit but I assume it can do > unit and functional testing just like Junit. And we own the code so we can > make it do that if needed. Feature tests? If by that you mean functional tests, then no, I don't agree. The tests in compiler.jx.tests are unit tests that test if the output string from FalconJX matches the expected value, given a certain input. It in no way tests whether the input or the output actually DOES anything. I doesn't check if given the code for a click on a button, the code correctly fires an event that causes the text of a specified label to change to the correct value. That is functional testing, IMHO. > I do think I just want to write the "source" for a test once and then have > it run "everywhere". That would be ideal, and maybe we can use the format that mustella uses (MXML if I'm correct?) and make marmotinni use the same format, making if possible to use the same functional tests for both the AS (Flash Player) side and the JS (browser) side. > As I've been going through the compiler.jx.tests, it makes me want to > refactor those tests as well so they can be used to test Falcon's AS > handling too. The tests in 'org.apache.flex.compiler.internal.codegen.as' test exactly that. They test AS to AS compilation of most language features (some work needs to be done writing tests for the missing feature). All other ASJS test 'suites' (amd, goog, flexjs) subclass these tests and only override them where the expected output differs from that of the parent. It was set up this way to ensure that starting with testing all possible AS output, all the language features would also be tested in the subclasses, i.e. the various JS output formats. > At one point several years ago, Mike L and I discussed authoring FlexUnit > tests in MXML. I still like the idea as it more tightly controls the way > tests are authored. As I mentioned above, we might look into mustella's MXML formatted tests and see if we can leverage that in marmotinni. I don't think FlexUnit (being a unit testing framework) will be able to run functional tests in both the Flash Player and the various browsers... EdB -- Ix Multimedia Software Jan Luykenstraat 27 3521 VB Utrecht T. 06-51952295 I. www.ixsoftware.nl