Re: FlexJS Tests (was Re: [FlexJS] technical debt)

2017-07-07 Thread Josh Tynjala
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  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"  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=02%7C01%7C%
> 7C68cc4baa25b34232470408
> >d4c54c3ded%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%
> 7C636350378641405029
> >=auA9oG3sSGDFlZ0CC40PZ1LpX6pl9vaFjBWav7SWf34%3D=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=
> 02%7C01%7C%7C68cc
> >4baa25b34232470408d4c54c3ded%7Cfa7b1b5a7b34438794aed2c178de
> cee1%7C0%7C0%7C
> >636350378641405029=81tT4SQse5BRp2LtJGCybnwsZLEP9P
> 8wDl9zrYpoOYo%3D
> >served=0
> >
> >- Josh
> >
> >
> >
> >On Fri, Jul 7, 2017 at 3:16 AM, Harbs  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=02%
> 7C01%7C%7C68cc4baa25b3423
> >>2470408d4c54c3ded%7Cfa7b1b5a7b34438794aed2c178de
> cee1%7C0%7C0%7C6363503786
> >>41405029=gfStLT52BXyKlgefzw63jD0M71L6UJklCCPe0kW2yjw%3D=0
> >><
> >>
> >>https://na01.safelinks.protection.outlook.com/?url=
> https%3A%2F%2Fwww.npmj
> >>s.com%2Fpackage%2Fselenium-webdriver=02%7C01%7C%
> 7C68cc4baa25b3423247
> >>0408d4c54c3ded%7Cfa7b1b5a7b34438794aed2c178de
> cee1%7C0%7C0%7C6363503786414
> >>05029=gfStLT52BXyKlgefzw63jD0M71L6UJklCCPe0kW2yjw%3D=0>
> >>
> >> > On Jul 7, 2017, at 1:38 AM, Alex Harui 
> >>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=02%7C01
> >>%7C%7C68cc4baa25b34232470408d4c54c3ded%7Cfa7b1b5a7b34438794aed2c178de
> cee1
> >>%7C0%7C0%7C636350378641405029=pEFm3JIcipgNSvZMjSglS16g%
> 2BHyuZK%2FhY
> >>lFRG4lBwdA%3D=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"  wrote:
> >> >
> >> >> Where are the 

Re: FlexJS Tests (was Re: [FlexJS] technical debt)

2017-07-07 Thread Alex Harui
And you have a Core.swc in
/Users/harbs/Documents/ApacheFlex/flex-asjs/frameworks/libs?  What is in:

/Users/harbs/Documents/ApacheFlex/flex-asjs/frameworks/flex-config.xml


-Alex

On 7/7/17, 9:14 AM, "Harbs"  wrote:

>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apa
>che.org%2FGcuj=02%7C01%7C%7C0e3a53510ea840b2ee3908d4c55354c8%7Cfa7b1b
>5a7b34438794aed2c178decee1%7C0%7C0%7C636350409091821954=EHi%2Bx3XzTM
>ftQRdEIaYOeKtFCDQr1XU3JggHreKemUk%3D=0
>ache.org%2FGcuj=02%7C01%7C%7C0e3a53510ea840b2ee3908d4c55354c8%7Cfa7b1
>b5a7b34438794aed2c178decee1%7C0%7C0%7C636350409091831959=XjG7DH2jIQK
>v%2BI%2F2BIUhEIDjI4vZv2JD0a7zkZkg28s%3D=0>
>
>> On Jul 7, 2017, at 6:55 PM, Alex Harui  wrote:
>> 
>> What error did you get?
>> 
>> The Ant build on the CI server runs checkintests and it is passing
>>there.
>> 
>> The FlexJS Mustella uses Selenium for the JS run, but some manual
>> intervention is currently required.
>> 
>> -Alex
>> 
>> On 7/7/17, 3:16 AM, "Harbs"  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.
>>>np
>>> 
>>>mjs.com%2Fpackage%2Fselenium-webdriver=02%7C01%7C%7C5851203659274db
>>>5f
>>> 
>>>ae608d4c5214b2a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63635019419
>>>32
>>> 82017=k0RGXQMJAf5YMPo4Cvq%2BXXtn6ELAqhf4USYcj0qdLag%3D=0
>>> 
>>>>>mj
>>> 
>>>s.com%2Fpackage%2Fselenium-webdriver=02%7C01%7C%7C5851203659274db5f
>>>ae
>>> 
>>>608d4c5214b2a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363501941932
>>>82
>>> 017=k0RGXQMJAf5YMPo4Cvq%2BXXtn6ELAqhf4USYcj0qdLag%3D=0>
>>> 
 On Jul 7, 2017, at 1:38 AM, Alex Harui 
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=02%7C
01
 
