<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-8826930886642696467</atom:id><lastBuildDate>Thu, 24 Oct 2024 06:03:15 +0000</lastBuildDate><category>A/L ICT</category><category>Software Test Tools</category><title>                             QA Tech Notes</title><description></description><link>http://jeewanthatechnotes.blogspot.com/</link><managingEditor>noreply@blogger.com (෴෴සිහින කොදෙව්ව෴෴)</managingEditor><generator>Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:keywords>jeewantha,technotes,Quality,assurance,A/L,ICT</itunes:keywords><itunes:subtitle/><itunes:category text="Technology"/><itunes:owner><itunes:email>jtk.jeewantha@gmail.com</itunes:email></itunes:owner><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8826930886642696467.post-4892837278112089721</guid><pubDate>Mon, 31 Dec 2012 15:49:00 +0000</pubDate><atom:updated>2012-12-31T07:49:35.310-08:00</atom:updated><title>A/L ICT Model Paper 02 </title><description>&lt;h3 class="post-title entry-title" itemprop="name"&gt;
A/L ICT Model Paper 02 is published. (This Paper cover only few chapters.)&lt;/h3&gt;
&lt;h3 class="post-title entry-title" itemprop="name"&gt;
Go and find the links.&lt;/h3&gt;
&lt;h3 class="post-title entry-title" itemprop="name"&gt;
&amp;nbsp;&lt;a href="http://alictpapers.blogspot.com/2012/12/model-paper-02.html"&gt;A/L ICT Model Paper 02&lt;/a&gt; &lt;/h3&gt;
</description><link>http://jeewanthatechnotes.blogspot.com/2012/12/al-ict-model-paper-02.html</link><thr:total>0</thr:total><author>jtk.jeewantha@gmail.com (෴෴සිහින කොදෙව්ව෴෴)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8826930886642696467.post-5169759051631366840</guid><pubDate>Wed, 26 Dec 2012 05:23:00 +0000</pubDate><atom:updated>2012-12-25T21:23:36.599-08:00</atom:updated><title>New Blog</title><description>Hi all ,&lt;br /&gt;
&lt;br /&gt;
Now you can download A/L ICT papers and Notes from my new blog.&lt;br /&gt;
&lt;br /&gt;
please go to &lt;br /&gt;
&lt;h1 class="title"&gt;
&lt;a href="http://alictpapers.blogspot.com/"&gt;A/L ICT Notes and Papers&lt;/a&gt;&lt;/h1&gt;
</description><link>http://jeewanthatechnotes.blogspot.com/2012/12/new-blog.html</link><thr:total>0</thr:total><author>jtk.jeewantha@gmail.com (෴෴සිහින කොදෙව්ව෴෴)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8826930886642696467.post-8309986598511338286</guid><pubDate>Mon, 04 Jul 2011 03:44:00 +0000</pubDate><atom:updated>2013-01-15T06:49:32.848-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">A/L ICT</category><title>A/L ICT Model Paper 01</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
I have uploaded a 1st model paper of A/L ICT which is created by me. If you like to do that download it and do it.&lt;br /&gt;
If you need to correct the answers please send me the answers.&lt;br /&gt;
my Gmail address is jtk.jeewantha@gmail.com .&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.4shared.com/document/do0cp6Zz/Model_Paper01.html"&gt;Download Here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Hope this will help you.&lt;br /&gt;
I will post some lecture notes related to the A/L ICT in future.&lt;br /&gt;
If you can tell me what area you need mostly i will prepare them and share with you. just put a comment to this post by saying the area you need.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://alictpapers.blogspot.com/" target="_blank"&gt;To download more papers and notes click here&lt;/a&gt;&amp;nbsp;&lt;/div&gt;
</description><link>http://jeewanthatechnotes.blogspot.com/2011/07/al-ict-model-paper-01-from-section-11.html</link><thr:total>6</thr:total><author>jtk.jeewantha@gmail.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8826930886642696467.post-4368175647514218281</guid><pubDate>Fri, 30 Oct 2009 04:46:00 +0000</pubDate><atom:updated>2011-07-26T20:58:15.425-07:00</atom:updated><title>Cucumber and Ruby on Rails (Part 7) My learning materials</title><description>Now lets see a scenario to go through the links and how the cucumber deals with that scenario.&lt;br /&gt;Before write the scenario lets look at the scree shots and what could be the scenario.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1 Step&lt;/span&gt;:- I am on the “List of products” page and I can see&lt;br /&gt;  Titled = Ruby on Rails&lt;br /&gt;  Description = Model View Architecture&lt;br /&gt;  Image url = ror.jpg&lt;br /&gt;  Price = 22&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhybwqxJDgl4suUWrH0F_uqCNfh0lwfr6EbmKjHzHjQvVUIp2mCKpoCeZ2e9-4GRRgkJNzM2kXnyBxVOOLZ4byjQrU8X_2jV_XSvgoiYpoJX6XWEUyvDCjL1Hem1XVL_5uf3BTNQV8dwAE/s1600-h/1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 214px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhybwqxJDgl4suUWrH0F_uqCNfh0lwfr6EbmKjHzHjQvVUIp2mCKpoCeZ2e9-4GRRgkJNzM2kXnyBxVOOLZ4byjQrU8X_2jV_XSvgoiYpoJX6XWEUyvDCjL1Hem1XVL_5uf3BTNQV8dwAE/s320/1.png" alt="" id="BLOGGER_PHOTO_ID_5398252174209751842" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2 Step&lt;/span&gt;:- Now I click on “New Product” link.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdgb0GiEE8SH7ku7lf0xkK1ZCoNOwnE64DGkclXqX1HT27QS_Eo8MAt8_9YCMA2sc1d8uhUA8I7KW9e1_fP-RU85zo_3SsnCAJA_14GxkC5HxhxKrg0glJUa6SxUw3OVAbG_vuU8YTgD4/s1600-h/2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 215px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdgb0GiEE8SH7ku7lf0xkK1ZCoNOwnE64DGkclXqX1HT27QS_Eo8MAt8_9YCMA2sc1d8uhUA8I7KW9e1_fP-RU85zo_3SsnCAJA_14GxkC5HxhxKrg0glJUa6SxUw3OVAbG_vuU8YTgD4/s320/2.png" alt="" id="BLOGGER_PHOTO_ID_5398252776280600194" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3 Step&lt;/span&gt;:- Now  click on “Back” link again. Then I am again on “List of Products”.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnp1NenPAkeFQdWOYJIoYbjOpeIeT3awSZE3Qh6696HssfwxQv7b26RXCIa5TUUYK68wog09c25rlbO1p3SXOLwt7vJE-ZFBk9RwqQD4o-KkFy2rJQV6i_w4H3OE_JUd2xQdrUf66LyQo/s1600-h/3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 214px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnp1NenPAkeFQdWOYJIoYbjOpeIeT3awSZE3Qh6696HssfwxQv7b26RXCIa5TUUYK68wog09c25rlbO1p3SXOLwt7vJE-ZFBk9RwqQD4o-KkFy2rJQV6i_w4H3OE_JUd2xQdrUf66LyQo/s320/3.png" alt="" id="BLOGGER_PHOTO_ID_5398252772952653170" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4 Step&lt;/span&gt;:- Now click on “Show” link and then I can see&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6GsYalgiXmNggZ3_Jgovpx2oQlFD7w1PKxlKs8f1X_Kw5ACSRjVDlLUKDn2eqqX-aGx9bkghgEAXjrMrCSMXaGTte9-Nhx8uo7WOhBaY5rkzcwY9VmK6ZEJQ33_STsU_EUcaowOPQhOg/s1600-h/4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 183px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6GsYalgiXmNggZ3_Jgovpx2oQlFD7w1PKxlKs8f1X_Kw5ACSRjVDlLUKDn2eqqX-aGx9bkghgEAXjrMrCSMXaGTte9-Nhx8uo7WOhBaY5rkzcwY9VmK6ZEJQ33_STsU_EUcaowOPQhOg/s320/4.png" alt="" id="BLOGGER_PHOTO_ID_5398252767613345618" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5 Step&lt;/span&gt;: like wise we can navigate through the links&lt;br /&gt;&lt;br /&gt;Now lets see how this scenario can be written. Before that look at these step definitions. You can find them in webrat_steps.rb file.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;When&lt;/span&gt; /^I press "([^\"]*)"$/ &lt;span style="font-weight: bold;"&gt;do&lt;/span&gt; |button|&lt;br /&gt;click_button(button)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;This can be used for when we click on button&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;When&lt;/span&gt; /^I follow "([^\"]*)"$/ &lt;span style="font-weight: bold;"&gt;do&lt;/span&gt; |link|&lt;br /&gt;click_link(link)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;When&lt;/span&gt; /^I follow "([^\"]*)" within "([^\"]*)"$/ &lt;span style="font-weight: bold;"&gt;do&lt;/span&gt; |link, parent|&lt;br /&gt;&lt;br /&gt;click_link_within(parent, link)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;These two can be used when we navigate through the links.&lt;br /&gt;Now lets see the scenario.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Scenario&lt;/span&gt;: Go Through Links&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Given&lt;/span&gt; I have products titled Ruby on Rails, description Model View Architecture, Image url ror.jpg, Price 22&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;When&lt;/span&gt; I go to the list of Products&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    Then&lt;/span&gt; I should see "Ruby on Rails"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "Model View Architecture"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "ror.jpg"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "22"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;When&lt;/span&gt; I follow "New Product"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;And&lt;/span&gt; I follow "Back"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;And&lt;/span&gt; I am on the list of Products&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    Then&lt;/span&gt; I should see "Ruby on Rails"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "Model View Architecture"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "ror.jpg"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "22"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;When&lt;/span&gt; I follow "Show"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    Then&lt;/span&gt; I should see "Ruby on Rails"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "Model View Architecture"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "ror.jpg"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "22"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;When&lt;/span&gt; I follow "Back"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;And&lt;/span&gt; I am on the list of Products&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    Then&lt;/span&gt; I should see "Ruby on Rails"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "Model View Architecture"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "ror.jpg"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "22"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;When&lt;/span&gt; I follow "Edit"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;And&lt;/span&gt; I follow "Back"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;And&lt;/span&gt; I am on the list of Products&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    Then&lt;/span&gt; I should see "Java"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "Platform Independent"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "java.jpg"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "20"&lt;br /&gt;&lt;br /&gt;save this scenario as go_through_links.feature  and run the &lt;span style="font-weight: bold;"&gt;cucumber features/go_through_links.feature&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then you can see the following screen shot.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjss94uLrvysUkc8rek4dXKe34liUoEVdEh3-m7JzlpR8MEdGkKpiH0T4MO9DAVgE2wOhRixwMJY14Ip0sBNZncHUqq3M81tsDk_-1UPC2Zp_yX569yTDTlsWSIupnW46GTh26kKo0ENKY/s1600-h/5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 297px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjss94uLrvysUkc8rek4dXKe34liUoEVdEh3-m7JzlpR8MEdGkKpiH0T4MO9DAVgE2wOhRixwMJY14Ip0sBNZncHUqq3M81tsDk_-1UPC2Zp_yX569yTDTlsWSIupnW46GTh26kKo0ENKY/s320/5.png" alt="" id="BLOGGER_PHOTO_ID_5398252759693549826" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Why this scenario failed. Look at these steps.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;When&lt;/span&gt; I follow "Edit"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;And&lt;/span&gt; I follow "Back"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;And&lt;/span&gt; I am on the list of Products&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    Then&lt;/span&gt; I should see "Java"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "Platform Independent"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "java.jpg"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "20"&lt;br /&gt;&lt;br /&gt;These steps are wrong. They should be as follows.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;When&lt;/span&gt; I follow "Edit"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;And&lt;/span&gt; I follow "Back"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;And&lt;/span&gt; I am on the list of Products&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    Then&lt;/span&gt; I should see "Ruby on Rails"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "Model View Architecture"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "ror.jpg"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    And&lt;/span&gt; I should see "22"&lt;br /&gt;&lt;br /&gt;Edit the feature file and run again cucumber features/go_through_links.feature. Now you can get the all the steps are passed massage.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwr7IErRmAv5q4FsP4Lxqc2ieoNnfgexSK4BHdXOv3CrQ5x17qv70wH8Gu3RMQNQ6-cIIVa6plNsi71c-ECZDdiYuBsK4hCnFdLjnkccexldGw5IY7UOFPJQS_bDtuRIQObgvBbu3YUJk/s1600-h/6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 296px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwr7IErRmAv5q4FsP4Lxqc2ieoNnfgexSK4BHdXOv3CrQ5x17qv70wH8Gu3RMQNQ6-cIIVa6plNsi71c-ECZDdiYuBsK4hCnFdLjnkccexldGw5IY7UOFPJQS_bDtuRIQObgvBbu3YUJk/s320/6.png" alt="" id="BLOGGER_PHOTO_ID_5398252755482141378" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is how the cucumber work with the navigation scenario.</description><link>http://jeewanthatechnotes.blogspot.com/2009/10/cucumber-and-ruby-on-rails-part-7-my.html</link><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhybwqxJDgl4suUWrH0F_uqCNfh0lwfr6EbmKjHzHjQvVUIp2mCKpoCeZ2e9-4GRRgkJNzM2kXnyBxVOOLZ4byjQrU8X_2jV_XSvgoiYpoJX6XWEUyvDCjL1Hem1XVL_5uf3BTNQV8dwAE/s72-c/1.png" width="72"/><thr:total>0</thr:total><author>jtk.jeewantha@gmail.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8826930886642696467.post-5157504790290928139</guid><pubDate>Fri, 23 Oct 2009 07:43:00 +0000</pubDate><atom:updated>2011-07-26T20:57:33.232-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Software Test Tools</category><title>Software Test Tools</title><description>&lt;span style="font-weight:bold;"&gt;What Are Software Test Tools? &lt;/span&gt;&lt;br /&gt;Software test tools help development teams investigate software bugs, verify functionality, and ensure both the reliability and security of the software they develop. Tools are available for all stages of a software development project. Some software testing tool vendors offer an integrated suite that will support testing and development throughout the life of a project, from gathering requirements to supporting the live system. Other vendors concentrate on a single part of the application development life cycle.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Software Test Tools Business Drivers and Benefits&lt;/span&gt;&lt;br /&gt;    1) Increase the quality of software applications. &lt;br /&gt;    2) Software performance measurement. &lt;br /&gt;    3) Improving process management lifecycle of the product. &lt;br /&gt;    4) Perform a risk analysis and benchmarking. &lt;br /&gt;    5) Gain consistency in testing procedures with automated testing tools (as opposed to manual testing, which may be incompatible). &lt;br /&gt;    6) Improving the time to put on the market following the effective detection of functional performance, and security issues. &lt;br /&gt;    7) Save money on software development and maintenance costs&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Software Test Tools Risks&lt;/span&gt;&lt;br /&gt;     1. Automated testing can produce quantities of raw data cumbersome. Test for choosing one form tool you can easily manipulate the data that is capable of change and should work together. &lt;br /&gt;     2. It undermines the efficiency of fault injection is not important. Fault injection tool specific code paths above weaknesses, particularly, the path that are victims of security attacks can not show through the check. &lt;br /&gt;     3. There are two drawbacks you enough for choosing the wrong software tools have not only wasted time and resources, but also an obstacle that you can get your teams made solutions difficult.</description><link>http://jeewanthatechnotes.blogspot.com/2009/10/software-test-tools.html</link><thr:total>0</thr:total><author>jtk.jeewantha@gmail.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8826930886642696467.post-1979981714129066982</guid><pubDate>Mon, 19 Oct 2009 10:04:00 +0000</pubDate><atom:updated>2011-07-26T20:57:33.233-07:00</atom:updated><title>Test Automation</title><description>&lt;span style="font-weight:bold;"&gt;Test automation &lt;/span&gt;is the use of software for monitoring the performance tests, comparing actual results with expected results, the functions of setting up test conditions and control tests and other testing Reference [1]. Generally, test automation involves automating a manual process already in place that uses a formalized testing process.&lt;br /&gt;&lt;br /&gt;Following two pictures are describing the test automation steps. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKpSBRoz27Sg2jJSduO8dERBD4Y14uperM7fjTNpd4UlePLXVRV3AAJF1lvcoOFod9eYURSIwtmqAJd0l_EgCRKSdA7FcYYgLQ_yV1eF966wzlEM3MhCGmgMOXLcTPzqTnXfWkM_9NYEI/s1600-h/1.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 378px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKpSBRoz27Sg2jJSduO8dERBD4Y14uperM7fjTNpd4UlePLXVRV3AAJF1lvcoOFod9eYURSIwtmqAJd0l_EgCRKSdA7FcYYgLQ_yV1eF966wzlEM3MhCGmgMOXLcTPzqTnXfWkM_9NYEI/s400/1.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5394250798328925202" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4xag1C79gCsFKICQQE-sL0ST_1he2Ocv1tXcD6AWSMVJaf8CcnKglmnY2_Jv5m-EqLz2WNbqDS5E3ySweC6Jhaq0wcnYgH6iwIRtHagz4BNNhp6wTjf7BFD4y1fOkg0P7iAM_lDm0yz0/s1600-h/2.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 331px; height: 393px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4xag1C79gCsFKICQQE-sL0ST_1he2Ocv1tXcD6AWSMVJaf8CcnKglmnY2_Jv5m-EqLz2WNbqDS5E3ySweC6Jhaq0wcnYgH6iwIRtHagz4BNNhp6wTjf7BFD4y1fOkg0P7iAM_lDm0yz0/s400/2.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5394250968893253538" /&gt;&lt;/a&gt;</description><link>http://jeewanthatechnotes.blogspot.com/2009/10/test-automation.html</link><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKpSBRoz27Sg2jJSduO8dERBD4Y14uperM7fjTNpd4UlePLXVRV3AAJF1lvcoOFod9eYURSIwtmqAJd0l_EgCRKSdA7FcYYgLQ_yV1eF966wzlEM3MhCGmgMOXLcTPzqTnXfWkM_9NYEI/s72-c/1.gif" width="72"/><thr:total>0</thr:total><author>jtk.jeewantha@gmail.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8826930886642696467.post-4025417463963080223</guid><pubDate>Mon, 19 Oct 2009 07:24:00 +0000</pubDate><atom:updated>2011-07-26T20:57:33.233-07:00</atom:updated><title>Cucumber and Ruby on Rails (Part 6) My learning materials</title><description>OK now I think   you all have good knowledge about my pasts posts. I f you have any question you can ask me any time by mailing me. Now lets move to our todays lesson.&lt;br /&gt;&lt;br /&gt;What can we do further with our project. Hmmmmm... We can validate user inputs . Lets see how can the validations can be done using cucumber.&lt;br /&gt;&lt;br /&gt;What can we validate. We can validate “user inputs are OK such as is price is a numerical value or not and all the fields are not empty etc..”&lt;br /&gt;&lt;br /&gt;Before doing the cucumber part lets see the what is happening in GUI part.&lt;br /&gt;&lt;br /&gt;Go to the product/app/models/ folder and open product.rb file. Afetr that copy and paste following codes to it as follows.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;class Product &lt; ActiveRecord::Base &lt;/span&gt;&lt;br /&gt;validates_presence_of :title, :description, :image_url &lt;br /&gt;validates_numericality_of :price &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now lets see the GUI. &lt;br /&gt;1)First go to the product folder in the terminal and then run the server “ruby script/server”&lt;br /&gt;2) Then gotothe browser and type “http://localhost:3000/products” . Then you can see following GUI&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3ODe526nnRpIkI2S7mklP2H-f5xwoHClqtAwt2BYRVHSBqZnEFWQXlf1qvoVwS0-eYgWDelLPFmsGM7CAg5iSv180iHbcidrGqephIyPNmBC-_V3hoqFN7JHJ9tfVhfQvOxIDQCQqTAE/s1600-h/1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 118px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3ODe526nnRpIkI2S7mklP2H-f5xwoHClqtAwt2BYRVHSBqZnEFWQXlf1qvoVwS0-eYgWDelLPFmsGM7CAg5iSv180iHbcidrGqephIyPNmBC-_V3hoqFN7JHJ9tfVhfQvOxIDQCQqTAE/s320/1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5394209297700251474" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3)click on New product link and you can see this page.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCK4asWiPi7Khg9ZcH8Ty0lxCz7JnTMKJCTxSLhZg5icGq8drSFPSJRI8i3QfggaImEke3PpF8eVGpQH6qWUnc-cg15iktWPhlR8rJ44P4AxhWOZxJ17W4ENF3MyfHl7odiFNE_skE6a4/s1600-h/2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 258px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCK4asWiPi7Khg9ZcH8Ty0lxCz7JnTMKJCTxSLhZg5icGq8drSFPSJRI8i3QfggaImEke3PpF8eVGpQH6qWUnc-cg15iktWPhlR8rJ44P4AxhWOZxJ17W4ENF3MyfHl7odiFNE_skE6a4/s320/2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5394209562850626754" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;4)Now check what is happening when click on create button without filling any field. You can see following error massages.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi87bSgKSfIaCgzF313o6kl9ug-Ey3XComoadO7etFBuSjfVcIMX0jIEz8v7wvTN2a_2LRRUDLjDfyvYWHpe-AP3LtCRivrUiCYhNJKaKbxrmvVu0cld9e3NfP1G0Wjry9TSVxI1_Ujido/s1600-h/3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 202px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi87bSgKSfIaCgzF313o6kl9ug-Ey3XComoadO7etFBuSjfVcIMX0jIEz8v7wvTN2a_2LRRUDLjDfyvYWHpe-AP3LtCRivrUiCYhNJKaKbxrmvVu0cld9e3NfP1G0Wjry9TSVxI1_Ujido/s320/3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5394209916364028226" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;5)Now you can see what is happening when there is one field is filling and click create button. Check them with your self.&lt;br /&gt;&lt;br /&gt;6)Now lets see how the cucumber can use for this.&lt;br /&gt;7)Go to the feature folder and create a new file called validate_product_details.feature and copy and paste following scenario.&lt;br /&gt;8)&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Scenario&lt;/span&gt;: Validate Product Details &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;Given&lt;/span&gt; I have no products &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I am on the list of Products &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; I follow "New Product" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Title" with "" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Description" with "" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Image Url" with "" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Price" with "" &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I press "Create" &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Then&lt;/span&gt; I should see "Title can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Description can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Image url can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Price is not a number" &lt;br /&gt;&lt;br /&gt;9)Now run the cucumber features/validate_product_details.feature  then you can see following.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCwII8RM5UniApdxQ-4ecPhPYKPhg5bt4VKJMkFUl1f3LeepAmr3uqj78LYjLux4nzf4zOvlAbjOf3ll1pQaXG1bORu1Ohh51ud_Y4x-bXTef4vmWImO-SzR0VkVpqz_EZ4Flk7TZIgIA/s1600-h/4.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 307px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCwII8RM5UniApdxQ-4ecPhPYKPhg5bt4VKJMkFUl1f3LeepAmr3uqj78LYjLux4nzf4zOvlAbjOf3ll1pQaXG1bORu1Ohh51ud_Y4x-bXTef4vmWImO-SzR0VkVpqz_EZ4Flk7TZIgIA/s320/4.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5394210267220770002" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;10)It says all steps are passed. In this scenario we can check alll the validation by writing steps like follows&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Scenario&lt;/span&gt;: Validate Product Details &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;Given&lt;/span&gt; I have no products &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I am on the list of Products &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; I follow "New Product" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Title" with "" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Description" with "" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Image Url" with "" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Price" with "" &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I press "Create" &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Then&lt;/span&gt; I should see "Title can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Description can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Image url can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Price is not a number" &lt;br /&gt;&lt;br /&gt; &lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; I fill in "Title" with "C#" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Description" with "" &lt;br /&gt;  And I fill in "Image Url" with "" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Price" with "" &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I press "Create" &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Then&lt;/span&gt; I should see "Description can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Image url can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Price is not a number" &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; I fill in "Title" with "C#" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Description" with "" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Image Url" with "" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Price" with "23" &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I press "Create" &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Then&lt;/span&gt; I should see "Description can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Image url can't be blank" &lt;br /&gt;  &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; I fill in "Title" with "C#" .......&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; like wise we can write so many steps.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;11)But you can see that is not much effective because write all the validation like this is not good. What can we do for it. Think a little bit....&lt;br /&gt;12)If you can remember the last post why we can't use that. Then the above scenario can be written as follows.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Scenario&lt;/span&gt;: Validate Product Details &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;Given&lt;/span&gt; I have no products &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I am on the list of Products &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; I follow "New Product" &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; I fill in the following: &lt;br /&gt;    | Title          |        | &lt;br /&gt;    | Description    |        | &lt;br /&gt;    | Image Url      |        | &lt;br /&gt;    | Price          |        | &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I press "Create" &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Then&lt;/span&gt; I should see "Title can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Description can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Image url can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Price is not a number"&lt;br /&gt;&lt;br /&gt;13)Now run the  cucumber features/validate_product_details.feature&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" &lt;br /&gt;href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXWx6nkJ05AYrAPNXrASffsQ9wDpH0VJmyP8y-RwWxbHzKRk2Ln6JhqEaLQk1vZoQfE5ndbRfNsddELqHFsCHZs7Vh4Inj8b_Dw74KtPhWA2mNNkdiSKcZeUVnbZVF7EBCsEAY5vcGn10/s1600-h/5.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 310px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXWx6nkJ05AYrAPNXrASffsQ9wDpH0VJmyP8y-RwWxbHzKRk2Ln6JhqEaLQk1vZoQfE5ndbRfNsddELqHFsCHZs7Vh4Inj8b_Dw74KtPhWA2mNNkdiSKcZeUVnbZVF7EBCsEAY5vcGn10/s320/5.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5394210569320898546" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;14)What a simple way to write validation file. Now lets expand this as follows and try to understand to what is happening there.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Scenario&lt;/span&gt;: Validate Product Details &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;Given&lt;/span&gt; I have no products &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I am on the list of Products &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; I follow "New Product" &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; I fill in the following: &lt;br /&gt;    | Title          |        | &lt;br /&gt;    | Description    |        | &lt;br /&gt;    | Image Url      |        | &lt;br /&gt;    | Price          |        | &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I press "Create" &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Then&lt;/span&gt; I should see "Title can't be blank" &lt;br /&gt;  And I should see "Description can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Image url can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Price is not a number" &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; I fill in the following: &lt;br /&gt;    | Title          |          | &lt;br /&gt;    | Description    |          | &lt;br /&gt;    | Image Url      |          | &lt;br /&gt;    | Price          |    20    | &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I press "Create" &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Then&lt;/span&gt; I should see "Title can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Description can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Image url can't be blank" &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; I fill in the following: &lt;br /&gt;    | Title          |        | &lt;br /&gt;    | Description    |        | &lt;br /&gt;    | Image Url      |  a.jpg | &lt;br /&gt;    | Price          |        | &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I press "Create" &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Then&lt;/span&gt; I should see "Title can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Description can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Price is not a number" &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; I fill in the following: &lt;br /&gt;    | Title          |                      | &lt;br /&gt;    | Description    |   My name is JTK     | &lt;br /&gt;    | Image Url      |                      | &lt;br /&gt;    | Price          |                      | &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I press "Create" &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Then&lt;/span&gt; I should see "Title can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Image url can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Price is not a number" &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; I fill in the following: &lt;br /&gt;    | Title          |    JTK    | &lt;br /&gt;    | Description    |           | &lt;br /&gt;    | Image Url      |           | &lt;br /&gt;    | Price          |           | &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I press "Create" &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Then&lt;/span&gt; I should see "Description can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Image url can't be blank" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Price is not a number" &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;15)Now run the  cucumber features/validate_product_details.feature now try to write your own validation files for your projects.</description><link>http://jeewanthatechnotes.blogspot.com/2009/10/cucumber-and-ruby-on-rails-part-6-my.html</link><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3ODe526nnRpIkI2S7mklP2H-f5xwoHClqtAwt2BYRVHSBqZnEFWQXlf1qvoVwS0-eYgWDelLPFmsGM7CAg5iSv180iHbcidrGqephIyPNmBC-_V3hoqFN7JHJ9tfVhfQvOxIDQCQqTAE/s72-c/1.png" width="72"/><thr:total>0</thr:total><author>jtk.jeewantha@gmail.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8826930886642696467.post-6294176890097257664</guid><pubDate>Wed, 14 Oct 2009 04:12:00 +0000</pubDate><atom:updated>2011-07-26T20:55:30.896-07:00</atom:updated><title>Cucumber and Ruby on Rails (Part 5) My learning materials</title><description>OK now I think you have a good idea of my past posts. Pardon me because my new post is late. As I said earlier there is a simple way of the last scenario. First we look at that scenario.&lt;br /&gt;&lt;br /&gt; &lt;span style="font-weight:bold;"&gt;Scenario&lt;/span&gt;: Create Valid Product &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;Given&lt;/span&gt; I have no products &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I am on the list of Products &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; I follow "New Product" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Title" with "Ruby On Rails" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Description" with "Model View Control Architecture" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Image Url" with "ror.jpg" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Price" with "22" &lt;br /&gt;  And I press "Create" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;Then&lt;/span&gt; I should see "Product was successfully created." &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Ruby On Rails" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Model View Control Architecture" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "ror.jpg" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "22" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should have 1 product &lt;br /&gt;&lt;br /&gt;In this scenario we used “I fill in “(field name)” with “(value)” ” lot of time. But we can give this in a simple way. Lets look at that scenario.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Scenario&lt;/span&gt;: Create Valid Product &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;Given&lt;/span&gt; I have no products &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I am on the list of Products &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; I follow "New Product" &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; I fill in the following: &lt;br /&gt;    | Title               | C#       | &lt;br /&gt;    | Description    | ABC   | &lt;br /&gt;    | Image Url      | c.jpg    | &lt;br /&gt;    | Price              | 5          | &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I press "Create" &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Then&lt;/span&gt; I should see "Product was successfully created." &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "C#" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "ABC" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "C#" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "5" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should have 1 product&lt;br /&gt;&lt;br /&gt;When we write this what is happening. Go to your &lt;span style="font-weight:bold;"&gt;webrat_step.rb&lt;/span&gt; file and you can see the following step definition.&lt;br /&gt;&lt;br /&gt;# Use this to fill in an entire form with data from a table. Example:&lt;br /&gt;#&lt;br /&gt;#   When I fill in the following:&lt;br /&gt;#     | Account Number | 5002      |&lt;br /&gt;#     | Expiry date    | 2009-11-01|&lt;br /&gt;#     | Note           | Nice guy  |&lt;br /&gt;#     | Wants Email?   |           |&lt;br /&gt;#&lt;br /&gt;# TODO: Add support for checkbox, select og option&lt;br /&gt;# based on naming conventions.&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; /^I fill in the following:$/ &lt;span style="font-weight:bold;"&gt;do&lt;/span&gt; |fields|&lt;br /&gt;  fields.rows_hash.each &lt;span style="font-weight:bold;"&gt;do&lt;/span&gt; |name, value|&lt;br /&gt;    &lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; %{I fill in "#{name}" with "#{value}"}&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There you can see the the cucumber give a easy way to do our job without typing same thing several  times like in the 1st scenario.&lt;br /&gt;&lt;br /&gt;What is happening from this step definition is it created a step for us by getting the values in table. How it does lets look at step by step.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;When /^I fill in the following:$/ do |fields|&lt;/span&gt;&lt;br /&gt;From this it takes the one field of the raw for a example  | Title  | C#    | &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;fields.rows_hash.each do |name, value|&lt;/span&gt;&lt;br /&gt;From this it takes the values of the field as &lt;span style="font-weight:bold;"&gt;name&lt;/span&gt; and value then&lt;br /&gt;name= Title&lt;br /&gt;value=c#&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;When %{I fill in "#{name}" with "#{value}"}&lt;/span&gt;&lt;br /&gt;From this step its create a step using that value then the step comes as &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;When I fill in Title with C#&lt;/span&gt;&lt;br /&gt;and end like wise all the fields are translated by the cucumber.&lt;br /&gt;&lt;br /&gt;Then what happen. Now it check this new step with the webrat file or with our step definition file and go through it.&lt;br /&gt;&lt;br /&gt;The correct step definition is  &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; /^I fill in "([^\"]*)" with "([^\"]*)"$/ &lt;span style="font-weight:bold;"&gt;do&lt;/span&gt; |field, value|&lt;br /&gt;  fill_in(field, :with =&gt; value) &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When we run this scenario using &lt;span style="font-weight:bold;"&gt;cucumber features/create_product.feature&lt;/span&gt; we got as follows.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipiDazOKSBSwmd32YxdxeDUbvHVp1I_Onb_fEUzj2tef-SDzDHU11OIErBIGLQyk6ZfqSqQ84vJbMV7GYQJdUXV1GB-77ePq3ExMdZaq34H_whx4ErX9kePJGFq87XxWU83zg7owsn-co/s1600-h/new+cucumber.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 313px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipiDazOKSBSwmd32YxdxeDUbvHVp1I_Onb_fEUzj2tef-SDzDHU11OIErBIGLQyk6ZfqSqQ84vJbMV7GYQJdUXV1GB-77ePq3ExMdZaq34H_whx4ErX9kePJGFq87XxWU83zg7owsn-co/s320/new+cucumber.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5392306445106472162" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;it says all the steps are pass. that means code is OK. see how the cucumber is easy to work. according to that you can type these steps as table in that scenario&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Then&lt;/span&gt; I should see "Product was successfully created." &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "C#" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "ABC" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "C#" &lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "5" &lt;br /&gt;&lt;br /&gt;try it your self.&lt;br /&gt;&lt;br /&gt;Best Regards,&lt;br /&gt;Jeewantha.</description><link>http://jeewanthatechnotes.blogspot.com/2009/10/cucumber-and-ruby-on-rails-part-5-my.html</link><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipiDazOKSBSwmd32YxdxeDUbvHVp1I_Onb_fEUzj2tef-SDzDHU11OIErBIGLQyk6ZfqSqQ84vJbMV7GYQJdUXV1GB-77ePq3ExMdZaq34H_whx4ErX9kePJGFq87XxWU83zg7owsn-co/s72-c/new+cucumber.png" width="72"/><thr:total>0</thr:total><author>jtk.jeewantha@gmail.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8826930886642696467.post-904077496856943327</guid><pubDate>Mon, 05 Oct 2009 05:01:00 +0000</pubDate><atom:updated>2011-07-26T20:55:30.896-07:00</atom:updated><title>Cucumber and Ruby on Rails (Part 4) My learning materials</title><description>I think you get a good knowledge from my past posts.  OK now lets see to test adding new products. Before that lets see what is happening when new product is adding.&lt;br /&gt;&lt;br /&gt;1)He should be in the &lt;span style="font-weight:bold;"&gt;List of Product&lt;/span&gt; page as follows.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAktBDC4mOuNffcihPrbJIXu84JIGdgsMQXRrO5ES2ekfn1gb-B3ZrB-BdqTFMwCIzgK133rI7VbOOeCoQzA0gDdKraICXqHUqR0lWAlB8K6K4cojdnzFI9finYMTEh6kbyHPocYFHCIs/s1600-h/1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 68px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAktBDC4mOuNffcihPrbJIXu84JIGdgsMQXRrO5ES2ekfn1gb-B3ZrB-BdqTFMwCIzgK133rI7VbOOeCoQzA0gDdKraICXqHUqR0lWAlB8K6K4cojdnzFI9finYMTEh6kbyHPocYFHCIs/s320/1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5388977267556615202" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2)Now what he do . He clicks the New Products Link. Now he can see the following page.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1XR9Zij145yVIVRNkJTCMCyqu-ccu8EjSaHeJVh7eiZrQBC7BViJSza3cEqwZ8Sn79AZD61pPM07YHBTuRDTxzn8mdE1KnceQaoEal0evof4aa3S0MGn3MEs_oDDVJH2ptt-7lwjHMoQ/s1600-h/2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1XR9Zij145yVIVRNkJTCMCyqu-ccu8EjSaHeJVh7eiZrQBC7BViJSza3cEqwZ8Sn79AZD61pPM07YHBTuRDTxzn8mdE1KnceQaoEal0evof4aa3S0MGn3MEs_oDDVJH2ptt-7lwjHMoQ/s320/2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5388978386501494658" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3)Now he fill the fields as&lt;br /&gt;    &lt;span style="font-weight:bold;"&gt;Title&lt;/span&gt; = Ruby On Rails&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;Description&lt;/span&gt; = Model View Control Architecture&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;Image url&lt;/span&gt;= ror.jpg&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;Price&lt;/span&gt;=22&lt;br /&gt;&lt;br /&gt;4)Now he clicks &lt;span style="font-weight:bold;"&gt;Create&lt;/span&gt; button and he can see following page.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtefVrT29hDtM-5nBDbfPFEmm7hBLsVp8w9Edv-saTlJe2QmrkKcOCr341E0YNuYTvQrZP1drHgC_HLkgzNtL3q1jSEZgt5agpEDQWjJQCljacZwL2kqQ3dfbCbMumB00QM1nRO57a3gk/s1600-h/3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 153px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtefVrT29hDtM-5nBDbfPFEmm7hBLsVp8w9Edv-saTlJe2QmrkKcOCr341E0YNuYTvQrZP1drHgC_HLkgzNtL3q1jSEZgt5agpEDQWjJQCljacZwL2kqQ3dfbCbMumB00QM1nRO57a3gk/s320/3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5388978808210631554" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;5)He can see “&lt;span style="font-weight:bold;"&gt;Product was successfully created&lt;/span&gt;” and he can see &lt;span style="font-weight:bold;"&gt;“Ruby On Rails&lt;/span&gt;”, “&lt;span style="font-weight:bold;"&gt;Model View Control Architecture&lt;/span&gt;”, “&lt;span style="font-weight:bold;"&gt;ror.jpg&lt;/span&gt;” and “&lt;span style="font-weight:bold;"&gt;22&lt;/span&gt;”.&lt;br /&gt;&lt;br /&gt;6)Now lets see how we can test it using Cucumber Testing.&lt;br /&gt;&lt;br /&gt;7)Create a new file called “&lt;span style="font-weight:bold;"&gt;create_product.feature&lt;/span&gt;” in &lt;span style="font-weight:bold;"&gt;product/features&lt;/span&gt; folder and paste this scenario.&lt;br /&gt;&lt;br /&gt; &lt;span style="font-weight:bold;"&gt;Scenario&lt;/span&gt;: Create Valid Product&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;Given&lt;/span&gt; I have no products&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I am on the list of Products&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; I follow "New Product"&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Title" with "Ruby On Rails"&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Description" with "Model View Control Architecture"&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Image Url" with "ror.jpg"&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I fill in "Price" with "22"&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I press "Create"&lt;br /&gt;&lt;br /&gt;  Then I should see "Product was successfully created."&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Ruby On Rails"&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Model View Control Architecture"&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "ror.jpg"&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "22"&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should have 1 product&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8)This scenario check all the steps which I shown above. Check them your self. Now go to the "&lt;span style="font-weight:bold;"&gt;Product_steps.rb&lt;/span&gt;"page in &lt;span style="font-weight:bold;"&gt;features/step_definition&lt;/span&gt; folder and paste following codes.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Given&lt;/span&gt; /^I have no products$/ &lt;span style="font-weight:bold;"&gt;do&lt;/span&gt;&lt;br /&gt;  Product.delete_all&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Then&lt;/span&gt; /^I should have ([0-9]+) product$/ &lt;span style="font-weight:bold;"&gt;do&lt;/span&gt; |count|&lt;br /&gt;  &lt;span style="font-weight:bold;"&gt;Product&lt;/span&gt;.count.should == count.to_i&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;9)Now we have 2 feature files as &lt;span style="font-weight:bold;"&gt;list_of_product.feature&lt;/span&gt; and  &lt;span style="font-weight:bold;"&gt;create_product.feature&lt;/span&gt;&lt;br /&gt;10)when we run &lt;span style="font-weight:bold;"&gt;cucumber features&lt;/span&gt; all the features files are run. If we want to run only one file we can run &lt;span style="font-weight:bold;"&gt;cucumber features/(file name)&lt;/span&gt;&lt;br /&gt;  eg:-  &lt;span style="font-weight:bold;"&gt;cucumber features/ create_product.feature&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;11)Run the &lt;span style="font-weight:bold;"&gt;cucumber features/ create_product.feature&lt;/span&gt; and you can see following.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU7gl9qbuDSc-NjSFhN71kSn7SCxNXKeyYYuFgibvzv3EotmMhgF9bKR3NZGzfQMrVo9DygY2ULPdz3REq78q__dmt_UN4zlRlbIya0JI56g4W8-K1jYEYNfiWATg5RUuNV9LV6f5Y66Q/s1600-h/4.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 314px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU7gl9qbuDSc-NjSFhN71kSn7SCxNXKeyYYuFgibvzv3EotmMhgF9bKR3NZGzfQMrVo9DygY2ULPdz3REq78q__dmt_UN4zlRlbIya0JI56g4W8-K1jYEYNfiWATg5RUuNV9LV6f5Y66Q/s320/4.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5388980306888247794" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;12)It says all the steps are passed. Now you can test to verify actually this scenario works with the code for that we can change some codes in scenario and check running &lt;span style="font-weight:bold;"&gt;cucumber  features&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;13)I give it to you as a home work. Check what happening when the scenario change and run &lt;span style="font-weight:bold;"&gt;cucumber features&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;14)Lets see in the next post how this scenario can be written in simple way.</description><link>http://jeewanthatechnotes.blogspot.com/2009/10/cucumber-and-ruby-on-rails-part-4-my.html</link><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAktBDC4mOuNffcihPrbJIXu84JIGdgsMQXRrO5ES2ekfn1gb-B3ZrB-BdqTFMwCIzgK133rI7VbOOeCoQzA0gDdKraICXqHUqR0lWAlB8K6K4cojdnzFI9finYMTEh6kbyHPocYFHCIs/s72-c/1.png" width="72"/><thr:total>0</thr:total><author>jtk.jeewantha@gmail.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8826930886642696467.post-4115096293020143055</guid><pubDate>Thu, 01 Oct 2009 09:59:00 +0000</pubDate><atom:updated>2011-07-26T20:55:30.896-07:00</atom:updated><title>Cucumber and Ruby on Rails (Part 3) My learning materials</title><description>Now lets start to create scenarios and do testing using cucumber&lt;br /&gt;&lt;br /&gt;1)Lets create our first scenario as follows and save it in the&lt;span style="font-weight:bold;"&gt; product/features&lt;/span&gt; folder as named &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;list_of_product.feature&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;     &lt;span style="font-weight:bold;"&gt;Scenario&lt;/span&gt;: Products List&lt;br /&gt;          &lt;span style="font-weight:bold;"&gt;Given&lt;/span&gt; I have products titled Java, description Platform Independent, Image url java.jpg, Price 20&lt;br /&gt;          &lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; I go to the list of Products&lt;br /&gt;          &lt;span style="font-weight:bold;"&gt;Then&lt;/span&gt; I should see "Java"&lt;br /&gt;          &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Platform Independent" &lt;br /&gt;          &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "java.jpg"&lt;br /&gt;          &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "20"&lt;br /&gt;&lt;br /&gt;2)Now run the cucumber features and see the out put as&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCZsfA7l73Mk0wsjOs3kngudGworsI0cNrSvYyl-Jm1om0AlXwwCEeImd9duQEs80Zu1fiqvAO3IZK6216sg3cZv7v4gJlwdedY08qFXFK5aEw11rexfa89k3JGBYjU9b9r_fvDR8eTSk/s1600-h/1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 306px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCZsfA7l73Mk0wsjOs3kngudGworsI0cNrSvYyl-Jm1om0AlXwwCEeImd9duQEs80Zu1fiqvAO3IZK6216sg3cZv7v4gJlwdedY08qFXFK5aEw11rexfa89k3JGBYjU9b9r_fvDR8eTSk/s320/1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5387569552646448658" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3)You get 1 scenario (1 undefined)&lt;br /&gt; 6 steps (5 skipped, 1 undefined)&lt;br /&gt; that means your 1st step  is not defined. That means the cucumber do not know how to deal with the step&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;GivenI have products titled Java, description Platform Independent, Image url java.jpg, Price 20&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;To deal with this that should be in the&lt;span style="font-weight:bold;"&gt; webrat_step.rb&lt;/span&gt; file in the &lt;span style="font-weight:bold;"&gt;features/step_definitions &lt;/span&gt;folder. If not we have to create them for the use of cucumber and you can see the cucumber suggest you some definitions as &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Given /^I have products titled Java, description Platform Independent, Image url java\.jpg, Price 20$/ do&lt;br /&gt;  pending&lt;br /&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4)Now lets create the definition file. Create a file named &lt;span style="font-weight:bold;"&gt;product_step.rb &lt;/span&gt;file in the &lt;span style="font-weight:bold;"&gt;features/step_definitions&lt;/span&gt; folder  and paste the following code there and save it.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Given /^I have products titled (.+), description (.+), Image url (.+), Price (.+)$/ do |title,description,image_url,price|&lt;br /&gt;&lt;br /&gt;    Product.create!(:title =&gt; title, :description =&gt; description, :image_url =&gt; image_url, :price =&gt; price)&lt;br /&gt;&lt;br /&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In this step it says to store the data in the table called Product.&lt;br /&gt;&lt;br /&gt;5)Now lets run again &lt;span style="font-weight:bold;"&gt;cucumber features&lt;/span&gt; and see the result. You can see following error.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSdhz1aznjsTGApjrIOtpM8nBWKqclZRLwj7oCA3kn75H2imJBVlDm6R7bMVVI41yTbE_55ha0J2WhtCCyorAOWXLU_836gd-F_WUH0KKAgVBKbmq4_uHYByeFyr4LM6dgsnvuN2suEmg/s1600-h/2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 254px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSdhz1aznjsTGApjrIOtpM8nBWKqclZRLwj7oCA3kn75H2imJBVlDm6R7bMVVI41yTbE_55ha0J2WhtCCyorAOWXLU_836gd-F_WUH0KKAgVBKbmq4_uHYByeFyr4LM6dgsnvuN2suEmg/s320/2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5387570054330888690" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This says there is no such a constant like &lt;span style="font-weight:bold;"&gt;Product&lt;/span&gt;.  This means still we do not create our &lt;span style="font-weight:bold;"&gt;Product&lt;/span&gt; Table lets create our product table. Type on the terminal as follows.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;ruby script/generate scaffold product title:string description:text image_url:string price:decimal&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;rake db:migrate&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6)Now lets run again &lt;span style="font-weight:bold;"&gt;cucumber features&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtDeRmPT_Gk26m6gOcqY9BWjfjD6yhwAViHXgkvWdUsILRNlza-q5wvD08AIz7UcxI4rBHSKTgn1LWUt_wvKjHiL3VZQKCe_6Nt21_7I0BNFJn6cARbDtUbaNOpu0arpL-8qeQKuXSCIw/s1600-h/3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 253px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtDeRmPT_Gk26m6gOcqY9BWjfjD6yhwAViHXgkvWdUsILRNlza-q5wvD08AIz7UcxI4rBHSKTgn1LWUt_wvKjHiL3VZQKCe_6Nt21_7I0BNFJn6cARbDtUbaNOpu0arpL-8qeQKuXSCIw/s320/3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5387570410871928722" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;That says that product_test.products table. That because these scenarios working with the tables in the test database. So lets fix it. Run following code.&lt;br /&gt; &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;rake db:test:clone&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now lets run again &lt;span style="font-weight:bold;"&gt;cucumber features.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;7)Its hows the following error and add it to the file &lt;span style="font-weight:bold;"&gt;path.rb&lt;/span&gt; in &lt;span style="font-weight:bold;"&gt;features/support&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;this should come after &lt;span style="font-weight:bold;"&gt;case&lt;/span&gt; statement&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;when /the list of Products/&lt;br /&gt;&lt;br /&gt;  products_path&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;the reason for this is&lt;/span&gt; (&lt;br /&gt;&lt;br /&gt;We have our first passing step! The second step is now failing, though. This is because Cucumber doesn’t know how to translate “the list of articles” into a path in our application.&lt;br /&gt;One of the files installed by Cucumber is called paths.rb, which lives in the /features/support directory. In this file we can define custom paths that map the English definitions in Cucumber files to paths in our Rails application. To add a mapping we just add a new when condition to the case statement in the path_to method. (There’s a comment in the file to show us where to add it.)&lt;br /&gt;)&lt;br /&gt;8)Now run again &lt;span style="font-weight:bold;"&gt;cucumber features &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSnV-XMuxVj2LcS3qimPyD8S8XB8mp4DMAbpHtXSxuxQ58IGa9181u8oISJB4pPIJzC7tkd758RMp8o_kA6u6_JCNTrf_s0xxje_ewvFzjymkLAjOItJvEpd1oQFEM2TiJr0pwUYOrUQs/s1600-h/4.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 176px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSnV-XMuxVj2LcS3qimPyD8S8XB8mp4DMAbpHtXSxuxQ58IGa9181u8oISJB4pPIJzC7tkd758RMp8o_kA6u6_JCNTrf_s0xxje_ewvFzjymkLAjOItJvEpd1oQFEM2TiJr0pwUYOrUQs/s320/4.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5387570754161475426" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;9)You get all the scenarios are passed.&lt;br /&gt;10)Now our first scenario is passed lets try another scenario in the next post. Try this scenario and check you can understand it. Copy and paste to the same feature file&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Scenario&lt;/span&gt;: Products List&lt;br /&gt;    &lt;span style="font-weight:bold;"&gt;Given&lt;/span&gt; I have products titled Java, description Platform Independent, Image url java.jpg, Price 20&lt;br /&gt;     &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I have products titled Ruby on Rails, description Rich internet Application, Image url ror.gif, Price 25&lt;br /&gt;    &lt;span style="font-weight:bold;"&gt;When&lt;/span&gt; I go to the list of Products&lt;br /&gt;    &lt;span style="font-weight:bold;"&gt;Then&lt;/span&gt; I should see "Java"&lt;br /&gt;    &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Platform Independent" &lt;br /&gt;    &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "java.jpg"&lt;br /&gt;    &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "20"&lt;br /&gt;     &lt;span style="font-weight:bold;"&gt;Then&lt;/span&gt; I should see "Ruby on Rails"&lt;br /&gt;     &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "Rich internet Application" &lt;br /&gt;     &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "ror.gif"&lt;br /&gt;     &lt;span style="font-weight:bold;"&gt;And&lt;/span&gt; I should see "25"</description><link>http://jeewanthatechnotes.blogspot.com/2009/10/cucumber-and-ruby-on-rails-part-3-my.html</link><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCZsfA7l73Mk0wsjOs3kngudGworsI0cNrSvYyl-Jm1om0AlXwwCEeImd9duQEs80Zu1fiqvAO3IZK6216sg3cZv7v4gJlwdedY08qFXFK5aEw11rexfa89k3JGBYjU9b9r_fvDR8eTSk/s72-c/1.png" width="72"/><thr:total>1</thr:total><author>jtk.jeewantha@gmail.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8826930886642696467.post-8569070206437612445</guid><pubDate>Thu, 01 Oct 2009 06:41:00 +0000</pubDate><atom:updated>2011-07-26T20:55:30.896-07:00</atom:updated><title>Ruby cucumber Part3</title><description>Hi all,&lt;br /&gt;I am very sorry for the delay of my 3rd post because these days are i am very busy. i hope to do it as soon as possible. Most probably today afternoon i can do it.&lt;br /&gt;Cheers,&lt;br /&gt;jeewantha.</description><link>http://jeewanthatechnotes.blogspot.com/2009/09/ruby-cucumber-part3.html</link><thr:total>0</thr:total><author>jtk.jeewantha@gmail.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8826930886642696467.post-625497067119137159</guid><pubDate>Mon, 28 Sep 2009 04:45:00 +0000</pubDate><atom:updated>2011-07-26T20:55:30.897-07:00</atom:updated><title>Cucumber and Ruby on Rails (Part 2) My learning materials</title><description>&lt;style type="text/css"&gt;!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt; 	&lt;/style&gt;  &lt;p  style="margin-bottom: 0in; font-weight: bold;font-family:arial;"&gt;&lt;span style="font-size:130%;"&gt;Create  a project and do testing using cucumber.&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;   	&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt; 	&lt;title&gt;&lt;/title&gt; 	&lt;meta name="GENERATOR" content="OpenOffice.org 3.0  (Linux)"&gt; 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt; 	&lt;/style&gt;  &lt;/div&gt;&lt;p style="margin-bottom: 0in; text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;Project name&lt;/span&gt; “product”&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="margin-bottom: 0in; text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;Requirement&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;ol style="text-align: justify;"&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-size:100%;"&gt;The user can see the available 	products.&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="margin-bottom: 0in; text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;		When the user come to the page he should be a&lt;/span&gt;&lt;span style="font-size:100%;"&gt;ble to see all the available products with 	description like&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="margin-bottom: 0in; text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;	Title: Ruby on Rails&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="margin-bottom: 0in; text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;	Description: Model, view, controller architecture&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="margin-bottom: 0in; text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;	Image Url: ror.jpg&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="margin-bottom: 0in; text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;	Price: 21&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="margin-bottom: 0in; text-align: justify;"&gt;    &lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;ol style="text-align: justify;" start="2"&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-size:100%;"&gt;He should be able to add new 	products.&lt;/span&gt;&lt;/p&gt; 	&lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-size:100%;"&gt;He should be able to show the 	products.&lt;/span&gt;&lt;/p&gt; 	&lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-size:100%;"&gt;He should be able to edit 	products.&lt;/span&gt;&lt;/p&gt; 	&lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-size:100%;"&gt;He should be able to validate 	products details when adding new products.&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="margin-bottom: 0in; text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;             		Error massages should be display when there is a wrong with adding data like&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="margin-bottom: 0in; text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;                       	Price should be number&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="margin-bottom: 0in; text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;                      	Title cant be blank etc.&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;ol style="text-align: justify;" start="6"&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-size:100%;"&gt;When Edit product the validation 	also should be done.&lt;/span&gt;&lt;/p&gt; 	&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-size:100%;"&gt;He should be able to navigate any 	places by clicking links.&lt;/span&gt;&lt;/p&gt; 	&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-size:100%;"&gt;He should be able to delete 	products.&lt;/span&gt;&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="margin-bottom: 0in; text-align: justify;"&gt;&lt;span style="font-size:130%;"&gt;Product table contents&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="margin-bottom: 0in; text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;         	Title		=	String&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="margin-bottom: 0in; text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;         	Description	=	String&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="margin-bottom: 0in; text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;          Image Url	=	String&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;p style="margin-bottom: 0in; text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;         	Price		=	Decimal&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt; &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;br /&gt;	&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt; 	&lt;title&gt;&lt;/title&gt; 	&lt;meta name="GENERATOR" content="OpenOffice.org 3.0  (Linux)"&gt; 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt; 	&lt;/style&gt;  &lt;p style="margin-bottom: 0in; font-weight: bold;"&gt;&lt;span style="font-size:130%;"&gt;Lets start developing the project.&lt;/span&gt;&lt;/p&gt;  &lt;ol&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;Install cucumber&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p style="margin-bottom: 0in;"&gt;                                  	&lt;b&gt;sudo gem1.8 install cucumber&lt;/b&gt;&lt;/p&gt;  &lt;ol start="2"&gt;&lt;li&gt;&lt;p&gt;The plugins’ dependencies must be installed separately:&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;                 &lt;b&gt;gem install term-ansicolor treetop diff-lc&lt;/b&gt;&lt;b&gt;s nokogiri&lt;/b&gt;&lt;/p&gt;  &lt;ol start="3"&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;Lets start developing our project&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p style="margin-bottom: 0in;"&gt;        Open a terminal then type&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;                                	         	&lt;b&gt;rails -d mysql product &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;                                &lt;b&gt;		cd product&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;b&gt;           rake db:create:all &lt;/b&gt; &lt;/p&gt;    &lt;p style="margin-bottom: 0in;"&gt;&lt;b&gt;                        		rake db:migrate&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;ol start="4"&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;Now lets try to create cucumber&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p style="margin-bottom: 0in;"&gt;                             		&lt;b&gt;ruby script/generate cucumber&lt;/b&gt;&lt;/p&gt;  &lt;ol start="5"&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;Then run&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p style="margin-bottom: 0in;"&gt;            		&lt;b&gt;              Cucumber features&lt;/b&gt;&lt;/p&gt;  &lt;ol start="6"&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in; font-weight: normal;"&gt;Then u can 	see as follows&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO70Dz0SZGXJ3x4dLRlUgBTfVL0aDCPQF3WEI6cJhjrkQhVnJMw_uPRfL6saF5xkEKb2ScUinDADf2MKOEZgMxiu4ln061yoT1XebYxtmyqbiHclJllMxuMJ4idEXefVOJq_dT29aRZsA/s1600-h/1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 223px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO70Dz0SZGXJ3x4dLRlUgBTfVL0aDCPQF3WEI6cJhjrkQhVnJMw_uPRfL6saF5xkEKb2ScUinDADf2MKOEZgMxiu4ln061yoT1XebYxtmyqbiHclJllMxuMJ4idEXefVOJq_dT29aRZsA/s320/1.png" alt="" id="BLOGGER_PHOTO_ID_5386378222560151074" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol start="6"&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in; font-weight: normal;"&gt;Now you are 	ready to work with cucumber&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in; font-weight: normal;"&gt;lets see that 	in next post.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;title&gt;&lt;/title&gt; 	&lt;meta name="GENERATOR" content="OpenOffice.org 3.0  (Linux)"&gt; 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt; 	&lt;/style&gt;   &lt;p style="margin-bottom: 0in; font-weight: normal;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;/div&gt;&lt;p style="margin-bottom: 0in; font-family: times new roman;"&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt; &lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;p  style="margin-bottom: 0in; font-weight: bold; text-align: justify;font-family:arial;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style=";font-family:times new roman;font-size:100%;"  &gt;&lt;span style="font-weight: normal;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; </description><link>http://jeewanthatechnotes.blogspot.com/2009/09/cucumber-and-ruby-on-rails-part-2-my.html</link><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO70Dz0SZGXJ3x4dLRlUgBTfVL0aDCPQF3WEI6cJhjrkQhVnJMw_uPRfL6saF5xkEKb2ScUinDADf2MKOEZgMxiu4ln061yoT1XebYxtmyqbiHclJllMxuMJ4idEXefVOJq_dT29aRZsA/s72-c/1.png" width="72"/><thr:total>1</thr:total><author>jtk.jeewantha@gmail.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8826930886642696467.post-1649321880197287053</guid><pubDate>Sat, 26 Sep 2009 11:09:00 +0000</pubDate><atom:updated>2011-07-26T20:55:30.897-07:00</atom:updated><title>Cucumber and Ruby on Rails (Part 1)</title><description>&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;br /&gt;    I write this post to exchange my experienced with you about Cucumber and  ruby and rails.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;What is cucumber?&lt;/span&gt;&lt;br /&gt;   Actually when i heard this word i get a funny and i get a picture as follows.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7q3Ux55n0OEIw-nvYMWTCauvuWNeK7ZNo9OLLcQsbH0VY9lPV7H_Vg6Z9EGMoPv3cZVUUgCJeJ2atpaPXQElEWshoBaSpntd6zV8N_YRAKM9B9PxCp9DqVWQGNAS4dgHfNFc-tGSjWl4/s1600-h/1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 81px; height: 127px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7q3Ux55n0OEIw-nvYMWTCauvuWNeK7ZNo9OLLcQsbH0VY9lPV7H_Vg6Z9EGMoPv3cZVUUgCJeJ2atpaPXQElEWshoBaSpntd6zV8N_YRAKM9B9PxCp9DqVWQGNAS4dgHfNFc-tGSjWl4/s200/1.jpg" alt="" id="BLOGGER_PHOTO_ID_5385733740122026242" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;   After that i searched web and i try to find tutorials for learning this myself. when i was finding about cucumber i got idea about as follows.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn-bfJNC6XdkkPJCz-HgZYUHPafLKfvFfTQmxrPlygFUKWTg96qBYtrQ0_Y2OG03NNO4hgVmOeE_1vfsxrQ52Tspi7uFp0PcTLASFEZj1BlWwkm9lgUPllVj-D8QyDji5VpNrkCNm6XZ4/s1600-h/2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn-bfJNC6XdkkPJCz-HgZYUHPafLKfvFfTQmxrPlygFUKWTg96qBYtrQ0_Y2OG03NNO4hgVmOeE_1vfsxrQ52Tspi7uFp0PcTLASFEZj1BlWwkm9lgUPllVj-D8QyDji5VpNrkCNm6XZ4/s200/2.jpg" alt="" id="BLOGGER_PHOTO_ID_5385734589756498850" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;  After that i started finding and do various type of tutorials and try to get basics of cucumber. But it was very difficult to me learn this because there are not much tutorials for that i found 2 tutorials and by refering them i got basic idea and i think to share my knowledge with others so that is why this kind of blog post is come out. I think this will for the begginers to get an idea.&lt;br /&gt;&lt;br /&gt;  Now lets see what is the cucumber in ruby on rais and in other post how to start to test a project using cucumber.&lt;br /&gt;&lt;br /&gt;  Cucumber (Behavioral Driven Development ) is used for testing the behavior of a code. the programmers says that cucumber is used for accepting testing. Any way this is used for behaviral testing.&lt;br /&gt;&lt;br /&gt;    Reads plain texts….&lt;br /&gt;    Texts are written as scenarios&lt;br /&gt;    Scenarios interact with the code&lt;br /&gt;    Check the Codes are correct&lt;br /&gt;&lt;br /&gt;  Cucumber lets software development teams describe how software should behave in plain text. The text is written in a business-readable domain-specific language and serves as documentation, automated tests and development-aid - all rolled into one format.&lt;br /&gt;&lt;br /&gt;  Lets see the simple senario and discuss about it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Scenario&lt;/span&gt;: Listing &amp;amp; showing products&lt;br /&gt;    &lt;span style="font-weight: bold;"&gt;Given&lt;/span&gt; I have products titled Java, description  Platform Independent, Image url java.jpg, Price 20&lt;br /&gt;    &lt;span style="font-weight: bold;"&gt;When&lt;/span&gt; I go to the list of Products&lt;br /&gt;    &lt;span style="font-weight: bold;"&gt;Then&lt;/span&gt; I should see "Java"&lt;br /&gt;    &lt;span style="font-weight: bold;"&gt;And&lt;/span&gt; I should see "Platform Independent"&lt;br /&gt;    &lt;span style="font-weight: bold;"&gt;And&lt;/span&gt; I should see "java.jpg"&lt;br /&gt;    &lt;span style="font-weight: bold;"&gt;And&lt;/span&gt; I should see "20"&lt;br /&gt;&lt;br /&gt;   As u can see the  the senario is describe in palain text. here the Given, When, Then and And are the key words which is used by the cucumber. how the cucumber work with this type of plain text for that it uses the regular expressions. See the folowing regular expression (Don't wory that much about that we'll see them leter in detail)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Given&lt;/span&gt; /^I have products titled (.+), description (.+), Image url (.+), Price (.+)$/ &lt;span style="font-weight: bold;"&gt;do &lt;/span&gt;&lt;br /&gt;    |title,description,image_url,price|&lt;br /&gt;    Product.create!(:title =&gt; title, :description =&gt; description, :image_url =&gt;  image_url, :price =&gt; price)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  This describes the first step of the above senario. we do not much trouble with regular expressions. Becuse when we generate cucumber we get predefine regular expressions in webrat_steps.rb file.&lt;br /&gt;&lt;br /&gt;Now I think u have basic idea about cucumber. In next posts lets see step by step to create a project and testing project using cucumber.&lt;br /&gt;&lt;/div&gt;</description><link>http://jeewanthatechnotes.blogspot.com/2009/09/cucumber-and-ruby-on-rails-part-1.html</link><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7q3Ux55n0OEIw-nvYMWTCauvuWNeK7ZNo9OLLcQsbH0VY9lPV7H_Vg6Z9EGMoPv3cZVUUgCJeJ2atpaPXQElEWshoBaSpntd6zV8N_YRAKM9B9PxCp9DqVWQGNAS4dgHfNFc-tGSjWl4/s72-c/1.jpg" width="72"/><thr:total>0</thr:total><author>jtk.jeewantha@gmail.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8826930886642696467.post-2585855962675351379</guid><pubDate>Thu, 24 Sep 2009 11:59:00 +0000</pubDate><atom:updated>2011-07-26T20:55:30.897-07:00</atom:updated><title>Working with Ruby on Rails Cucumber From the Beginning(Part I)</title><description>&lt;br /&gt;&lt;style type="text/css"&gt;&lt;!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&lt;/style&gt;Create  a project and do testing using cucumber.  &lt;p style="margin-bottom: 0in;"&gt;Project name “product”&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;Requirement&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;The user can see the available 	products.&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p style="margin-bottom: 0in;"&gt;		When the user come to the page he should be able to see all the available products with 	description like&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;	Title: Ruby on Rails&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;	Description: Model, view, controller architecture&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;	Image Url: ror.jpg&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;	Price: 21&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;    &lt;/p&gt; &lt;ol start="2"&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;He should be able to add new 	products.&lt;/p&gt; 	&lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;He should be able to show the 	products.&lt;/p&gt; 	&lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;He should be able to edit 	products.&lt;/p&gt; 	&lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;He should be able to validate 	products details when adding new products.&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p style="margin-bottom: 0in;"&gt;		Error massages should be display when there is a wrong with adding data like&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;	Price should be number&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;	Title cant be blank etc.&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;ol start="6"&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;When Edit product the validation 	also should be done.&lt;/p&gt; 	&lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;He should be able to navigate any 	places by clicking links.&lt;/p&gt; 	&lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;He should be able to delete 	products.&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt;  &lt;p style="margin-bottom: 0in;"&gt;Product table contents&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;	Title		=	String&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;	Description	=	String&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;	Image Url	=	String&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;	Price		=	Decimal&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;Lets start developing the project.&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;Install cucumber&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p style="margin-bottom: 0in;"&gt;	&lt;b&gt;sudo gem1.8 install cucumber&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;ol start="2"&gt;&lt;li&gt;&lt;p&gt;The plugins’ dependencies must be installed separately:&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;	&lt;b&gt;gem install term-ansicolor treetop diff-lcs nokogiri&lt;/b&gt;&lt;/p&gt; &lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;ol start="3"&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;Lets start developing our project&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p style="margin-bottom: 0in;"&gt;	Open a terminal then type&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;	         	&lt;b&gt;rails -d mysql product  &lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;  &lt;b&gt;		cd product&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;b&gt;	          	rake db:create:all &lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;b&gt; 		rake db:migrate &lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;ol start="4"&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;Now lets try to create cucumber&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p style="margin-bottom: 0in;"&gt;		&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;b&gt;ruby script/generate cucumber&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;ol start="5"&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in;"&gt;Then run&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p style="margin-bottom: 0in;"&gt;		&lt;b&gt;Rake Features 	&lt;/b&gt;&lt;font style="font-weight: normal;"&gt;Or&lt;/font&gt;&lt;b&gt; 	Cucumber features&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;ol start="6"&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in; font-weight: normal;"&gt;Then u can 	see as follows&lt;/p&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p style="margin-bottom: 0in; font-weight: normal;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in; font-weight: normal;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKWKy-b855uxa_Q41m70PQsWOodSP6ueY0Y9r_82b4M6yfKgbBtrZSk7YQwoARyVjfarSVAM2vbntCBfbFrKl8UHvOUEDz1CA1rXjgsQ6_xGSdQZhQGQpHQPxHOu6E5EcT_zNgYEdkm6o/s1600-h/1.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKWKy-b855uxa_Q41m70PQsWOodSP6ueY0Y9r_82b4M6yfKgbBtrZSk7YQwoARyVjfarSVAM2vbntCBfbFrKl8UHvOUEDz1CA1rXjgsQ6_xGSdQZhQGQpHQPxHOu6E5EcT_zNgYEdkm6o/s320/1.png" alt="" id="BLOGGER_PHOTO_ID_5385004597834886546" border="0"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;ol start="6"&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in; font-weight: normal;"&gt;Now you are 	ready to work with cucumber&lt;/p&gt; 	&lt;/li&gt;&lt;li&gt;&lt;p style="margin-bottom: 0in; font-weight: normal;"&gt;lets see that 	in next post.&lt;/p&gt;  &lt;/li&gt;&lt;/ol&gt; &lt;p style="margin-bottom: 0in; font-weight: normal;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in; font-weight: normal;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in; font-weight: normal;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in; font-weight: normal;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; </description><link>http://jeewanthatechnotes.blogspot.com/2009/09/working-with-ruby-on-rails-cucumber.html</link><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKWKy-b855uxa_Q41m70PQsWOodSP6ueY0Y9r_82b4M6yfKgbBtrZSk7YQwoARyVjfarSVAM2vbntCBfbFrKl8UHvOUEDz1CA1rXjgsQ6_xGSdQZhQGQpHQPxHOu6E5EcT_zNgYEdkm6o/s72-c/1.png" width="72"/><thr:total>0</thr:total><author>jtk.jeewantha@gmail.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8826930886642696467.post-7550394884610734939</guid><pubDate>Thu, 27 Aug 2009 09:17:00 +0000</pubDate><atom:updated>2011-07-26T20:55:30.897-07:00</atom:updated><title>Test Automation Tool</title><description>There are a lot of test automation tool in software industry. the iMacro and selenium IDE re two of them. Both can be installed as a firefox add-on. lets see how can it be done. in the next post.</description><link>http://jeewanthatechnotes.blogspot.com/2009/08/test-automation-tool.html</link><thr:total>0</thr:total><author>jtk.jeewantha@gmail.com (Unknown)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8826930886642696467.post-2854285539977909433</guid><pubDate>Wed, 26 Aug 2009 15:49:00 +0000</pubDate><atom:updated>2011-07-26T20:55:30.897-07:00</atom:updated><title>Test Automation</title><description>&lt;b&gt;Test automation&lt;/b&gt; is the use of software to control the execution of tests, the comparison of actual outcomes to predicted outcomes, the setting up of test preconditions, and other test control and test reporting functions&lt;sup id="cite_ref-0" class="reference"&gt;&lt;a href="http://en.wikipedia.org/wiki/Test_automation#cite_note-0"&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/sup&gt;. Commonly, test automation involves automating a manual process already in place that uses a formalized testing process.&lt;br /&gt;&lt;p&gt;Although manual tests may find many defects in a software application, it is a laborious and time consuming process. In addition it may not be effective in finding certain classes of defects. Test automation is a process of writing a computer program to do testing that would otherwise need to be done manually. Once tests has been automated, they can be run quickly. This is often the most cost effective method for software products that have a long maintenance life, because even minor patches over the lifetime of the application can cause features to break which were working at an earlier point in time.&lt;/p&gt; &lt;p&gt;There are two general approaches to test automation:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;b&gt;Code-driven testing&lt;/b&gt;. The public interfaceto classes, modules, or libraries are tested with a variety of input arguments to validate that the results that are returned are correct.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Graphical User Interface testing&lt;/span&gt;. A testing framework generates user interface events such as keystrokes and mouse clicks, and observes the changes that result in the user interface, to validate that the observable behavior of the program is correct.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Test automation tools can be expensive, and it is usually employed in combination with manual testing. It can be made cost-effective in the longer term, especially when used repeatedly in regression testing.&lt;/p&gt;What to automate, when to automate, or even whether one really needs automation are crucial decisions which the testing (or development) team has to take. Selecting the correct features of the product for automation largely decides the success of the automation. Automating unstable features or features that are undergoing changes should be avoided.&lt;sup id="cite_ref-1" class="reference"&gt;&lt;a href="http://en.wikipedia.org/wiki/Test_automation#cite_note-1"&gt;&lt;span&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;reference:- http://en.wikipedia.org/wiki/Test_automation&lt;a href="http://en.wikipedia.org/wiki/Test_automation#cite_note-1"&gt;&lt;span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/sup&gt;</description><link>http://jeewanthatechnotes.blogspot.com/2009/08/test-automation.html</link><thr:total>0</thr:total><author>jtk.jeewantha@gmail.com (Unknown)</author></item></channel></rss>