[Sugar-devel] Unit testing an activity

Rafael Ortiz rafael at activitycentral.com
Thu May 3 18:51:56 EDT 2012


On Thu, May 3, 2012 at 5:38 PM, Samuel Greenfeld <greenfeld at laptop.org>wrote:

> Logging isn't quite the question being asked.  This was discussed on IRC a
> bit.
>
> Taylor is potentially getting school credit for working on the video chat
> activity this semester.  Part of Taylor's independent study agreement
> requires him/her to write unit tests to verify the proper operation of the
> code written.
>
> There is no guarantee Taylor will be working on this project next
> semester; someone else may be asked to take over.  And the idea is that the
> next maintainer will be able to use the unit tests to-be-created to verify
> that they did not break anything with an update.
>
> While I know Sascha is working on some unit tests for the core Sugar
> libraries, there is no unit test approach I know of that has been taken to
> systematically verify activities.  So I asked Taylor to ask on this email
> list in case someone has an idea how to do this, or knows of an activity
> which already has unit tests.
>
>
Ok understood. I didn't wanted to reply no, but also (afaik) there is not
such effort for activities.



> ---
> SJG
>
>
>
> On Thu, May 3, 2012 at 3:27 PM, Rafael Ortiz <rafael at activitycentral.com>wrote:
>
>>
>>
>> On Thu, May 3, 2012 at 1:54 PM, Taylor Rose (RIT Student) <
>> tjr1351 at rit.edu> wrote:
>>
>>> Does anyone have advice about how to run unit tests for an activity? I
>>> am working on a video conferencing activity called Open Video Chat<https://github.com/FOSSRIT/Open-Video-chat>.
>>> I'd like to be able to run some basic unit tests on the activity but I'm
>>> not sure how to instantiate an activity in a testing environment or if it's
>>> even possible. Can anyone offer advice or point me to an example? I'd like
>>> to be able to mock a connection and make sure the activity reacts properly,
>>> starting up gstreamer and such.
>>>
>>> Thanks,
>>> Taylor
>>>
>>>
>> Hi Taylor
>>
>> Thanks for working on Open video chat,
>> to debug your application you can use Python logging:
>>
>> http://wiki.laptop.org/go/Python_Standard_Logging_in_Sugar
>>
>>
>> Your logs are going to be saved on .sugar/default/logs
>>
>>
>> For examples on how to use it, you can look at other activities on
>> http://git.sugarlabs.org
>>
>> hth.
>>
>> Thanks.
>>
>> _______________________________________________
>>> Sugar-devel mailing list
>>> Sugar-devel at lists.sugarlabs.org
>>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>>
>>>
>>
>> _______________________________________________
>> Sugar-devel mailing list
>> Sugar-devel at lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20120503/c28ab349/attachment.html>


More information about the Sugar-devel mailing list