The TraceListener in the example code listens for events from the TestRunner and prints to the console. Those same events could be used to collect failures and do anything you want with them.
- Josh On Fri, Jul 7, 2017 at 8:59 AM, Alex Harui <aha...@adobe.com.invalid> wrote: > Hi Josh, > > That could be good. I took a quick look and didn't understand how it > reports errors that can be collected and reported. How does that work? > Would it interface with Selenium? > > Thanks, > -Alex > > On 7/7/17, 8:23 AM, "Josh Tynjala" <joshtynj...@gmail.com> wrote: > > >I wrote a simple test runner similar to FlexUnit for some of my projects. > >I'm happy to donate this code to FlexJS or FlexUnit if it can help > >bootstrap the testing efforts. > > > >https://na01.safelinks.protection.outlook.com/?url= > https%3A%2F%2Fgithub.co > >m%2FBowlerHatLLC%2Fnextgenas-test&data=02%7C01%7C% > 7C68cc4baa25b34232470408 > >d4c54c3ded%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0% > 7C636350378641405029 > >&sdata=auA9oG3sSGDFlZ0CC40PZ1LpX6pl9vaFjBWav7SWf34%3D&reserved=0 > > > >It supports [Test], [Before], and [After] metadata: > > > >https://na01.safelinks.protection.outlook.com/?url= > https%3A%2F%2Fgithub.co > >m%2FBowlerHatLLC%2Fnextgenas-test%2Fwiki%2FMetadata&data= > 02%7C01%7C%7C68cc > >4baa25b34232470408d4c54c3ded%7Cfa7b1b5a7b34438794aed2c178de > cee1%7C0%7C0%7C > >636350378641405029&sdata=81tT4SQse5BRp2LtJGCybnwsZLEP9P > 8wDl9zrYpoOYo%3D&re > >served=0 > > > >- Josh > > > > > > > >On Fri, Jul 7, 2017 at 3:16 AM, Harbs <harbs.li...@gmail.com> wrote: > > > >> The checkintests target currently fails. I’m guessing the build file was > >> not updated for dual. > >> > >> Selenium has a JS API[1]. It seems like we should be able to write tests > >> in MXML and AS and then use Node.js to run the results. I’m not sure how > >> easy it would be to generalize tests so that the same tests could be > >>run in > >> both Flash and Selenium. It should be an interesting project to try. > >> > >> We should probably add FlexUnit tests even if they only run in SWF. I > >>will > >> make an attempt to do so myself. It seems like it should be possible to > >>run > >> the FlexUnit tests in JS using one of the JS unit testing frameworks or > >> even rolling our own JS implementation. I don’t think the way it’s run > >>is > >> important, but it would be a very good idea to allow FlexUnit to run in > >>JS > >> unmodified. > >> > >> I never quite “got” how the meta tags in FlexUnit actually work. > >> > >> > >>[1]https://na01.safelinks.protection.outlook.com/?url= > https%3A%2F%2Fwww.n > >>pmjs.com%2Fpackage%2Fselenium-webdriver&data=02% > 7C01%7C%7C68cc4baa25b3423 > >>2470408d4c54c3ded%7Cfa7b1b5a7b34438794aed2c178de > cee1%7C0%7C0%7C6363503786 > >>41405029&sdata=gfStLT52BXyKlgefzw63jD0M71L6UJklCCPe0kW2yjw%3D&reserved=0 > >>< > >> > >>https://na01.safelinks.protection.outlook.com/?url= > https%3A%2F%2Fwww.npmj > >>s.com%2Fpackage%2Fselenium-webdriver&data=02%7C01%7C% > 7C68cc4baa25b3423247 > >>0408d4c54c3ded%7Cfa7b1b5a7b34438794aed2c178de > cee1%7C0%7C0%7C6363503786414 > >>05029&sdata=gfStLT52BXyKlgefzw63jD0M71L6UJklCCPe0kW2yjw%3D&reserved=0> > >> > >> > On Jul 7, 2017, at 1:38 AM, Alex Harui <aha...@adobe.com.INVALID> > >>wrote: > >> > > >> > I have a subset of Mustella working on both platforms in the > >>BasicTests > >> > that run from the checkintests target in the Ant build. There is a > >> > writeup on Mustella in the wiki > >> > > >>https://na01.safelinks.protection.outlook.com/?url= > https%3A%2F%2Fcwiki.ap > >>ache.org%2Fconfluence%2Fdisplay%2FFLEX%2FMustella% > 2BOverview&data=02%7C01 > >>%7C%7C68cc4baa25b34232470408d4c54c3ded%7Cfa7b1b5a7b34438794aed2c178de > cee1 > >>%7C0%7C0%7C636350378641405029&sdata=pEFm3JIcipgNSvZMjSglS16g% > 2BHyuZK%2FhY > >>lFRG4lBwdA%3D&reserved=0. I > >> > haven't gone through it to see how much does or doesn't apply to > >>FlexJS. > >> > The BasicTests are in the flex-asjs repo in > >>mustella/tests/basicTests. I > >> > basically copied the Flex SDK's BasicTests and modified it a bit to > >>run > >> in > >> > FlexJS and commented out most tests because back when I did it, we > >>didn't > >> > have many components. It might be interesting to comment more tests > >>back > >> > in and see if they run. > >> > > >> > There are some FlexUnit tests that run as part of the Core.swc Ant > >>build, > >> > but only on SWF. > >> > > >> > The Maven build runs some Selenium tests that I think are written in > >> Java, > >> > and I think only test JS output. > >> > > >> > I haven't invested much time in test infrastructure or test creation > >> since > >> > there were some strong opinions about not liking Mustella and some > >> > thoughts about how to make FlexUnit run on both platforms. > >> > > >> > My personal preference is that tests should be written in MXML and/or > >>AS > >> > and run on both platforms. Bonus points if existing tests can be run > >> > unmodified or mostly unmodified. > >> > > >> > -Alex > >> > > >> > On 7/6/17, 2:02 PM, "Harbs" <harbs.li...@gmail.com> wrote: > >> > > >> >> Where are the instructions on how to use it? If I know how to write > >> >> tests, I’d be much better about doing so… > >> >> > >> >>> On Jul 6, 2017, at 11:53 PM, Alex Harui <aha...@adobe.com.INVALID> > >> >>> wrote: > >> >>> > >> >>> I have put in place a test infrastructure > >> >> > >> > > >> > >> > >