<?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"
	>

<channel>
	<title>Marathon - Java GUI Testing</title>
	<atom:link href="http://blog.marathontesting.com/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.marathontesting.com</link>
	<description>All things Marathon, Marathonite, Java and GUI Test automation, scripting and whatever is useful for test automation projects.</description>
	<pubDate>Wed, 19 Nov 2008 06:24:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>Checklists, Exploratory Testing and Marathon</title>
		<link>http://blog.marathontesting.com/checklists-exploratory-testing-and-marathon.html</link>
		<comments>http://blog.marathontesting.com/checklists-exploratory-testing-and-marathon.html#comments</comments>
		<pubDate>Wed, 19 Nov 2008 06:24:09 +0000</pubDate>
		<dc:creator>KD</dc:creator>
		
		<category><![CDATA[Marathon]]></category>

		<guid isPermaLink="false">http://blog.marathontesting.com/?p=13</guid>
		<description><![CDATA[This post is about two features that are yet to be released for Marathon. We are working on these features and hope to release soon. I am publishing these details in the hope of getting feedback.
Checklists
Checklists are everywhere. The GTD crowd lives by them. A checklist is a tool in testers arsenal when used well [...]]]></description>
			<content:encoded><![CDATA[<p>This post is about two features that are yet to be released for Marathon. We are working on these features and hope to release soon. I am publishing these details in the hope of getting feedback.</p>
<h2>Checklists</h2>
<p>Checklists are everywhere. The GTD crowd lives by them. A checklist is a tool in testers arsenal when used well makes mundane tasks easy to handle, complex tasks more structured and overall provides systematic way of handling testing.<br />
<span id="more-13"></span></p>
<h2>Marathon Checklists</h2>
<p>Marathon brings the goodness of checklists to the automation - making it possible to create semi automatic test scripts.<br />
Marathon checklist is a form containing either checkbox items (along with an explanatory text area) or plain text areas. The forms are stored as plain XML files. These can be created through an (rudimentary) UI while recording or using you favorite text editor.<br />
While recording a test script, you can insert a checklist action. You will be prompted with the existing forms and you can either select a predefined form or create a new one.<br />
While playing a test script with a checklist action, the user will be presented with the form. The form will have options to succeed or fail the test script. In both the cases, the results are written into a XML file. At the end of test run, you can create a checklist report that formats the results and display either in text or html format.<br />
The checklist actions by default are ignored during batch run (from commandline or JUnit view). You can enable the checklist actions by passing a command line parameter (for batch run) or a menu option (for JUnit run).</p>
<h2>Exploratory Testing With Marathon</h2>
<p>Having the checklists is good and we can make it better by adding an exploratory test mode. The exploratory test mode is similar to recording mode (may be the same option) - where the application is started and the script is recorded. But the recorded script is not used for playback. It is used to provide the step by step operations for reproducing a bug. During this mode, you have an option of adding a test failure. When using this option, you can either provide free form text or use an existing checklist. Marathon will store the results including the recorded part of the script in a XML file. A report option provides the Text or HTML view of the results.<br />
Another feature of exploratory testing mode - for a later release - is the ability to add a window screen shot and making annotation markings on the screenshot image. This screenshot will also be added to the results.</p>
<p>How does these features sound? Do you think these will be useful? Please leave feedback in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.marathontesting.com/checklists-exploratory-testing-and-marathon.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Using Marathon for laying out a form</title>
		<link>http://blog.marathontesting.com/using-marathon-for-laying-out-a-formwe.html</link>
		<comments>http://blog.marathontesting.com/using-marathon-for-laying-out-a-formwe.html#comments</comments>
		<pubDate>Tue, 18 Nov 2008 06:24:09 +0000</pubDate>
		<dc:creator>KD</dc:creator>
		
		<category><![CDATA[Marathon]]></category>

		<guid isPermaLink="false">http://blog.marathontesting.com/?p=9</guid>
		<description><![CDATA[We have been working on creating a dialog (somewhat complicated) using grid bag layout. Designing the form became a hassle some components started moving around quite a bit.
Marathon to the rescue.

We named each of the components and panels that we are adding (using setName) and ran the application under Marathon (version 2.0b4 - yet to [...]]]></description>
			<content:encoded><![CDATA[<p>We have been working on creating a dialog (somewhat complicated) using grid bag layout. Designing the form became a hassle some components started moving around quite a bit.</p>
<p>Marathon to the rescue.</p>
<p><span id="more-9"></span></p>
<p>We named each of the components and panels that we are adding (using setName) and ran the application under Marathon (version 2.0b4 - yet to be released). The new version has a different assertion mechanism where by the component selected is highlighted.</p>
<p> </p>
<div id="attachment_10" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.marathontesting.com/wp-content/uploads/2008/11/eclipse001.png"><img class="size-medium wp-image-10" title="Marathon Assertion List" src="http://blog.marathontesting.com/wp-content/uploads/2008/11/eclipse001-300x267.png" alt="Assertions" width="300" height="267" /></a><p class="wp-caption-text">Assertions</p></div>
<p>You can see the semi-transparent Address field? Marathon by default shows each of the recognizable components by highlighting them. It is a nice side benefit.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.marathontesting.com/using-marathon-for-laying-out-a-formwe.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Running tests headless</title>
		<link>http://blog.marathontesting.com/running-tests-headless.html</link>
		<comments>http://blog.marathontesting.com/running-tests-headless.html#comments</comments>
		<pubDate>Tue, 10 Jun 2008 12:50:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Marathon]]></category>

		<guid isPermaLink="false">http://blog.marathontesting.com/?p=4</guid>
		<description><![CDATA[Updated. Thanks to Arun for giving me a pointer to pstools.
This will be part of Marathon User Guide when it comes out. I am writing these snippets so that you can benefit from them now.
Now that you wrote a lot tests using marathon  how do you run them? The problem with GUI testing is [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Updated. Thanks to Arun for giving me a pointer to pstools.</p></blockquote>
<blockquote><p>This will be part of Marathon User Guide when it comes out. I am writing these snippets so that you can benefit from them now.</p></blockquote>
<p>Now that you wrote a lot tests using <a href="http://www.marathontesting.com/">marathon</a>  how do you run them? The problem with GUI testing is that your desktop is tied up for the duration of the tests. The monitor blinks like a tube-light with a starter problem with Windows popping up all over with crazy titles - &#8216;testStartAndStopRecordingWithSetupAndTearDown&#8217; or &#8216;testDeleteFilesWithSomeFailures&#8217;. Even if you can live with this - all these popping up windows will be stealing your application&#8217;s focus (beside stealing yours) and some of your keystrokes and mouse clicks will go there. In the end you end up not knowing whether a test case failed because of you using the keyboard or a bug in the application under test.<br />
<span id="more-4"></span></p>
<h2>Using java.awt.headless</h2>
<p>Java since 1.4.2 supports a headless mode that is half-baked and not useful for the purposes we are talking about. Googling for &#8216;java headless&#8217; turns up <a href="http://java.sun.com/j2se/1.4.2/docs/guide/awt/AWTChanges.html">this page</a>, so I am pointing this out. Java support for headless is really for applications that need to run without a display and keyboard. Anyhow if you do not need a display then the whole of this article does not make sense.</p>
<h2>Running headless on Linux</h2>
<p>An elegant solution I found to run GUI test suites on Linux is to use Xvbf - a X server that simulates a display, mouse and keyboard. On ubuntu, the platform of choice for me, the Xvfb package comes with a script xvfb-run. Executing an application under Xvfb is just typing:</p>
<blockquote><p><code>xvfb-run marathon &lt;path-to-your-mpf&gt;</code></p></blockquote>
<p>The standard error and output will be on your terminal, so you can see the progress of your test case execution and any errors thrown up by the test run.</p>
<h2>Running headless on Windows</h2>
<h3>Using psexec</h3>
<blockquote><p>psexec is a small utility from <a href="http://www.sysinternals.com">Sysinternals</a> from the pstools package. You can <a href="http://www.sysinternals.com/Utilities/PsTools.html">Download it here</a>.</p></blockquote>
<p>psexec allows you to run applications on remote machines. We will use it to run marathon headless on Windows. Download the pstools archive and install on the machine. Add the installed directory to the path. There are two ways you can execute Marathon - with a console and without a console.</p>
<p>For using it with a console (so that you can see the progress):</p>
<blockquote><p><code>psexec -s cmd /c marathon -batch &lt;path-to-your-mpf&gt;</code></p></blockquote>
<p>If you are not interested in a console:</p>
<blockquote><p><code>psexec -s -d cmd /c marathon -batch &lt;path-to-your-mpf&gt;</code></p></blockquote>
<p>Note that <code>-s</code> uses the system account (i.e the administrator) to execute the command. I found it easier to create a batch file that runs Marathon with all options and execute the batch file using psexec:</p>
<blockquote><p><code>psexec -s cmd /c &lt;path-to-batch-file&gt;</code></p></blockquote>
<h3>Using telnet</h3>
<p>You can run the tests headless on Windows using the telnet service that is available on Windows XP Professional. You can enable telnet service from Control Panel -&gt; Services. Once you enable the service log-in using the command:</p>
<blockquote><p><code>telnet localhost</code></p></blockquote>
<p>Give your user name and password. You will land up at C:&gt; prompt. Run your command:</p>
<blockquote><p><code>marathon -batch &lt;path-to-your-mpf&gt;</code></p></blockquote>
<p>That is it. Your display, keyboard and mouse belong to you, no annoying pop-up windows to disturb you and Marathon chugs along running the application tests. You can use <code>-text, -html</code> or <code>-xml</code> arguments along with <code>-batch</code> so that the test results are captured in a report.</p>
<blockquote><p><strong>Note:</strong><br />
Running a telnet server is insecure. Modify your windows firewall settings to disable incoming connections. Default is to disable incoming  connections from Internet - it should be OK.</p>
<p><strong>Note:</strong><br />
It will be possible to automate the log-in part provided we have a telnet client that can take input from a file and send the commands to<br />
the server. I don&#8217;t know of any. Drop me a line if you know such a client for Windows.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.marathontesting.com/running-tests-headless.html/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
