You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by piotrz <pi...@gmail.com> on 2014/05/03 14:20:59 UTC

Re: Unit tests in TLF

I have managed to build unit tests applications for TLF using ant. 
The result of this build is Flex application witch we could manually launch
in the browser and start unit tests.
 
I think this is not what we are looking for yes ? How should it work?
Similar to mustella tests ?

1) built of TLF swc
2) built of unit tests application 
3) application should launch automatically
4) Gets result of those test (break whole ant built if something goes wrong
- unit tests failed)

Need some advice in this matter.

I have changed 8 unit tests class - they are working now with Flex Unit 4.
This is 215 tests method - I have ignored 11 methods because they have
failed. I won't for now investigate what has happened I will do it later
when we will have full functional system. I think I will create additional
branch for my changes and commit it later this week.

Piotr





-----
Apache Flex Committer
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Unit-tests-in-TLF-tp36199p37450.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: Unit tests in TLF

Posted by Harbs <ha...@gmail.com>.
Cool!

I just committed my table work to a “tables” branch. Any suggestions on how to handle testing for that would be very welcome.

On Oct 6, 2014, at 8:53 AM, piotrz <pi...@gmail.com> wrote:

> I have merged my code to develop branch. I saw that TLF build correctly so I
> can assume that everything is working fine. :)
> 
> In this location bin\apps\automation_apps\bin\ we should see xmls file with
> reports for results of unit tests - If someone could take a look whether
> they did create on the machine. - Don't know how to do this. 
> 
> Piotr 
> 
> 
> 
> -----
> Apache Flex PMC
> piotrzarzycki21@gmail.com
> --
> View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Unit-tests-in-TLF-tp36199p41100.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.


RE: Unit tests in TLF

Posted by piotrz <pi...@gmail.com>.
Thanks Michael. Your help was crucial. :) I hope to push next part of TLF
tests soon to develop branch. :)

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Unit-tests-in-TLF-tp36199p41123.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

RE: Unit tests in TLF

Posted by "Michael A. Labriola" <la...@digitalprimates.net>.
>I have merged my code to develop branch. I saw that TLF build correctly so I can assume that everything is working fine. :)


Nice work. Congratulations and good job

Re: Unit tests in TLF

Posted by piotrz <pi...@gmail.com>.
I have merged my code to develop branch. I saw that TLF build correctly so I
can assume that everything is working fine. :)

In this location bin\apps\automation_apps\bin\ we should see xmls file with
reports for results of unit tests - If someone could take a look whether
they did create on the machine. - Don't know how to do this. 

Piotr 



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Unit-tests-in-TLF-tp36199p41100.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: Unit tests in TLF

Posted by piotrz <pi...@gmail.com>.
Ok Thanks Erik. I will try to merge today my branch into develop. Will see
what will blow up ;)

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Unit-tests-in-TLF-tp36199p40978.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: Unit tests in TLF

Posted by Erik de Bruin <er...@ixsoftware.nl>.
> Next general question. Do you think guys that I should merge my code to TLF
> develope branch ?
> I'm not sure how this build script will be working on the machine where we
> are building our Flex SDK - while tests it is launching flash player
> projector.
>

This should be OK. If your setup works locally for you, please commit it to
develop. It’s not called that for nothing ;-) If something breaks, no
worries, we’ll fix what you find until it doesn’t.

The build machine has a Flash Player and other tests use that as well, so
that should be no limitation.

EdB




>
> Piotr
>
>
>
> -----
> Apache Flex PMC
> piotrzarzycki21@gmail.com
> --
> View this message in context:
> http://apache-flex-development.2333347.n4.nabble.com/Unit-tests-in-TLF-tp36199p40972.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.
>



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: Unit tests in TLF

Posted by piotrz <pi...@gmail.com>.
Ok Thanks to Michael I'm done and TLF script building whole project and
launching all tests (13 classes) witch I rewritten to Flex Unit 4. Will be
working on the next.

Harbs I would like give a try to launch these tests on your code - you have
changed probably a lot in current TLF. 
I know that you are using separate repository, not our Apache Flex repo - Is
that correct or am I missing something ?

Maybe we could create separate branch, and push all of your changes to this
branch, later merge my code with your to see how everything is working ?

Next general question. Do you think guys that I should merge my code to TLF
develope branch ?
I'm not sure how this build script will be working on the machine where we
are building our Flex SDK - while tests it is launching flash player
projector.

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Unit-tests-in-TLF-tp36199p40972.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: Unit tests in TLF

Posted by piotrz <pi...@gmail.com>.
Hi Harbs,

If someone help me beat this problem couple of tests will be ready for you
for sure. :)

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Unit-tests-in-TLF-tp36199p40883.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: Unit tests in TLF

