<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>syn.theti.ca &#187; fonts</title>
	<atom:link href="http://syn.theti.ca/category/fonts/feed/" rel="self" type="application/rss+xml" />
	<link>http://syn.theti.ca</link>
	<description>debian, eeepc, kids &#38; f/oss software</description>
	<lastBuildDate>Tue, 25 May 2010 11:50:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Tuxpaint GUI testing with xautomation</title>
		<link>http://syn.theti.ca/2006/10/25/tuxpaint-gui-testing-with-xautomation/</link>
		<comments>http://syn.theti.ca/2006/10/25/tuxpaint-gui-testing-with-xautomation/#comments</comments>
		<pubDate>Wed, 25 Oct 2006 23:52:00 +0000</pubDate>
		<dc:creator>Ben Armstrong</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[jr]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[tuxpaint]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Tuxpaint could be a poster child for l10n. It has translations now for 68 different locales. The large number of locales poses somewhat of a problem for testing1. Tuxpaint 0.9.16 just released. During the release preparation, the manual testing of all of these locales drove me nearly insane. So to help out next time, I [...]]]></description>
			<content:encoded><![CDATA[<p>Tuxpaint could be a poster child for l10n.  It has translations now for 68 different locales.  The large number of locales poses somewhat of a problem for testing<sup><a href="#fn1">1</a></sup>.</p>
<p>Tuxpaint 0.9.16 <a href="http://www.tuxpaint.org/latest/tuxpaint-0.9.16-press-release-en.php3">just released</a>.  During the release preparation, the manual testing of all of these locales drove me nearly insane.  So to help out next time, I created the following bash script using xautomation<sup><a href="#fn2">2</a></sup>, imagemagick and xprop (from xbase-clients):</p>
<pre>
<code>
#!/bin/bash
testname="tuxpaint"
root_geometry=`xprop -root _NET_DESKTOP_GEOMETRY |cut -d= -f2`
root_x=`echo $root_geometry |cut -d, -f1`
root_y=`echo $root_geometry |cut -d, -f2`
xc=$((root_x/2-1))
yc=$((root_y/2-1))

capture_tuxpaint () {
   tuxpaint --startblank --nolockfile --lang $1 --640x480 --windowed --nosound &#38;
   sleep 1
   xte "mousemove $xc $yc"
   xte "mouseclick 1"
   sleep 1
   xte "key Escape"
   sleep 2
   import -silent -window "Tux Paint" $testname-$1.png
   xte "mousermove -120 -40"
   xte "mouseclick 1"
}

for lang in `tuxpaint --lang help |awk '$1~/^[[:lower:]]/ {print $1}'`; do
   capture_tuxpaint $lang
done
</code>
</pre>
<p>I&#8217;m not entirely happy with it, but it&#8217;s at least a starting point.  Ideally, I&#8217;d make <code>.pat</code> files to use with <code>visgrep</code> to find coordinates for the button images instead of hardwiring the approximate button positions.  Also, the script needs a companion script to configure the system for testing (i.e. perform the locales configuration and install all fonts).</p>
<p>Here are the resulting <a href="http://syn.theti.ca/tuxpaint_tests/index.html">screenshots</a> which show up a few problems with the translations.  It looks like the quit dialog strings have been updated since they were first translated, so now we need retranslation for several languages.  Also, there are some languages, like Swahili and Klingon, for which there are no locales in glibc in Debian.  I&#8217;ll have to talk to the glibc maintainers about that.  And for that matter, I don&#8217;t even know if a <span class="caps">DFSG</span>-free Klingon font exists.</p>
<p>In any event, I&#8217;m delighted with the results, and look forward to using <code>xautomation</code> more for <span class="caps">GUI</span> testing.</p>
<p id="fn1"><sup>1</sup>   For one thing, several languages require special fonts.  For another, there is no way to get tuxpaint to tell you what locales it supports.  Granted, there is <code>--lang help</code>, but this is a crude approximation, as the mapping between language and locale is arbitrarily hardwired (which hmh on #debian-devel irc pointed out to me is just plain wrong).  It doesn&#8217;t help me at all in the arduous task of configuring glibc locales so I can test them.  For that, I need to look at <code>i18n.c</code>.</p>
<p id="fn2"><sup>2</sup> I tried using <code>xmacro</code> at first, but <code>xmacrorec</code> just made my pointer jiggle back and forth.  It seemed like it was updating the position for a short distance, and then X was resetting it back to the former position of the pointer.  Some strange interaction with my window manager, perhaps?  But ultimately I am happier with the <code>xautomation</code> approach anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://syn.theti.ca/2006/10/25/tuxpaint-gui-testing-with-xautomation/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
