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

<channel>
	<title>Off Shore Development India &#187; Asp.Net Selenium Tests</title>
	<atom:link href="http://www.offshoresoftwaredevelopmentindia.com/blog/tag/aspnet-selenium-tests/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.offshoresoftwaredevelopmentindia.com/blog</link>
	<description>Offshore Software Development India</description>
	<lastBuildDate>Wed, 25 Jan 2012 13:14:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Working with Selenium-Grid and run PHP Tests</title>
		<link>http://www.offshoresoftwaredevelopmentindia.com/blog/2009/06/01/working-with-selenium-grid-and-run-php-tests/</link>
		<comments>http://www.offshoresoftwaredevelopmentindia.com/blog/2009/06/01/working-with-selenium-grid-and-run-php-tests/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 02:50:17 +0000</pubDate>
		<dc:creator>nirav</dc:creator>
				<category><![CDATA[.Net Development]]></category>
		<category><![CDATA[Php Development]]></category>
		<category><![CDATA[Selenium Testing]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Unit Testing]]></category>
		<category><![CDATA[Asp.Net Selenium Tests]]></category>
		<category><![CDATA[Development based on Unit Testing]]></category>
		<category><![CDATA[Functional Testing]]></category>
		<category><![CDATA[PHP Selenium Tests]]></category>
		<category><![CDATA[PHP Tests by Selenium Grid]]></category>
		<category><![CDATA[PHP Unit Testing]]></category>
		<category><![CDATA[Selenium Grid Testing]]></category>
		<category><![CDATA[Software Testing Framework]]></category>
		<category><![CDATA[Testing Methods]]></category>
		<category><![CDATA[Web Application Testing]]></category>
		<category><![CDATA[Website Functional Testing]]></category>
		<category><![CDATA[Website Testing]]></category>
		<category><![CDATA[Woring with Selenium Grid]]></category>

		<guid isPermaLink="false">http://www.offshoresoftwaredevelopmentindia.com/blog/?p=35</guid>
		<description><![CDATA[By Vaishal,
Working with Selenium-Grid
1. Download selenium Grid from
http://seleniumhq.org/download/
And extract files any location. Mostly in C:\selenium
2. Install latest jre from
http://java.sun.com/
3. Download ant from
http://ant.apache.org/
Extract files in C:\Ant.
- Set environment variable ANT_HOME as
- Go to the properties menu of MyComputer
- Go to the advance menu and click on &#8216;Environment Variable&#8217;
- Click on new and Enter value &#8216;ANT_HOME&#8217; variable [...]]]></description>
			<content:encoded><![CDATA[<p>By Vaishal,</p>
<p>Working with Selenium-Grid</p>
<p>1. Download selenium Grid from<br />
<a href="http://seleniumhq.org/download/">http://seleniumhq.org/download/</a><br />
And extract files any location. Mostly in C:\selenium</p>
<p>2. Install latest jre from</p>
<p><a href="http://java.sun.com/">http://java.sun.com/</a></p>
<p>3. Download ant from</p>
<p><a href="http://ant.apache.org/">http://ant.apache.org/</a><br />
Extract files in C:\Ant.</p>
<p>- Set environment variable ANT_HOME as<br />
- Go to the properties menu of MyComputer<br />
- Go to the advance menu and click on &#8216;Environment Variable&#8217;<br />
- Click on new and Enter value &#8216;ANT_HOME&#8217; variable with your folder value where you have installed Ant.<br />
- Now set the path variable as<br />
Edit value and add location of your ant\bin folder</p>
<p>4. Now go to the selenium-grid folder from command prompt and launch-hub as follow:</p>
<p>ant launch-hub</p>
<p>Hub will start on port no 4444 as follow:</p>
<p>5. Now start remote server from new terminal from same selenium-grid folder as follow</p>
<p>ant launch-remote-control</p>
<p>It will start as follow:</p>
<p>6. Now in browser go to the hub location by</p>
<p><a href="http://localhost:4444/console">http://localhost:4444/console</a></p>
<p>It will look like</p>
<p>7. To start more remote server enter<br />
ant -Dport=5556 launch-remote-control<br />
ant -Dport=5557 launch-remote-control<br />
ant -Dport=5558 launch-remote-control</p>
<p>8. Now the hub on browser will show as</p>
<p>Available Remote Controls<br />
Host Port Environment<br />
localhost 5555 *firefox<br />
localhost 5556 *firefox<br />
localhost 5557 *firefox<br />
localhost 5558 *firefox</p>
<p>Note: The total run time is directly proportional to the number of available remote controls. So don’t start more controls if not necessary.</p>
<p>9. Run the hub</p>
<p>This setup illustrates that you can run the hub and the remote controls on arbitrary machines. When you do so though, you need to provide a lot more information when launching a remote control. You need to launch it with:<br />
ant -Dport=&lt;port&gt; -Dhost=&lt;hostname&gt; -DhubURL=&lt;hub url&gt; launch-remote-control<br />
Where:</p>
<p>port Port that the remote control will be listening at. Must be unique on the machine the remote control runs on. hostname Hostname or IP address of the machine the remote control runs on. Must be visible from the Hub machine. Note: this information could be inferred as it is always referring to the machine the remote control runs on. It might not be required in future versions of the Selenium Grid. hub url Which hub the remote control should register/unregister to. If the hub is running on hostname my.hub.com, this URL will be <a href="http://my.hub.com:4444">http://my.hub.com:4444</a></p>
<p>10. Now to run a test open new cmd prompt and go the test folder.<br />
phpunit Example</p>
<p>11. This will start the test.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.offshoresoftwaredevelopmentindia.com/blog/2009/06/01/working-with-selenium-grid-and-run-php-tests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with Selenium-IDE &amp; Running PHP Unit tests</title>
		<link>http://www.offshoresoftwaredevelopmentindia.com/blog/2009/06/01/working-with-selenium-ide-running-php-unit-tests/</link>
		<comments>http://www.offshoresoftwaredevelopmentindia.com/blog/2009/06/01/working-with-selenium-ide-running-php-unit-tests/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 02:20:02 +0000</pubDate>
		<dc:creator>nirav</dc:creator>
				<category><![CDATA[.Net Development]]></category>
		<category><![CDATA[Php Development]]></category>
		<category><![CDATA[Selenium Testing]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Unit Testing]]></category>
		<category><![CDATA[Asp.Net Selenium Tests]]></category>
		<category><![CDATA[Development based on Unit Testing]]></category>
		<category><![CDATA[Functional Testing]]></category>
		<category><![CDATA[PHP Selenium Tests]]></category>
		<category><![CDATA[PHP Tests by Selenium IDE]]></category>
		<category><![CDATA[PHP Unit Testing]]></category>
		<category><![CDATA[Selenium IDE]]></category>
		<category><![CDATA[Software Testing Framework]]></category>
		<category><![CDATA[Web Application Testing]]></category>
		<category><![CDATA[Website Functional Testing]]></category>
		<category><![CDATA[Website Testing]]></category>

		<guid isPermaLink="false">http://www.offshoresoftwaredevelopmentindia.com/blog/?p=34</guid>
		<description><![CDATA[By Vaishal,
Working with Selenium-IDE &#124; Running Functional Tests &#124; Runnig PHP Unit Tests
Selenium IDE is an integrated development environment for Selenium tests. It is implemented as a Firefox extension, and allows you to record, edit, and debug tests. Selenium IDE includes the entire Selenium Core, allowing you to easily and quickly record and play back [...]]]></description>
			<content:encoded><![CDATA[<p>By Vaishal,</p>
<p>Working with Selenium-IDE | Running Functional Tests | Runnig PHP Unit Tests</p>
<p>Selenium IDE is an integrated development environment for Selenium tests. It is implemented as a Firefox extension, and allows you to record, edit, and debug tests. Selenium IDE includes the entire Selenium Core, allowing you to easily and quickly record and play back tests in the actual environment that they will run.</p>
<p>Selenium IDE is not only recording tool: it is a complete IDE. You can choose to use its recording capability, or you may edit your scripts by hand. With auto-complete support and the ability to move commands around quickly, Selenium IDE is the ideal environment for creating Selenium tests no matter what style of tests you prefer.</p>
<p>1. Download selenium IDE from<br />
<a href="http://selenium-ide.openqa.org/download.jsp">http://selenium-ide.openqa.org/download.jsp</a></p>
<p>This will directly add IDE as fire-fox add-ons.<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/2079">https://addons.mozilla.org/en-US/firefox/addon/2079</a><br />
2. Start Firefox and then Start Selenium IDE: Tools-&gt;Selenium IDE.</p>
<p>You will see the following window.</p>
<p>3. Enter base url or open the site on which you want to perform functional testing.<br />
IDE will directly open in play mode with the entry of base url as below. Here we want to perform testing on <a href="http://www.offshoresoftwaredevelopmentindia.com/">http://www.offshoresoftwaredevelopmentindia.com/</a></p>
<p>4. After starting the IDE now simply browse the site. It  makes entry in the table as below</p>
<p>Now the entire test is like</p>
<p>Now stop recording by pressing red button.</p>
<p>In html format it looks like</p>
<p>We can export this file in any format we want as</p>
<p>In PHP format it looks as</p>
<p>5. Now to run the recorded test open new browser and press the green &#8211; play button</p>
<p>6. The test will run as follow</p>
<p>7. If there will be any error then that test will be highlighted by red line as</p>
<p>8. If you are on a slow internet connection than it may help to slow the test speed.</p>
<p>9. You can save the test case in php as follow..</p>
<p>Required changes in the exported PHP file is as follow</p>
<p>a. Change the class name same as stored file name as default class name will be “Example”.<br />
b. Enter the web-site name in the<br />
$this-&gt;setBrowserUrl(&#8220;<a href="http://change-this-to-the-site-you-are-testing/">http://change-this-to-the-site-you-are-testing/</a>&#8220;);<br />
Field.<br />
c. Available browser options are<br />
*iexplore<br />
*konqueror<br />
*firefox<br />
*mock<br />
*pifirefox<br />
*piiexplore<br />
*chrome<br />
*safari<br />
*opera<br />
*iehta<br />
*custom<br />
That is write as follow<br />
$this-&gt;setBrowser(&#8220;*chrome&#8221;);<br />
(When we define browser as chrome then no need to get security certificate but in case of firefox or iexplore we need to take certificate. )</p>
<p>10. Downloading and installing Selenium RC<br />
Selenium RC is a Java based command line server that starts browsers and runs commands you pass from your tests.</p>
<p>a. First make sure you have a Java runtime installed on your machine.<br />
Otherwise download it from<br />
<a href="http://www.java.com/en/download/manual.jsp">http://www.java.com/en/download/manual.jsp</a><br />
<a href="http://java.sun.com/javase/6/docs/technotes/guides/jweb/otherFeatures/jre_install.html">http://java.sun.com/javase/6/docs/technotes/guides/jweb/otherFeatures/jre_install.html</a><br />
Test the version of JRE by entering command on command line as –<br />
java -version<br />
b. Download Selenium RC from <a href="http://selenium-rc.seleniumhq.org/download.html">http://selenium-rc.seleniumhq.org/download.html</a>.<br />
c. After extracting the files from the archive copy the ‘selenium-server.jar’ file to any directory you feel appropriate.<br />
d. Start the Selenium RC server from the command-line by issuing the following command:<br />
java -jar selenium-server.jar<br />
This will start the server on port 4444.<br />
e. Now the server is ready to accept test commands from your PHP script. Make sure you keep this server running till you finish testing.</p>
<p>11. Changes in selenium-server.jar file requires to run in Firefox is as below:</p>
<p>a. Open selenium-server.jar using winrar<br />
b. locate 2 dirs: customProfileDirCUSTFFCHROME and customProfileDirCUSTFF<br />
c. recursively explore each of those dirs, and when you find a file called install.rdf drag it to some temp location, and edit the following line:<br />
&lt;em:maxVersion&gt;2.0.0.*&lt;/em:maxVersion&gt;<br />
change it to:<br />
&lt;em:maxVersion&gt;4.0.0.*&lt;/em:maxVersion&gt;<br />
d. drag the install.rdf back into the archive and overwrite the old one.<br />
e. do this for all the install.rdf files in those 2 dirs.</p>
<p>12. Installing PHPUnit<br />
a. An easy way to install PHPUnit is to use the PEAR installer. The PEAR channel (pear.phpunit.de) is used to distribute PHPUnit so make sure that it is registered with your local PEAR environment:<br />
pear channel-discover pear.phpunit.de<br />
After the channel is registered install PHPUnit:<br />
pear install phpunit/PHPUnit<br />
Actual testing</p>
<p>Now that PHPUnit is installed and the Selenium RC server is up and running, it’s time to run our test we saved before in our ‘Example.php’ file. Type the following on your command-line:<br />
phpunit Example</p>
<p>13. This will start the test. The PHPUnit Selenium driver will execute each test command from your file and send it to the Selenium server, which does the job of launching the appropriate browser, opening web pages, and performing various specified actions; and closing the browser after the test completes.</p>
<p>This will open new browser as</p>
<p>After successful execution the output will be as</p>
<p>Note: All Images will coming soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.offshoresoftwaredevelopmentindia.com/blog/2009/06/01/working-with-selenium-ide-running-php-unit-tests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unit Testing and Selenium Testing</title>
		<link>http://www.offshoresoftwaredevelopmentindia.com/blog/2009/06/01/unit-testing-and-selenium-testing/</link>
		<comments>http://www.offshoresoftwaredevelopmentindia.com/blog/2009/06/01/unit-testing-and-selenium-testing/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 01:57:58 +0000</pubDate>
		<dc:creator>nirav</dc:creator>
				<category><![CDATA[.Net Development]]></category>
		<category><![CDATA[Php Development]]></category>
		<category><![CDATA[Selenium Testing]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Unit Testing]]></category>
		<category><![CDATA[Asp.Net Selenium Tests]]></category>
		<category><![CDATA[Development based on Unit Testing]]></category>
		<category><![CDATA[Functional Testing]]></category>
		<category><![CDATA[Javascript Testing Methods]]></category>
		<category><![CDATA[PHP Selenium Tests]]></category>
		<category><![CDATA[PHP Unit Testing]]></category>
		<category><![CDATA[Software Testing Framework]]></category>
		<category><![CDATA[Testing Methods]]></category>
		<category><![CDATA[Web Application Testing]]></category>
		<category><![CDATA[Website Testing]]></category>

		<guid isPermaLink="false">http://www.offshoresoftwaredevelopmentindia.com/blog/?p=33</guid>
		<description><![CDATA[By Vaishal,
Unit Testing
Unit testing is a software verification and validation method where the programmer gains confidence that individual units of source code are fit for use. A unit is the smallest testable part of an application. In procedural programming a unit may be an individual program, function, procedure, etc., while in object-oriented programming, the smallest [...]]]></description>
			<content:encoded><![CDATA[<p>By Vaishal,</p>
<p><strong>Unit Testing</strong></p>
<p>Unit testing is a software verification and validation method where the programmer gains confidence that individual units of source code are fit for use. A unit is the smallest testable part of an application. In procedural programming a unit may be an individual program, function, procedure, etc., while in object-oriented programming, the smallest unit is a method, which may belong to a base/super class, abstract class or derived/child class.</p>
<p>Ideally, each test case is independent from the others: substitutes like method stubs, mock objects, fakes and test harnesses can be used to assist testing a module in isolation. Unit tests are typically written and run by software developers to ensure that code meets its requirements and behaves as intended. Its implementation can vary from being very manual (pencil and paper) to being formalized as part of build automation.</p>
<p>The goal of unit testing is to isolate each part of the program and show that the individual parts are correct. A unit test provides a strict, written contract that the piece of code must satisfy. As a result, it affords several benefits. Unit tests find problems early in the development cycle.</p>
<p>For the php code we are performing unit testing using PHP Unit.</p>
<p><strong>Selenium Testing</strong></p>
<p>Selenium is a portable software testing framework for web applications. The tests can be written as HTML tables or coded in a number of popular programming languages and can be run directly in most modern web browsers. It is used for functional testing. Selenium can be deployed on Windows, Linux, and Macintosh.</p>
<p>The latest side project is Selenium Grid, which provides a hub allowing the running of multiple Selenium tests concurrently on any number of local or remote systems, thus minimizing test execution time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.offshoresoftwaredevelopmentindia.com/blog/2009/06/01/unit-testing-and-selenium-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