Posted by Harbs <ha...@gmail.com>.
That’s great!

I’d love to run the tests on my work of TLF before I try to merge it back into the main code base. If you have some time to help me with that, it would be awesome.

Harbs

On May 8, 2014, at 9:58 AM, piotrz <pi...@gmail.com> wrote:

> Hi Guys!
> 
> I have committed my changes related to Flex Unit TLF tests to
> FlexUnit4TestsTLF branch.
> TLF tests are consists with 
> 
> testApps - this is TLF editor -> http://www.adobe.com/devnet-apps/tlf/demo/
> 
> automation_apps - it contains logic for launch tests, read some data from
> xml files witch have been using in tests classes, report all results when
> tests have finished.
> 
> automation_core - some helpers for tests
> 
> automation_tests - tests classes
> 
> My main changes are in automation_apps and automation_tests. 
> 
> From automation_apps I removed all logic for report tests results and
> replace it by one single line -> <flexunituirunner:TestRunnerBase
> id="testRunner"/>. In test runner we have all results what we need when
> tests finished, later I will put those results also to file. 
> 
> I have removed also ability to choose what tests we would like to run in
> that place I have added AllTestsSuite and MinimalTestsSuite (checkin tests).
> - look in to them and you will see what tests are working currently.
> 
> build.xml - For now script build all applications and put them into "bin"
> folder. After build you can go to 
> "bin\apps\automation_apps\bin\" and launch VellumUnit.html.
> 
> Here I have some problems and don't know how to resolve it. Will be greatful
> for some advice.
> 
> SecurityError: Error #2148: SWF file
> file:///H:/flexsdk/flex-repo/source/flex-tlf/bin/apps/automation_apps/bin/VellumUnit.swf
> cannot access local resource
> file:///H:/flexsdk/flex-repo/source/flex-tlf/bin/apps/test/testFiles/markup/tlf/simple.xml.
> Only local-with-filesystem and trusted local SWF files may access local
> resources.
> 
> I know that I can put those paths to flash player settings manager as a
> trusted location, but it didn't work. We have to resolve it in some how,
> because after ant built I would like to run VellumUnit.html and run tests
> automatically.
> 
> So how to run tests for to look how does it work ? You can simply set up to
> your IDE all necessary apps and build them. For me Intellij IDEA put those
> apps into trusted sand box so everything works fine from IDE.
> 
> automation_apps (sub modules, swc files automation_core, automation_tests) -
> of course you have to add here Flex Unit 4.2 
> testApps (sub modules, swc textLayout_editBar, textLayout_ui) - it should
> build into automation_apps/bin
> 
> This is how it looks for now. As a next step I will be working on launch
> more tests classes and change build.xml file for automation of tests.
> 
> Piotr
> 
> 
> 
> 
> 
> 
> 
> 
> -----
> Apache Flex Committer
> piotrzarzycki21@gmail.com
> --
> View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Unit-tests-in-TLF-tp36199p37516.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.


RE: Unit tests in TLF

Posted by piotrz <pi...@gmail.com>.
Are you saying that app should automatically respond to my script - ok I will
try to build small project with Unit Tests and Ant to see whether it will
work. 
Maybe I have to in somehow reorganize current TLF unit test project.

Thanks Michael will back with the results.

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Unit-tests-in-TLF-tp36199p40885.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

RE: Unit tests in TLF

Posted by "Michael A. Labriola" <la...@digitalprimates.net>.
>I have missed something from your previous response and didn't try CIListener. - I am really sorry about it. 
Now it is working, I can move forward.


No problems at all. I just wanted to know if you had tried so I could help you debug it.

RE: Unit tests in TLF

Posted by piotrz <pi...@gmail.com>.
Hi Michael,

I have missed something from your previous response and didn't try
CIListener. - I am really sorry about it. 
Now it is working, I can move forward.

Thank you Michael!

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Unit-tests-in-TLF-tp36199p40950.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

RE: Unit tests in TLF

Posted by "Michael A. Labriola" <la...@digitalprimates.net>.
Hi,

Asking again, are you using the CIListener or the AIRCIListener? Those are the components that do this work for you.

Mike


-----Original Message-----
From: piotrz [mailto:piotrzarzycki21@gmail.com] 
Sent: Sunday, September 28, 2014 2:45 PM
To: dev@flex.apache.org
Subject: RE: Unit tests in TLF

Hi Guys,

I have created small project with FU and ant script. It's building this project and launching FU tests unfortunately situation is exactly the same.

I'm waiting for the response ->
http://images.devs-on.net/Image/IbrK3QRfZHwy8PDh-Obszar.png

Flash Player is opening and launching tests. My tests failed for purpose and script still waiting for the response. After 60 seconds I got:

http://images.devs-on.net/Image/vaJ2i7afccEyHQt1-Obszar.png