%7C%7C5851203659274db5fae608d4c5214b2a%7Cfa7b1b5a7b34438794aed2c178dece
e1
 
%7C0%7C0%7C636350194193282017=0Pnb%2BdCvmgY9UVKOj4lELhkNa3VJBKnrg
OA
 WnOy2cvc%3D=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"  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 
>> wrote:
>> 
>> I have put in place a test infrastructure
> 
 
>>> 
>> 
>



Re: FlexJS Tests (was Re: [FlexJS] technical debt)

2017-07-07 Thread Harbs
https://paste.apache.org/Gcuj 

> On Jul 7, 2017, at 6:55 PM, Alex Harui  wrote:
> 
> What error did you get?
> 
> The Ant build on the CI server runs checkintests and it is passing there.
> 
> The FlexJS Mustella uses Selenium for the JS run, but some manual
> intervention is currently required.
> 
> -Alex
> 
> On 7/7/17, 3:16 AM, "Harbs"  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.np
>> mjs.com%2Fpackage%2Fselenium-webdriver=02%7C01%7C%7C5851203659274db5f
>> ae608d4c5214b2a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363501941932
>> 82017=k0RGXQMJAf5YMPo4Cvq%2BXXtn6ELAqhf4USYcj0qdLag%3D=0
>> > s.com%2Fpackage%2Fselenium-webdriver=02%7C01%7C%7C5851203659274db5fae
>> 608d4c5214b2a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636350194193282
>> 017=k0RGXQMJAf5YMPo4Cvq%2BXXtn6ELAqhf4USYcj0qdLag%3D=0>
>> 
>>> On Jul 7, 2017, at 1:38 AM, Alex Harui  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=02%7C01
>>> %7C%7C5851203659274db5fae608d4c5214b2a%7Cfa7b1b5a7b34438794aed2c178decee1
>>> %7C0%7C0%7C636350194193282017=0Pnb%2BdCvmgY9UVKOj4lELhkNa3VJBKnrgOA
>>> WnOy2cvc%3D=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"  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 
> wrote:
> 
> I have put in place a test infrastructure
 
>>> 
>> 
> 



Re: FlexJS Tests (was Re: [FlexJS] technical debt)

2017-07-07 Thread Alex Harui
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"  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=02%7C01%7C%7C68cc4baa25b34232470408
>d4c54c3ded%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636350378641405029
>=auA9oG3sSGDFlZ0CC40PZ1LpX6pl9vaFjBWav7SWf34%3D=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=02%7C01%7C%7C68cc
>4baa25b34232470408d4c54c3ded%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C
>636350378641405029=81tT4SQse5BRp2LtJGCybnwsZLEP9P8wDl9zrYpoOYo%3D
>served=0
>
>- Josh
>
>
>
>On Fri, Jul 7, 2017 at 3:16 AM, Harbs  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=02%7C01%7C%7C68cc4baa25b3423
>>2470408d4c54c3ded%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363503786
>>41405029=gfStLT52BXyKlgefzw63jD0M71L6UJklCCPe0kW2yjw%3D=0
>><
>> 
>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.npmj
>>s.com%2Fpackage%2Fselenium-webdriver=02%7C01%7C%7C68cc4baa25b3423247
>>0408d4c54c3ded%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363503786414
>>05029=gfStLT52BXyKlgefzw63jD0M71L6UJklCCPe0kW2yjw%3D=0>
>>
>> > On Jul 7, 2017, at 1:38 AM, Alex Harui 
>>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=02%7C01
>>%7C%7C68cc4baa25b34232470408d4c54c3ded%7Cfa7b1b5a7b34438794aed2c178decee1
>>%7C0%7C0%7C636350378641405029=pEFm3JIcipgNSvZMjSglS16g%2BHyuZK%2FhY
>>lFRG4lBwdA%3D=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"  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 
>> >>> wrote:
>> >>>
>> >>> I have put in place a test infrastructure
>> >>
>> >
>>
>>



