Benjamin,

We really haven't done anything other than what was in the source code I 
posted with my first message.  We wanted to be able to easily run unit 
tests or not, since they take a while to run, without changing the 
code.  That was the impetus for putting TestSuite into a class, and only 
creating it if we had "test=1" as an argument. 

The other thing we really wanted to be able to do was close the test 
results window and keep working after all the unit tests had run.  That 
was the impetus for placing TestSuite inside a window with closeable='true'.

The final issue that we ran into was that some of our unit tests would 
fail if some of the views that some things depended on had not yet 
finished initializing.  That was the reason to add initstage='late'.

With the changes in 3.2, TestSuite seems to need to be an element of the 
canvas, and can't be inside a window.  With the Ginger changes, I was 
able to make LzUnit work pretty much like we had it in 3.1.1 (though now 
we let the TestSuite make its own window).  The only real change was 
that since it doesn't have a close box, I added an item to our debug 
menu to close it.

And yes, this is for an Inspiration related project.  I shouldn't really 
say more about it than I did in my post on 3/7/2006, but if you've 
looked at the Inspiration program and that post I think you can guess 
what we're up to. ;-)

-Jason

Benjamin Shine wrote:
> Jason, it sounds like you've done some work extending LzUnit. What is 
> your xUnitTest class? What have you added? In what ways was the 
> existing test system insufficient? I'm working on improving the test 
> system so I'd appreciate hearing about your experience... or your code.
>
> Are you using Open Laszlo for an Inspiration-related project?
>
> -ben
>
> On Apr 6, 2006, at 9:24 AM, Jason Stafford wrote:
>
>> The issue LPP-647 is marked as fixed in 3.2, but it isn't in the 
>> release I downloaded yesterday.  Instead my unit tests are slightly 
>> broken.  Comparing the latest lzunit.lzx from Subversion against the 
>> one that came as part of the 3.2 release, I see that they do not match.
>>
>> This concerns me somewhat since I think this is the second bug that 
>> was supposed to be a part of the 3.2 release, but didn't actually 
>> make into the released code.
>>
>> Could someone at Laszlo Systems who makes the official build look 
>> into this issue of fixes not making it into the build and let the 
>> list know what happened.
>>
>> Thanks,
>>
>> -Jason
>>
>> P.S. If you're curious, here is the code we were using for our unit 
>> test.  Prior to the LPP-647 fix we had our TestSuite embedded inside 
>> a window so that we could close the test result after it had run.  
>> Without any change to my code - just moving to 3.2 I get the 
>> following errors:
>> WARNING: base/basewindow.lzx:75 undefined object does not have a 
>> property 'options'
>> WARNING: base/basewindow.lzx:75 reference to undefined property 
>> 'options'
>> WARNING: base/basewindow.lzx:75 undefined object does not have a 
>> property '[]'
>> WARNING: base/basewindow.lzx:78 undefined object does not have a 
>> property 'setOption'
>>
>> This didn't surprise me that much, since I expected some breakage 
>> with fix LPP-647.
>>
>> Here is the original code (uninteresting parts removed):
>> <canvas>
>> <class name='xUnitTest' width='520' height='220' x='10' y='10 '
>>         closeable='true' resizable='true' title='Unit Tests' 
>> initstage='late' extends='window'>
>>     <TestSuite  name='suite' x='0' y='10'>
>>         <mainTest/>
>>     </TestSuite>
>> </class>
>>
>> <script>
>>     if( LzBrowser.getInitArg('test') == 1 )
>>     {
>>         new xUnitTest();
>>     }
>> </script>
>> </canvas>
>>
>> I changed my code to just have a TestSuite at the root of the canvas, 
>> but the TestResult looks like the 3.1 results, not the Console window 
>> I was expecting.
>>
>> <canvas>
>> <class name='xUnitTest' extends='TestSuite'>
>>      <mainTest/>
>> </class>
>>
>> <script>
>>     if( LzBrowser.getInitArg('test') == 1 )
>>     {
>>         new xUnitTest();
>>     }
>> </script>
>> </canvas>
>>
>>
>> -- Jason Stafford Principal Developer Inspiration Software, Inc. The 
>> leader in visual thinking & learning Introducing INSPIRATION(r) 8, 
>> the essential tool to visualize, think, organize and learn. Students 
>> use Inspiration to plan, research and complete projects successfully. 
>> Learn more at www.inspiration.com. 503-297-3004 Extension 119 
>> 503-297-4676 (Fax) 9400 SW Beaverton-Hillsdale Highway Suite 300 
>> Beaverton, OR 97005-3300
>> _______________________________________________
>> Laszlo-dev mailing list
>> [email protected]
>> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
>
> benjamin shine
> software engineer
> [EMAIL PROTECTED]
>
>
>

-- 
Jason Stafford
Principal Developer
Inspiration Software, Inc.
The leader in visual thinking & learning

Introducing INSPIRATION(r) 8, the essential tool to visualize, think, 
organize and learn. Students use Inspiration to plan, research and 
complete projects successfully. Learn more at www.inspiration.com. 

503-297-3004 Extension 119
503-297-4676 (Fax)
9400 SW Beaverton-Hillsdale Highway
Suite 300
Beaverton, OR 97005-3300

_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to