I have no idea what's could be wrong with this. I could send to anyone this project for check whether on his PC it will work.

On the screenshot there is a bit mess in my project, because I have tried several things ;)

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Unit-tests-in-TLF-tp36199p40948.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

RE: Unit tests in TLF

Posted by piotrz <pi...@gmail.com>.
Hi Guys,

I have created small project with FU and ant script. It's building this
project and launching FU tests unfortunately situation is exactly the same.

I'm waiting for the response ->
http://images.devs-on.net/Image/IbrK3QRfZHwy8PDh-Obszar.png

Flash Player is opening and launching tests. My tests failed for purpose and
script still waiting for the response. After 60 seconds I got:

http://images.devs-on.net/Image/vaJ2i7afccEyHQt1-Obszar.png

I have no idea what's could be wrong with this. I could send to anyone this
project for check whether on his PC it will work.

On the screenshot there is a bit mess in my project, because I have tried
several things ;)

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Unit-tests-in-TLF-tp36199p40948.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

RE: Unit tests in TLF

Posted by "Michael A. Labriola" <la...@digitalprimates.net>.
Piotr-

> Should I dispatch some event through the -> flexunituirunner:TestRunnerBase ?

If you are using any of the flexunit CI pieces they take care of that communication back to the launching process for you. I don't know if you are or are not. Dispatching an event is not ideal as the TestRunnerBase is a visual component and really has nothing to do with running the tests. It's just a display that reacts to input. If you want to see more, you might want to look at how the CIListener and AIRCIListener worked instead of reinventing a way to do so.

This is how the tests for FlexUnit run and finish when they are complete. 

Just my thoughts,
Mike


Re: Unit tests in TLF

Posted by piotrz <pi...@gmail.com>.
Hi Guys,

I would like to build tlf unit tests and running from ant build.xml file
these tests. I did it without a problem:

<target name="flexunnit_tests">
        <flexunit
swf="${output.dir}/apps/automation_apps/bin/VellumUnit.swf" timeout="180000"
player="flash" toDir="${output.dir}/apps/automation_apps/bin"
haltonfailure="false" verbose="true" />
</target>

It's running a tests without a problem, but what should a I do to say to my
script "Hey I have finished my tests here you go my results!" ? Currently
script is waiting for the respons and crashing after some time. :)

Should I dispatch some event through the -> flexunituirunner:TestRunnerBase
?

Piotr



-----
Apache Flex Committer
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Unit-tests-in-TLF-tp36199p40865.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: Unit tests in TLF

Posted by piotrz <pi...@gmail.com>.
Hi Alex,

Sorry for the delay. I did try to put folder witch contains simple.xml file
and other files require for Test cases.

Piotr



-----
Apache Flex Committer
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Unit-tests-in-TLF-tp36199p37582.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: Unit tests in TLF

Posted by Alex Harui <ah...@adobe.com>.
Excellent!  Thanks for woking on it.  What did you try putting into the FP
trust file?

On 5/7/14 11:58 PM, "piotrz" <pi...@gmail.com> wrote:

>Hi Guys!
>
>I have committed my changes related to Flex Unit TLF tests to
>FlexUnit4TestsTLF branch.
>TLF tests are consists with
>
>testApps - this is TLF editor ->
>http://www.adobe.com/devnet-apps/tlf/demo/
>
>automation_apps - it contains logic for launch tests, read some data from
>xml files witch have been using in tests classes, report all results when
>tests have finished.
>
>automation_core - some helpers for tests
>
>automation_tests - tests classes
>
>My main changes are in automation_apps and automation_tests.
>
>From automation_apps I removed all logic for report tests results and
>replace it by one single line -> <flexunituirunner:TestRunnerBase
>id="testRunner"/>. In test runner we have all results what we need when
>tests finished, later I will put those results also to file.
>
>I have removed also ability to choose what tests we would like to run in
>that place I have added AllTestsSuite and MinimalTestsSuite (checkin
>tests).
>- look in to them and you will see what tests are working currently.
>
>build.xml - For now script build all applications and put them into "bin"
>folder. After build you can go to
>"bin\apps\automation_apps\bin\" and launch VellumUnit.html.
>
>Here I have some problems and don't know how to resolve it. Will be
>greatful
>for some advice.
>
>SecurityError: Error #2148: SWF file
>file:///H:/flexsdk/flex-repo/source/flex-tlf/bin/apps/automation_apps/bin/
>VellumUnit.swf
>cannot access local resource
>file:///H:/flexsdk/flex-repo/source/flex-tlf/bin/apps/test/testFiles/marku
>p/tlf/simple.xml.
>Only local-with-filesystem and trusted local SWF files may access local
>resources.
>
>I know that I can put those paths to flash player settings manager as a
>trusted location, but it didn't work. We have to resolve it in some how,
>because after ant built I would like to run VellumUnit.html and run tests
>automatically.
>
>So how to run tests for to look how does it work ? You can simply set up
>to
>your IDE all necessary apps and build them. For me Intellij IDEA put those
>apps into trusted sand box so everything works fine from IDE.
>
>automation_apps (sub modules, swc files automation_core,
>automation_tests) -
>of course you have to add here Flex Unit 4.2
>testApps (sub modules, swc textLayout_editBar, textLayout_ui) - it should
>build into automation_apps/bin
>
>This is how it looks for now. As a next step I will be working on launch
>more tests classes and change build.xml file for automation of tests.
>
>Piotr
>
>
>
>
>
>
>
>
>-----
>Apache Flex Committer
>piotrzarzycki21@gmail.com
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/Unit-tests-in-TLF-tp3
>6199p37516.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.


