|
From: Boysenberry P. <boy...@ha...> - 2007-10-25 21:23:34
|
I'm trying to develop a test suite but have run into a problem concerning the library assets my classes require. Is there anyway to provide those assets in a way that makes sense with the TDD approach. I can't get some of my classes to pass because of the library assets they call for. TIA, -bop |
|
From: Boysenberry P. <boy...@ha...> - 2007-10-25 21:57:07
|
It would seem that I just need to include the assets I need available in the AsUnitTestRunner.FLA (with the Document Class set to AsUnitTestRunner). Is that considered a bad practice? Does it still fit with a TDD approach? Any help would be much appreciated. Thanks, Boysenberry On Oct 25, 2007, at 4:23 PM, Boysenberry Payne wrote: > I'm trying to develop a test suite but have run into a problem > concerning > the library assets my classes require. Is there anyway to provide > those > assets in a way that makes sense with the TDD approach. I can't > get some of my classes to pass because of the library assets they > call for. > > TIA, > -bop > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Asunit-users mailing list > Asu...@li... > https://lists.sourceforge.net/lists/listinfo/asunit-users |
|
From: Luke B. <lb...@pa...> - 2007-10-25 22:45:49
|
This is definitely a difficult issue. There are two approaches that we have used in the past, I'd be interested in hearing what others have done. a) Use MTASC and SWFMill - or- MTASC for code and Flash Authoring for only symbol creation. This is most certainly the recommended approach for developing Flash Player lite, 6, 7 or 8 content. This approach allows you to create and reference two different 'main' documents. One for running your test suites and one for running your production application. Each of these are very, very thin classes and can easily include your library SWF whether you create it with SWFMill or Flash Authoring. b) Use Flash Authoring, but #include a different main document depending on whether you're going to production or test suites. What this really means is that you don't put anything meaningful on the main timeline of your FLA, other than maybe a preloader and the #include statement that gets switched. It might looks something like this: #include "Main.as" //#include "MainRunner.as" You just swap which one is commented and each of these included documents just attachMovie with a different MovieClip or instantiate a different Main class. This isn't really recommended, but neither is using Authoring as a compiler, so if you can't move to MTASC, and you're stuck with Authoring, this is the way we've done it in the past. I'd be interested to hear what others have to say. This would conceivably work with the latest version of Authoring by changing the 'Document Class' reference. I just can't imagine going back to non command-line compilation at this point, so I would highly encourage you to look into the first approaches. The one thing that you absolutely, positively do not ever want to do, is create two different FLA files and start trying to manually synchronize the library from one to the other. This will not help you. These two FLA files will inevitably fall out of sync and your test harness will be using a fixture that does not match your production environment. This is very, very bad. Hope that helps, Luke Bayes http://www.asserttrue.com |
|
From: Boysenberry P. <boy...@ha...> - 2007-10-26 00:06:29
|
> a) Use MTASC and SWFMill - or- MTASC for code and Flash Authoring > for only symbol creation. I'll have to look into doing it this way. Up until now I've been using the Authoring tool and am completely unfamiliar with either option. If I knew more about how command line compiling and symbols from an authoring environment mixed I would know if this were possible for me. As it is I load many symbols from external swf files, I just didn't build to do it with the default symbols because I know they're not optional. > This isn't really recommended, but neither is using Authoring as a > compiler, so if you can't move to MTASC, and you're stuck with > Authoring, this is the way we've done it in the past. I'd be > interested to hear what others have to say. This would conceivably > work with the latest version of Authoring by changing the 'Document > Class' reference. I just can't imagine going back to non command- > line compilation at this point, so I would highly encourage you to > look into the first approaches. I'm using Flash 9 and AS3 so I could try writing slick document classes that allowed me to swap when testing. That will be my first course of action, the quicker route. In long run it sounds like my best choice would be to get into MTASC. After looking it over a bit I notice its only for compiling AS2. Maybe I'll have to wait. After searching a bit I found Haxe which seems to have an AS3 version setting, but all of its examples are centered around AS2 and I'm not sure about how well it implements the Authoring Tools version of AS3. The Document Class setting seems to have done the trick, so I start there and continue to research the compilers. Thanks, Boysenberry On Oct 25, 2007, at 5:45 PM, Luke Bayes wrote: > This is definitely a difficult issue. > > There are two approaches that we have used in the past, I'd be > interested in hearing what others have done. > > a) Use MTASC and SWFMill - or- MTASC for code and Flash Authoring > for only symbol creation. > > This is most certainly the recommended approach for developing > Flash Player lite, 6, 7 or 8 content. > > This approach allows you to create and reference two different > 'main' documents. One for running your test suites and one for > running your production application. Each of these are very, very > thin classes and can easily include your library SWF whether you > create it with SWFMill or Flash Authoring. > > b) Use Flash Authoring, but #include a different main document > depending on whether you're going to production or test suites. > What this really means is that you don't put anything meaningful on > the main timeline of your FLA, other than maybe a preloader and the > #include statement that gets switched. It might looks something > like this: > > #include "Main.as" > //#include "MainRunner.as" > > You just swap which one is commented and each of these included > documents just attachMovie with a different MovieClip or > instantiate a different Main class. > > This isn't really recommended, but neither is using Authoring as a > compiler, so if you can't move to MTASC, and you're stuck with > Authoring, this is the way we've done it in the past. I'd be > interested to hear what others have to say. This would conceivably > work with the latest version of Authoring by changing the 'Document > Class' reference. I just can't imagine going back to non command- > line compilation at this point, so I would highly encourage you to > look into the first approaches. > > The one thing that you absolutely, positively do not ever want to > do, is create two different FLA files and start trying to manually > synchronize the library from one to the other. This will not help > you. These two FLA files will inevitably fall out of sync and your > test harness will be using a fixture that does not match your > production environment. This is very, very bad. > > > Hope that helps, > > > Luke Bayes > http://www.asserttrue.com > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Asunit-users mailing list > Asu...@li... > https://lists.sourceforge.net/lists/listinfo/asunit-users |
|
From: Octavian C. <oct...@gm...> - 2007-10-26 00:20:13
|
On 10/25/07, Boysenberry Payne <boy...@ha...> wrote: > > I'm using Flash 9 and AS3 so I could try writing slick document classes > that allowed me to swap when testing. > That will be my first course of action, the quicker route. In long run it > sounds like my best choice would be to > get into MTASC. After looking it over a bit I notice its only for > compiling AS2. Maybe I'll have to wait. > If you are writing AS3 you have a pretty good command line compiler in the free Flex SDK. It doesn't need swfmill for resources anymore, you can write Embbed tags in your code and it will simply embed the resources that you need. The only reference I found for how to write an Embed tag is here<http://livedocs.adobe.com/flex/15/flex_docs_en/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flex_Documentation&file=00001060.htm> . Vivi. After searching a bit I found Haxe which seems to have an AS3 version > setting, but all of its examples are > centered around AS2 and I'm not sure about how well it implements the > Authoring Tools version of AS3. > > The Document Class setting seems to have done the trick, so I start there > and continue to research the > compilers. > > Thanks, > Boysenberry > > > > On Oct 25, 2007, at 5:45 PM, Luke Bayes wrote: > > This is definitely a difficult issue. > > There are two approaches that we have used in the past, I'd be interested > in hearing what others have done. > > a) Use MTASC and SWFMill - or- MTASC for code and Flash Authoring for > only symbol creation. > > This is most certainly the recommended approach for developing Flash > Player lite, 6, 7 or 8 content. > > This approach allows you to create and reference two different 'main' > documents. One for running your test suites and one for running your > production application. Each of these are very, very thin classes and can > easily include your library SWF whether you create it with SWFMill or Flash > Authoring. > > b) Use Flash Authoring, but #include a different main document depending > on whether you're going to production or test suites. What this really means > is that you don't put anything meaningful on the main timeline of your FLA, > other than maybe a preloader and the #include statement that gets switched. > It might looks something like this: > > #include "Main.as" > //#include "MainRunner.as" > > You just swap which one is commented and each of these included documents > just attachMovie with a different MovieClip or instantiate a different Main > class. > > This isn't really recommended, but neither is using Authoring as a > compiler, so if you can't move to MTASC, and you're stuck with Authoring, > this is the way we've done it in the past. I'd be interested to hear what > others have to say. This would conceivably work with the latest version of > Authoring by changing the 'Document Class' reference. I just can't imagine > going back to non command-line compilation at this point, so I would highly > encourage you to look into the first approaches. > > The one thing that you absolutely, positively do not ever want to do, is > create two different FLA files and start trying to manually synchronize the > library from one to the other. This will not help you. These two FLA files > will inevitably fall out of sync and your test harness will be using a > fixture that does not match your production environment. This is very, very > bad. > > > Hope that helps, > > > Luke Bayes > http://www.asserttrue.com > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> > http://get.splunk.com/_______________________________________________ > Asunit-users mailing list > Asu...@li... > https://lists.sourceforge.net/lists/listinfo/asunit-users > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Asunit-users mailing list > Asu...@li... > https://lists.sourceforge.net/lists/listinfo/asunit-users > > -- Octavian Costache http://www.vivi.ro |
|
From: Luke B. <lb...@pa...> - 2007-10-26 00:19:16
|
Sorry about that - I pretty much assumed you were working with AS2. Now I'm really curious what others have to say! At that point, I would probably compile with Flex Builder / MXMLC and use Authoring as either a compile time or run time library. This can get really tricky - especially if you're using Grant Skinner's Authoring components. There is also a pretty big performance issue if you're running MXMLC without Flex Builder. If you're interested in a quick introduction to Flex/MXMLC compilation you should check out our other project: http://code.google.com/p/projectsprouts/ Here's a video demo of an earlier incarnation: http://www.asserttrue.com/articles/2007/04/04/introducing-asproject You'll need to install Ruby and Ruby Gems, but after that, you should be able to get up and running pretty quickly. Good Luck, Luke Bayes http://www.asserttrue.com |
|
From: Boysenberry P. <boy...@ha...> - 2007-10-26 14:02:29
|
I installed Ruby and the Sprouts gem. Ran through all of the instruction with only one bug while running rake: rake aborted! [ERROR] /usr/local/lib/ruby/1.8/open3.rb:67: warning: Insecure world writable dir /Users/boysie/habitat in PATH, mode 040777 Oops, so it looks like I need to chmod my habitat directory. Do you know what the right mode is? PS Is this not the list to be on for Sprout issues, or only ASUnit by itself? Thanks, Boysenberry On Oct 25, 2007, at 7:19 PM, Luke Bayes wrote: > Sorry about that - I pretty much assumed you were working with AS2. > > Now I'm really curious what others have to say! > > At that point, I would probably compile with Flex Builder / MXMLC > and use Authoring as either a compile time or run time library. > This can get really tricky - especially if you're using Grant > Skinner's Authoring components. > > There is also a pretty big performance issue if you're running > MXMLC without Flex Builder. > > If you're interested in a quick introduction to Flex/MXMLC > compilation you should check out our other project: > > http://code.google.com/p/projectsprouts/ > > Here's a video demo of an earlier incarnation: > > http://www.asserttrue.com/articles/2007/04/04/introducing-asproject > > You'll need to install Ruby and Ruby Gems, but after that, you > should be able to get up and running pretty quickly. > > > Good Luck, > > > Luke Bayes > http://www.asserttrue.com > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Asunit-users mailing list > Asu...@li... > https://lists.sourceforge.net/lists/listinfo/asunit-users |
|
From: Luke B. <lb...@pa...> - 2007-10-26 15:27:47
|
Hey Boysenberry, Thanks for checking it out! I am not certain, but I would try 0744 and if that doesn't work, try 755. Are you on Windows? Perhaps with Cygwin? I recall getting those errors a lot with Ruby and Cygwin on Windows. Since Win doesn't know about *nixy file permissions, files wind up chmoded to 777 in Cygwin. Thanks for asking about the list. This is actually just a list for AsUnit. The Sprouts list is at: http://groups.google.com/group/projectsprouts And bugs/feature requests can be reported here: http://code.google.com/p/projectsprouts/issues/list I'm going to go ahead and post this question and answer on the Sprouts list for now. Thanks, Luke Bayes http://www.asserttrue.com 10/26/07, [AsUnit User] wrote: > > I installed Ruby and the Sprouts gem.Ran through all of the instruction > with only one bug while running rake: > > rake aborted! > [ERROR] /usr/local/lib/ruby/1.8/open3.rb:67: warning: Insecure world > writable dir /Users/boysie/habitat in PATH, mode 040777 > > Oops, so it looks like I need to chmod my habitat directory. > Do you know what the right mode is? > > PS Is this not the list to be on for Sprout issues, or only ASUnit by > itself? > > Thanks, > [AsUnit User] > > On Oct 25, 2007, at 7:19 PM, Luke Bayes wrote: > > Sorry about that - I pretty much assumed you were working with AS2. > > Now I'm really curious what others have to say! > > At that point, I would probably compile with Flex Builder / MXMLC and use > Authoring as either a compile time or run time library. This can get really > tricky - especially if you're using Grant Skinner's Authoring components. > > There is also a pretty big performance issue if you're running MXMLC > without Flex Builder. > > If you're interested in a quick introduction to Flex/MXMLC compilation you > should check out our other project: > > http://code.google.com/p/projectsprouts/ > > Here's a video demo of an earlier incarnation: > > http://www.asserttrue.com/articles/2007/04/04/introducing-asproject > > You'll need to install Ruby and Ruby Gems, but after that, you should be > able to get up and running pretty quickly. > > > Good Luck, > > > Luke Bayes > http://www.asserttrue.com > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> > http://get.splunk.com/_______________________________________________ > Asunit-users mailing list > Asu...@li... > https://lists.sourceforge.net/lists/listinfo/asunit-users > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Asunit-users mailing list > Asu...@li... > https://lists.sourceforge.net/lists/listinfo/asunit-users > > -- Luke Bayes http://www.asserttrue.com |