Logging isn't quite the question being asked. This was discussed on IRC a bit.<br><br>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.<br>
<br>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.<br>
<br>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.<br>
<br>---<br>SJG<br><br><br><div class="gmail_quote">On Thu, May 3, 2012 at 3:27 PM, Rafael Ortiz <span dir="ltr"><<a href="mailto:rafael@activitycentral.com" target="_blank">rafael@activitycentral.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br><div class="gmail_quote"><div><div class="h5">On Thu, May 3, 2012 at 1:54 PM, Taylor Rose (RIT Student) <span dir="ltr"><<a href="mailto:tjr1351@rit.edu" target="_blank">tjr1351@rit.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Does anyone have advice about how to run unit tests for an activity? I am working on a video conferencing activity called <a href="https://github.com/FOSSRIT/Open-Video-chat" target="_blank">Open Video Chat</a>. 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.<br>
<br>Thanks,<br>Taylor<br>
<br></blockquote><div><br></div></div></div><div>Hi Taylor</div><div><br></div><div>Thanks for working on Open video chat,</div><div>to debug your application you can use Python logging:</div><div> </div><div><a href="http://wiki.laptop.org/go/Python_Standard_Logging_in_Sugar" target="_blank">http://wiki.laptop.org/go/Python_Standard_Logging_in_Sugar</a></div>
<div> </div><div><br></div><div>Your logs are going to be saved on .sugar/default/logs</div><div><br></div><div><br></div><div>For examples on how to use it, you can look at other activities on <a href="http://git.sugarlabs.org" target="_blank">http://git.sugarlabs.org</a></div>
<div><br></div><div>hth.</div><div><br></div><div>Thanks.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br></blockquote></div><br>