Re: Unit tests in TLF

Posted by piotrz <pi...@gmail.com>.
Hi Guys!

I have committed my changes related to Flex Unit TLF tests to
FlexUnit4TestsTLF branch.
TLF tests are consists with 

testApps - this is TLF editor -> http://www.adobe.com/devnet-apps/tlf/demo/

automation_apps - it contains logic for launch tests, read some data from
xml files witch have been using in tests classes, report all results when
tests have finished.

automation_core - some helpers for tests

automation_tests - tests classes

My main changes are in automation_apps and automation_tests. 

>From automation_apps I removed all logic for report tests results and
replace it by one single line -> <flexunituirunner:TestRunnerBase
id="testRunner"/>. In test runner we have all results what we need when
tests finished, later I will put those results also to file. 

I have removed also ability to choose what tests we would like to run in
that place I have added AllTestsSuite and MinimalTestsSuite (checkin tests).
- look in to them and you will see what tests are working currently.

build.xml - For now script build all applications and put them into "bin"
folder. After build you can go to 
"bin\apps\automation_apps\bin\" and launch VellumUnit.html.

Here I have some problems and don't know how to resolve it. Will be greatful
for some advice.

SecurityError: Error #2148: SWF file
file:///H:/flexsdk/flex-repo/source/flex-tlf/bin/apps/automation_apps/bin/VellumUnit.swf
cannot access local resource
file:///H:/flexsdk/flex-repo/source/flex-tlf/bin/apps/test/testFiles/markup/tlf/simple.xml.
Only local-with-filesystem and trusted local SWF files may access local
resources.

I know that I can put those paths to flash player settings manager as a
trusted location, but it didn't work. We have to resolve it in some how,
because after ant built I would like to run VellumUnit.html and run tests
automatically.

So how to run tests for to look how does it work ? You can simply set up to
your IDE all necessary apps and build them. For me Intellij IDEA put those
apps into trusted sand box so everything works fine from IDE.

automation_apps (sub modules, swc files automation_core, automation_tests) -
of course you have to add here Flex Unit 4.2 
testApps (sub modules, swc textLayout_editBar, textLayout_ui) - it should
build into automation_apps/bin

This is how it looks for now. As a next step I will be working on launch
more tests classes and change build.xml file for automation of tests.

Piotr








-----
Apache Flex Committer
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Unit-tests-in-TLF-tp36199p37516.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: Unit tests in TLF

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

> If you can launch the test automatically, that would be best, IMO.

But having test to run is certainly better than the current situation were we can't run the tests. Check in it if it's an improvement over before (which sounds like it is) and if it doesn't break anything else.

Thanks,
Justin

Re: Unit tests in TLF

Posted by Alex Harui <ah...@adobe.com>.
If you can launch the test automatically, that would be best, IMO.

-Alex

On 5/3/14 5:20 AM, "piotrz" <pi...@gmail.com> wrote:

>I have managed to build unit tests applications for TLF using ant.
>The result of this build is Flex application witch we could manually
>launch
>in the browser and start unit tests.
> 
>I think this is not what we are looking for yes ? How should it work?
>Similar to mustella tests ?
>
>1) built of TLF swc
>2) built of unit tests application
>3) application should launch automatically
>4) Gets result of those test (break whole ant built if something goes
>wrong
>- unit tests failed)
>
>Need some advice in this matter.
>
>I have changed 8 unit tests class - they are working now with Flex Unit 4.
>This is 215 tests method - I have ignored 11 methods because they have
>failed. I won't for now investigate what has happened I will do it later
>when we will have full functional system. I think I will create additional
>branch for my changes and commit it later this week.
>
>Piotr
>
>
>
>
>
>-----
>Apache Flex Committer
>piotrzarzycki21@gmail.com
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/Unit-tests-in-TLF-tp3
>6199p37450.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.