Re: FlexJS Tests (was Re: [FlexJS] technical debt)

2017-07-07 Thread Alex Harui
What error did you get?

The Ant build on the CI server runs checkintests and it is passing there.

The FlexJS Mustella uses Selenium for the JS run, but some manual
intervention is currently required.

-Alex

On 7/7/17, 3:16 AM, "Harbs"  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.np
>mjs.com%2Fpackage%2Fselenium-webdriver=02%7C01%7C%7C5851203659274db5f
>ae608d4c5214b2a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363501941932
>82017=k0RGXQMJAf5YMPo4Cvq%2BXXtn6ELAqhf4USYcj0qdLag%3D=0
>s.com%2Fpackage%2Fselenium-webdriver=02%7C01%7C%7C5851203659274db5fae
>608d4c5214b2a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636350194193282
>017=k0RGXQMJAf5YMPo4Cvq%2BXXtn6ELAqhf4USYcj0qdLag%3D=0>
>
>> On Jul 7, 2017, at 1:38 AM, Alex Harui  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=02%7C01
>>%7C%7C5851203659274db5fae608d4c5214b2a%7Cfa7b1b5a7b34438794aed2c178decee1
>>%7C0%7C0%7C636350194193282017=0Pnb%2BdCvmgY9UVKOj4lELhkNa3VJBKnrgOA
>>WnOy2cvc%3D=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"  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 
 wrote:
 
 I have put in place a test infrastructure
>>> 
>> 
>



Re: FlexJS Tests (was Re: [FlexJS] technical debt)

2017-07-07 Thread Josh Tynjala
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://github.com/BowlerHatLLC/nextgenas-test

It supports [Test], [Before], and [After] metadata:

https://github.com/BowlerHatLLC/nextgenas-test/wiki/Metadata

- Josh



On Fri, Jul 7, 2017 at 3:16 AM, Harbs  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://www.npmjs.com/package/selenium-webdriver <
> https://www.npmjs.com/package/selenium-webdriver>
>
> > On Jul 7, 2017, at 1:38 AM, Alex Harui  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://cwiki.apache.org/confluence/display/FLEX/Mustella+Overview.  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"  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 
> >>> wrote:
> >>>
> >>> I have put in place a test infrastructure
> >>
> >
>
>


Re: FlexJS Tests (was Re: [FlexJS] technical debt)

2017-07-07 Thread Harbs
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://www.npmjs.com/package/selenium-webdriver 


> On Jul 7, 2017, at 1:38 AM, Alex Harui  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://cwiki.apache.org/confluence/display/FLEX/Mustella+Overview.  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"  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 
>>> wrote:
>>> 
>>> I have put in place a test infrastructure
>> 
> 



Re: FlexJS Tests (was Re: [FlexJS] technical debt)

2017-07-06 Thread justin
Hi,

What do people feel about setting a code and branch coverage on all checkins? 
Say 80% coverage of changes made?

Thanks,
Justin

Re: FlexJS Tests (was Re: [FlexJS] technical debt)

2017-07-06 Thread Justin Mclean
Hi,

BTW Sonar can give you useful test coverage statistics [1] and will even show 
line by line where a test is covered by tests [2] look at the red and green 
bars in the gutter.

Thanks,
Justin

1. 
https://builds.apache.org/analysis/component_measures/domain/Coverage?id=org.apache.flex.flexjs.compiler%3Aflexjs-compiler-parent
2. 
https://builds.apache.org/analysis/component_measures/metric/new_overall_line_coverage/list?id=org.apache.flex.flexjs.compiler%3Aflexjs-compiler-parent

Re: FlexJS Tests (was Re: [FlexJS] technical debt)

2017-07-06 Thread Alex Harui
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://cwiki.apache.org/confluence/display/FLEX/Mustella+Overview.  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"  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 
>>wrote:
>> 
>> I have put in place a test infrastructure
>