<?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>Pankaj Nakhat&#039;s blog :  All About Agile Testing</title>
	<atom:link href="http://www.pankajnakhat.com/blog1/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pankajnakhat.com/blog1</link>
	<description>All about Testing</description>
	<lastBuildDate>Sun, 11 Mar 2012 11:12:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>What is BDD ?</title>
		<link>http://www.pankajnakhat.com/blog1/bdd/03/what-is-bdd/</link>
		<comments>http://www.pankajnakhat.com/blog1/bdd/03/what-is-bdd/#comments</comments>
		<pubDate>Sun, 11 Mar 2012 09:10:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[BDD]]></category>
		<category><![CDATA[Jbehave]]></category>

		<guid isPermaLink="false">http://www.pankajnakhat.com/blog1/?p=313</guid>
		<description><![CDATA[What is BDD View more PowerPoint from pnakhat]]></description>
			<content:encoded><![CDATA[<div style="width:425px" id="__ss_11957714"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/pnakhat/what-is-bdd" title="What is BDD" target="_blank">What is BDD</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/11957714" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
<div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/thecroaker/death-by-powerpoint" target="_blank">PowerPoint</a> from <a href="http://www.slideshare.net/pnakhat" target="_blank">pnakhat</a> </div>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.pankajnakhat.com/blog1/bdd/03/what-is-bdd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jbehave Story Navigator &#8211; Dictionary of all the steps</title>
		<link>http://www.pankajnakhat.com/blog1/bdd/03/jbehave-story-navigator-dictionary-of-all-the-steps/</link>
		<comments>http://www.pankajnakhat.com/blog1/bdd/03/jbehave-story-navigator-dictionary-of-all-the-steps/#comments</comments>
		<pubDate>Sun, 04 Mar 2012 23:00:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[BDD]]></category>
		<category><![CDATA[Jbehave]]></category>

		<guid isPermaLink="false">http://www.pankajnakhat.com/blog1/?p=286</guid>
		<description><![CDATA[I have been wondering for a while, if there was a way to get all my BDD steps in one place to so that I can do a search on the existing steps. As the Library of steps grows gradually often finding existing steps becomes a lazy and tedious activity. And then we end up [...]]]></description>
			<content:encoded><![CDATA[<p>I have been wondering for a while, if there was a way to get all my BDD steps in one place to so that I can do a search on the existing steps. As the Library of steps grows gradually often finding existing steps becomes a lazy and tedious activity. And then we end up with multiple steps doing same things.</p>
<p>Jbehave reports can be ebabled to show something which is called Storynavigator. Its a client side javascript library which enabled browser to read meta data generated by <a href="http://jbehave.org/reference/stable/cross-reference.html" target="_blank">cross referencing</a> in Jbehave. Cross referencing can be enabled very easily from the configuration and it then generated the meta data which can be used by this story navigator.</p>
<p>How to enable cross referencing in Jbehave configuration?</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">    @Override
    <span style="color: #000000; font-weight: bold;">public</span> Configuration configuration<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    	CrossReference xref <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> CrossReference<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">Class</span> embeddableClass <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">getClass</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">// Start from default ParameterConverters instance</span>
        ParameterConverters parameterConverters <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ParameterConverters<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">// factory to allow parameter conversion and loading from external resources (used by StoryParser too)</span>
        ExamplesTableFactory examplesTableFactory <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ExamplesTableFactory<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> LocalizedKeywords<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, <span style="color: #000000; font-weight: bold;">new</span> LoadFromClasspath<span style="color: #009900;">&#40;</span>embeddableClass<span style="color: #009900;">&#41;</span>, parameterConverters<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">// add custom coverters</span>
        parameterConverters.<span style="color: #006633;">addConverters</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> DateConverter<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">SimpleDateFormat</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;yyyy-MM-dd&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>,
                <span style="color: #000000; font-weight: bold;">new</span> ExamplesTableConverter<span style="color: #009900;">&#40;</span>examplesTableFactory<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        parameterConverters.<span style="color: #006633;">addConverters</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> MyConverter<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        parameterConverters.<span style="color: #006633;">addConverters</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> StudentConverter<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> ExamplesTableFactory<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> MostUsefulConfiguration<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
            .<span style="color: #006633;">useStoryLoader</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> LoadFromClasspath<span style="color: #009900;">&#40;</span>embeddableClass<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
            .<span style="color: #006633;">useStoryParser</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> RegexStoryParser<span style="color: #009900;">&#40;</span>examplesTableFactory<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> 
            .<span style="color: #006633;">useStoryReporterBuilder</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> StoryReporterBuilder<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
                .<span style="color: #006633;">withCodeLocation</span><span style="color: #009900;">&#40;</span>CodeLocations.<span style="color: #006633;">codeLocationFromClass</span><span style="color: #009900;">&#40;</span>embeddableClass<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
                .<span style="color: #006633;">withDefaultFormats</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
                .<span style="color: #006633;">withFormats</span><span style="color: #009900;">&#40;</span>CONSOLE, TXT, <span style="color: #003399;">HTML</span>, XML<span style="color: #009900;">&#41;</span>
                .<span style="color: #006633;">withCrossReference</span><span style="color: #009900;">&#40;</span>xref<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
            .<span style="color: #006633;">useParameterConverters</span><span style="color: #009900;">&#40;</span>parameterConverters<span style="color: #009900;">&#41;</span>    
            .<span style="color: #006633;">useStepMonitor</span><span style="color: #009900;">&#40;</span>xref.<span style="color: #006633;">getStepMonitor</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

<p>Now the next step is to copy the JS libraries in your project and make sure they are copied in the view directory. Download the all the files and folder from here <a href="https://github.com/jbehave/jbehave-core/tree/master/jbehave-navigator/src/main/resources">https://github.com/jbehave/jbehave-core/tree/master/jbehave-navigator/src/main/resources</a>. Copy them under src/main/storynavigator folder in your source.</p>
<p>Add this confif in your POM files, so that these files are copied in the Jbehave view directory</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">        ${basedir}/src/main/storynavigator
        ${project.build.directory}/jbehave/view
        false</pre></div></div>

<p>Now every run will generate a file called navigator.html inside /target/jbehave/view.</p>
<p>First tab is Stories, it will allow searching on story description, narrative and meta tag. Second tab is the Steps Tab, this will allow searching all the steps in your step classes.</p>
<p>Bit of learning &#8211; You will not see data in Stories tab for you story if no meta tags are used in the report.</p>
<p>&nbsp;</p>
<p><img class="alignleft" src="http://pankajnakhat.com/blog1/wp-content/uploads/2011/06/storyNav.png" alt="" width="800" height="600" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pankajnakhat.com/blog1/bdd/03/jbehave-story-navigator-dictionary-of-all-the-steps/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Agile Testing challenges and overcoming effectively</title>
		<link>http://www.pankajnakhat.com/blog1/agile-testing/08/agile-testing-challenges-and-overcoming-effectively/</link>
		<comments>http://www.pankajnakhat.com/blog1/agile-testing/08/agile-testing-challenges-and-overcoming-effectively/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 10:26:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Agile Test Planning]]></category>
		<category><![CDATA[Agile Testing]]></category>

		<guid isPermaLink="false">http://www.pankajnakhat.com/blog1/?p=275</guid>
		<description><![CDATA[Software testing has changed dramatically since the inception of Agile and Scrum. These methodologies are now widely accepted and without any doubt offers better way of delivering software. However Agile and Scrum also highlighted some of the challenges in the testing processes which possessed greater risk of failure , if not thought about in the [...]]]></description>
			<content:encoded><![CDATA[<p>Software testing has changed dramatically  since the inception of Agile and Scrum. These  methodologies are now widely accepted and without any doubt offers better way of delivering software. However Agile and Scrum also highlighted some of the challenges in the testing processes which possessed greater risk of failure , if not thought about in the over all process. </p>
<p>Some of these challenges becomes inevitable , if  some of the critical processes in scrum like story writing, estimation and TDD falls apart. </p>
<p>Some of the high level Testing challenges in Agile and Scrum</p>
<li>- Lack of detailed requirement (Story)
<li>- Constantly changing requirement (Change is accepted in principal)</li>
<li>- Not enough time to prepare tests</li>
<li>- Re factoring of the code as an accepted practice (Possess  greater risk without Test automation at all levels)</li>
</li>
<p>And I think these are some of the core points if taken care can make huge impact on the overall testing process and for that matter in delivery.</p>
<p><strong>Having the right Requirement</strong></p>
<p>I see this as a biggest pain points and root of other problems. Having a good story can change how the requirement is delivered and tested.  I refer this from the book &#8220;User stories Applied&#8221;, that a story should inhibit following features INVEST</p>
<p>I &#8211; INVEST<br />
N &#8211; NEGOTIABLE<br />
V &#8211; VALUABLE<br />
E &#8211; ESITMATABLE<br />
S &#8211; SMALL<br />
T &#8211; TESTABLE</p>
<p>Each of these characteristics are self explainable and however trivial they may sound, they have huge impact on the quality of the requirement delivered in the end. </p>
<p>For instance a large story which can pretty much eat good few sprints is more likely to introduce bugs, as it will not be ready (DONE) by end of the sprint for review.  And also large stories create confusion for developer as they get out of context very soon, similarly its nightmare for testing as well since focusing on a big chunk of feature creates opportunity for bug and overlooking.</p>
<p>Also, a badly written story can lead a wrong estimation which can cause capacity issues for testing as chances are some stuff will have to rolled over to next sprint or rushed through. Not only that a badly estimated story can lead to greater risks in further sprints, as it will be eat up some of the valuable time needed to prepare for next sprint&#8217;s requirement.</p>
<p>I strongly believe that testers in Agile project can add lot of value by looking at requirements nice early and reviewing it from a tester&#8217;s point of view. Some of the questions a tester need to asks are</p>
<p>- Does this acceptance criteria makes sense?<br />
- How can I test it? (What, where and When )<br />
- Is it not a duplication of work we did earlier ?<br />
- Is this story too small or big ?</p>
<p><strong>
<ul>
Automate Automate Automate </ul>
<p></strong></p>
<p>Automation will help maintaining a tight grip on the changes. Automation should be done at all levels and with involvement of QAs). Why do I say that? As Agile accepts changes quiet frequently and focuses on delivering features every sprint. it is obviously you would not get much time to plan, write and manage those tests, hence it is imperative that test automation is thought about while writing the code. And QAs should play important role in discussing, planning and thinking about those tests upfront, and discuss them with BAs and Developers. Build as much input as possible and then take right decisions as in which tests to be automate as unit, integration or UI tests. </p>
<p>Automation are assets and needs to be maintained, re factored and looked after like production code.  I have seen automation tests becoming big bottleneck to maintain and trace and these problems can be solved by doing some simple things regularly .</p>
<p>- Make sure your automated tests are traceable against requirements (There are tools available to do that , if not use spreadsheet ). This will make sure you can track the tests against a requirement and if needed re factor, extend or retire it.<br />
- Automated at all levels &#8211; UI tests are expensive and not conducive to tests each and everything. Good unit and integration test helps in building better coverage and helps in giving faster feedback. End to End tests are important and should be exclusive and focus on workflow and driving application end to end.<br />
- Get testers involved in writing unit and integration tests, they will provide valuable feedback.</p>
<p><strong>Defining the DONE Criteria </strong></p>
<p>I think this is the first and foremost process to be in place from Day1. </p>
<p>What is DONE Criteria ?</p>
<p>DONE criteria are high level check list items which needs to be satisfied in order to claim a story is DONE. DONE Criteria should have technical, process, functional, non-functional, configuration aspects of the software. DONE criteria forces teams to take holistic view on the stories rather then code completing the feature.</p>
<p>Some of the common aspects of done criteria</p>
<p>- All acceptance criteria met.   (Functional)<br />
- Performance not degraded.     (Non Functional)<br />
- Code coverage achieved and all acceptance tests automation. (Technical )<br />
- All build passed and application deployed on UAT/Staging environment. (Environment/Configuration)<br />
- Exploratory testing performed and QA signed off.<br />
- Demoed to stake holders on proper environment. (Process)<br />
- All known bugs closed and tested (Process)</p>
<p>By doing this teams will make sure that software produced is of great quality and all aspects of the applications are taken care. Doing this repeatedly will make sure testers are not doing catchup but they are part of the story and sign off process. Software produced in the end can be released and should be production ready. </p>
<p><strong>Exploratory Testing<br />
</strong></p>
<p>This is the most misunderstood and ignored aspect of Agile Testing. Exploratory Testing advocated testes/BAs to test a feature by exploring it beyond the test scripts. At the same time it is not about clicking around  the application without proper context.</p>
<p>Exploratory testing should be done every sprint on set of features on a proper environment. Testers should use all their skills to think out of the box and try to fearlessly test the system within the context of the features, however not limited to that feature.</p>
<p>Success of Agile Testing depends on working collaboratively between different stakeholders of the project and learning and rectifying quickly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pankajnakhat.com/blog1/agile-testing/08/agile-testing-challenges-and-overcoming-effectively/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Jbehave &#8211; Parametrization of Scenarios &#8211; Data driving the scenario</title>
		<link>http://www.pankajnakhat.com/blog1/uncategorized/06/jbehave-parametrization-of-scenarios-data-driving-the-bdd-scenario/</link>
		<comments>http://www.pankajnakhat.com/blog1/uncategorized/06/jbehave-parametrization-of-scenarios-data-driving-the-bdd-scenario/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 14:13:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Agile Testing]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[BDD]]></category>
		<category><![CDATA[Jbehave]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.pankajnakhat.com/blog1/?p=226</guid>
		<description><![CDATA[If you are using Jbehave and wonder how to execute your scenarios with different set of data without repeating the steps, so that your scenarios don&#8217;t blow up repeating same steps with different set of data. You can also refer to this scenario as data driven testing, as each of the row in your data [...]]]></description>
			<content:encoded><![CDATA[<p>If you are using Jbehave and wonder how to execute your scenarios with different set of data without repeating the steps, so that your scenarios don&#8217;t blow up repeating same steps with different set of data.</p>
<p>You can also refer to this scenario as data driven testing, as each of the row in your data table becomes one test case.</p>
<p>In the example below lets say I am testing a calculator sum function, and for that I need to have several test cases to test with different data. So basically steps looks like this, however we need to give different input and assert output.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">&nbsp;
&nbsp;
Scenario<span style="color: #339933;">:</span> As as user I want to test calculator sum function 
Meta<span style="color: #339933;">:</span>
@author pankaj
&nbsp;
Given calculator takes <span style="color: #339933;">&lt;</span>input1<span style="color: #339933;">&gt;</span> and <span style="color: #339933;">&lt;</span>input2<span style="color: #339933;">&gt;</span>
Then the sum is <span style="color: #339933;">&lt;</span>sum<span style="color: #339933;">&gt;</span>
&nbsp;
Examples<span style="color: #339933;">:</span>
<span style="color: #339933;">|</span>input1<span style="color: #339933;">|</span>input2<span style="color: #339933;">|</span>sum<span style="color: #339933;">|</span>
<span style="color: #339933;">|</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">|</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">|</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">|</span>
<span style="color: #339933;">|</span><span style="color: #cc66cc;">4</span><span style="color: #339933;">|</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">|</span><span style="color: #cc66cc;">9</span><span style="color: #339933;">|</span>
<span style="color: #339933;">|</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">|</span><span style="color: #cc66cc;">12</span><span style="color: #339933;">|</span><span style="color: #cc66cc;">22</span><span style="color: #339933;">|</span></pre></td></tr></table></div>

<p>And steps implementation  for the above written steps will  need to use Named parameter. So basically Named parameter (Which is usually in <>), will be replaced by the data in the table below the steps in the story. In the above example there are three named parameter in my story. </p>
<input1>
<input2>
<sum></p>
<p>In the steps implementation, you step needs to explicitly use the named parameter in the method. Using named parameter in the steps tells jbehave that it needs to replace this with the data in the table specified below/or in another file.</p>
<p>Steps class would look like</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">org.qainfolabs.jbehave.steps</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.math.BigDecimal</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">junit.framework.Assert</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.jbehave.core.annotations.Given</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.jbehave.core.annotations.Named</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.jbehave.core.annotations.Then</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.qainfolabs.app.Calculator</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> CalulatorSteps <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">BigDecimal</span> input1<span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">BigDecimal</span> input2<span style="color: #339933;">;</span>
&nbsp;
	@Given<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;calculator takes &lt;input1&gt; and &lt;input2&gt;&quot;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> readFruits<span style="color: #009900;">&#40;</span>@Named<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;input1&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #003399;">BigDecimal</span> input1,
			@Named<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;input2&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #003399;">BigDecimal</span> input2<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">input1</span> <span style="color: #339933;">=</span> input1<span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">input2</span> <span style="color: #339933;">=</span> input2<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	@Then<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;the sum is &lt;sum&gt;&quot;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> doSum<span style="color: #009900;">&#40;</span>@Named<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;sum&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #003399;">BigDecimal</span> sum<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		Calculator calc <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Calculator<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">Assert</span>.<span style="color: #006633;">assertEquals</span><span style="color: #009900;">&#40;</span>sum, calc.<span style="color: #006633;">sum</span><span style="color: #009900;">&#40;</span>input1, input2<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>After the scenario is executed Jbehave will produce a detailed report of the scenario, showing the steps repeating with replaced parameter with each data set.</p>
<p><a href="http://www.pankajnakhat.com/blog1/wp-content/uploads/2011/06/jbehave2.png"><img src="http://www.pankajnakhat.com/blog1/wp-content/uploads/2011/06/jbehave2.png" alt="" title="jbehave" width="596" height="537" class="alignleft size-full wp-image-258" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pankajnakhat.com/blog1/uncategorized/06/jbehave-parametrization-of-scenarios-data-driving-the-bdd-scenario/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to manage my day to day tasks if I am an Agile Tester</title>
		<link>http://www.pankajnakhat.com/blog1/uncategorized/11/how-to-manage-my-tasks-if-i-am-an-agile-tester/</link>
		<comments>http://www.pankajnakhat.com/blog1/uncategorized/11/how-to-manage-my-tasks-if-i-am-an-agile-tester/#comments</comments>
		<pubDate>Sun, 28 Nov 2010 23:20:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Agile Test Planning]]></category>
		<category><![CDATA[Agile Testing]]></category>
		<category><![CDATA[planning]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://pnakhat.wordpress.com/?p=65</guid>
		<description><![CDATA[Testers on agile projects have to often deal with multiple tasks in an iteraton. They have to support the stories in developement. (Talking to devs and BAS) They ideal prepare acceptance tests for the next iterations. Also, they need to do exploratory testing around the stories which comes through development Deal with defects as part [...]]]></description>
			<content:encoded><![CDATA[<p>Testers on agile projects have to often deal with multiple tasks in an iteraton.</p>
<div>
<ul>
<li>They have to support the stories in developement. (Talking to devs and BAS)</li>
<li>They ideal prepare acceptance tests for the next iterations.</li>
<li>Also, they need to do exploratory testing around the stories which comes through development</li>
<li>Deal with defects as part of the exploratory testing.</li>
<li>Automation testing.</li>
</ul>
<div>At times it becomes challenging to priotise day to day activities.  How do I decide, what sould I work on?</div>
<div>Few things which can make decision taking more practical and easy</div>
<div>
<ol>
<li>Always think what you want to achieve end of the day, that often helps in prortising work.</li>
<li>Given you have few tasks at one time, which task is going to add more value for your customer? Viz If a really important story for business needs to start next sprint, you better have to prepare for that instead doing exploratory testing at that point in time.</li>
<li>Make sure your tasks are small and estimable even if you dont estimate testing tasks in the sprint planning, This would help you plan your day better.</li>
<li>Have a small planning board your sake (even if its in your note book)</li>
<li>Write down the things you want to do, often people forget small tasks.</li>
<li>If you have to leave a task undone (You may have to move between tasks based on need), make sure you make a note of it and come back to it soonish, as you may have to start all over again if you resume the task after a gap.</li>
<li>Make sure your story wall shows real progress of QA work (New stories, sign off, Defects on stories) , as this would help you planing the activities.</li>
</ol>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.pankajnakhat.com/blog1/uncategorized/11/how-to-manage-my-tasks-if-i-am-an-agile-tester/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Agile Testers check list</title>
		<link>http://www.pankajnakhat.com/blog1/uncategorized/11/agile-testers-check-list/</link>
		<comments>http://www.pankajnakhat.com/blog1/uncategorized/11/agile-testers-check-list/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 20:26:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.pankajnakhat.com/blog1/?p=214</guid>
		<description><![CDATA[Before Sprint -          Working closely with BA on upcoming stories -          Where ever possible produce acceptance criteria / test of the stories to be done in coming sprint -          Understanding review of the stories -          Challenging the ambiguous requirements -          Challenging big stories In the sprint -          Work with development team on implantation of the [...]]]></description>
			<content:encoded><![CDATA[<p><strong><span style="text-decoration: underline;">Before Sprint</span></strong></p>
<p>-          Working closely with BA on upcoming stories</p>
<p>-          Where ever possible produce acceptance criteria / test of the stories to be done in coming sprint</p>
<p>-          Understanding review of the stories</p>
<p>-          Challenging the ambiguous requirements</p>
<p>-          Challenging big stories</p>
<p><strong><span style="text-decoration: underline;">In the sprint</span></strong></p>
<p>-          Work with development team on implantation of the acceptance tests of the stories.</p>
<p>-          Pair with developers if it helps the team to get stories moving quickly and reducing the feedback time</p>
<p>-          Discuss different levels of testing to be done for the stories . Don’t think you don’t have any responsibilities towards unit and integration tests.</p>
<p>-          Have an understating of implementation of the tests being written and challenge a implementation wherever you think the code will not be exercised in the right way.</p>
<p>-          Make sure the feedback is fast and delivered stories are tested on proper environments and meets the Done criteria.</p>
<p>-          Make sure you builds are green and tests are passing all the time</p>
<p>-          Work with business / BA on the delivered stories to sign off it.</p>
<p>-          Document and communicate the bugs according to your team process.</p>
<p>-          Implement more comprehensive automated tests if needed.</p>
<p>-          Make sure Non functional requirements are met</p>
<p><strong><span style="text-decoration: underline;"> </span></strong></p>
<p><strong><span style="text-decoration: underline;">Post sprint</span></strong></p>
<p>-          Work with business/ BAs on the demo of the story, as I think QAs develop deep understanding of the requirements.</p>
<p>-          More exploratory testing.</p>
<p>-          Look at performance/load/stress criteria of your application every now and then.</p>
<p>-          Close the fixed bugs and make sure proper regression tests are added.</p>
<p>This list is not a comprehensive tasks lists and it is meant only for guideline purposes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pankajnakhat.com/blog1/uncategorized/11/agile-testers-check-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Behaviour Driven Development &#8211; Leverage on power of communication</title>
		<link>http://www.pankajnakhat.com/blog1/agile-testing/11/behaviour-driven-development-leverage-on-power-of-communication/</link>
		<comments>http://www.pankajnakhat.com/blog1/agile-testing/11/behaviour-driven-development-leverage-on-power-of-communication/#comments</comments>
		<pubDate>Sat, 13 Nov 2010 22:54:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Agile Testing]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[BDD]]></category>
		<category><![CDATA[behaviour Driven development]]></category>

		<guid isPermaLink="false">http://www.pankajnakhat.com/blog1/?p=209</guid>
		<description><![CDATA[Behaviour driven development is now widely accepted process in Agile community. Now the question to be asked what is that make this simple discipline powerful and effective? And how to use the power of communication? Agile development practices have been preaching for years on the aspect of writing acceptance tests for the requirements upfront. These [...]]]></description>
			<content:encoded><![CDATA[<p>Behaviour driven development is now widely accepted process in Agile community. Now the question to be asked what is that make this simple discipline powerful and effective? And how to use the power of communication?</p>
<p>Agile development practices have been preaching for years on the aspect of writing acceptance tests for the requirements upfront.  These acceptance tests used to be written in various and tools. <a href="http://fitnesse.org/">Fitnesse</a> definitely levraged among all other tools, simply because it enabled developement teams to use power of communication.  No longer there was divide between tests being too technical for the people to read who actually cared about them, ofcourse I am talking about business , BAs, Testers.</p>
<p>Behaviour Driven Development is refined form for writing Acceptance tests, where requirements are expressed in natural language of communication (English, French etc) and implemented in the same form. This enabled no loss of communication from Requirements to Tests.  And also it forces business to be involved with requirement throughout, as they have visibility on what they asked WORKS !</p>
<p>Tools like Cucumber, Concordian, Jbehave, Easyb enabled a uniform language of communication for Requirements and Tests , which looks like a simple discipline but it is very powerful.</p>
<p>Not only business gets lot of value from it at the same time development teams are equally benefited, as they have clear understanding of expected software behaviour in the form of executable requirement.  Also, the power of BDD lies in thinking about business problem and expressing the intent without thinking about the implementation details of the problem.</p>
<p>A BDD can express the intent in form of Simple Sentences, Tables, Examples etc. The most common form of Acceptance testing format is Given &#8211; When &#8211; Then, which is widely being used in BDDs.</p>
<p>Given &#8211; Is a prerequisite or precondition  for an action.<br />
When &#8211; A action or Event happens.<br />
Then &#8211; Results of the action.</p>
<p>Example &#8211; Saving bank account withdraw scenario</p>
<p><em><strong>Given</strong> there are 1000$ in saving bank account number XXXXXXX<br />
<strong>When</strong> a cash with drawl  of $900 is done<br />
<strong>Then</strong> available balance is $100<br />
</em></p>
<p>The above example is a simple explanation of How a Given When Then can express an intent in consistent and effective way.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pankajnakhat.com/blog1/agile-testing/11/behaviour-driven-development-leverage-on-power-of-communication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebDriver &#8211; Introduction</title>
		<link>http://www.pankajnakhat.com/blog1/uncategorized/04/webdriver-getting-started/</link>
		<comments>http://www.pankajnakhat.com/blog1/uncategorized/04/webdriver-getting-started/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 08:59:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[DSL Automated Testing]]></category>
		<category><![CDATA[Webdriver]]></category>

		<guid isPermaLink="false">http://www.pankajnakhat.com/blog/?p=185</guid>
		<description><![CDATA[WebDriver is really  a good clean and powerfull API to test the browsers. Obviously now Selenium 2.0 is backed by WebDriver and there are different options you can use webdriver in different way. (With and Without a Proxy server) But originally WebDriver came with an idea of talking to browsers natively to driver then to [...]]]></description>
			<content:encoded><![CDATA[<p>WebDriver is really  a good clean and powerfull API to test the browsers. Obviously now Selenium 2.0 is backed by WebDriver and there are different options you can use webdriver in different way. (With and Without a Proxy server)  But originally WebDriver came with an idea of talking to browsers natively to driver then to achieve faster and better response. How is it different from Selenium. Please see the <a href="http://www.pankajnakhat.com/blog/agile-testing/04/selenium-vs-webdriver/">post </a>.  So, I would focus on this post to write a simple Google search test using webdriver.</p>
<p>I am assuming you have got a basic Java project setup where you can write tests in Java, and also you can choose any unit testing framework of your choice.  WebDriver is a generic interface which then gets implemented by different available drivers (browsers) to achieve the consistency in the API. However, there are still some difference between the drivers, but we will ignore that for this posts, as basic API is consistent across the driver.  Having an interface independent of driver implementation helps to write driver independent  tests, so we can write a test in WebDriver and run that against any available driver (Firefox, Chrome, IE and Iphone driver).</p>
<p>I must admit that chrome driver is little immature at the moment, but I am sure it should be good soon.  For my example I will be using Eclipse as the IDE and TestNG as the unit testing framework.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">org.wd.tests</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.openqa.selenium.By</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.openqa.selenium.WebDriver</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.openqa.selenium.WebElement</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.openqa.selenium.firefox.FirefoxDriver</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.testng.Assert</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.testng.annotations.Test</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.wd.annotation.DataDriven</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> TestGoogle<span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">/* This creates a field of type WebDriver Interface*/</span>
	<span style="color: #000000; font-weight: bold;">protected</span> WebDriver driver<span style="color: #339933;">;</span>
&nbsp;
	@Test
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> testGoogle<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">/*This will crate a new Instance of Firefox driver*/</span>
		<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">driver</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> FirefoxDriver<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
		<span style="color: #666666; font-style: italic;">/*This will launch www.google.co.uk on the browser*/</span>
		driver.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://www.google.co.uk&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
&nbsp;
		<span style="color: #666666; font-style: italic;">/*Identify the elements to interact with */</span>		
		WebElement searchTextBox <span style="color: #339933;">=</span> driver.<span style="color: #006633;">findElement</span><span style="color: #009900;">&#40;</span>By.<span style="color: #006633;">name</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;q&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		WebElement searchButton <span style="color: #339933;">=</span> driver.<span style="color: #006633;">findElement</span><span style="color: #009900;">&#40;</span>By.<span style="color: #006633;">name</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;btnG&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/*Take actions now - Set the text field*/</span>
		searchTextBox.<span style="color: #006633;">sendKeys</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Pankaj Nakhat&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #666666; font-style: italic;">/*Click on the searchButton*/</span>
		searchButton.<span style="color: #006633;">click</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>		
&nbsp;
		<span style="color: #666666; font-style: italic;">/*Verify HTML response contains some text*/</span>
		<span style="color: #000000; font-weight: bold;">Assert</span>.<span style="color: #006633;">assertEquals</span><span style="color: #009900;">&#40;</span>driver.<span style="color: #006633;">getPageSource</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, <span style="color: #0000ff;">&quot;Pankaj Nakhat&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		driver.<span style="color: #006633;">quit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.pankajnakhat.com/blog1/uncategorized/04/webdriver-getting-started/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hiring an Agile Tester, what should you look for?</title>
		<link>http://www.pankajnakhat.com/blog1/uncategorized/04/hiring-an-agile-tester-what-should-you-look-for/</link>
		<comments>http://www.pankajnakhat.com/blog1/uncategorized/04/hiring-an-agile-tester-what-should-you-look-for/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 07:50:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.pankajnakhat.com/blog/?p=186</guid>
		<description><![CDATA[I have been involved in numerous interviews to hire Agile tester for different organizations and always wondered what should be the right skill set you should look for in a good agile tester. Agile testing is not a rocket science and you still need people with good testing skills, that is a prerequisite.  But most [...]]]></description>
			<content:encoded><![CDATA[<p>I have been involved in numerous interviews to hire Agile tester for different organizations and always wondered what should be the right skill set you should look for in a good agile tester.</p>
<p>Agile testing is not a rocket science and you still need people with good testing skills, that is a prerequisite.  But most of the organizations get confused between hiring a QA in terms of desired technical skills and QA Skills.</p>
<p>If you see most of the job specs floating around in the market, they have standard specs  viz Selenium, Fitnesse etc etc.  So, basically people seek technical tester to do test automation and hence they get glued to some particular job specs while hiring Agile Testers.  Where do you draw a line that a tester is technical enough to do the job, at the same time posses necessary Testing Skills?</p>
<p>Do people miss a trick here, in forming a good checklist for an Agile Tester?</p>
<p>A good Agile tester should be technically sound, there is no second thought about it, but then why can’t people hire good developers to do testing job in Agile projects.  That’s where I think QA specific skills should be looked for while hiring Agile Testers,  at the same time assessing their technical skills. I will get to the point of “QA Skills” in a while, but before that I want to touch upon on Technical skills of an Agile Tester.</p>
<p>Technical skills of an Agile Tester should not be only limited to knowing some specific tools, I think an Agile Tester should have a good programming aptitude. So this will enable them to pick up any new technology quiet quickly.  They should then apply their automation/tools experience with any given technology.</p>
<p>Also, an Agile Tester should be aware of the application architecture, hardware, tools and interaction between different systems. That enables them to think about the testing from much more wider perspective.</p>
<p>What QA skills one must look for whilst hiring Agile Testers?</p>
<p>1)      Good analytical skills to think about the requirement from users/testers perspective to verify a requirement and also testing it on adverse scenarios.</p>
<p>2)      Ability to communicate with business to challenge and asses a requirement.</p>
<p>3)      Proactive: An agile environment needs testers to be proactive to foresee any issues that may block the team in anyways.</p>
<p>4)      Ability to communicate well with developers:  I think this is equally important like interaction with business.   Testers play a role of a bridge between Business/BAs and Developers. And thats where they should not be technically deprived that one end of bridge become weaker.  I am not saying that you just need technical skill to be able to communicate with the developers.</p>
<p>5)      Good time/task management:  A Tester needs to play different roles in any  iterations/sprints and he should be able to priorities his work to be able to carry out the most important activities in the context of a sprint.</p>
<p>6)      Quick Learners : This is an attribute which is great to have in anyone, but I would asses a candidate on his learning ability.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pankajnakhat.com/blog1/uncategorized/04/hiring-an-agile-tester-what-should-you-look-for/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>DSL For Automation Testing an Introduction</title>
		<link>http://www.pankajnakhat.com/blog1/agile-testing/10/dsl-for-automation-testing-an-introduction/</link>
		<comments>http://www.pankajnakhat.com/blog1/agile-testing/10/dsl-for-automation-testing-an-introduction/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 14:55:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Agile Testing]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[Automation in agile projects]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[DSL Automated Testing]]></category>

		<guid isPermaLink="false">http://www.pankajnakhat.com/blog/?p=159</guid>
		<description><![CDATA[DSLs have been buzzing around for a while now, and I thought of putting some thoughts together. DSL &#8211; Domain Specific Languages, what does it mean for Testing? What are the benefits.. Over the years automation testing has changed from record and play back mechanism to more structured, framework oriented approach. Benefits were evident Test [...]]]></description>
			<content:encoded><![CDATA[<p>DSLs have been buzzing around for a while now, and I thought of putting some thoughts together.</p>
<p>DSL &#8211; Domain Specific Languages, what does it mean for Testing? What are the benefits..</p>
<p>Over the years automation testing has changed from record and play back mechanism to more structured, framework oriented approach. Benefits were evident Test were readable, Scalable and Maintainable.</p>
<p>But there was more needed to be done, as most automation tests would turn in to over head rather then assets.  Framework based approach was good..but came up with its own sets of problem. Some of them were Code like tests, which meant they were not human readable and needed either hours of</p>
<p>documentation to make them explicit to humans.  So if the application changed underneath both test and documentation needed to change. And after a while these will not match each other by any means.</p>
<p>Frameworks like keyword driven testing enabled naive to write Tests, however created the problem of highly non abstracted tests.</p>
<p>Since the introduction of methodologies like Agile, it was inevitable that those problem needed to be sorted fast. Tests needed to be changed quickly with often changing requirements.</p>
<p>DSLs allows you to write tests in your own domain..be it banking, Online Gaming or Travel Industry.  Which means tests are human readable and highly contextual to domain.</p>
<p>For example &#8211; I need to write a Test for a baking application for testing a Scenario of Transfer of a fund from Account A to Account B.  Note, I am talking in terms of any specific tool here, and that I will keep up for a separate post.</p>
<p>&lt;Test&gt;</p>
<ol>
<li>Login in my online banking application with user &#8220;A&#8221;</li>
<li>Go to transfer funds page</li>
<li>Check initial balance it should be &#8220;£ 500&#8243;</li>
<li>Transfter amount &#8220;£100&#8243; to account &#8220;B&#8221;</li>
<li>Check final balance , it should be &#8220;£ 400&#8243;</li>
<li>logout from the application.</li>
</ol>
<p>&lt;/Test&gt;</p>
<p>In above example , Test exactly looks like manual test scripts but there nature is Executable in whatever technology and tool we choose.</p>
<p>What problems does it solve?</p>
<ul>
<li>Maintenance is easier now as test are human readable.</li>
<li>Adding and Amending a step in Test just requires finding the right step, rather then changing the implementation  (In Most of the cases).</li>
<li>For example &#8211; In above Test I need to add a new requirement of a welcome page after login. We simply introduce another DSL step after step1 &#8220;Verify user is shown welcome page with him name on it&#8221;, and rest of the test is still unchanged.</li>
<li>Test can be extended easily to do more comprehensive end to end test.</li>
<li>If the application changes underneath in terms of UI Objects , tests will remain unchanged, only the underlying implementation will change.</li>
<li>If a business process changes completely, changed can be accommodated easily by changing the DSL definition. For example in above Test the transfer process changes and now required another level of authentication before transferring the funds. We would change the definition of Step4 to <strong><em>&#8216;Transfter amount &#8220;£100&#8243; to account &#8220;B&#8221; and enter authentication password for user &#8220;A&#8221;&#8216; </em></strong></li>
</ul>
<p>DSLs can also come with its own challenges, which I would like to discuss in my next post.</p>
<p><div id='quick_subscribe_messages'></div><form name='quick_subscribe_form' id='quick_subscribe_form' method='POST' action='http://www.pankajnakhat.com/blog1/index.php?'><input type='text' name='QS_user_email_post' id='QS_user_email_post' value='E-mail' onFocus='if(this.value=="E-mail") this.value=""'><input type='submit' value='ok'></form></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pankajnakhat.com/blog1/agile-testing/10/dsl-for-automation-testing-an-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

