tag:blogger.com,1999:blog-7579146552578657522024-02-07T23:43:39.132-08:00Software Test Automation and Process Tips...Knowledge sharing in Software Test Automation and Test ProcessAnonymoushttp://www.blogger.com/profile/18061025315278377536noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-757914655257865752.post-58272446737664980812014-09-12T14:14:00.001-07:002014-09-12T16:14:14.510-07:00Using Sikuli to test Windows Phone 8.1 Application<div>
<br /></div>
Test automation tools for regression testing in mobile applications have been increasingly sought. For some platforms is very difficult to find good free tools such as Windows Phone 8.1 platform. To automate this platform effectively you need to invest in expensive testing tools. But if your company doesn't have budget to invest in the purchase of tools for test automation, It is possib;e to perform a feasible way to automate using a free tool called <a href="http://www.sikuli.org/">Sikuli.</a><br />
<div>
<br /></div>
<div>
Sikuli is a free tool picture driven developed by MIT using python programming language. This tool allow to automate regression tests, you can find the tutorials and presetations in the sikuli <a href="http://doc.sikuli.org/tutorials/index.html">web site</a>.</div>
<div>
<br /></div>
<div>
The requirements to use Sikuli to test windows phone are:</div>
<div>
<br /></div>
<div>
<ol>
<li>Use a computer with S.O. Windows 8.1</li>
<li>Download and install <a href="http://www.sikuli.org/download.html">Sikuli</a> in your computer.</li>
<li>Download and Install Project my Screen for Windows Phone available on microsoft page -> http://www.microsoft.com/en-us/download/details.aspx?id=42536.</li>
<li>Connect your mobile device Windows Phone 8.1 and project the screen on your computer. Example of how to project the screen <a href="https://www.youtube.com/watch?v=T1GzY4evB5M">here</a>.</li>
</ol>
<div>
Steps to automate tests using Sikuli:</div>
</div>
<div>
<br /></div>
<div>
<ol>
<li>Open the Project My Screen and plug your Mobile Phone Windows Phone 8.1 by USB port.</li>
<li>The Mobile Phone' home screen must to appears ins your computer. </li>
<li>Open Sikuli program in your computer.</li>
<li>The Sikuli IDE must be opened as showed in Figure 1.</li>
<li>The left bar shows the commands to be used in Sikuli.</li>
<li>Click on command "<i><span style="color: blue;">Click()</span></i>"</li>
<li>Now Select the area of the screen of your Mobile Phone . For example, select the icon of your application (To open the application to be tested).</li>
<li>The sikuli will script the command with the image selected. <i><span style="color: blue;">Click (image)</span></i></li>
<li>Now you tap on icon of your mobile application to open it.</li>
<li>Then, back to Sikuli and choose the command <i><span style="color: blue;">Click()</span></i> again.</li>
<li>Select the application area, for example a button.</li>
<li>Tap on button select in your mobile phone.</li>
<li>In Sikuli, you can click on command <i><span style="color: blue;">Find() </span></i></li>
<li>Select an image of your mobile application or a message for example.</li>
<li>Go to your mobile initial state, for example home screen.</li>
<li>In Sikuli click on button Play to reproduce your steps and observe it executing.</li>
</ol>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMc36VddSyfT3v-KhItOhnAqY42abyeKRPk6ViYoYoqsn87g53ZIKX7lyU86KEJT3QXKiH1LLGQBPu7uKfN22pg2FbaGqovyKjnVx7Shd00hJt6aBOiDJmDXP6VhMagim4ZyjQ2x1CLwYx/s1600/code.png" imageanchor="1" style="display: inline !important; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMc36VddSyfT3v-KhItOhnAqY42abyeKRPk6ViYoYoqsn87g53ZIKX7lyU86KEJT3QXKiH1LLGQBPu7uKfN22pg2FbaGqovyKjnVx7Shd00hJt6aBOiDJmDXP6VhMagim4ZyjQ2x1CLwYx/s1600/code.png" height="344" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Figure 1 - Sikuli IDE</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The video attached will shows how the steps recorded can be reproduced using sikuli.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/IkZIiLqVbwE?feature=player_embedded' frameborder='0'></iframe><br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Remarks:</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<ul>
<li>The Project my screen must be opened in the same size and position in your computer to be exactly reproduced.</li>
<li>The home screen of your mobile phone and localization of icons and image must be the same of the mobile recorded.</li>
<li>The Sikuli will recognize the application through the image and position.</li>
<li>You can use python language to improve your test script , example: </li>
</ul>
<div>
<i><span style="color: blue;">if find(image)</span></i></div>
<div>
<i><span style="color: blue;"><br /></span></i></div>
<i><span style="color: blue;"> print "Test Passed"</span></i><br />
<i><span style="color: blue;"><br /></span></i>
<i><span style="color: blue;">else print "Test Failed"</span></i><br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/18061025315278377536noreply@blogger.com4tag:blogger.com,1999:blog-757914655257865752.post-26874342802168685052014-05-15T18:53:00.001-07:002014-09-12T13:58:36.236-07:00Testing Android Applications using MonkeyRunner<div style="text-align: justify;">
Monkeyrunner is a tool from Android SDK. It provides an API using commands to execute tests in Android devices or Android emulators. It is possible to write a Python program that installs an Android application and perform it actions. </div>
<div style="text-align: justify;">
The API has the following classes of commands: </div>
<div style="text-align: justify;">
<br />
<ul>
<li><span style="font-family: Times, Times New Roman, serif;">Monkey Device: it provides connection to a device or emulator.</span></li>
<ul>
<li><span style="font-family: Times, Times New Roman, serif;">http://developer.android.com/tools/help/MonkeyDevice.html </span></li>
</ul>
<li><span style="font-family: Times, Times New Roman, serif;">Monkey Image: It can run packages, <span style="background-color: white; line-height: 21.00792121887207px;">provides methods for installing and uninstalling packages, start</span></span><span style="background-color: white; font-family: Times, 'Times New Roman', serif; line-height: 21.00792121887207px;"> an Activity, and send keyboard or touch events to an application</span><span style="background-color: white; color: #707070; font-family: Times, 'Times New Roman', serif; line-height: 21.00792121887207px;">.</span><span style="background-color: white; color: #707070; font-family: Times, 'Times New Roman', serif; line-height: 21.00792121887207px;"> </span><span style="font-family: Times, 'Times New Roman', serif;"> </span></li>
<ul>
<li><span style="font-family: Times, Times New Roman, serif;">http://developer.android.com/tools/help/MonkeyImage.html </span></li>
</ul>
<li><span style="font-family: Times, Times New Roman, serif;">Monkey Runner : It captures screen image, <span style="background-color: white; line-height: 21.00792121887207px;">comparing two MonkeyImage objects and writing an image to a file.</span></span></li>
<ul>
<li><span style="font-family: Times, Times New Roman, serif;">http://developer.android.com/tools/help/MonkeyRunner.html</span></li>
</ul>
</ul>
</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
MonkeyRunner Example</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
To use the monkeyrunner, it is necessary to include in the environment variable PATH the android tools directory. </div>
<div style="text-align: justify;">
... \ sdk \ build-tools \ android-4.4; </div>
<div style="text-align: justify;">
... \ sdk \ tools </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br />
<ul>
<li>Create a folder called monkey in the c drive of the computer and put the scripts monkeyrunner_recorder.py monkeyrunner_playback.py available here: </li>
<ul>
<li>https://github.com/miracle2k/android-platform_sdk/tree/master/monkeyrunner/scripts</li>
</ul>
<li>Create subfolders images, apks-script, log and apks_to_test</li>
</ul>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixmTI8_3M7L5CEpmRyIifb_tzHWBf3xLUH6h-vRJQdryDL7qF6MseqGaJ87gT8MJy9Nba1xQQX7B3kW95BkuGctlVqrDjU_TZFuTpCEpmt903M5arliEAtF4CztDHN_pNBTFrh8OOEYvWo/s1600/test1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixmTI8_3M7L5CEpmRyIifb_tzHWBf3xLUH6h-vRJQdryDL7qF6MseqGaJ87gT8MJy9Nba1xQQX7B3kW95BkuGctlVqrDjU_TZFuTpCEpmt903M5arliEAtF4CztDHN_pNBTFrh8OOEYvWo/s1600/test1.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: justify;">
<br />
<ul>
<li>Open the emulator android or conect your Android device in USB (usb_debug must eon)</li>
<li>Open a command prompt and type: </li>
<li>monkeyrunner c: \ monkey \ monkeyrunner_recorder.py</li>
</ul>
</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ1f-AjUF-fpup7TwjwP0JbjWzl7P7CzRHYxs8otK0L3jtByajG0G9rM3djF4OkSgUp1z345dALsxhJ-c92KAx3pQTzhi4Z20njdCXdxwIIy0aqpo4_0KfBiMC_RInq8S8jbhgUDYaWfuq/s1600/command.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ1f-AjUF-fpup7TwjwP0JbjWzl7P7CzRHYxs8otK0L3jtByajG0G9rM3djF4OkSgUp1z345dALsxhJ-c92KAx3pQTzhi4Z20njdCXdxwIIy0aqpo4_0KfBiMC_RInq8S8jbhgUDYaWfuq/s1600/command.png" height="37" width="320" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
The interface monkeyrunner recorder will appear. </div>
<div style="text-align: justify;">
With the mouse, try to perform actions on the emulator screen, like opening an application. </div>
<div style="text-align: justify;">
The actions will appear on the right of the recorder interface.</div>
<div style="text-align: justify;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK4__vZNHP5mMo8fddCrVfpD8a3b6livxACMQ6qi-qdUZ1emz6pLyhrChp0d6pJDrm0LgE4DA9brnIAEpeCqukkUBIwt5vav5K9-ctHEBFv5AwraiLfBZ4Q6gZTte0Z4DcWUk2q0pTBp5o/s1600/recorder.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK4__vZNHP5mMo8fddCrVfpD8a3b6livxACMQ6qi-qdUZ1emz6pLyhrChp0d6pJDrm0LgE4DA9brnIAEpeCqukkUBIwt5vav5K9-ctHEBFv5AwraiLfBZ4Q6gZTte0Z4DcWUk2q0pTBp5o/s1600/recorder.png" height="288" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">MonkeyRunner Recorder</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
In the recorder interface , save the scripts clicking on the menu Export Actions</div>
<div class="separator" style="clear: both; text-align: justify;">
- Save the script as a file extension .mr (test.mr example) </div>
<div class="separator" style="clear: both; text-align: justify;">
- Close the recorder interface and reopen the command prompt </div>
<div class="separator" style="clear: both; text-align: justify;">
- Type: monkeyrunner c:\monkey\monkeyrunner_playback.py c: \monkey\test.mr </div>
<div class="separator" style="clear: both; text-align: justify;">
- Press enter and note that the emulator will play back your recorded actions on Emulator or in the Android device.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
If you prefer, it is possible to create scripts directly in python and run. in monkeyrunner.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Follow the python code bellow, it tests installation of an application, it simulates the buttons' actions Back, Home and Menu and then it generates a log file and saves screen image. </div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i>class DroidTest:</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i><br /></i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> rootfolder = 'c:\\monkey\\'</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> apkDir = rootdir + 'apks_to_test\\'</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> imageDir = rootdir + 'images\\'</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> logDir = rootdir + 'log\\'</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i><br /></i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> def __init__(self, device, count):</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> self.device = device</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> self.count = count</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i><br /></i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> def run(self):</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> eraseLog(self.device)</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i><br /></i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> for apk in glob.glob(self.apkDir + '/*.apk'):</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> print "Testing apk %s" % apk</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> packagename,activity = get_package_activity_name(apk)</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> componentname = packagename + "/." + activity</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i><br /></i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> apk_path = self.device.shell('pm path ' + packagename)</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> if apk_path.startswith('package:'):</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> print"App is already installed."</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> else:</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> print"App not installed, installing APKs..."</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> self.device.installPackage(apk)</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i><br /></i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> print componentname</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i><br /></i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> self.device.startActivity(component=componentname)</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i><br /></i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> MonkeyRunner.sleep(5)</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i><br /></i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> image = self.device.takeSnapshot()</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> image.writeToFile(self.imageDir + 'screenshot_' + packagename + str(self.count) + '.png','png')</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i><br /></i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> #Simulate Device Events Home, Back and Menu buttons</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i><br /></i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> self.device.press('KEYCODE_HOME', 'DOWN_AND_UP')</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> MonkeyRunner.sleep(5)</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> self.device.startActivity(component=componentname)</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> MonkeyRunner.sleep(5)</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> self.device.press('KEYCODE_BACK', MonkeyDevice.DOWN_AND_UP)</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> MonkeyRunner.sleep(5)</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> self.device.startActivity(component=componentname)</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> MonkeyRunner.sleep(5)</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> self.device.press('KEYCODE_MENU', MonkeyDevice.DOWN_AND_UP)</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i><br /></i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> log(self.logDir + 'test' + str(self.count) +'.log', self.device);</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i><br /></i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> self.device.removePackage(apk)</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i><br /></i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i>if __name__ == "__main__":</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white;"><span style="color: blue;"><i> main()</i></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
- Name this code as testDroid.py. </div>
<div class="separator" style="clear: both; text-align: justify;">
- Put an apk in the folder \apks_to_test</div>
<div class="separator" style="clear: both; text-align: justify;">
- Start the emulator or Android device and then type the following command in prompt: monkeyrunner c:\mokey\testDroid.py</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
The python program will run and it will execute the buttons tests.</div>
<div style="text-align: justify;">
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dybJVPDD2_axD2c84uMwC1vPiXPQ9qOuJAmd4MoK9wttUD4_mJLUPpEN3A0iqOIbiQrB_vAZ7r1ZrF8D-dkEA' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/18061025315278377536noreply@blogger.com7tag:blogger.com,1999:blog-757914655257865752.post-78515707357604443542014-05-08T13:21:00.000-07:002014-05-08T13:26:11.579-07:00Agile Practices to Help Mobile Testing<div style="text-align: justify;">
The growing trend to use mobile devices and software applications to everyday activities and communication resulted in popular use of mobile software applied to many kinds of devices platforms. There is the demand nowadays for agile and flexible testing procedures in the software companies. In this post I will describe an experience to implement some agile practices for mobile application testing.</div>
<div class="heading1" style="margin-left: 28.35pt; mso-list: l1 level1 lfo2; tab-stops: list 28.35pt; text-indent: -28.35pt;">
<b><br /></b>
<b>Mobile Application Testing</b><o:p></o:p></div>
<div class="heading1" style="margin-left: 28.35pt; mso-list: l1 level1 lfo2; tab-stops: list 28.35pt; text-indent: -28.35pt;">
<br /></div>
<div style="text-align: justify;">
Mobile Application Testing is testing using well-defined software test methods and tools to ensure quality in functions, behaviors, performance, and quality of service, as well as features, such as mobility, usability, interoperationability, connectivity, security, and privacy [1].</div>
<div style="text-align: justify;">
Mobile Application testing has some peculiarities that include connectivity, convenience (Quality of Design), supported devices (diversity of devices and OS), touch screens, new programing languages, resources constraints and context awareness.There are challenges for testing process mainly for test selection and test execution because of the rich contextual inputs and lack of test tools [2]. </div>
<div style="text-align: justify;">
According to the technical literature, the important types of testing in mobile application are [3]:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
· <b>GUI Functional Testing:</b> Functional testing ensures that the application is working as specified in the requirements. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
· <b>Performance Testing:</b> This testing is undertaken to check the performance and behavior of the application under certain conditions such as low battery, bad network coverage, low available memory, simultaneous access to application’s server by several users and other conditions.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
· <b>Memory and Energy Testing</b>: memory leaks may preempt the (limited) memory resource, and active processes (of killed applications) may reduce the device (battery) autonomy.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
· <b>Interrupt Testing</b>: An application while functioning may face several interruptions like incoming calls or network coverage outage and recovery. The different types of interruptions are: Incoming and Outgoing SMS and MMS, Incoming and Outgoing calls, Incoming Notifications, Battery Removal, Cable Insertion and Removal for data transfer, Network outage and recovery, Media Player on/off, Device Power cycle.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
· <b>Device multitude Testing</b>: Testing an application on a multitude of mobile devices.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
· <b>Usability Testing</b>: The usability verifies if the application has friendly interface, achieving its goals and getting a favorable response from users. This is the key to commercial success.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
·<b> Installation testing</b>: This testing verifies that the installation process goes smoothly without the user having to face any difficulty. This testing process covers installation, updating and uninstalling of an application.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
·<b> Certification Testing</b>: The mobile application needs to be tested against the guidelines set by different mobile platforms to be available in an application store, example: Nokia Test Criteria, IOS Testing criteria, Microsoft Test Criteria and etc.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
These types of testing required impact the test activities during application development, especially in agile methodologies.</div>
<div class="heading2" style="margin-left: 28.35pt; text-align: justify; text-indent: -28.35pt;">
<b><br /></b>
<b>Experience: Project Description</b><o:p></o:p></div>
<div class="p1a" style="text-align: justify;">
<br /></div>
<div class="p1a" style="text-align: justify;">
The project X was a
mobile application to help to navigate cities giving the access to scheduled
departure/arrival times from public transportation.<o:p></o:p></div>
<div class="MsoBodyText" style="margin-bottom: 0.0001pt; text-align: justify;">
The
project followed the Scrum development framework and the software platforms
used were J2ME programming language and Eclipse IDE. This project had two
deliverables for different mobile platforms. The project team had 4 developers,
one Scrum master, 1 Product Owner, 2 designers and 2 testers. <o:p></o:p></div>
<div class="MsoBodyText" style="margin-bottom: 0.0001pt; text-align: justify;">
Initially,
developers were responsible for code new features, unit tests and Continuous
Integration (CI), and Testers should take care of functional tests,
non-functional tests, and certification tests for mobile applications. <o:p></o:p></div>
<div class="MsoBodyText" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="heading1" style="margin-left: 28.35pt; text-align: justify; text-indent: -28.35pt;">
<b><span style="font-size: 7pt;"> </span><!--[endif]-->Testing Process</b><o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
The testing process was designed initially following the
traditional sequential phases: Test Planning, Test Specification, Test
Execution and Test Report. The test tools used were: Testlink to manage
test cases, Jira to manage failures and J2ME Unit to automate unit tests. In
the beginning of project the test team and design team were not allocated along
with the development team despite belonging to the same company.</div>
<div class="MsoNormal" style="text-align: justify;">
<o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
In early iterations of the project development, some
problems were identified as: slow response to changes in the project
requirements, poor and insufficient unit testing, little time to execute functional and
non-functional testing and unstable application running into target device.<o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
In order to solve these issues and accommodate agile
development iterations with all types of testing required, the test process was
revised and some agile practices were implemented as following:<o:p></o:p></div>
<div class="bulletitemCxSpFirst" style="text-align: justify;">
<!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span><!--[endif]--><b>Team Co-location</b>: Testers, designers and
developers allocated in the same room to join the team and encourage
cooperation.<o:p></o:p></div>
<div class="bulletitemCxSpMiddle" style="text-align: justify;">
<!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span><!--[endif]--><b>Pair programming</b>: Developers and
Testers together in pairs to implement unit testing to improve test coverage.<o:p></o:p></div>
<div class="bulletitemCxSpMiddle" style="text-align: justify;">
<!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><b>Pair Testing</b>: Testers together to implement and
execute exploratory tests and non-functional tests (Performance and Security).<o:p></o:p></div>
<div class="bulletitemCxSpMiddle" style="text-align: justify;">
<!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><b>Prioritization of regression testing</b>: the
regression testing was executed following of most critical features to be
delivered (covering Certification Testing).<o:p></o:p></div>
<div class="bulletitemCxSpLast" style="text-align: justify;">
<!--[if !supportLists]--><span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span><!--[endif]--><b>Designers involved in interface tests</b> to
identify unconformities of screen flow and screen design.<o:p></o:p></div>
<div class="figurecaption">
.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRhouG4eGBa0upO2DoloCe1Wsa3PDRnlktTpigTSH58oDM6JOzkUDDiULkndsMCVjSzecbbpEyn8_ikqZvAsBCq_xrRwc625S-AHIECYcgIe8tKM0bmceCHvofZMX9hlx9yhNmbOY4Cie5/s1600/process.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRhouG4eGBa0upO2DoloCe1Wsa3PDRnlktTpigTSH58oDM6JOzkUDDiULkndsMCVjSzecbbpEyn8_ikqZvAsBCq_xrRwc625S-AHIECYcgIe8tKM0bmceCHvofZMX9hlx9yhNmbOY4Cie5/s1600/process.PNG" height="400" width="373" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<o:p></o:p><br />
<div class="figurecaption" style="text-align: center;">
<b>Fig. 1.</b> Testing Process Activities<o:p></o:p></div>
<div class="figurecaption">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
The Figure 1 shows the testing process activities designed for
mobile applications. </div>
<div class="MsoNormal" style="text-align: justify;">
The programming skills tester did the pair programming to improve the unit testing.</div>
<div class="MsoNormal" style="text-align: justify;">
The Test Execution includes the execution of functional tests, regression tests, performance tests, security tests, stability
tests, regression tests, certification tests and interface (GUI) tests. If
failures were found, they were reported to developers, once the failures were fixed, the test team executes the retest to validate the faults. When all critical failures were fixed
the test report is generated and sent to the project team.<o:p></o:p></div>
<div class="heading1" style="margin-left: 28.35pt; mso-list: l1 level1 lfo2; tab-stops: list 28.35pt; text-indent: -28.35pt;">
<b><span style="font-size: 7pt;"><br /></span></b></div>
<div class="heading1" style="margin-left: 28.35pt; mso-list: l1 level1 lfo2; tab-stops: list 28.35pt; text-indent: -28.35pt;">
<b><br /></b>
<b><span style="font-size: 7pt;"></span><!--[endif]-->Results</b><o:p></o:p></div>
<div class="heading1" style="margin-left: 28.35pt; mso-list: l1 level1 lfo2; tab-stops: list 28.35pt; text-indent: -28.35pt;">
<b><br /></b></div>
<div style="text-align: justify;">
Reaching the agile practices, the project team found the right way to work. The co-location improved the communication problem between testers, designers and developers.It also promotes fast feedback when changes were required. The pair programming solved the poor unit testing, since testers helped to improve the quality of scripts and test coverage. Running regression tests for prioritized features, involving designers in interface GUI tests and the pair testing approach made the cooperation of testing team happen. It allowed them to run all types of tests required for this mobile application on time. </div>
<div style="text-align: justify;">
<br /></div>
<div>
<div style="text-align: justify;">
The table below shows the results comparison between a past application Project 1 with the traditional test process and the Project X that used the agile practices. Both projects had the same number of testers, developers and designers. The projects had 6 months of time to develop, test and delivery the application.The test team in Project X could execute <b>more</b> types of important tests for mobile applications and the project was delivered with stability and without failures, it was a really good result.</div>
<div class="MsoBodyText" style="line-height: 93%; margin-bottom: .0001pt; margin-bottom: 0in; mso-pagination: none;">
<br /></div>
<div class="MsoBodyText" style="line-height: 93%; margin-bottom: .0001pt; margin-bottom: 0in; mso-pagination: none;">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 67.65pt;" valign="top" width="90"><div class="MsoNormal" style="text-indent: 0in;">
<b>Projects<o:p></o:p></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 58.95pt;" valign="top" width="79"><div class="MsoNormal" style="text-indent: 0in;">
<b>Number of Features <o:p></o:p></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: .8in;" valign="top" width="77"><div class="MsoNormal" style="text-indent: 0in;">
<b>Failures Found and closed<o:p></o:p></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 45.8pt;" valign="top" width="61"><div class="MsoNormal" style="text-indent: 0in;">
<b>Failures remain after delivery<o:p></o:p></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 121.9pt;" valign="top" width="163"><div class="MsoNormal" style="text-indent: 0in;">
<b>Types of testing applied<o:p></o:p></b></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 67.65pt;" valign="top" width="90"><div class="MsoNormal" style="text-indent: 0in;">
Project 1 (Traditional Test
Process)</div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 58.95pt;" valign="top" width="79"><div class="MsoNormal" style="text-indent: 0in;">
9</div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: .8in;" valign="top" width="77"><div class="MsoNormal" style="text-indent: 0in;">
442</div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 45.8pt;" valign="top" width="61"><div class="MsoNormal" style="text-indent: 0in;">
9</div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 121.9pt;" valign="top" width="163"><div class="dashitemCxSpFirst">
<!--[if !supportLists]-->─<span style="font-size: 7pt;">
</span><!--[endif]-->Unit Testing</div>
<div class="dashitemCxSpMiddle">
<!--[if !supportLists]-->─<span style="font-size: 7pt;">
</span><!--[endif]-->Functional Testing, </div>
<div class="dashitemCxSpMiddle">
<!--[if !supportLists]-->─<span style="font-size: 7pt;">
</span><!--[endif]-->Exploratory Testing</div>
<div class="dashitemCxSpMiddle">
<!--[if !supportLists]-->─<span style="font-size: 7pt;">
</span><!--[endif]-->Regression Testing </div>
<div class="dashitemCxSpLast">
<!--[if !supportLists]-->─<span style="font-size: 7pt;">
</span><!--[endif]-->Performance Testing</div>
</td>
</tr>
<tr style="height: 125.7pt; mso-yfti-irow: 2; mso-yfti-lastrow: yes;">
<td style="border-top: none; border: solid windowtext 1.0pt; height: 125.7pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 67.65pt;" valign="top" width="90"><div class="MsoNormal" style="text-indent: 0in;">
Project X (Agile practices applied to testing process)</div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 125.7pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 58.95pt;" valign="top" width="79"><div class="MsoNormal" style="text-indent: 0in;">
11</div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 125.7pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: .8in;" valign="top" width="77"><div class="MsoNormal" style="text-indent: 0in;">
388</div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 125.7pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 45.8pt;" valign="top" width="61"><div class="MsoNormal" style="text-indent: 0in;">
0</div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 125.7pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 121.9pt;" valign="top" width="163"><div class="dashitemCxSpFirst">
<!--[if !supportLists]-->─<span style="font-size: 7pt;">
</span><!--[endif]-->Unit Testing</div>
<div class="dashitemCxSpMiddle">
<!--[if !supportLists]-->─<span style="font-size: 7pt;">
</span><!--[endif]-->Functional Testing</div>
<div class="dashitemCxSpMiddle">
<!--[if !supportLists]-->─<span style="font-size: 7pt;">
</span><!--[endif]-->Regression Testing</div>
<div class="dashitemCxSpMiddle">
<!--[if !supportLists]-->─<span style="font-size: 7pt;">
</span><!--[endif]-->Performance Testing</div>
<div class="dashitemCxSpMiddle">
<!--[if !supportLists]-->─<span style="font-size: 7pt;">
</span><!--[endif]-->Security Testing</div>
<div class="dashitemCxSpMiddle">
<!--[if !supportLists]-->─<span style="font-size: 7pt;">
</span><!--[endif]-->GUI Testing</div>
<div class="dashitemCxSpMiddle">
<!--[if !supportLists]-->─<span style="font-size: 7pt;">
</span><!--[endif]-->Stability Testing</div>
<div class="dashitemCxSpMiddle">
<!--[if !supportLists]-->─<span style="font-size: 7pt;">
</span><!--[endif]-->Certification Testing</div>
<div class="dashitemCxSpMiddle">
<!--[if !supportLists]-->─<span style="font-size: 7pt;">
</span><!--[endif]-->Field Testing</div>
<div class="dashitemCxSpLast" style="mso-list: none; tab-stops: .5in; text-indent: 0in;">
<br /></div>
</td>
</tr>
</tbody></table>
</div>
<div>
<b><br /></b>
<b><br /></b>
<b>References</b></div>
<div>
<b><br /></b></div>
<div>
<div class="referenceitem" style="mso-list: l0 level1 lfo1; mso-text-indent-alt: -5.7pt; text-indent: -17.05pt;">
<!--[if !supportLists]--><span style="font-size: 7pt;"> </span>1.<span style="font-size: 7pt;"> </span><!--[endif]-->Gao,
J.; Xiaoying Bai; Wei-Tek Tsai; Uehara, T., "Mobile Application Testing: A
Tutorial,"<span class="apple-converted-space"><span style="font-size: 13.5pt;"> </span></span><i>Computer</i><span class="apple-converted-space"><span style="font-size: 13.5pt;"> </span></span>,
vol.47, no.2, pp.46,55, Feb. 2014<br />
doi: 10.1109/MC.2013.445.</div>
<div class="referenceitem" style="mso-list: l0 level1 lfo1; mso-text-indent-alt: -5.7pt; text-indent: -17.05pt;">
<span style="text-indent: -17.05pt;">22.</span><span style="font-size: 7pt; text-indent: -17.05pt;"> </span><span style="text-indent: -17.05pt;">Kirubakaran,
B.; Karthikeyani, V., "Mobile application testing — Challenges and
solution approach through automation,"</span><span class="apple-converted-space" style="text-indent: -17.05pt;"><span style="font-size: 13.5pt;"> </span></span><i style="text-indent: -17.05pt;">Pattern
Recognition, Informatics and Mobile Engineering (PRIME), 2013 International
Conference on</i><span class="apple-converted-space" style="text-indent: -17.05pt;"><span style="font-size: 13.5pt;"> </span></span><span style="text-indent: -17.05pt;">, vol., no., pp.79,84, 21-22 Feb. 2013 </span><span style="text-indent: -17.05pt;">doi:10.1109/ICPRIME.2013.6496451</span></div>
<div class="referenceitem" style="mso-list: l0 level1 lfo1; mso-text-indent-alt: -5.7pt; text-indent: -17.05pt;">
<span style="text-indent: -17.05pt;">33. </span><span style="font-size: 7pt; text-indent: -17.05pt;"> </span><span style="text-indent: -17.05pt;">Kumar,
M.; Chauhan M.; “Best Practices in Mobile Testing”, White Paper Infosys, 2013
http://www.infosys.com/flypp/resources/Documents/mobile-application-testing.pdf.</span></div>
<div class="referenceitem" style="mso-list: l0 level1 lfo1; mso-text-indent-alt: -5.7pt; text-indent: -17.05pt;">
<o:p></o:p></div>
<div class="referenceitem" style="mso-list: l0 level1 lfo1; mso-text-indent-alt: -5.7pt; text-indent: -17.05pt;">
<span style="text-indent: -17.05pt;"><br /></span></div>
<div class="referenceitem" style="mso-list: l0 level1 lfo1; mso-text-indent-alt: -5.7pt; text-indent: -17.05pt;">
<o:p></o:p></div>
<div class="referenceitem" style="mso-list: l0 level1 lfo1; mso-text-indent-alt: -5.7pt; text-indent: -17.05pt;">
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/18061025315278377536noreply@blogger.com5tag:blogger.com,1999:blog-757914655257865752.post-75210048647492957412013-08-20T14:46:00.003-07:002013-08-24T19:31:59.085-07:00Starting Performance Testing with Jmeter <div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">This post is about performing tests in a
web server using Jmeter.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><br />
</span><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">First, to start load tests
or performance tests, some planning is necessary in the
following activities:</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></div>
<br />
<ul type="disc">
<li class="MsoNormal"><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Understanding web
application architecture, network environment and business rules and
needs.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
<li class="MsoNormal"><span lang="EN-US" style="font-family: inherit, serif; font-size: 12pt;">Choosing</span><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"> tools to automate
load/performance tests</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
<li class="MsoNormal"><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Selecting user
scenarios, identifying the critical points.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
<li class="MsoNormal"><span lang="EN-US" style="font-family: inherit, serif; font-size: 12pt;">Paying</span><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"> attention to the test environment, there
must be a network dedicated to testing and a good machine to run test automation
tools and tools to monitor the net and the CPU of
the server. </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
<li class="MsoNormal"><span style="font-family: "inherit","serif"; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Recording selected scenarios.</span><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
<li class="MsoNormal"><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Choosing adequate reports to analyse the data from
execution.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
<li class="MsoNormal"><span style="font-family: "inherit","serif"; font-size: 12.0pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Analysing and generating reports.</span><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
</ul>
<ul>
</ul>
<h2>
Using Jmeter</h2>
<div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Jmeter is an opensource
tool used in performance testing, load testing
and stress testing. <span style="background: white;">It can be used to
simulate a heavy load on a server, network or object to test its strength or to
analyze overall performance under different load types.</span></span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><span style="background: white;"><br /></span></span></div>
</div>
<div>
<span style="background-color: white; font-family: inherit;">Jmeter can be downloaded through <a href="http://jmeter.apache.org/download_jmeter.cgi">Apache Jmeter web site</a> </span></div>
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">The Jmeter installation is very simple. It requires <span style="background-color: white;">JRE/JDK correctly installed and the JAVA_HOME environment variable set. </span><span style="background-color: white;">Just </span><span style="background-color: white;">unzip the zip/tar file into the directory where you want JMeter.</span></span><br />
<span style="font-family: inherit;"><span style="background-color: white;">In the Jmeter/bin directory you can </span><span style="background-color: white;">run the jmeter.bat (for Windows) or jmeter (for Unix) file.</span></span><br />
<span style="font-family: inherit;"><span style="background-color: white;"><br /></span>
</span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQoNtoP-P_TTVJFK7LM8-NTxzB5cCZHFXDxS_NOCsKaXWytVrYzZmoDhY60QKCSYntz-0DQRGiCMHx3C03k5-zDZ_Vh3JWl1bj6eAygO5s9yYVXCyZBN_F8GnFuushf2mrUof1cuxbq4cx/s1600/Jmeter.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><span style="font-family: inherit;"><img border="0" height="318" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQoNtoP-P_TTVJFK7LM8-NTxzB5cCZHFXDxS_NOCsKaXWytVrYzZmoDhY60QKCSYntz-0DQRGiCMHx3C03k5-zDZ_Vh3JWl1bj6eAygO5s9yYVXCyZBN_F8GnFuushf2mrUof1cuxbq4cx/s400/Jmeter.png" width="400" /></span></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-family: inherit;">Jmeter Interface</span></td></tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: 12pt;">
<span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">First element is Test Plan, selecting and
rigth click add the component Thread Group needed for the test.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><br />
</span><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">TestPlan -> Add ->
Threads (Users) -> Thread Group.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><br />
</span><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><br />
It's interesting to add the element called Recording Controller. It will help to organize the test scenarios according to
functionality to be tested.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><br />
</span><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Right Click on Thread Group
-> Add -> Logic Controller -> Recording Controller</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><br />
</span><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><br />
Then, it's good to add listeners to see the data generated by tests.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><br />
</span><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Thread Group right click
->Listener -> Agregate Gragh</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><br />
</span><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Thread Group right click
->Listener -> Summary Report</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><br />
</span><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><br />
<br />
If you want to collect isolated results, add listener just for Recording
Controller.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><br />
</span><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Recording Controller right
click ->Listener -> Agregate Gragh</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><br />
</span><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><br />
After, the element HTTP Proxy Server must be added, it allows Jmeter to record
the user requests and turns them into object
Samplers.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></div>
<ul type="disc">
<li class="MsoNormal"><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Right click in
Workbench -> Add -> Non Test Elements -: HTTP Proxy Server.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
<li class="MsoNormal"><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Open the browser and
configure it to listen to the proxy server
port which is set in Jmeter proxy server
(default : localhost: 8080)</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
<li class="MsoNormal"><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">In Jmeter -> HTTP
Proxy Server select in Target Controller your Thread Group and your
Recording Controller created.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
<li class="MsoNormal"><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">In Jmeter -> HTTP
Proxy Server -> click on the Start button.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
<li class="MsoNormal"><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Execute the actions in
the browser , they will be recorded by
Jmeter.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
<li class="MsoNormal"><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Afterwards, access the
web page and record the user scenarios.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
</ul>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">When it finishes just go back to Jmeter and Stop HTTP Proxy
Server. It's good to delete images, css files and scripts before running the tests.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-US" style="font-family: inherit, serif; font-size: 12pt;">Next</span><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">, select Thead Group, in Thread Properties
and set:</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></div>
<ul type="disc">
<li class="MsoNormal" style="background-color: white; background-position: initial initial; background-repeat: initial initial;"><b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">The
number of threads</span></b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">: they are used to simulate concurrent connections to your server
application.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
<li class="MsoNormal" style="background-color: white; background-position: initial initial; background-repeat: initial initial;"><b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">The
ramp-up period</span></b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">: how long it take to "ramp-up" to the full
number of threads chosen</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
<li class="MsoNormal" style="background-color: white; background-position: initial initial; background-repeat: initial initial;"><b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Number
of times to execute the test</span></b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
</ul>
<div class="MsoNormal" style="background-color: white; background-position: initial initial; background-repeat: initial initial; margin-bottom: 0.0001pt;">
<span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"> Example:
Set 10 threads and the ramp-up period 100 seconds. So, it will take 100 seconds
to get all 10 threads up and running.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">The next step is
to select the Play button in Jmeter toolbar.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></div>
<div>
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsXMg8jB_28jWnqVuMkrf3Mc9Uw59r9Gpo91mHIGQL5T5FtTTYaWUBPEEeRg2tMJ_4Ui4tkYgwrnUIf8BjTe8j9RWUKq0txc2UxrezNzB-ppBpnWQGUo23f6tMcegS1yxCyNPU9WgMCzn8/s1600/play.PNG" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: center;"><span style="color: black; font-family: inherit;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsXMg8jB_28jWnqVuMkrf3Mc9Uw59r9Gpo91mHIGQL5T5FtTTYaWUBPEEeRg2tMJ_4Ui4tkYgwrnUIf8BjTe8j9RWUKq0txc2UxrezNzB-ppBpnWQGUo23f6tMcegS1yxCyNPU9WgMCzn8/s1600/play.PNG" /></span></a></div>
<span style="font-family: inherit;"><br /></span>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">OBS: If you set a large
number of threads for example 1000 and the Jmeter freezes showing Memory leak in
command line. Verify the RAM memory of the computer and Edit the following line
of Jmeter.bat :</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><br />
</span><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">set HEAP=-Xms2048m -Xmx2048m</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><br />
</span><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">For a good performance. It
is recommended to execute a large number of threads in Jmeter using a computer
with more then 4GB RAM.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><br />
</span><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><br />
When the execution stops, observe the Summary Report. It will show values on measurement.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></div>
<br />
<ul type="disc">
<li class="MsoNormal" style="background-color: white; background-position: initial initial; background-repeat: initial initial;"><b><u><span style="font-family: "inherit","serif"; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Label</span></u></b><b><span style="font-family: "inherit","serif"; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">: </span></b><span style="font-family: "inherit","serif"; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">http request recorded.</span><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
<li class="MsoNormal" style="background-color: white; background-position: initial initial; background-repeat: initial initial;"><b><u><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 10.5pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Samples</span></u></b><b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 10.5pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">: </span></b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 10.5pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">number of http request ran for threads. </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
<li class="MsoNormal" style="background-color: white; background-position: initial initial; background-repeat: initial initial;"><b><u><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 10.5pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Average</span></u></b><b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 10.5pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">:</span></b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 10.5pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">
average response time for http request. </span><span style="font-family: "inherit","serif"; font-size: 10.5pt; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">T</span><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
<li class="MsoNormal" style="background-color: white; background-position: initial initial; background-repeat: initial initial;"><b><u><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 10.5pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Min</span></u></b><b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 10.5pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">: </span></b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 10.5pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">the minimum response time taken by the http
request. </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
<li class="MsoNormal" style="background-color: white; background-position: initial initial; background-repeat: initial initial;"><b><u><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 10.5pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Max</span></u></b><b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 10.5pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">: </span></b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 10.5pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"> the maximum response time taken by the http
request. </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
<li class="MsoNormal" style="background-color: white; background-position: initial initial; background-repeat: initial initial;"><b><u><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 10.5pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Std.Deviation</span></u></b><b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 10.5pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">:</span></b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 10.5pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"> how
many cases were deviating from the average value of the receiving time.
</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
<li class="MsoNormal" style="background-color: white; background-position: initial initial; background-repeat: initial initial;"><b><u><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 10.5pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Error %</span></u></b><b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 10.5pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">:</span></b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 10.5pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"> error
percentage in samples during run. </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
<li class="MsoNormal" style="background-color: white; background-position: initial initial; background-repeat: initial initial;"><b><u><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 10.5pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">Throughput</span></u></b><b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 10.5pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">:</span></b><b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"> </span></b><span lang="EN-US" style="font-family: "inherit","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: "Times New Roman"; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;">number of requests per
unit of time sent to server.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-ansi-language: EN-US; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: PT-BR;"><o:p></o:p></span></li>
</ul>
<ul style="background-color: white;">
</ul>
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">In Agregate Graph, the results are plotted and it is possible to identify bottlenecks of the http requests.</span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL-k5QF2xsdSgJO1-q5Iv38BLxV2MysDvaUhn3x5oRg1OMJe9Qh1-JBdNJy3oHuBWbMlcVhSCpBD4AMnWRSYbMJzQqiUkK18X3BF2MCOaKZA2S-PcetAYGvDH_rBaKC6ldpU5lFgVnf5zl/s1600/Aggregate+Graph.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="259" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL-k5QF2xsdSgJO1-q5Iv38BLxV2MysDvaUhn3x5oRg1OMJe9Qh1-JBdNJy3oHuBWbMlcVhSCpBD4AMnWRSYbMJzQqiUkK18X3BF2MCOaKZA2S-PcetAYGvDH_rBaKC6ldpU5lFgVnf5zl/s640/Aggregate+Graph.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Agregate Graph</td></tr>
</tbody></table>
<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/18061025315278377536noreply@blogger.com0tag:blogger.com,1999:blog-757914655257865752.post-49645561039752034562013-03-11T20:50:00.000-07:002013-08-20T20:25:49.884-07:00Experience on the Application of Distributed Testing in an Agile Software Development Environment<br />
<div style="text-align: justify;">
Software engineering is by nature a highly collaborative activity. However, this collaboration is more difficult when the teams are geographically separated, as several factors, such as work-time, cultural differences, communication, technical capability, among others, may impact on its success. Moreover, each activity in the software development process has specific needs in a distributed software development (DSD) environment.</div>
<div style="text-align: justify;">
In this post, I will report an industrial experience of a testing team separated geographically in the context of a software project that followed an agile method. This experience was possible through a collaboration between industry (Nokia Institute) and the federal university of amazonas, and its generated a paper presented in <a href="http://icgse2012.serandp.com/">ICGSE 2012</a>.Authors: <b>Eliane Collins, Gisele Macedo, Nayane Maia and <a href="http://www.blogger.com/goog_505701042">Dr. Arilo Dias-Neto</a></b><a href="http://.www.dcc.ufam.edu.br/arilo/">.</a></div>
<div style="text-align: justify;">
<br /></div>
<h3>
APPLYING AGILE TESTING IN A DSD ENVIRONMENT</h3>
<h4>
A. Software Project Characteristics</h4>
<div style="text-align: justify;">
This project had been conducted in the context of a research institute in Manaus/Amazonas/Brazil aiming at</div>
<div style="text-align: justify;">
developing a web application to manager advertising campaigns, called Project X. This software project was developed following the Scrum agile methodology , and it consisted of 30 stories (Product Backlog) divided into 9 Sprints (iterations) varying from 2 to 3 weeks. This project had a development team composed of 1</div>
<div style="text-align: justify;">
Scrum Master and 3 full-time developers. The Testing Team, the focus of this paper, consisted of 6 professionals, being 2 full-time testers located in the same physical environment of the developers and four part-time testers who worked in another site (geographically separated) as a result of a cooperation between the research institute and the Federal University of Amazonas (UFAM).</div>
<div style="text-align: justify;">
The Project X was developed using a web platform (PHP + MySQL database), and IDE Eclipse. The system was composed of 8 screens (4 forms to register campaigns and users and 4 screens to search and generate reports).</div>
<h4>
B. Testing Process</h4>
<div style="text-align: justify;">
The Project X’s software testing process followed the Scrum methodology, where the testing team was integrated to the project team, participating in Scrum ceremonies (sprint review, daily, retrospective and planning meetings). Their responsibilities were to plan test cases through the stories described in the Product Backlog, specify the acceptance criteria, and use test automation tools to speed up the execution activities of each sprint.</div>
<div style="text-align: justify;">
Due to the geographic distribution of the testing team, the testing process was designed considering the characteristics of a DSD (distributed software development) environment. We needed to provide a testing structure allowing access to the project’s information by all team members. Thus, in order to attend this demand, the testing team used a server dedicated to be connected remotely with the following tools:</div>
<div style="text-align: justify;">
• <a href="http://www.teamst.org/">TestLink</a>: used to manage test plans, write test cases, and report tests execution. Besides, the selection of tests to compose a test suite was done manually, TestLink acted as an editor and organizer of test cases, storing all information. It facilitated the creation of test plans and reports documentation, and the controlling of the tests execution versions;</div>
<div style="text-align: justify;">
• <a href="http://www.mantisbt.org/">Mantis Bug Tracker</a>: through this tool, which was already used in the institute, the tester registered the</div>
<div style="text-align: justify;">
defects found, sent them to the developers and controlled the lifecycle of each defect. </div>
<div style="text-align: justify;">
• <a href="http://sourceforge.net/projects/firescrum/">FireScrum</a>: a web tool for Scrum taskboard was used to detail tasks defined for the project sprint. This tool was used for both testing teams (remote and local) to record and update the tasks progress. Thus, the test coordinator used these as data in the project daily meeting.</div>
<div style="text-align: justify;">
• <a href="http://subversion.tigris.org/">Subversion</a>: it was used to share and manage information among the test team members. </div>
<div style="text-align: justify;">
Moreover, in order to ensure the operation of this infrastructure and facilitate communication among the teams, a Test Leader located in the institute was responsible for defining the testing tasks, planning the sprint activities and reporting the progress of these activities at the daily meetings. Only the Test Leader could communicate with the development team, avoiding a larger communication network in the testing team. The remote testing team was allocated to the tasks of designing, automated (creating scripts), and executing test cases for the stories developed in each sprint.</div>
<div style="text-align: justify;">
The tasks of test process during the sprint were incremental and iterative following the scrum process. They are represented in Figure 1. The dark rectangles represent the Test Leader’s activities and the lighter rectangles represent the Remote Testing team’s activities.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZGA_Gmdv25ifWp9hL0bXOyWNLOnOc73-zVVZYQPp2v7KIzx0uGMVkrewas5cJPgpLg0Cd5QvtzaHKXs5QoBvLcXIa7AciEqwwHHghzNNc9BPVSdcihZrWd05vlu_BzIjYzvG3jhv157lo/s1600/fig1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="340" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZGA_Gmdv25ifWp9hL0bXOyWNLOnOc73-zVVZYQPp2v7KIzx0uGMVkrewas5cJPgpLg0Cd5QvtzaHKXs5QoBvLcXIa7AciEqwwHHghzNNc9BPVSdcihZrWd05vlu_BzIjYzvG3jhv157lo/s400/fig1.PNG" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: center;">
Figure 1. Overview of Testing Process</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
The task Incremental Test Execution includes execution of exploratory tests and automation of regression tests. For Project X project, the tool chosen for the functional tests automation was the <a href="http://seleniumhq.org/">Selenium RC</a> and IDE5. Selenium uses the approach record-play support and tests web applications for the browser Mozilla Firefox. Selenium IDE can record the user actions in the browser, creating test scripts in several programming languages and executing them later. The Selenium Java API used in the project allows running the test scripts in other browsers such as the versions of Internet Explorer. The automated test suite is updated and executed in every sprint. The tools TestLink and Selenium were integrated, thus, when</div>
<div style="text-align: justify;">
test cases are executed in the Selenium tool, their results are recorded automatically in TestLink.</div>
<div style="text-align: justify;">
<br /></div>
<h4>
C. Communication Process</h4>
<div style="text-align: justify;">
According to agile practices, communication is an essential factor for the success of the agile project. Project members who have good communication process can cooperate more and mitigate risks of changes during the project. It is an essential factor when some teams of the project are geographically distributed.</div>
<div style="text-align: justify;">
To work with distributed teams, it is important to use tools to facilitate communication. In this project we used several tools like e-mail, a free scrum tool for task board (FireScrum), and the chat and video-conference tool (Skype) to make possible online communication among team’s members, resolving doubts as soon as possible. Thus, e-mail was used only for offline communication (invitations to meetings and</div>
<div style="text-align: justify;">
project documents). </div>
<div style="text-align: justify;">
Daily, all team members needed to access the online FireScrum tool, where the tasks were created and allocated to the testing team members by the Test Leader. The Remote Testing team was responsible for updating the FireScrum tasks every day, reporting the progress and impediments.</div>
<div style="text-align: justify;">
Figure 2 represents the communication flow among the project teams. According to the flow, communication between the Development Team and the Test Leader was straight (face- to- face) while communication with the Remote Testing team occurred through the server test tools.</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiagbvKVL6LpQ-2uHdoJ-yVJBPCUcNjwM98IN5p2nBso6-c3i0s9hKbtpRHfwH_bnX_qU30BEXOdh23vBP7rRy2T4jykecJf9tHAuV2HZV81BuhZ56O2vOOWJ65MLQxuJLVk4lfnA0E_xVK/s1600/fig2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiagbvKVL6LpQ-2uHdoJ-yVJBPCUcNjwM98IN5p2nBso6-c3i0s9hKbtpRHfwH_bnX_qU30BEXOdh23vBP7rRy2T4jykecJf9tHAuV2HZV81BuhZ56O2vOOWJ65MLQxuJLVk4lfnA0E_xVK/s400/fig2.PNG" width="362" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: center;">
Figure 2. Communication Network.</div>
<div style="text-align: justify;">
<br /></div>
<h4>
D. Tasks Allocation</h4>
<div style="text-align: justify;">
Using the Scrum methodology, tasks are defined and estimated in Sprint Planning Meeting. In this ceremony, each professional involved must participate to specify the tasks necessary to accomplish the stories. All members were invited to this event, including the remote team. On presentation of the definition and clearly understanding the tasks, the Test Leader inserted them into the FireScrum tool and allocated them to the testing team members. During the sprint, the Remote Testing team could add and assign new tasks, when appropriate. With all communication tools available, any possible impediment from the remote testing team could have been quickly detected and easily solved avoiding delays. Each professional team was responsible for his/her external tasks and he/she had to communicate any eventual difficulty as soon as possible. The task status could be defined as: to do (to be made), in progress (ongoing task) and done (tasks completed).</div>
<div style="text-align: justify;">
Every day, before the daily meeting of the project in the company, the Test Leader checked the progress of tasks to inform the development team. Among the main tasks assigned to the Remote Testing team, we can cite: specification of new test cases, update of test cases from previous stories, creation and automation of</div>
<div style="text-align: justify;">
test scripts, execution of test cases and test scripts of the stories in sprint, defects registration, execution of automated scripts to regression tests and validation of solved defects.</div>
<div style="text-align: justify;">
The main Test Leader’s tasks can be summarized in: review created test cases, monitor tasks in FireScrum, facilitate test tasks, send project information and report test execution.</div>
<div style="text-align: justify;">
<br /></div>
<h4>
E. Planning and Restrospective Meetings</h4>
<div style="text-align: justify;">
Following Scrum, there are two other important meetings to be performed: planning and retrospective. Planning is the meeting where the whole team decides to express their opinion about how to get the stories according to the prioritized backlog. In Project X, all testing team participated in this meeting (including the remote team), choosing the stories to be developed and estimating the complexity of the selected stories. The retrospective meeting is considered a very important ceremony because it is where is said what went right and what should be improved for the next sprint. All team members, including the remote testing team, participated in this event, sharing experiences and understanding the difficulties that would be improved in the next sprint. With the participation of the remote testing team in both Scrum ceremonies, it’s possible to get the unit of the project team and everybody feels as part of the team.</div>
<div style="text-align: justify;">
<br /></div>
<h3>
CHALLENGES AND LESSONS LEARNED</h3>
<div style="text-align: justify;">
In this experience on conducting distributed testing in an agile software project, we could observe it can work very well. However, some issues need to be managed to avoid the risks introduced by the combination of these software engineering practices (DSD + agile practices). Thus, we identified some challenges and key lessons that we learned for minimizing the impact of the geographical distance between the testing teams:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
A. Communication and Coordination are essential factors for the success of distributed testing All main research works in the DSD field indicate communication and coordination as important aspects to carry the success in a distributed software project, and we could also confirm these claims. Some practices were essential to reach this success:</div>
<div style="text-align: justify;">
• Allocating one person (test leader) as a link between the local and remote testing team is very important to avoid a large communication network and, consequently noises. Thus, all information and decisions would always pass through this professional, responsible for distributing information, solving impedances and communication problems, and making the testing tasks easier.</div>
<div style="text-align: justify;">
• A communication protocol should be formalized, regulating how the teams should keep contact with each</div>
<div style="text-align: justify;">
other. That includes structure of emails, communication tools, meetings, timetable, and so on. This is essential to avoid losing data, effort, and quality in the software project. For instance, the definition of a standard for test cases specification and bug reporting allows a tester to complete a task started by another tester or validate a bug reported by another professional.</div>
<div style="text-align: justify;">
• An online chat tool should be used and the key persons in the project (Scrum master, development and test leaders) should be always available to clarify doubts.</div>
<div style="text-align: justify;">
• Periodic meetings between the development and testing teams should be scheduled. This contributes to understand the complex user’s stories. Moreover, the physical presence of the remote testing team in the</div>
<div style="text-align: justify;">
Scrum meetings (Planning, Retrospective and Review) is very important to share, among all software project</div>
<div style="text-align: justify;">
members, information regarding problems, suggestion of improvements and planning of new activities.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
B. The project information should be available with details to all members As part of the testing team is separated geographically, only short stories and acceptance criteria descriptions are not enough for test cases’ specification. Thus, user’s scenarios and the application wireframe should be available to cover all features to be developed/tested, bypassing the limitations imposed by the distance between part of the testers and the product owner. Moreover, changes in the user’s scenarios result in a high effort to update test cases and their automation scripts. Therefore, these scenarios should be kept updated, otherwise they can affect the quality of the testing activity.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
C. Automation reduces the needs of physical presence in the testing process The tests automation has an essential role in the success of distributed testing, because both teams would be able to run the regression tests suite constantly without depending on time zones between the remote and local testing teams. Moreover, automation speeds up the time required for running the tests even when new releases are published by the development team close to the deployment deadline.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
D. Supporting tools are always important, but testing team organization is more Tools are also highlighted in the technical literature as an important element in a distributed software project. In the context of distributed testing in an agile project, two special tools should be cited:</div>
<div style="text-align: justify;">
• A Scrum dashboard tool presents all activities performed daily by the remote testing team, showing information regarding the performance of testers and the tasks’ progress. Thus, the test leader is provided with information to support the testing process management, mitigating eventual risks. In our software project we used the FireScrum tool.</div>
<div style="text-align: justify;">
• A test management tool controls all information regarding the testing activities, test cases specification and validation, creation of new releases, test running, number of detected failures, and bug tracking (creation, correction, and validation). In our software project we used the TestLink and Mantis tools. Besides their importance, tools can fail, and we need to be prepared for this moment. If the network or a server crashes, all remote teams’ activities can be affected because communication between the teams will cease to exist. Thus, we cannot be dependent on tools to perform our activities. </div>
<div style="text-align: justify;">
<br /></div>
<h3>
CONCLUSIONS</h3>
<div style="text-align: justify;">
We could observe that it is feasible to integrate the DSD with the agile practices, maintaining management and organization of a software project, because some of them are considered in the testing activities for both scenarios, as the need of an efficient communication, automation as a resource to reduce cost, and task allocation in small parts. On the other hand, the difference in these scenarios regarding the testing activities, such as continuous integration and daily meetings, could be avoided with some technological solutions already reported in the technical literature.</div>
<div style="text-align: justify;">
Some challenges and lessons learned could be extracted from these experience and they could support other software engineers when performing testing in a similar environment.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Complete paper: <a href="http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=6337365&isnumber=6337293">http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=6337365&isnumber=6337293</a></div>
Anonymoushttp://www.blogger.com/profile/18061025315278377536noreply@blogger.com0tag:blogger.com,1999:blog-757914655257865752.post-82496577541129829022013-01-28T12:00:00.000-08:002014-05-19T14:57:52.682-07:00Using Fitnesse Test Tool for Acceptance Test in Mobile Applications<br />
<div style="text-align: justify;">
There are few tools to make acceptance tests for mobile applications, eg J2ME platform.</div>
<div style="text-align: justify;">
The tool J2MEUnit seems a good solution for unit testing tools but compared to <a href="http://fit.c2.com/">Fit frameworks</a>, the tests become more cumbersome. </div>
<div style="text-align: justify;">
So I decided to use the test tool <a href="http://fitnesse.org/">Fitnesse</a> to validate business rules in a J2ME application and the tests implemented were simpler and faster. See the instructions to do Test-First approach.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<h2>
Configuration</h2>
<div>
<div style="text-align: justify;">
To use the tool Fitnesse into eclipse, it is necessary to install Fitnesse plugin for eclipse.</div>
<div style="text-align: justify;">
1) Start up Eclipse and select the HELP menu -> Install new software</div>
<div style="text-align: justify;">
2) Click the Add button and type in the Name field: Fitnesse and field Location: http://www.bandxi.com/fitnesse/ or usu this <a href="https://drive.google.com/file/d/0B0zNzlW7l6H5bDFtQk16aGJ6MUk/edit?usp=sharing">Link</a>.</div>
<div style="text-align: justify;">
3) Select Ok</div>
<div style="text-align: justify;">
4) Select Fitnesse Plugin for Eclipse and then click Next.</div>
<div style="text-align: justify;">
5) The Eclipse Plugin will be installed and will restart.</div>
<div style="text-align: justify;">
6) When eclipse restarts, the two icons of Fitnesse appear on the toolbar.</div>
</div>
<div style="text-align: justify;">
<br /></div>
<h2>
Create a Project</h2>
<div>
<div>
1) In eclipse, you click the File menu and select New-> Project.</div>
<div>
2) You can select a JavaME Middlet Project.</div>
<div>
3) Give a name, for example: FitnesseProject.</div>
<div>
4) Select your new project in the left of the eclipse package explorer tab.</div>
<div>
5) Select the project created with right click and select Fitnesse -> Add to project classpath libraries fitnesse. </div>
<div>
6) Then click again with the right click over the project and select File -> New -> Folder to create a folder.</div>
<div>
7) Give the name of the folder: fitnesse</div>
<div>
8) Right-click the folder and select Fitnesse-fitnesse> Lunch Fitnesse runtime on this folder.</div>
<div>
9) In the name of the project click the right click and select Configure Buildpath</div>
<div>
10) In the window to configure Buildpath, add the following jars: </div>
<div>
<ul>
<li>collections.jar</li>
<li>ee.minimum.jar</li>
</ul>
<div>
It is necessary because of fitnesse dependences.</div>
</div>
<div>
<br /></div>
<div>
11) In your test project, select the src folder with the right click and select: New -> package, give the name of the fixtures this new package.</div>
<div>
12) Build a fixture to test for example an calc method.</div>
<div>
13) In your test project FitnesseProject go to fixtures package and right click and choose New-> Class</div>
<div>
14) In the window to create the new class type the name CalcFixture and in superclass field, click Browse and enter in the window ColumnFixture.</div>
<div>
15) Select the class from the list and select Ok to create the class.</div>
<div>
16) Write a test fixture with the following code:</div>
</div>
<div>
<br /></div>
<div>
<div>
package fixtures;</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
import fit.ColumnFixture;</div>
<div>
<br /></div>
<div>
public class CalcFixture extends ColumnFixture {</div>
<div>
<br /></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>public int a, b;</div>
<div>
</div>
<div>
</div>
<div>
public int result() {</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div>
<span style="color: red;">return calc.add(a, b);</span></div>
<div>
}</div>
<div>
<br /></div>
<div>
}</div>
</div>
<div>
<br /></div>
<div>
The line <span style="color: red;">return calc.add(a, b); </span>is gonna be red because the method add does not exist.</div>
<div>
<br /></div>
<div>
Lets create the system code:</div>
<div>
<br /></div>
<div>
17) In your project, create a new package called app (src right click and select: New -> package,).</div>
<div>
18) Create a new Class in this package called Calc.</div>
<div>
19) Insert a code just to fix the error in your fixture.</div>
<div>
<br /></div>
<div>
<div>
package app;</div>
<div>
<br /></div>
<div>
public class Calc {</div>
<div>
<br /></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>public int add(int a, int b){</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>return 0;</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>}</div>
<div>
}</div>
</div>
<div>
<br /></div>
<div>
Now the error in your fixture will disappear.</div>
<div>
<br /></div>
<h2>
Executing Tests </h2>
<div>
<div>
1) In the eclipse toolbar, click the icon to launch the Fitnesse server.</div>
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxnwtvNk4UBqFvWMTpZEgPP5UOiqQFn-o7AlssqrdDCtnHJURwtp_Y6waWx3NATylIqQgIit67ShSHfVd8pQDVb37CT24DysIu3xeXyCGODGYE02ZZOU_QQnw8F2154dqkFKu11ot87cd5/s1600/menu.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxnwtvNk4UBqFvWMTpZEgPP5UOiqQFn-o7AlssqrdDCtnHJURwtp_Y6waWx3NATylIqQgIit67ShSHfVd8pQDVb37CT24DysIu3xeXyCGODGYE02ZZOU_QQnw8F2154dqkFKu11ot87cd5/s1600/menu.PNG" /></a></div>
<div>
2) the eclipse browser will appear in the eclipse fitnesse page.</div>
<div>
3) the page is similar to a Fitnesse wiki, click the Edit menu on the left top of the page.</div>
<div>
4) Enter the word anywhere ProjectTest and save the change.</div>
<div>
5) You will see the word followed by a question <span style="color: blue;">ProjectTest?</span></div>
<div>
6) Click the interrogation <span style="color: blue;">?</span> mark.</div>
<div>
7) You will see an edit page of a wiki.</div>
<div>
8) Enter the following code in the wiki:</div>
<div>
<br /></div>
<div>
!path /C :/workspace/FitnesseProject/bin</div>
<div>
<br /></div>
<div>
! 3 Column Fixture</div>
<div>
|!-fixtures.CalcFixture-! |</div>
<div>
| a | b | result () |</div>
<div>
| 1 | 2 | 3 |</div>
<div>
| 13 | 5 | 18|</div>
<div>
<br /></div>
<div>
It is important to point to the bin folder of the the project using <span style="color: red;">!path.</span></div>
<div>
To indicate the package and fixture class to be used, we use the command |!-packagename.classname-! |</div>
<div>
Then the decision table is implemented with the parameters to be passed, text separator and the expected return result class ().</div>
<div>
9) Save the page in the wiki.</div>
<div>
10) In the page saved, select the blue menu on the left Properties.</div>
<div>
11) On page properties select Test and then click Save Properties.</div>
<div>
12) When you return to your test wiki the button Test will appear in the menu.</div>
<div>
13) Click the Test to run your test.</div>
<div>
14) If a message in yellow saying there was not found the test class or fields, make sure the project generated classes in the bin folder or you are pointing to the correct address in the bin folder.</div>
<div>
15) Another important check is if you put the exact same name as the parameter of the fixture in the table.</div>
</div>
<div>
16) If the test run the errors in red will appear as the picture bellow:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKQSbJRSglWRm_Oudi2bfbzoa1ppTrwwRWmPnbuoBqEY91iyeP6yQrAtFtPZFaWrpn-qKqpJyxmQemyl_MtpKVONZAJp226Y4UVabcoWeWbvbbuimBaimKOhDFlKw7zm3r2bi0phjJRD0P/s1600/fitnesseError.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKQSbJRSglWRm_Oudi2bfbzoa1ppTrwwRWmPnbuoBqEY91iyeP6yQrAtFtPZFaWrpn-qKqpJyxmQemyl_MtpKVONZAJp226Y4UVabcoWeWbvbbuimBaimKOhDFlKw7zm3r2bi0phjJRD0P/s640/fitnesseError.PNG" height="256" width="640" /></a></div>
<div>
<br /></div>
<div>
The errors appear because the method add in the class Calc wasn't implemented.</div>
<div>
<br /></div>
<div>
17) Back to project and open the class: src -> app -> Calc.java.</div>
<div>
18)Insert the code:</div>
<div>
<br /></div>
<div>
<div>
package app;</div>
<div>
<br /></div>
<div>
public class Calc {</div>
<div>
<br /></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>public int add(int a, int b){</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>return a+b;</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>}</div>
<div>
}</div>
</div>
<div>
<br /></div>
<div>
19) Save and back to Fitnesse page in the eclipse.</div>
<div>
20) Don't forget to build the project.</div>
<div>
21) Execute the fitnesse tests again clicking in Test.</div>
<div>
22) The test table will be green, your test is passed as the picture bellow.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXGwlIHW61-yW0h_epy2mz64tozvv5enJLZ4RVIY8yLVNIqsJu5hMXGJ38Y51oZbZ3cczcrVIOM7hc_8wtSVhRdIlzGINFakaC0OixqXzS1iR0sn53NbGQWkD9-5faWVk8pFlhkx8ippxn/s1600/FitnesseSucess.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXGwlIHW61-yW0h_epy2mz64tozvv5enJLZ4RVIY8yLVNIqsJu5hMXGJ38Y51oZbZ3cczcrVIOM7hc_8wtSVhRdIlzGINFakaC0OixqXzS1iR0sn53NbGQWkD9-5faWVk8pFlhkx8ippxn/s640/FitnesseSucess.PNG" height="260" width="640" /></a></div>
<div>
23) When your class will be totally tested, you can create a middlet and call your class Calc.</div>
<div>
24) In src, right click and create the package with the name mobile in New-> package.</div>
<div>
<div>
25) In the package created click the right mouse button and create a midlet. New-> midlet</div>
<div>
26) Put the name of the HelloWorld midlet for example.</div>
<div>
27) In midlet created add a private variable private Display display;.</div>
<div>
28) In the startApp () put the following code:</div>
<div>
<br /></div>
<div>
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Display display = Display.getDisplay (this);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>String message = String.valueOf(new Calc().add(3, 4));<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>TextBox textBox = new TextBox ("Hello World", message, 50, 0);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>display.setCurrent (textBox);</div>
<div>
<br /></div>
<div>
30) Run the midlet selecting the project and clicking the right click and selecting: Run As -> Emulated Java ME Midlet</div>
<div>
31) The midlet will run Hello World and will appear the result of add: 7.</div>
</div>
<div>
<br /></div>
<div>
For the next functionalities, repeat all the process :)</div>
<div>
<br /></div>
<div>
<div>
Fitnesse pros:</div>
<div>
<br /></div>
<div>
- A fixture class tests one class of the system.</div>
<div>
- Parameters are passed only in wiki and it is not necessary one test method for each parameter (as JUnit).</div>
<div>
- It is friendly and developers and Testers can use the eclipse itself.</div>
<div>
<br /></div>
<div>
Fitnesse cons:</div>
<div>
<br /></div>
<div>
- Tests are run only in eclipse and it is not possible to embed the tests in the emulator or in the cell phone as J2MEUnit do.</div>
</div>
<div>
<br /></div>
<div>
My Conclusion is:</div>
<div>
<br /></div>
<div>
If you want to validate business rules and acceptance criteria, the Fitnesse works well and fast. But if the developer wants to analyze the memory limits and the cell phone performance, so J2MEUnit and Manual tests are required. </div>
<div>
<br /></div>
<div>
<h3>
Good Links:</h3>
<ul style="background-color: white; font-family: sans-serif; font-size: 13px; line-height: 19.1875px; list-style-image: url(data:image/png; list-style-type: square; margin: 0.3em 0px 0px 1.6em; padding: 0px;">
<li style="margin-bottom: 0.1em;"><a class="external free" href="http://fitnesse.org/" rel="nofollow" style="background-image: url(data:image/png; background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #663366; padding-right: 13px; text-decoration: initial;">http://fitnesse.org/</a></li>
</ul>
<ul style="background-color: white; font-family: sans-serif; font-size: 13px; line-height: 19.1875px; list-style-image: url(data:image/png; list-style-type: square; margin: 0.3em 0px 0px 1.6em; padding: 0px;">
<li style="margin-bottom: 0.1em;"><a class="external free" href="http://schuchert.wikispaces.com/FitNesse.Tutorials.0.Java#Create" rel="nofollow" style="background-image: url(data:image/png; background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #663366; padding-right: 13px;">http://schuchert.wikispaces.com/FitNesse.Tutorials.0.Java#Create</a> Eclipse Project</li>
</ul>
<ul style="background-color: white; font-family: sans-serif; font-size: 13px; line-height: 19.1875px; list-style-image: url(data:image/png; list-style-type: square; margin: 0.3em 0px 0px 1.6em; padding: 0px;">
<li style="margin-bottom: 0.1em;"><a class="external free" href="http://softeng.polito.it/courses/tutorial/FitnesseInEclipse.html" rel="nofollow" style="background-image: url(data:image/png; background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #663366; padding-right: 13px; text-decoration: initial;">http://softeng.polito.it/courses/tutorial/FitnesseInEclipse.html</a></li>
</ul>
</div>
Anonymoushttp://www.blogger.com/profile/18061025315278377536noreply@blogger.com7tag:blogger.com,1999:blog-757914655257865752.post-20376101257027437532013-01-22T20:02:00.003-08:002013-01-22T20:21:48.892-08:00Starting to use Selenium Webdriver<br />
<div style="text-align: justify;">
For a long time I used the Selenium IDE and RC for web system testing. Using java platform, it was possible to build robust test suites and generate automatic reports using Junit.</div>
<div style="text-align: justify;">
Like last year I have been worked in systems for mobile devices, I had not yet experienced the successor of Selenium RC, the Selenium Webdriver.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
Selenium webdriver is a tool designed to provide a simple interface and a concise programming to better support dynamics web pages.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
In my research about Selenium Webdriver, I found a interesting comparison table that I show bellow. It can help to understand the differences between Selenium RC and Webdriver.</div>
<br />
<br />
<div class="description" style="background-color: #bdbdbd; font-family: Verdana, Helvetica, sans-serif; font-size: 13px; line-height: 19px;">
<table border="1" style="font-size: 10px;"><tbody>
<tr><td align="center" width="33%"><b>Selenium IDE</b></td><td align="center" width="33%"><b>Selenium RC</b></td><td align="center" width="33%"><b>Webdriver</b></td></tr>
<tr><td width="33%">Works only on mozilla</td><td width="33%">Works on almost all browsers.Does not work on latest version of firefox/IE</td><td width="33%">Works on latest versions of almost all browsers - Firefox, IE(6,7,8), OPera, Chrome</td></tr>
<tr><td width="33%">Record and run tool</td><td width="33%">No Record and run</td><td width="33%">No Record and run</td></tr>
<tr><td width="33%">No server required to start</td><td width="33%">Server is required to start</td><td width="33%">No server required to start</td></tr>
<tr><td width="33%">Core engine is Javascript based</td><td width="33%">Core engine is Javascript based</td><td width="33%">Interacts natively with browser application</td></tr>
<tr><td width="33%">Very simple to use. If using User extentoins, you require knowledge on javascript which makes the work a little bit tough.</td><td width="33%">Its a simple and small API</td><td width="33%">Complex and a bit large API as compared to RC</td></tr>
<tr><td width="33%">Not at all object oriented</td><td width="33%">Less Object orinted API</td><td width="33%">Purely Object oriented API</td></tr>
<tr><td width="33%">Cannot move mouse with it</td><td width="33%">Cannot move mouse with it</td><td width="33%">Can move mouse cursor</td></tr>
<tr><td width="33%">Full xpaths have to be appended with 'xapth=\\' syntax</td><td width="33%">Full xpaths have to be appended with 'xapth=\\' syntax</td><td width="33%">No need to append 'xpath=\\'</td></tr>
<tr><td width="33%">No Listeners</td><td width="33%">No Listeners</td><td width="33%">Implementation of Listeners is provided</td></tr>
<tr><td width="33%">Cannot test iphone/Android applications</td><td width="33%">Cannot test iphone/Android applications</td><td width="33%">Can test iphone/Android applications</td></tr>
<tr><td width="33%"></td><td width="33%"><br /></td><td width="33%"><br /></td></tr>
</tbody></table>
<span style="font-family: 'Times New Roman'; font-size: small; line-height: normal;">source: http://qtpselenium.com/selenium-tutorial/difference-between-ide-rc-webdriver/</span></div>
<span style="font-family: 'Times New Roman'; font-size: small; line-height: normal;"><strike><br /></strike></span>
<br />
<div style="text-align: justify;">
I found very interesting the following points:</div>
<div style="text-align: justify;">
<br /></div>
<ol>
<li style="text-align: justify;">In Selenium Webdriver is not necessary to initialize the RC server.</li>
<li style="text-align: justify;">It is not necessary to use XPath.</li>
<li style="text-align: justify;">Fully object oriented.</li>
<li style="text-align: justify;">You can move the cursor.</li>
<li style="text-align: justify;">Can test on iphone and android applicat</li>
</ol>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
For these reasons I decided to try the Selenium Webdriver.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
I will describe my first example:</div>
<br />
<h2>
<span style="font-size: x-large;">
Installation and Configuration</span></h2>
<div>
<ol>
<li>In Selenium page http://code.google.com/p/selenium/downloads/list download the following files: <span style="background-color: white; font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; font-size: 12px; line-height: 16.390625px;">selenium-server-standalone.jar, s</span><span class="goog_qs-tidbit goog_qs-tidbit-0" style="background-color: #ffffdd; color: black; display: inline !important; font-family: arial, sans-serif; font-size: 13px; text-decoration: inherit; white-space: nowrap;"><a href="http://code.google.com/p/selenium/downloads/detail?name=selenium-java-2.29.0.zip&can=2&q=" style="color: purple; font-family: arial, sans-serif; font-size: 13px; white-space: nowrap;">elenium-java-2.29.0.zip</a> , and the browser drivers : </span><a href="http://code.google.com/p/selenium/downloads/detail?name=IEDriverServer_x64_2.29.0.zip&can=2&q=" style="color: purple; font-family: arial, sans-serif; font-size: 13px; white-space: nowrap;">IEDriverServer_x64_2.29.0.zip</a> and <a href="http://code.google.com/p/chromedriver/downloads/detail?name=chromedriver_win_23.0.1240.0.zip&can=2&q=" style="color: purple; font-family: arial, sans-serif; font-size: 13px; white-space: nowrap;">chromedriver_win_23.0.1240.0.zip</a> .</li>
</ol>
<ol>
<li>Open the <a href="http://www.eclipse.org/downloads/">Eclipse</a> newest java version.</li>
<li>Create a Java Project . File -> New -> Java Project</li>
<li>Choose a name for your project, SeleniumTest for example.</li>
<li>The new project will appears in the package explorer.</li>
<li>Select the project created in the package explorer and click using right mouse button.</li>
<li>Create a new folder : New -> Folder</li>
<li>The name of new folder is lib.</li>
<li>Extract the selenium-java-2.29.0.zip and copy selenium-server-standalone.jar to inside the new folder lib.</li>
<li>Select the jars and click using right mouse button and select Buildpath -> Add to Build Path.</li>
<li>The IEDriver and Chromerdriver must be stored in a folder in the C:\BrowserDrivers.</li>
</ol>
<h2>
<span style="font-size: x-large;">
Fast Example</span></h2>
<div>
<br /></div>
Let's try to test the login page of testlink demo.</div>
<div>
<br /></div>
<div>
<ol>
<li>Open the firefox and Install the Selenium IDE (http://seleniumhq.org/download/). </li>
<li>After Install the Selenium IDE, start it in Firefox -> Web Developer -> Selenium IDE.</li>
<li>The Selenium IDE will open and start to record the actions in the browser.</li>
<li>In firefox start open the page of testlink demo http://demo.testlink.org/tl194demo/login.php.</li>
<li>In the Login Name enter: admin </li>
<li>Password enter: admin</li>
<li>The testlink home page will appears.</li>
<li>Stop the Selenium IDE record.</li>
<li>In the Selenium IDE window, save the test in File-> Export As -> Java /JUnit 4/ webdriver.</li>
<li>save the file with the name Login.java in a folder.</li>
<li>Go to Eclipse IDE</li>
<li>Select the src folder in your java project created .</li>
<li>Create a class using right click and select New -> Class</li>
<li>The name of the Class is: TestLogin</li>
<li>Open your test recorded Login.java, copy the content and paste in the eclipse TestLogin class. Bellow the class example.</li>
</ol>
<div>
<br /></div>
<div>
<div>
<span style="color: blue;">package example;</span></div>
<div>
<span style="color: blue;"><br /></span></div>
<div>
<span style="color: blue;">import java.util.regex.Pattern;</span></div>
<div>
<span style="color: blue;">import java.util.concurrent.TimeUnit;</span></div>
<div>
<span style="color: blue;">import org.junit.*;</span></div>
<div>
<span style="color: blue;">import static org.junit.Assert.*;</span></div>
<div>
<span style="color: blue;">import static org.hamcrest.CoreMatchers.*;</span></div>
<div>
<span style="color: blue;">import org.openqa.selenium.*;</span></div>
<div>
<span style="color: blue;">import org.openqa.selenium.firefox.FirefoxDriver;</span></div>
<div>
<span style="color: blue;">import org.openqa.selenium.support.ui.Select;</span></div>
<div>
<span style="color: blue;"><br /></span></div>
<div>
<span style="color: blue;">public class TestLogin {</span></div>
<div>
<span style="color: blue;"> private WebDriver driver;</span></div>
<div>
<span style="color: blue;"> private String baseUrl;</span></div>
<div>
<span style="color: blue;"> private boolean acceptNextAlert = true;</span></div>
<div>
<span style="color: blue;"> private StringBuffer verificationErrors = new StringBuffer();</span></div>
<div>
<span style="color: blue;"><br /></span></div>
<div>
<span style="color: blue;"> @Before</span></div>
<div>
<span style="color: blue;"> public void setUp() throws Exception {</span></div>
<div>
<span style="color: blue;"> driver = new FirefoxDriver();</span></div>
<div>
<span style="color: blue;"> baseUrl = "http://demo.testlink.org/";</span></div>
<div>
<span style="color: blue;"> driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);</span></div>
<div>
<span style="color: blue;"> }</span></div>
<div>
<span style="color: blue;"><br /></span></div>
<div>
<span style="color: blue;"> @Test</span></div>
<div>
<span style="color: blue;"> public void testEWebdriver() throws Exception {</span></div>
<div>
<span style="color: blue;"> driver.get(baseUrl + "/tl194demo/login.php");</span></div>
<div>
<span style="color: blue;"> driver.findElement(By.id("login")).clear();</span></div>
<div>
<span style="color: blue;"> driver.findElement(By.id("login")).sendKeys("admin");</span></div>
<div>
<span style="color: blue;"> driver.findElement(By.name("tl_password")).clear();</span></div>
<div>
<span style="color: blue;"> driver.findElement(By.name("tl_password")).sendKeys("admin");</span></div>
<div>
<span style="color: blue;"> driver.findElement(By.name("login_submit")).click();</span></div>
<div>
<span style="color: blue;"> }</span></div>
<div>
<span style="color: blue;"><br /></span></div>
<div>
<span style="color: blue;"> @After</span></div>
<div>
<span style="color: blue;"> public void tearDown() throws Exception {</span></div>
<div>
<span style="color: blue;"> driver.quit();</span></div>
<div>
<span style="color: blue;"> String verificationErrorString = verificationErrors.toString();</span></div>
<div>
<span style="color: blue;"> if (!"".equals(verificationErrorString)) {</span></div>
<div>
<span style="color: blue;"> fail(verificationErrorString);</span></div>
<div>
<span style="color: blue;"> }</span></div>
<div>
<span style="color: blue;"> }</span></div>
<div>
<span style="color: blue;"><br /></span></div>
<div>
<span style="color: blue;"> private boolean isElementPresent(By by) {</span></div>
<div>
<span style="color: blue;"> try {</span></div>
<div>
<span style="color: blue;"> driver.findElement(by);</span></div>
<div>
<span style="color: blue;"> return true;</span></div>
<div>
<span style="color: blue;"> } catch (NoSuchElementException e) {</span></div>
<div>
<span style="color: blue;"> return false;</span></div>
<div>
<span style="color: blue;"> }</span></div>
<div>
<span style="color: blue;"> }</span></div>
<div>
<span style="color: blue;"><br /></span></div>
<div>
<span style="color: blue;"> private String closeAlertAndGetItsText() {</span></div>
<div>
<span style="color: blue;"> try {</span></div>
<div>
<span style="color: blue;"> Alert alert = driver.switchTo().alert();</span></div>
<div>
<span style="color: blue;"> if (acceptNextAlert) {</span></div>
<div>
<span style="color: blue;"> alert.accept();</span></div>
<div>
<span style="color: blue;"> } else {</span></div>
<div>
<span style="color: blue;"> alert.dismiss();</span></div>
<div>
<span style="color: blue;"> }</span></div>
<div>
<span style="color: blue;"> return alert.getText();</span></div>
<div>
<span style="color: blue;"> } finally {</span></div>
<div>
<span style="color: blue;"> acceptNextAlert = true;</span></div>
<div>
<span style="color: blue;"> }</span></div>
<div>
<span style="color: blue;"> }</span></div>
<div>
<span style="color: blue;">}</span></div>
</div>
<div>
<br /></div>
<ol>
<li>Fix the package name errors and the name of the class.</li>
<li>In eclipse package explorer select TestLogin.java with mouse right click and Run As -> JUnit</li>
<li>The Login recorded will run.</li>
</ol>
<h2>
<span style="font-size: x-large;">
Adjusts</span></h2>
</div>
One of the resources of Selenium webdriver is run the same test for more than one web browsers. Some adjusts in our first example test is required.<br />
<br />
<br />
<ol>
<li>First create more two drivers variables : <span style="color: blue;">private WebDriver driver1, driver2, driver3;</span></li>
<li>In the setUp() method replace for the following code:</li>
</ol>
<div>
<div>
<span style="color: blue;">driver1 = new FirefoxDriver();</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span> driver1.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);</span></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"><span style="color: blue;"> </span></span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span>File file1 = new File("C:/BrowserDrivers/IEDriverServer.exe");</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span>System.setProperty("webdriver.ie.driver", file1.getAbsolutePath());</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span>driver2 = new InternetExplorerDriver();</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span>driver2.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);</span></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"><span style="color: blue;"> </span></span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span>File file2 = new File("C:/BrowserDrivers/chromedriver.exe");</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span>System.setProperty("webdriver.chrome.driver", file2.getAbsolutePath());</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span>driver3 = new ChromeDriver();</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span>driver3.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);</span></div>
</div>
<div>
<span style="color: blue;"> </span></div>
<div>
<span style="color: blue;"> baseUrl = "http://demo.testlink.org/";</span></div>
<div>
<br /></div>
<br />
<div style="text-align: justify;">
To run my test was necessary to include the browser driver address in the computer (<span style="color: blue;">File file1 = new File("C:/BrowserDrivers</span><span style="color: blue;">/IEDriverServer.exe");</span>) to start the IE browser and Chrome browser.<br />
<br />
Change your test code adding the tests for each browser. See bellow:<br />
<br /></div>
<div>
<div>
<span style="color: blue;"> @Test</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span> public void testLoginFirefox() throws Exception {</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span> </span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span> driver1.get(baseUrl + "/tl194demo/login.php");</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span> login(driver1);</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span> }</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span> </span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span> @Test</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span> public void testLoginIE() throws Exception {</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span> </span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span> driver2.get(</span><span style="color: blue;">baseUrl + "/tl194demo/login.php</span><span style="color: blue;">");</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span> login(driver2);</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span> }</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span> </span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span> @Test</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span> public void testLoginChrome() throws Exception {</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span> </span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span> driver3.get(</span><span style="color: blue;">baseUrl + "/tl194demo/login.php"</span><span style="color: blue;">);</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span> login(driver3);</span></div>
<div>
<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span> }</span></div>
</div>
<div>
<div style="color: blue;">
public void login(WebDriver driver){</div>
<div style="color: blue;">
<span class="Apple-tab-span" style="white-space: pre;"> </span> </div>
<div style="color: blue;">
<span class="Apple-tab-span" style="white-space: pre;"> </span> driver.findElement(By.id("login")).clear();</div>
<div style="color: blue;">
<span class="Apple-tab-span" style="white-space: pre;"> </span> driver.findElement(By.id("login")).sendKeys("admin");</div>
<div style="color: blue;">
<span class="Apple-tab-span" style="white-space: pre;"> </span> driver.findElement(By.name("tl_password")).clear();</div>
<div style="color: blue;">
<span class="Apple-tab-span" style="white-space: pre;"> </span> driver.findElement(By.name("tl_password")).sendKeys("admin");</div>
<div style="color: blue;">
<span class="Apple-tab-span" style="white-space: pre;"> </span> driver.findElement(By.name("login_submit")).click();</div>
<div style="color: blue;">
<span class="Apple-tab-span" style="white-space: pre;"> </span> }</div>
<div style="color: blue;">
<div>
@After</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span> public void tearDown() throws Exception {</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span> driver1.quit();</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span> driver2.quit();</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span> driver3.quit();</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span> String verificationErrorString = verificationErrors.toString();</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span> if (!"".equals(verificationErrorString)) {</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span> fail(verificationErrorString);</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span> }</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span> }<br />
<br /></div>
</div>
<div>
All drivers must be closed using driver.quit() function.</div>
</div>
<div>
<br /></div>
<div>
Save the changes and Run the TestLogin.java again.</div>
<div>
Run As -> JUnit.</div>
<div>
<br /></div>
<div>
As result the Login test will be executed for 3 browsers: Firefox, IE and Chrome browsers.</div>
<div>
<br /></div>
<div>
There's no need to start the Selenium server before the tests and without effort it was possible to run tests for different kind of browsers.<br />
<br />
I will try to test using resources for mouse cursor moving and I will post here the results.<br />
<br />
Bye.<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/18061025315278377536noreply@blogger.com4tag:blogger.com,1999:blog-757914655257865752.post-76241563358523737122013-01-16T19:52:00.000-08:002013-01-21T18:35:21.151-08:00How I Automate Tests...<br />
<div style="text-align: justify;">
To automate tests, first I think the requirements that I need to start.</div>
<div style="text-align: justify;">
The figure 1 bellow shows the inputs and the outputs that I consider in test automation.</div>
<div style="text-align: justify;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf1phC8g2O_yNKwUivJU1EGzn4q257PDTnWR6E7_jJ1nOpU3QVoUhxGftKnoqkJln-1ktQTBHwr_lHhGEVn7epzKLqdzNhH56yjWGOH6pKBj2fQDhI2XId7evOga_xVbtMeBMi1SK0Ch4n/s1600/automation_inputsEn.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="167" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf1phC8g2O_yNKwUivJU1EGzn4q257PDTnWR6E7_jJ1nOpU3QVoUhxGftKnoqkJln-1ktQTBHwr_lHhGEVn7epzKLqdzNhH56yjWGOH6pKBj2fQDhI2XId7evOga_xVbtMeBMi1SK0Ch4n/s400/automation_inputsEn.PNG" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Figure 1 Test Automation Inputs and Outputs</td></tr>
</tbody></table>
To start the test automation activities I need the inputs:<br />
<br />
<ol>
<li>Test Cases selected to be automated, they must be repeatable.</li>
<li>Test Data.</li>
<li>Test Tools environment configured and preferably Continuous Integration.</li>
<li>Code, even using TDD (test driven development) the code (can be fake) is needed to run the tests.</li>
</ol>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
As desirable outputs of test automation, basically I consider the following artifacts:<br />
<br />
<ol>
<li>Test Scripts.</li>
<li>Execution Log.</li>
<li>Results Report.</li>
<li>Traceability (tests and requirements or tests and failures) and code coverage.</li>
</ol>
<div style="text-align: justify;">
Depending of test tool, other metrics could be extracted from test automation.</div>
<br />
<div style="text-align: justify;">
During the project a lot of external events can happen to disrupt the activities of automation as changes in requirements, extra requests from customer, change of deliverable dates and etc. For this reason I adopt some procedures listed bellow to automate tests and execute the software test activities.</div>
<br />
<ol>
<li style="text-align: justify;"><span lang="EN-US"><span style="font-size: 7pt;"> </span></span><span lang="EN-US">Plan the test cases for the priority
functionalities developed using a test tool (for example <a href="http://sourceforge.net/projects/testlink/">Testlink</a>). </span></li>
<li style="text-align: justify;"><span lang="EN-US">Select the test cases to be automated (selection can be according to acceptance criteria).</span></li>
<li style="text-align: justify;"><span lang="EN-US"><span style="font-size: 7pt;"> </span></span><span lang="EN-US">Automated test scripts creation according to test cases selected to be automated. These test scripts must be possible to be edited
and gathered in a test suite, and reused to others test cases;</span></li>
<li style="text-align: justify;"><span lang="EN-US">Update the test scripts is important to avoid wrong results.</span></li>
<li style="text-align: justify;"><span lang="EN-US">Then, the testers executed the
automated tests using a test tool and the exploratory manual tests also. The
defects found were registered in Testlink and in the defect tracking tool.</span></li>
<li style="text-align: justify;"><span lang="EN-US">The automatic regression tests
for all functionalities must be executed also when defects were validated to ensuring
that another part of system was not affected by code changes.</span></li>
<li style="text-align: justify;"><span lang="EN-US">The automated TestLink
reports can be generated. The development team
released another system version and the <span class="longtext"><span style="background: white;">same activities </span>process began again. </span></span></li>
</ol>
<div style="text-align: justify;">
I call these procedures Test Iteration because it will be repeated again for next version of software until the end of project.</div>
<div style="text-align: justify;">
I executed it in Scrum projects and Waterfall projects as well.My experience is reported in my paper "<a href="http://184.106.170.127/wp-content/uploads/2010/12/Congresso-Internacional-de-Teste-de-Software-ICTSS-artigo-de-Eliane-Collins.pdf">Iterative Software Testing Process for Scrum and Waterfall Projects using Open Source Testing Tools Experience</a>". It was presented in the event ICTSS 2010 (International Conference of Testing Software and Systems).</div>
<div style="text-align: justify;">
Executing these procedures is possible to ensure the test automation activities in the project and avoid problems as outdated test scripts.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
According to project platform is possible to use many test automation tools, for example:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Web projects: <a href="http://wiki.openqa.org/display/SEL/Home">Selenium Test tool</a> and <a href="http://jmeter.apache.org/">Jmeter</a></div>
<div style="text-align: justify;">
For desktop projects (Java AWT or Swing) : <a href="http://marathontesting.com/">Marathon test tool</a></div>
<div style="text-align: justify;">
For C# or Java application is possible to use <a href="http://fitnesse.org/">Fitnesse</a> test tool</div>
<div style="text-align: justify;">
For mobile J2ME applications : <a href="http://www.j2meunit.sourceforge.net/">J2MEUnit</a></div>
<div style="text-align: justify;">
<br /></div>
<br />
My favorite tools to use are Selenium, Fitnesse and Jmeter. In next posts I will detail how to use them.<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/18061025315278377536noreply@blogger.com0tag:blogger.com,1999:blog-757914655257865752.post-51149744509296661622012-12-27T13:26:00.001-08:002013-01-04T22:32:37.956-08:00Software Test Automation Means...<br />
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">I use the definition of the book <i>Automated Software Testing</i> [1], it says that Software Test Automation means to automate
software testing activities including the development and execution of test
scripts, verification of testing requirements, and the use of automated testing
tools. Automating the test activities can reduce the effort of manual and repetitive tests and can provide quick results feedback for project team.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">I consider that Test Automation is part of Software Development (not just part of Software Testing). It is a multidisciplinary activity since it envolves programming skills </span><span style="font-family: Arial, Helvetica, sans-serif;"> and testing skills, f</span><span style="font-family: Arial, Helvetica, sans-serif;">urthermore, the collaboration between the project team is a key factor for the success of this activity but that relationship I'll explain in another post.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">According to Mark Fewster and Dorothy Graham [2] Automating tests is a skill very different from Testing, because knowledge of good tools and software architecture </span><span style="font-family: Arial, Helvetica, sans-serif;">is required</span><span style="font-family: Arial, Helvetica, sans-serif;">. But in order to gain benefits the project team must wonder why to automate tests, what </span><span style="font-family: Arial, Helvetica, sans-serif;">automate, </span><span style="font-family: Arial, Helvetica, sans-serif;">when to automate testing and the risks of automation.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Why to Automate Tests?</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">First , </span><span style="font-family: Arial, Helvetica, sans-serif;">we all need to be quick (time to market).</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">In second, commonly in a system there is a set of many test cases to be run several times and soon, when they are executed only manually is risky because all tests can not be performed very carefully and effective all times due to factors such as the short time to delivery results, tiredness and even human distraction. In this sense Test Automation provides the execution of many repetitive tests quickly and facilitate the generation of documents. So, the test professional can dedicate time to execute tests that agregate value to the project.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Other reason to automate tests is the cost. The initial investiment is high, the team need to be trained, need time to analyze tools, buy tools and there is the learning curve to get test automation effectively in the project. But when the tests are automated and organized, they cost is cheaper than running manually because what needed to be run on a day for more than a person can run automatically at one hour and the results are generated fast.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Some other benefits for the project include: improvements on software development lifecycle, software reliability, quickly regression tests, generation of documents, failures monitoring and reproducing defects.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">What Automate?</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">The candidate tests to be automate are :</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
</div>
<ul>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Development tests: Unit Tests and Integration tests. They must be automated to prevent defects in the code, facilitate changes, decrease dependency between classes and improve the software design.</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Acceptance Tests : basic requirements from customer.</span></li>
<ul>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://en.wikipedia.org/wiki/Application_programming_interface">API</a> level: functional tests of the system in the level of API, without GUI dependence. It identifies business rules failures.</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://pt.wikipedia.org/wiki/Interface_gr%C3%A1fica_do_utilizador">GUI</a> Level : the GUI must be tested when the system interface is stable and will not change.</span></li>
</ul>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Non Functional Tests: Security Tests, Performance tests, Stress and Volume tests, they must be performed when the system funcionalities are completed and can simulate the real production environment.</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Failures found: The critical or major failures found during exploratory test execution are important candidates to be automated to ensure that the failure will not return to the system after code changes.</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Repetitive tests: The tests that have to be executed many times have to me automated.</span></li>
</ul>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">When to Automate Testing?</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">It's better to automate tests when ALL project team are envolved, commited in the automation activities and conscious of the importance and benefits of this activity. Everybody must to understand that it requires time to be spent and all should be willing to help</span><span style="font-family: Arial, Helvetica, sans-serif;">. The automation must be planned and in the project schedule. With this, the automation can be sucessful.</span></div>
</div>
<div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">When the automation </span><span style="font-family: Arial, Helvetica, sans-serif;">activity is delegated to the responsibility of one person or one team it gets more difficult communication process and synchronization of tasks.</span></div>
</div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">Common Risks of Test Automation [2]:</span></div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div>
<ul>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Unrealistics expectations: it is not possible to automate 100% of the tests and manual tests still must be performed.</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Maintenance cost: depending of the system platform, the cost of maintenance of the test automation can be expensive and requires time when the system requirements change.</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Technical difficulties: when the system has a complex platform and lack of testing tools adequated and have no time to build one, it is not worth to automate tests.</span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Lack of development process: without a development process organized, customer requirements and architecture documentation, it is not possible to automate the test activities. </span></li>
<li style="text-align: justify;"><span style="font-family: Arial, Helvetica, sans-serif;">Lack of management support: the management of the organization must to know the value of test automation activity and the benefits for the project. Many projects has no test automation because the manager think that test automation is expensive and it's not agregate value to build the system. The old idea of the just development code is important to build a system.</span></li>
</ul>
</div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">References</span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">[1] <a href="http://www.amazon.com/Automated-Software-Testing-Introduction-Performance/dp/0201432870">Dustin, et al , Automated Software Testing, 1999.</a></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;">[2] </span><span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://www.amazon.com/Software-Test-Automation-Mark-Fewster/dp/0201331403/ref=pd_sim_b_3">Mark Fewster and Dorothy Graham, Software Test Automation, 2007.</a></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
Anonymoushttp://www.blogger.com/profile/18061025315278377536noreply@blogger.com0tag:blogger.com,1999:blog-757914655257865752.post-28454057158108190412012-12-21T14:17:00.003-08:002012-12-21T14:17:55.918-08:00INTRODUCTION<span style="font-family: Arial, Helvetica, sans-serif; text-align: justify;">Hello All,</span><br />
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">In my first post I will introduce myself and why I created this blog.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">My name is Eliane Collins, I am a Computing Engineer and I live in Manaus, Brazil.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Now, many people must to ask: Where is Manaus?</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">See the red ballloon in the picture below.</span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH5Q7MHj2OFMr-LFEAQpRZFk0dn55XQf_9aFtt1kvnfJnUIlZZFPlhiyc0v2BpB26eBlk9F5s2GT4GaNE4Rj57wxwItghmCMikeATVtuIh7oJsSDsRBuoxSYYTWl7CdmPLYwaKTppDR6AS/s1600/manaus.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH5Q7MHj2OFMr-LFEAQpRZFk0dn55XQf_9aFtt1kvnfJnUIlZZFPlhiyc0v2BpB26eBlk9F5s2GT4GaNE4Rj57wxwItghmCMikeATVtuIh7oJsSDsRBuoxSYYTWl7CdmPLYwaKTppDR6AS/s400/manaus.PNG" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">Picture from GoogleMaps</span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Manaus is located in the middle of Amazonia. It is a industrial city, T<span style="background-color: white;"><span style="line-height: 19.200000762939453px;">he population in 2012 was 1.85 million people. The Brazilian government offers incentive to companies located here. L</span></span><span style="background-color: white; line-height: 19.200000762939453px;">ocal industries include brewing, </span><span style="background-color: white; line-height: 19.200000762939453px;">shipbuilding, soap manufacturing, the production of chemicals, computers, motorcycles and</span><span style="background-color: white; line-height: 19.200000762939453px;"> </span><a href="http://en.wikipedia.org/wiki/Petroleum" style="background-image: none; color: #0b0080; line-height: 19.200000762939453px; text-decoration: initial;" title="Petroleum">petroleum</a><span style="background-color: white; line-height: 19.200000762939453px;"> </span><span style="background-color: white; line-height: 19.200000762939453px;">refining of</span><a href="http://en.wikipedia.org/wiki/Oil" style="background-image: none; color: #0b0080; line-height: 19.200000762939453px; text-decoration: initial;" title="Oil">oil</a><span style="background-color: white; line-height: 19.200000762939453px;"> </span><span style="background-color: white; line-height: 19.200000762939453px;">brought in by barge and</span><span style="background-color: white; line-height: 19.200000762939453px;"> </span><a href="http://en.wikipedia.org/wiki/Tourism" style="background-image: none; color: #0b0080; line-height: 19.200000762939453px; text-decoration: initial;" title="Tourism">tourism</a><span style="background-color: white; line-height: 19.200000762939453px;">. </span><span style="background-color: white; line-height: 19.200000762939453px;">The mobile phone companies</span><span style="background-color: white; line-height: 19.200000762939453px;"> </span><a href="http://en.wikipedia.org/wiki/Nokia" style="background-image: none; color: #0b0080; line-height: 19.200000762939453px; text-decoration: initial;" title="Nokia">Nokia</a><span style="background-color: white; line-height: 19.200000762939453px;">,</span><span style="background-color: white; line-height: 19.200000762939453px;"> </span><a href="http://en.wikipedia.org/wiki/Siemens" style="background-image: none; color: #0b0080; line-height: 19.200000762939453px; text-decoration: initial;" title="Siemens">Siemens</a><span style="background-color: white; line-height: 19.200000762939453px;">,</span><span style="background-color: white; line-height: 19.200000762939453px;"> Sumsung, LG, </span><a class="mw-redirect" href="http://en.wikipedia.org/wiki/Sagem" style="background-image: none; color: #0b0080; line-height: 19.200000762939453px; text-decoration: initial;" title="Sagem">Sagem</a> and<span style="background-color: white; line-height: 19.200000762939453px;"> </span><a href="http://en.wikipedia.org/wiki/Gradiente" style="background-image: none; color: #0b0080; line-height: 19.200000762939453px; text-decoration: initial;" title="Gradiente">Gradiente</a><span style="background-color: white; line-height: 19.200000762939453px;"> </span><span style="background-color: white; line-height: 19.200000762939453px;">operate mobile phone manufacturing plants in Manaus.</span> For this reason a lot of software companies are here. (http://en.wikipedia.org/wiki/Manaus)</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">And finally a little bit about me:</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">My graduation is in Computing Engineering on University of State of Amazonas, I am actually master degree student in the University Federal of Amazonas.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">I work in Software development since 2004 and specifically in Software Testing since 2005. I am </span><span style="background-color: white; color: #222222;"><span style="font-family: Arial, Helvetica, sans-serif;">ISTQB Certified Tester</span></span><span style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;"> (</span><span style="font-family: Arial, Helvetica, sans-serif;">CTFL). My experience include </span><span style="background-color: white; font-family: Arial, Helvetica, sans-serif; line-height: 15px;">Software Testing Process, Software Testing Automation, Software Testing for Mobile Phones, Software Web Development JavaEE, JavaME, Windows Phone and Software Development for Digital TV.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white; line-height: 15px;"><span style="font-family: Arial, Helvetica, sans-serif;">I used to work for Siemens/Benq Mobile as Testing Analyst and nowadays I work as Testing Coordinator at Nokia Technology Institute in Manaus.</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="background-color: white; line-height: 15px;"><span style="font-family: Arial, Helvetica, sans-serif;"> </span></span><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 15px;">I am also instructor of a course of test automation and I writed some papers since 2010 relating my professional experiences. My papers in 2012:</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 15px;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<ul>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 15px;"><a href="http://www.cse.chalmers.se/~rjmh/AST2012/site/Programme.html">AST 2012</a> : </span><span style="background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; line-height: 17px; text-align: start;">Software Test Automation Practices in Agile Development </span><span style="background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; line-height: 17px; text-align: start;">Environment: An Industry Experience Report.</span></li>
<li><a href="http://compsac-2012.cs.iastate.edu/workshop_details.php?id=53&y="><span style="background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; line-height: 17px; text-align: start;">S</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 15px;">TA 2012</span></a><span style="line-height: 15px;"> : </span><em style="background-color: white; text-align: start;"><span style="font-family: Arial, Helvetica, sans-serif;">Strategies for Agile Software Testing Automation: An Industrial Experience.</span></em></li>
<li><em style="background-color: white; font-family: Arial, Helvetica, sans-serif; text-align: start;"><a href="http://icgse2012.serandp.com/">ICGSE 2012</a> :</em><span style="background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">An Industrial Experience on the Application of Distributed Testing in an Agile Software Development Environment. </span></li>
<li><span style="background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; line-height: 18px;"><a href="http://www.sbqs2012.com.br/">B</a></span><span style="color: #333333; font-family: Arial, Helvetica, sans-serif; line-height: 18px;"><a href="http://www.sbqs2012.com.br/">razillian Symposium of Software Quality</a> (SBQS 2012): </span><span style="background-color: white; font-style: inherit; text-align: left;"><span style="font-family: Arial, Helvetica, sans-serif;">Aplicando Testes Ágeis com Equipes Distribuídas: Um Relato de Experiência</span></span></li>
</ul>
<br />
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 15px;">For more professional information my profile is on <a href="http://www.linkedin.com/profile/view?id=40795375&trk=tab_pro">linkedIn</a>.</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 15px;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 15px;">And Why to create this blog?</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, Nimbus Sans L, sans-serif; font-size: x-small;"><span style="line-height: 15px;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, Nimbus Sans L, sans-serif;"><span style="line-height: 15px;">I have 3 key reasons:</span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, Nimbus Sans L, sans-serif;"><span style="line-height: 15px;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="font-family: Arial, Helvetica, Nimbus Sans L, sans-serif;"><span style="line-height: 15px;">First because to automate tests is one of the activities that I most enjoy doing in my job. Second because throughout my career in software testing I went through several experiences automating tests for different kinds of software and thirdly because in presentations and lectures that I've done many professionals describe the difficulties of test teams to accomplish the automation activities during their projects. For these reasons I think my humble knowledge and experience in this subject can help software development teams. :)</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Arial, Helvetica, Nimbus Sans L, sans-serif; font-size: x-small;"><span style="line-height: 15px;"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif;">I hope you enjoy the next posts! Thank you.</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white; font-family: Arial, Helvetica, 'Nimbus Sans L', sans-serif; font-size: 13px; line-height: 15px;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Anonymoushttp://www.blogger.com/profile/18061025315278377536noreply@blogger.com3