<?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>Xored Software, Inc. &#187; Q7</title>
	<atom:link href="http://www.xored.com/category/q7/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xored.com</link>
	<description></description>
	<lastBuildDate>Thu, 16 May 2013 05:20:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>Default Contexts</title>
		<link>http://www.xored.com/2013/05/16/default-contexts/</link>
		<comments>http://www.xored.com/2013/05/16/default-contexts/#comments</comments>
		<pubDate>Thu, 16 May 2013 05:20:34 +0000</pubDate>
		<dc:creator>Anastasia Ahramenko</dc:creator>
				<category><![CDATA[Q7]]></category>

		<guid isPermaLink="false">http://www.xored.com/?p=693</guid>
		<description><![CDATA[It&#8217;s good practice to make test case to be focused on testing functionality itself and all operations for preparing application  should be moved out from test case to some place. In case of Q7 the contexts is the right place for these purposes. Q7 contexts are applied to application before test case execution. In eclipse there are several [...]]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s good practice to make test case to be focused on testing functionality itself and all operations for preparing application  should be moved out from test case to some place. In case of Q7 the contexts is the right place for these purposes. Q7 contexts are applied to application before test case execution. In eclipse there are several groups of standard mutable configurations/states: preferences, workspace, workbench.</p>
<p>In the process of using Q7 to create test projects, we came to the conclusion that some contexts should be executed before each test cases. For example, when testing JDT before each test should be cleared Workspace and Working Set, and terminated all active launches. Initially for these purpose Group Context is used, this context should be added to each test case in Q7 project. But this practice was uncomfortable, because at the addition of a new test case, it was necessary not to forget to add the Default Group Context. Since version 1.3 of Q7 introduced the concept of the Default Contexts list.</p>
<p>At the creation new Q7 Project the &#8220;Project Settings&#8221; file is created automatically:</p>
<p><a href="http://www.xored.com/2013/05/16/default-contexts/dc_1/" rel="attachment wp-att-699"><img class="alignnone size-full wp-image-699" alt="dc_1" src="http://www.xored.com/wp-content/themes/xored/uploads/dc_1.png" width="260" height="107" /></a></p>
<p>Description of project can be given in &#8220;Description&#8221; section of the &#8220;Project Settings&#8221;. Default Contexts can be set in &#8220;Default Contexts&#8221; section. Contexts to default contexts list can be added from this Q7 project and also from related Q7 projects.</p>
<p><a href="http://www.xored.com/2013/05/16/default-contexts/dc_2_3/" rel="attachment wp-att-768"><img class="alignnone size-full wp-image-768" alt="dc_2_3" src="http://www.xored.com/wp-content/themes/xored/uploads/dc_2_3.png" width="524" height="374" /></a></p>
<p>These default contexts are displayed in test cases. Sequence contexts defined in the Default Contexts  list can not be changed in the test case and custom contexts can be added to test case only after default contexts. &#8220;Project Settings&#8221; can be opened from test case by clicking on &#8220;Configure Project Default Contexts&#8221; link.</p>
<p><a href="http://www.xored.com/2013/05/16/default-contexts/dc_3_3/" rel="attachment wp-att-769"><img class="alignnone size-full wp-image-769" alt="dc_3_3" src="http://www.xored.com/wp-content/themes/xored/uploads/dc_3_3.png" width="524" height="376" /></a></p>
<p>At the replaying test case the default contexts are displayed in &#8220;Execution View&#8221;. Custom contexts are executed after default contexts execution.</p>
<p><a href="http://www.xored.com/2013/05/16/default-contexts/dc_4_3/" rel="attachment wp-att-770"><img class="alignnone size-full wp-image-770" alt="dc_4_3" src="http://www.xored.com/wp-content/themes/xored/uploads/dc_4_3.png" width="405" height="242" /></a></p>
<p>More information about the creation and application of Q7 contexts you can get from the Q7 demos - <a href="http://q7.xored.com/demos">http://q7.xored.com/demos</a>.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xored.com/2013/05/16/default-contexts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UI Testing of rulers in source code editors</title>
		<link>http://www.xored.com/2013/05/03/testing-rulers/</link>
		<comments>http://www.xored.com/2013/05/03/testing-rulers/#comments</comments>
		<pubDate>Fri, 03 May 2013 09:48:50 +0000</pubDate>
		<dc:creator>Ivan Inozemtsev</dc:creator>
				<category><![CDATA[Q7]]></category>

		<guid isPermaLink="false">http://www.xored.com/?p=679</guid>
		<description><![CDATA[Rulers are important part of modern IDEs, which can display a lot of information, like here: In this post I am going to illustrate Q7&#8242;s built-in support for rulers and describe how to create a couple test cases for various rulers. As an example we are going to use Java editor and a simple &#8220;Hello, [...]]]></description>
				<content:encoded><![CDATA[<p>Rulers are important part of modern IDEs, which can display a lot of information, like here:</p>
<p style="width:100%; display:block; float:left;"><a href="http://www.xored.com/wp-content/themes/xored/uploads/editor.png"><img alt="" src="http://www.xored.com/wp-content/themes/xored/uploads/editor.png"/></a></p>
<p>In this post I am going to illustrate Q7&#8242;s built-in support for rulers and describe how to create a couple test cases for various rulers. As an example we are going to use Java editor and a simple &#8220;Hello, world!&#8221; Java class, like on a screenshot above. A sample Q7 Project with tests is available at Github &ndash; <a href="https://github.com/xored/q7.examples.rulers">https://github.com/xored/q7.examples.rulers</a>
</p>
<p><span id="more-679"></span></p>
<p>
  Let&#8217;s start with a test case, which checks that if we double-click a ruler, breakpoint will be added and a tooltip will display a method name. To do this:
</p>
<ol>
<li>Start recording  </li>
<li>Double-click a ruler on line 9  </li>
<li>Move a mouse over breakpoint so that tooltip appears.  </li>
<li>Switch to Q7 assertion mode by pressing <code>Alt+Shift+7</code> hotkey, so that tooltip won&#8217;t disappear. </li>
<li>Click on a tooltip, check &#8216;text&#8217; field in Assertion Window and click &#8220;Add&#8221;</li>
</ol>
<p>
  That&#8217;s it, stop recording and save a test case, now Control Panel should display a text like this:
</p>
<pre>
with [get-editor "Program.java" | get-left-ruler] {
    get-ruler-column AnnotationColumn | double-click-ruler -line 9
    hover-ruler -line 9
}
get-window -from "Information Window" | get-editbox | get-property text 
    | equals "Line breakpoint:Program [line: 9] - main(String[])" 
    | verify-true
</pre>
<p>
  In a similar way a test case for asserting folded content can be added &ndash; note that in the beginning of a test case we also expanding all folded blocks via context menu in rulers:
</p>
<pre>
with [get-editor "Program.java" | get-left-ruler] {
    get-menu "Folding/Expand All" | click
    get-ruler-column ProjectionRulerColumn | click-ruler -line 5
    get-ruler-column ProjectionRulerColumn | hover-ruler -line 6
}
get-window -from "SourceViewerInformationControl.<init>()" | get-editbox | 
    get-property text | equals "/**\n"
                             + "\t * @param args\n"
                             + "\t */" | verify-true
</pre>
<p>
  A sample Q7 Project with these test cases and a couple more is available at Github &ndash; <a href="https://github.com/xored/q7.examples.rulers">https://github.com/xored/q7.examples.rulers</a>. To run these tests locally without Q7 installation and zero-configuration, simply run these commands in your console (Windows, Linux, Mac OS X):
</p>
<pre>
  $ git clone git://github.com/xored/q7.examples.rulers.git
  $ cd q7.examples.rulers
  $ mvn clean install
</pre>
<p>
  There are two bugs now which which might prevent recorded tests from executing, so manual modification might be required in Q7 up to 1.3.2:
</p>
<ol>
<li><a href="http://jira4.xored.com/browse/QS-2624">QS-2624 &ndash; Tooltip diappears too quickly after <b>hover-ruler</b> command</a>.<br />
    Q7 implementation of <b>hover-ruler</b> is pretty straightforward &ndash; based on given line and ruler column it calculates mouse coordinates and sends two mouse events &ndash; <b>MouseMove</b> and <b>MouseHover</b>. But for some reason tooltips for some sort of markers (for instance, TODO markers and Error markers) disappear almost immediately, thus a next command asserting a tooltip cannot find floating window. The workaround is simple and works on all platforms, but totally unexpected and so far we have no idea why does it work &ndash; but adding a <a href="#hover-text">hover-text</a> command on an editor fixes an issue and tooltips stop disappearing:</p>
<pre>
 with [get-editor "Program.java"] {
     get-text-viewer | hover-text 1 1 // Workaround for QS-2624
     get-left-ruler | get-ruler-column ProjectionRulerColumn | hover-ruler -line 6
 }
    </pre>
</li>
<li><a href="http://jira4.xored.com/browse/QS-2625">QS-2625 &ndash; Q7 does not capture ruler column when recording hover-ruler</a>. This issue is trivial and will be fixed in 1.3.2 and has a simple workaround too. Moving a mouse over ruler&#8217;s marker records command like <code>get-left-ruler | hover-ruler 4</code>. The fix is to insert missing <b>get-ruler-column</b> between <b>get-ruler</b> and <b>hover-ruler</b>. The simplest way to discover ruler column name is to click on it, but just in case here are the names of ruler columns available:
<ul>
<li><b>AnnotationColumn</b> &ndash; shows breakpoints, TODO items, error markers
      </li>
<li><b>ProjectionRulerColumn</b> &ndash; shows expand/collapse items
      </li>
<li><b>LineNumberColumn</b> &ndash; shows line numbers and/or version control system&#8217;s blame annotations
      </li>
</ul>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.xored.com/2013/05/03/testing-rulers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Test your plugins on multiple versions of Eclipse</title>
		<link>http://www.xored.com/2013/04/23/test-your-plugins-on-multiple-versions-of-eclipse/</link>
		<comments>http://www.xored.com/2013/04/23/test-your-plugins-on-multiple-versions-of-eclipse/#comments</comments>
		<pubDate>Tue, 23 Apr 2013 06:43:20 +0000</pubDate>
		<dc:creator>Ivan Inozemtsev</dc:creator>
				<category><![CDATA[Q7]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[Maven]]></category>

		<guid isPermaLink="false">http://www.xored.com/?p=672</guid>
		<description><![CDATA[Typically UI testing tools work with applications. But what if a final product is an update site? While it might be acceptable to install features under development into some version of Eclipse during test creation, when it comes to continuous integration things get more complicated. Creating some RCP application which includes required features requires extra [...]]]></description>
				<content:encoded><![CDATA[<p>Typically UI testing tools work with applications. But what if a final product is an update site? While it might be acceptable to install features under development into some version of Eclipse during test creation, when it comes to continuous integration things get more complicated. Creating some RCP application which includes required features requires extra effort and may significantly slow down the build.
</p>
<p><span id="more-672"></span></p>
<p>
One of the greatest advantages of Q7, when it comes to continuous integration, is its ability to &#8216;install&#8217; plugins from given p2 repository into some RCP before running UI tests. Besides making a build cross-platform and reducing build time, this feature allows to test product on several versions of Eclipse.
</p>
<p>
To illustrate this, we created a sample project on GitHub &ndash; <a href="http://github.com/xored/q7.examples.multirun">http://github.com/xored/q7.examples.multirun</a>. It contains a simple plugin (based on built-in Eclipse plugin template with a sample view) and few Q7 tests, but the real magic happens when you run these two commands in your shell on Windows, Mac OS X or Linux:
</p>
<pre class="src src-fundamental">$ git clone git://github.com/xored/q7.examples.multirun
$ mvn clean install
</pre>
<p>
With a zero configuration, this simple command will build an update site with a plugin and run the same project with Q7 tests on four versions of Eclipse &ndash; 3.5, 3.6, 3.7, 4.2. When this project is added as a build job on Hudson, it displays nice results with a total of 12 tests:
</p>
<p><a href="http://www.xored.com/2013/04/23/test-your-plugins-on-multiple-versions-of-eclipse/hudson/" rel="attachment wp-att-673"><img src="http://www.xored.com/wp-content/themes/xored/uploads/hudson.png" alt="hudson" width="573" height="181" class="aligncenter size-full wp-image-673" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.xored.com/2013/04/23/test-your-plugins-on-multiple-versions-of-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script parameterization</title>
		<link>http://www.xored.com/2012/12/20/script-parameterization/</link>
		<comments>http://www.xored.com/2012/12/20/script-parameterization/#comments</comments>
		<pubDate>Thu, 20 Dec 2012 08:20:38 +0000</pubDate>
		<dc:creator>Ivan Inozemtsev</dc:creator>
				<category><![CDATA[Q7]]></category>
		<category><![CDATA[ECL]]></category>

		<guid isPermaLink="false">http://www.xored.com/?p=653</guid>
		<description><![CDATA[One of the most asked features for Q7 is to execute a same test with different parameters. I&#8217;m going to demonstrate how it is possible to achieve the same effect using ECL. As an example, let&#8217;s test error messages in JDT New Class Wizard. We start with a Java project with a single class: At [...]]]></description>
				<content:encoded><![CDATA[<p>One of the most asked features for Q7 is to execute a same test with different parameters. I&#8217;m going to demonstrate how it is possible to achieve the same effect using ECL. As an example, let&#8217;s test error messages in JDT New Class Wizard. We start with a Java project with a single class:</p>
<p style="width:100%; display:block; float:left;">
<img alt="" src="http://www.xored.com/wp-content/themes/xored/uploads/project.png" />
</p>
<p>At first, let&#8217;s record an initial script which launches new class wizard, sets package and class name and asserts an error message:</p>
<pre>get-view "Package Explorer" | get-tree | select example | get-menu "New/Class" | click
with [get-window "New Java Class"] {
    get-editbox -after [get-label "Package:"] | set-text "org.example"
    get-editbox -after [get-label "Name:"] | set-text Class1
    get-editbox -after [get-label "Java Class"] | get-property text |
       equals "Type already exists." | verify-true
}
<span id="more-653"></span>
get-window "New Java Class" | get-button Cancel | click</pre>
<p>Now, what we really want is to type various values into Package and Name fields and make sure that error message changes accordingly. As a next step, let&#8217;s parameterize a script using <a href="http://download.xored.com/q7/docs/ecl-api/latest#get-param">get-param</a> ande <a href="http://download.xored.com/q7/docs/ecl-api/latest#set-param">set-param</a> commands:</p>
<pre>get-view "Package Explorer" | get-tree | select example | get-menu "New/Class" | click

set-param package "org.example"
set-param class "Class1"
set-param message "Type already exists."

with [get-window "New Java Class"] {
    get-editbox -after [get-label "Package:"] | set-text [get-param package]
    get-editbox -after [get-label "Name:"] | set-text [get-param class]
    get-editbox -after [get-label "Java Class"] | get-property text |
       equals [get-param message] | verify-true
}
get-window "New Java Class" | get-button Cancel | click</pre>
<p>So there are two logical blocks now: the first one sets parameters, the second one performs parameterized actions. So ideally we want to have a several &#8220;parameter&#8221; blocks and execute an &#8220;action&#8221; block after each of them. In ECL we can do that using two commands – <a href="&quot;http://download.xored.com/q7/docs/ecl-api/latest#emit">emit</a> and <a href="&quot;http://download.xored.com/q7/docs/ecl-api/latest#repeat-with">repeat-with</a>. The first one just takes an arbitrary number of arguments of any type and writes them into an output pipe, so we can pass several &#8220;parameter&#8221; scripts to it, and it will write them into output.</p>
<p>The <code>repeat-with</code> is more tricky and does the following:</p>
<ol>
<li>accepts a script from an argument and reads scripts from input pipe</li>
<li>for each script from input pipe, executes an input script followed by the argument script</li>
<li>writes aggregated output</li>
</ol>
<p>Therefore, we can emit multiple parameter blocks and repeat them with a given action block:</p>
<pre>emit {
   set-param package "org.example"
   set-param class "Class1"
   set-param message "Type already exists."
} {
   set-param package ""
   set-param class "Class1"
   set-param message "The use of the default package is discouraged."
} | repeat-with {
   with [get-window "New Java Class"] {
      get-editbox -after [get-label "Package:"] | set-text [get-param package]
      get-editbox -after [get-label "Name:"] | set-text [get-param class]
      get-editbox -after [get-label "Java Class"] | get-property text |
       equals [get-param message] | verify-true
   }
}
get-window "New Java Class" | get-button Cancel | click</pre>
<p>The example above uses only two paramerer blocks, but there can be as many such blocks as necessary, take a look at this video:<br />
<iframe width="560" height="315" src="http://www.youtube.com/embed/p2Xun1PEYhE" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.xored.com/2012/12/20/script-parameterization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asserting context menus</title>
		<link>http://www.xored.com/2012/12/13/asserting-context-menus/</link>
		<comments>http://www.xored.com/2012/12/13/asserting-context-menus/#comments</comments>
		<pubDate>Thu, 13 Dec 2012 13:31:26 +0000</pubDate>
		<dc:creator>Ivan Inozemtsev</dc:creator>
				<category><![CDATA[Q7]]></category>
		<category><![CDATA[ECL]]></category>

		<guid isPermaLink="false">http://www.xored.com/?p=641</guid>
		<description><![CDATA[During test case recording Q7 assertion mode allows to select a UI element in application under test and generate assertion lines in a script for selected properties. For instance, to check that &#8220;Save&#8221; button on Eclipse toolbar is disabled, we can switch to recording mode, select a button, check &#8220;enablement&#8221; property and click &#8220;Add&#8221;: As [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.xored.com/2012/12/13/asserting-context-menus/assert/" rel="attachment wp-att-642"></a>
<p>During test case recording Q7 <a href="http://help.xored.com/display/Q7/Control+Panel#ControlPanel-04HowtoChooseaRecordingMode">assertion mode</a> allows to select a UI element in application under test and generate assertion lines in a script for selected properties. For instance, to check that &#8220;Save&#8221; button on Eclipse toolbar is disabled, we can switch to recording mode, select a button, check &#8220;enablement&#8221; property and click &#8220;Add&#8221;:
</p>
<p style="width:100%; display:block; float:left;">
<a href="http://www.xored.com/wp-content/themes/xored/uploads/assert.png"><img src="http://www.xored.com/wp-content/themes/xored/uploads/assert.png"  /></a>
</p>
<p>
As a result, the following line will be appended to the script:
</p>
<pre>
get-button "Save (M1+S)" | get-property enablement | equals false |
   verify-true
</pre>
<p>
And in case this button is enabled during replay, test case will fail with a message: <em>Assertion of enablement failed: expected:&lt;false&gt; but was:&lt;true&gt;</em>
</p>
<p>
Yesterday one of our customers asked how to assert properties of context menus, as there&#8217;s a problem &ndash; once user switches to assertion mode, he cannot invoke context menu, as all user operations are blocked. And if context menu is open and then user goes to Control panel, context menu looses focus and closes. So, what can we do here to assert them?
</p>
<p><span id="more-641"></span></p>
<p>
The solution is to manually write ECL commands to perform these assertions. As an example, suppose we need to assert the following statements about context menu of a Java project in Package explorer:
</p>
<ol>
<li>The menu item <strong>New</strong> has children
</li>
<li>The menu item <strong>Close Project</strong> is enabled
</li>
<li>The menu item <strong>Compare With / Each Other</strong> is disabled
</li>
<li>The menu item <strong>Open Project</strong> does not exist
</li>
</ol>
<p>
At first, let&#8217;s take a look at what is being recorded when we click on some item in context menu:
</p>
<pre>
get-view "Package Explorer" | get-tree |
 select sample | get-menu "New/Class" | click
</pre>
<p>
So the sctipt takes a package explorer, finds a tree in it, selects an item &#8220;sample&#8221;, gets context menu item &#8220;New -&gt; Class&#8221; and clicks on it. Comparing this script with an assertion example above, We can replace a click with a series of commands for assertion like this:
</p>
<pre>
get-view "Package Explorer" | get-tree | select sample | 
 get-menu "New/Class" | get-property enablement | equals true |
 verify-true
</pre>
<p>
Here is a list of properties on menu items which can be used for assertion:
</p>
<ul>
<li><b>enablement</b> &ndash; whether an item is enabled
</li>
<li><b>accelerator</b> &ndash; assigned hotkey
</li>
<li><b>cascade</b> &ndash; whether an item has children
</li>
<li><b>caption</b> &ndash; menu item text
</li>
</ul>
<p>
Given that, it is easy to implement three first assertions, but how to make sure that an item does not exist? This can be done by using <a href="http://download.xored.com/docs/ecl-api/latest#verify-error">verify-error</a> command, which accepts a script as a parameter and passes if script fails, and fails otherwise. Therefore, we can write the following script:
</p>
<pre>
with [get-view "Package Explorer" | get-tree | select sample] {
    get-menu "New" | get-property cascade | equals true | verify-true
    get-menu "Close Project" | get-property enablement | equals true |
       verify-true
    get-menu "Compare With/Each Other" | get-property enablement | 
       equals false | verify-true
    verify-error {
        get-menu "Open Project"
    }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.xored.com/2012/12/13/asserting-context-menus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selecting values in combo</title>
		<link>http://www.xored.com/2012/12/11/selecting-values-in-combo/</link>
		<comments>http://www.xored.com/2012/12/11/selecting-values-in-combo/#comments</comments>
		<pubDate>Tue, 11 Dec 2012 11:44:08 +0000</pubDate>
		<dc:creator>Ivan Inozemtsev</dc:creator>
				<category><![CDATA[Q7]]></category>
		<category><![CDATA[ECL]]></category>

		<guid isPermaLink="false">http://www.xored.com/?p=616</guid>
		<description><![CDATA[When user selects a value from combobox, Q7 records snippet like this: get-preferences-menu &#124; click with [get-window Preferences] { get-tree &#124; select "Java/Compiler" get-group "JDK Compliance" &#124; get-combo -after [get-label "Compiler compliance level:"] &#124; set-text "1.6" } Here we record a set-text command to set a value in combobox, and this command works fine independently [...]]]></description>
				<content:encoded><![CDATA[<p>When user selects a value from combobox, Q7 records snippet like this:</p>
<pre>get-preferences-menu | click
with [get-window Preferences] {
    get-tree | select "Java/Compiler"
    get-group "JDK Compliance" | get-combo -after [get-label 
      "Compiler compliance level:"] | set-text "1.6"
}</pre>
<p>Here we record a <a href="http://download.xored.com/q7/docs/ecl-api/latest#set-text">set-text</a> command to set a value in combobox, and this command works fine independently whether the combobox is readonly or not.</p>
<p>However, recently we&#8217;ve got an interesting use case from a customer. The application under test has a combobox with values varying on each launch, so line like this is being recorded and cannot be replayed on consequent executions:</p>
<pre>get-combo -after [get-label "Value:"] | set-text "Value #123232"</pre>
<p>Of course, we filed (and by the time of writing this post already <a href="http://jira4.xored.com/browse/QS-2250">fixed</a>) an issue, but it is an interesting to find a workaround for this issue using current release of Q7. Suppose we want to always select the first value from a combobox. As a reference example we will use a <strong>Compiler compliance level</strong> combobox in JDT preferences.<br />
<span id="more-616"></span><br />
Let&#8217;s start recording, open a preference dialog and switch to <a href="http://help.xored.com/display/Q7/Control+Panel#ControlPanel-04HowtoChooseaRecordingMode">assertion mode</a> to get an information about combobox:</p>
<p style="width:100%; display:block; float:left;"><a href="http://www.xored.com/wp-content/themes/xored/uploads/properties.png"><img alt="" src="http://www.xored.com/wp-content/themes/xored/uploads/properties.png" width="500" /></a></p>
<p>Advanced properties of assertion dialog shows all properties of selected widget via reflection, so we can find all items available in given combo. If we check the first item in combobox and click <strong>Add</strong>, the following line is added to recorded script:</p>
<pre>get-window Preferences | get-group "JDK Compliance" | get-combo -after 
   [get-label "Compiler compliance level:"]  | 
   get-property "getItems().String[0]" | 
   equals "1.3" | verify-true</pre>
<p>In fact, we don&#8217;t need this assertion, but rather we need to get this value and use it as an argument to <strong>set-text</strong> command. Without extra argument <a href="http://download.xored.com/q7/docs/ecl-api/latest#get-property">get-property</a> returns a special assertion handle object, which is later being used to build a descriptive error message in case of assertion failure, and in order to extract actual property value, we need to add <strong>-raw</strong> argument to it.</p>
<p>So, going back to the snippet in the beginning of the post and using <a href="http://download.xored.com/q7/docs/ecl-api/latest#with">with</a> command to shorten the script, we can get the following:</p>
<pre>get-preferences-menu | click

with [get-window Preferences] {
    get-tree | select "Java/Compiler"

    with [get-group "JDK Compliance" | get-combo -after 
        [get-label "Compiler compliance level:"]] {
        set-text [get-property "getItems().String[0]" -raw]
    }
}</pre>
<p>As a result, this script will always select the first value in this combo:</p>
<p><a href="http://www.xored.com/wp-content/themes/xored/uploads/result.png"><img alt="" src="http://www.xored.com/wp-content/themes/xored/uploads/result.png" width="500" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.xored.com/2012/12/11/selecting-values-in-combo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Q7 Technology Stack becomes free and goes into the skies</title>
		<link>http://www.xored.com/2012/10/19/q7-technology-stack-becomes-free-and-goes-into-the-skies/</link>
		<comments>http://www.xored.com/2012/10/19/q7-technology-stack-becomes-free-and-goes-into-the-skies/#comments</comments>
		<pubDate>Fri, 19 Oct 2012 13:22:42 +0000</pubDate>
		<dc:creator>Andrey Platov</dc:creator>
				<category><![CDATA[Press Releases]]></category>
		<category><![CDATA[Q7]]></category>
		<category><![CDATA[EclipseCon]]></category>
		<category><![CDATA[Europe]]></category>

		<guid isPermaLink="false">http://www.xored.com/?p=606</guid>
		<description><![CDATA[LUDWIGSBURG, Germany &#8212; September 19, 2012 &#8212; Xored today announced new pricing model for its Q7 Technology Stack &#8212; world&#8217;s most advanced UI testing tools for Eclipse-based applications will be free of charge. No upfront fees. Unlimited users. Unlimited test runner instances. Period. &#8220;We believe new Q7 pricing model will be very fair-minded&#8221;, said Andrey [...]]]></description>
				<content:encoded><![CDATA[<p>LUDWIGSBURG, Germany &#8212; September 19, 2012 &#8212; Xored today announced new pricing model for its Q7 Technology Stack &#8212; world&#8217;s most advanced UI testing tools for Eclipse-based applications will be free of charge. No upfront fees. Unlimited users. Unlimited test runner instances. Period.</p>
<p><span id="more-606"></span></p>
<p><em>&#8220;We believe new Q7 pricing model will be very fair-minded&#8221;</em>, said <a href="http://ru.linkedin.com/in/platov">Andrey Platov</a>, Xored&#8217;s president. <em>&#8220;Testing process generate value only when tests are executed. So we will charge our users for test executions only. Everything else such as tools and infrastructure will be free.&#8221;</em></p>
<h2>Q7 Cloud</h2>
<p>Q7 Cloud is the next big move, helping teams to be agile. Instead of building expensive infrastructure to support Continuous Integration and Delivery, teams can forward UI testing phase to the Cloud and back with zero-configuration efforts, gaining unprecedented ROI &#8212; just paying a fraction of a cent per test executed without any investment in software, hardware, and administration.</p>
<p><em>&#8220;Tools like Q7 are changing GUI testing landscape. Small teams or individual developers are able to maintain huge GUI testbases, but another problem arises: GUI tests are slow, and execution time grows to tens of hours on a single box&#8221;</em>, said <a href="http://ru.linkedin.com/in/iinozemtsev">Ivan Inozemtsev</a>, Xored&#8217;s VP of Research &amp; Development. <em>&#8220;Now you can run your tests in the Q7 Cloud, distributing tests execution among dozens of machines.&#8221;</em></p>
<p>Tests are developed to run them, people are investing in tests development, continuous integration, and tooling for only one reason: the ability to run tests in exchange for information about quality and localisation of a problem as a return of investment in testing. New Q7&#8242;s pricing model clearly reflects this fact, as well as cuts your investments in software, hardware, and test lab administration down to zero.</p>
<h2>Pricing &amp; Availability</h2>
<p>New pricing plans available right now for eligible persons and companies. Request invite at <a href="http://www.eclipse-testing.com">http://www.eclipse-testing.com</a></p>
<ul>
<li>FREE: up to 5,000 test cases executed/month for FREE</li>
<li>Starter $99 / month: Includes 10,000 test executions; $0.0099 per test execution</li>
<li>Standard $399 / month: Includes 50,000 test executions; $0.0079 per test execution</li>
<li>Professional $699 / month: Includes 100,000 test executions; $0.0069 per test execution</li>
<li>Enterprise $1,999 / month: Includes 500,000 test executions; $0.0039 per test execution</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.xored.com/2012/10/19/q7-technology-stack-becomes-free-and-goes-into-the-skies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Q7 and Code Coverage</title>
		<link>http://www.xored.com/2012/06/21/code-coverage/</link>
		<comments>http://www.xored.com/2012/06/21/code-coverage/#comments</comments>
		<pubDate>Thu, 21 Jun 2012 19:15:21 +0000</pubDate>
		<dc:creator>Andrey Platov</dc:creator>
				<category><![CDATA[Q7]]></category>
		<category><![CDATA[Code Coverage]]></category>

		<guid isPermaLink="false">http://www.xored.com/?p=576</guid>
		<description><![CDATA[Sometimes our users are asking us about Code Coverage reports with Q7. So this article is to unveil our vision on this topic. First of all we believe it would be relatively easy to get code coverage reports for Q7 tests using third-party tools such as Emma or JaCoCo. However, we think any code coverage [...]]]></description>
				<content:encoded><![CDATA[<p>Sometimes our users are asking us about Code Coverage reports with Q7. So this article is to unveil our vision on this topic. First of all we believe it would be relatively easy to get code coverage reports for Q7 tests using third-party tools such as <a href="http://emma.sourceforge.net/">Emma</a> or <a href="http://www.eclemma.org/jacoco/">JaCoCo</a>. However, we think any code coverage measurements are useless (or evil) when it comes to functional testing.<span id="more-576"></span></p>
<h2>Unit Testing and Code Coverage</h2>
<p>Code Coverage is definitively important metric when you are doing Unit Testing. Since the ultimate goal of Unit Testing is to ensure all your code (units, classes) is working properly (as designed) &#8212; Code Coverage level reflects your level of assurance &#8211; a percentage of your code, which is behave as expected.</p>
<p>This is natural mapping between unit tests and corresponding pieces of code which is covered by tests. So having 10% of code covered with unit tests you may worry about your codebase quality, but having 90% of code covered with unit tests you may be much more relaxed knowing that major part of your codebase is working as expected.</p>
<h2>Functional Testing and Functionality Coverage</h2>
<p>Nevertheless functional testing looks quite similar to unit testing, they sits on another level. The goal of Functional Testing is to ensure all the application functionality delivered to the user, and those functions works as expected. Funny thing that any code coverage measurements would not help you to understand amount of planned functionality has been implemented and which amount is working properly.</p>
<p>What you definitely need to know when working on functional tests is <strong>Functionality Coverage</strong> in some form (like User Stories or Software Requirements). There is natural mapping between functional tests and User Stories, which are covered by tests. So when it comes to functional testing the definitive goal of QA/Dev team should be 100% <em>Functionality Coverage</em>, which has no connection to <em>Code Coverage</em>.</p>
<h2>Call for Comments</h2>
<p>All of the above is just only our current opinion, and we&#8217;d be happy to hear any contras/ideas. Please share your thoughts.</p>
<p>Kind Regards,<br/>Q7 Development Team</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xored.com/2012/06/21/code-coverage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
