Software QA, Functional, Automation & Load Testing with Arif TesterLogic Thu, 13 Sep 2018 04:58:23 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.15 https://i1.wp.com/testerlogic.com/wp-content/uploads/2014/09/puzzle-logic-mini-logo-v2.png?fit=32,30 Software QA, Functional, Automation & Load Testing with Arif 32 32 Install PHP (with extensions) on MacOS using Homebrew /install-php-extensions-macos-homebrew/ /install-php-extensions-macos-homebrew/#respond Tue, 28 Aug 2018 15:43:02 +0000 /?p=1369 1. Prerequisite Steps For First Time PHP-Installation 1.1 First install xcode-command-line tools by running below command in terminal. If any popup message appears during installation, that needs to be confirmed. For further details on xcode tools, you may check this link. xcode-select --install 1.2 As we are going to do all PHP related installations through […]

The post Install PHP (with extensions) on MacOS using Homebrew appeared first on Software QA, Functional, Automation & Load Testing with Arif.

]]>

This article has detailed steps on doing clean install of PHP 7.2 (latest PHP version as of August 2018). If you already have PHP installed via homebrew, then it requires you to first remove those PHP installations and then do the fresh PHP install. Reason of doing so, is to avoid conflicts that arise because of Homebrew March 2018 updates. Further details within blog!

Problem Background

Recently, I wanted to include a new module (visualception) in my test automation project that is built on top of codeception. In order to successfully make it work, there was a requirement to have php-imagick extension already installed in your system.

Initial search showed that, in past you could have installed php-imagick extension using command like brew install php71-imagick, but this does not work any more of Homebrew updates. With the migration to Homebrew-core, the php formula has stopped taking over the role of PECL. So now for installation of php extensions (like imagick or x-debug) you have to use PECL.

Due to older php installations, I was getting lot of issues while trying to install php-imagick extension. Ultimately, I was able to resolve all the problems by installing PHP from scratch. In below, I have listed all the steps for fresh PHP installation.

1. Prerequisite Steps For First Time PHP-Installation

In order to install PHP via Homebrew, we first need to install xcode-command-line tools and Homebrew. If these tools are already setup in your machine, then skip to next section.

1.1 First install xcode-command-line tools by running below command in terminal. If any popup message appears during installation, that needs to be confirmed. For further details on xcode tools, you may check this link.

xcode-select --install

1.2 As we are going to do all PHP related installations through macOS package manager Homebrew. So next we need to set it up by running below command:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Installation process will will show several prompts and may also ask for mac password. This may take a few minutes. Once it is done, you can verify the installation was successful by running below commands:

brew --version # it will return the Homebrew installed version number like .. Homebrew 1.7.2

brew doctor # it will ensure everything is configured correctly and if something is wrong then give instructions to fix

2. Remove EXISTING PHP (homeBREW) INSTALLATIONS

If you already have any PHP-related installations (php71 or older) done by homebrew then it is best to remove and clean all those installations. For me, they gave lot of conflicts and errors. Removing all of existing PHP-related installations and installing fresh was much more simpler. In case you donot have any existing php-homebrew installations OR want to keep them, then skip to next section.

2.1 Removing all PHP-Homebrew related installations

First run below brew commands to make sure brew is updated and has no configuration issues.

brew update  # updates brew itself
brew upgrade # upgrades all packages installed via brew
brew cleanup # by default, brew doesnot uninstall old versions. cleanup command will do the job
brew doctor  # Checks brew state and returns error, if there are any issues

If brew doctor or cleanup throws any errors then fix them as per instructions returned by brew-doctor or ask google 🙂

Now onto removing existing PHP-related installations (that were done by homebrew).

brew list | grep php # will show list of existing php installations done via homebrew
brew uninstall --force $x # where $x = value returned by above command (brew list | grep php)
rm -rf /usr/local/Cellar/php  # run to ensure php dir removed
rm ~/Library/LaunchAgents/homebrew.mxcl.php* # run to remove launch agents
sudo rm /Library/LaunchDaemons/homebrew.mxcl.php*

ps ax | grep php # checks php processes, if any still running then reboot

After above, again run brew cleanup and brew doctor  to ensure everything working fine.

3. FINALLY… sTART WITH PHP INSTALLATION !

3.1 Run PHP Installation commands

brew install php # this command will install latest available version of php

Or if you want to install specific versions you may run commands like below

brew install [email protected] # these are version specific commands. run these if specific version required.
brew install [email protected] 
brew install [email protected]
brew install [email protected]

hash -r # update bash's internal paths

Once done with above, now verify thatyou are running the correct homebrewPHP by running type php command. If it returns /usr/local/...anything.../php then it means you are  running homebrew-PHP. If it returns something like /usr/bin/php then it means you are running apple-supplied-PHP. In that case you need to fix paths, as we want to use homebrew-PHP! Finally run brew doctor to make sure everything is fine and no configuration errors are thrown.

3.2 Switching between PHP versions

If you have multiple php versions and want to switch between them, then you can do so by using brew link and brew unlink commands.

# Running below commands will switch php5.6 from php7.2
brew unlink [email protected]
brew link --force --overwrite [email protected]
brew doctor # to ensure all configs are fine
php -v # verify successful relinking done

# To again switch to php7.2 from php5.6 do below commands 
brew unlink [email protected]
brew link --force --overwrite [email protected]
brew doctor # to ensure all configs are fine
php -v # to verify successful relinking done

3.3 Install PHP extensions

As mentioned in start, php extensions such as php-imagick or php-xdebug which were previously installed by commands like (brew install php53-imagick) now should be installed by PECL (for details on PECL check this link). Below are example commands for installation of xdebug and imagick extension.

pecl install xdebug
pecl install imagick

Now you may run php -v to verify php version and php -m to check enabled extensions.

 

The post Install PHP (with extensions) on MacOS using Homebrew appeared first on Software QA, Functional, Automation & Load Testing with Arif.

]]>
/install-php-extensions-macos-homebrew/feed/ 0
iOS 11: What’s New & How it can Impact your Mobile App Testing /ios-11-mobile-app-testing/ /ios-11-mobile-app-testing/#respond Mon, 09 Oct 2017 23:35:21 +0000 /?p=1306 Within two weeks of iOS 11 public release, it is already adopted by 38.5% of iOS devices. Although the adoption rate is not as good as iOS 10 (that was 48.6% within same time) but still these numbers are high enough to convince any team that has not testing on iOS11. In iOS 11, we […]

The post iOS 11: What’s New & How it can Impact your Mobile App Testing appeared first on Software QA, Functional, Automation & Load Testing with Arif.

]]>
Within two weeks of iOS 11 public release, it is already adopted by 38.5% of iOS devices. Although the adoption rate is not as good as iOS 10 (that was 48.6% within same time) but still these numbers are high enough to convince any team that has not testing on iOS11.

In iOS 11, we have got many important updates like revamped control center, smarter Siri and multitasking abilities on iPads, In this blog, I will discuss only those updates that are most likely to impact testing of mobile apps.

1. Removal of Facebook & Twitter integration: With iOS 11 update, Apple has removed first party support for Facebook and Twitter, which were earlier integrated at system level. Previously, adding these accounts would function as a single sign-on for other apps. But that support is removed now. So, in case your Mobile App has Facebook/Twitter login feature, then it is recommended to test it and ensure that users are still able to login via web-view or native app (if installed).

2. Location permission updates: iOS 11 has significant changes on how location permissions are presented to user. In previous iOS versions, developers could choose which location permissions they wanted to show. Most of the Apps used to ask for ‘Always allow’ permission. However with iOS 11, all three options will automatically appear. User can also opt for ‘Only While using the App’ instead of ‘Always Allow’. While this might not be important for all apps, but it can definitely impact functioning of GPS and fitness tracking apps if users choose unintended option.

iOS 10 location permission App explanation dialogue

In addition to above, iOS 11 users will be notified If any App is excessively using GPS in background. So, it is better to ensure that App is only using GPS when required. 

iOS 11 GPS location usage notification

3. App Explanation for Location permissions: Along with three options discussed above for permission dialogue, user will also be displayed “App explanation” for all different location permission options (Always vs When-in-use). So it is important to ensure that developers have added proper “App explanations” for both these options. Because with iOS 11 ‘App explanation’ for both options will start displaying now which were not displaying previously. Any dummy data added could look really ugly on permission dialogue!

ios location permission explain

4. Drag & Drop support: Apple has made several changes in the UI. Most important is the drag-and-drop functionality which enable users to simultaneously perform multiple tasks. If app under test is developed on top of native technologies, then it should be fine. However, if the app is based on HTML5 or any other non-native platform, then there might be issues and it will better to thoroughly test it.

5. End of support for 32-bit products and Apps: It means that devices and Apps with 32-bit architecture will not work at all with iOS 11. However, the good news is that Apple has been advocating this migration since 2015. So very less number of Apps are expected to be impacted by this. You don’t need to check your app for this if any version of it was released after February 2015.

Have you already tested your App on iOS 11 or planning to do now? Please share your experience in comments and any other issues which can be observed in Apps running on iOS 11!

The post iOS 11: What’s New & How it can Impact your Mobile App Testing appeared first on Software QA, Functional, Automation & Load Testing with Arif.

]]>
/ios-11-mobile-app-testing/feed/ 0
How to Install and Configure JMeter in Mac OS /install-configure-jmeter-mac/ /install-configure-jmeter-mac/#respond Sat, 02 Jul 2016 11:16:26 +0000 /?p=1233 There are multiple approaches to install JMeter on Mac. You can either do it manually just like we do it in windows or you can follow a more simplistic method to install JMeter via HomeBrew. I prefer the Homebrew method, as it gets the job done quickly with few simple commands. I will especially recommend […]

The post How to Install and Configure JMeter in Mac OS appeared first on Software QA, Functional, Automation & Load Testing with Arif.

]]>

This blog explains the steps to install & configure JMeter in Mac OS. If you are a Windows user, then you may visit my previous blog to setup & configure JMeter in Windows.

There are multiple approaches to install JMeter on Mac. You can either do it manually just like we do it in windows or you can follow a more simplistic method to install JMeter via HomeBrew. I prefer the Homebrew method, as it gets the job done quickly with few simple commands. I will especially recommend it to those who are new to Mac OS and don’t want to go in details of manual configurations.

1. Open Mac Terminal, where we will be running all the commands.

2. In terminal, first we will run command to install HomeBrew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)

At this step, It might prompt you to install mac developer tools first. Just confirm this and provide you mac password if required. Installation process will begin now and once the Homebrew installation is completed It will show success message on mac terminal.

3. Now execute following brew command to install JMeter.

brew install jmeter
or
brew install jmeter --with-plugins

A success message will be shown on mac terminal when the installation is completed.

4. You are ready to use JMeter now. Just type and enter JMeter in terminal to launch it. In case it does not work you can also use following command.

open /usr/local/bin/jmeter

JMeter mac os

JMeter MacOS


Additional Tips for JMeter Configuration & Optimization:

  • Java JRE Installation: JMeter is platform independent application built on Java. Therefore it is important to have correct version of JRE installed in your system for smooth functioning of JMeter. JRE version should not only meet JMeter requirements but also match with your system specs (32/64 bit).
  • JMeter Best Practices: JMeter consumes lot of memory, so it is important to follow JMeter best practices. Actual load tests should be executed from command line and listeners should be used intelligently.
  • JMeter Memory Tuning: Default JMeter java configuration comes with very low memory allocations. So before running any load tests, first you should update the JVM parameters according to test requirements and your machine’s capacity. These parameters (HEAP="-Xms512m -Xmx512m") can be found in JMeter script file within bin folder of JMeter installation path (/usr/local/Cellar/jmeter/2.xx/bin/). Check this guide for further details on JMeter performance tuning.
  • JMeter Mac UI: JMeter provides you option to select JMeter theme that fits well with overall look and feel of Mac OS. You can select it from Menu > Options > Look and Feel > System.

Let me know if this worked out well for you. If you need further help, please feel free to ask in comments section 🙂

The post How to Install and Configure JMeter in Mac OS appeared first on Software QA, Functional, Automation & Load Testing with Arif.

]]>
/install-configure-jmeter-mac/feed/ 0
How to Setup and Configure JMeter in Windows /how-setup-configure-jmeter-windows/ /how-setup-configure-jmeter-windows/#comments Tue, 29 Sep 2015 23:10:28 +0000 /?p=1147 JMeter is one of most popular performance testing tool and since it is open-source, therefore it is often a start point for beginners in performance testing. In this blog, I will share a step-by-step guide that can be used to install JMeter in Windows environment. There will also be some configuration and script designing tips which you will find useful […]

The post How to Setup and Configure JMeter in Windows appeared first on Software QA, Functional, Automation & Load Testing with Arif.

]]>
JMeter is one of most popular performance testing tool and since it is open-source, therefore it is often a start point for beginners in performance testing. In this blog, I will share a step-by-step guide that can be used to install JMeter in Windows environment. There will also be some configuration and script designing tips which you will find useful while working on real-time JMeter projects.

1- Setup and Verify Java

Apache JMeter is purely a Java based tool; therefore first of all we need to make sure that Java is properly installed and configured in our system. If you are already using any java based applications, then Java might already be installed on your system. To check if Java is already installed open command prompt and run command java -version.

If Java is successfully installed and configured then the command will return valid java version number (java version “x.x.x.x”)  as shown in image below:

If Java is not installed or configured, then you may get a message like this: “java” is not recognized as an internal or external command, operable program or batch file. 

To fix it, you need to download and install valid java JRE or JDK corresponding to your operating system. Java JRE or JDK can be download from Java Download page on Oracle website. After successful installation of JRE/JDK, open command prompt again and run the command java -version . It should now return java version number that you installed. If you still do not get the valid response after above steps, then you may look into setting java environment variables under windows system properties.

It is very important to have correct version of java on your system to get maximum out of JMeter. For example, using a 32 bit java on a 64 bit operating system can lead to under-utilization of resources. 

2- Download and Install JMeter

To download JMeter simply go to official Apache JMeter website and download the zip or tgz package.

Apache JMeter Download
Apache JMeter Download

After downloading the file, just unzip it anywhere in your system. In the unzipped folder there are all the files which JMeter requires for its functioning.

3- Configure JMeter for better performance

There are many ways to optimize JMeter for better performance. It is a complete topic in itself but for starter, I will recommend at least configuring java xms and xmx values in JMeter.bat file. By doing so, you can make sure that JMeter is properly using the available memory resources. It also reduces the chances of OutOfMemory errors.

To change these settings, open jmeter.bat file in notepad and update following lines

// default configuration

set HEAP=-Xms512m -Xmx512m
set NEW=-XX:NewSize=128m -XX:MaxNewSize=128m
// new settings could be like this *depending* on your hardware and software specs
// note that, Max heap size should not exceed the 80% of total system memory

set HEAP=-Xms512m -Xmx2048m
set NEW=-XX:NewSize=128m -XX:MaxNewSize=1024m

Other than this configuration, it is also important to use listeners intelligently in your test plan. Listeners that consume more memory like Table, Tree, Assertion and Graph listeners should be avoided during actual load test execution. It is best to only generate JTL test results file during actual load tests and later that JTL file can be used to create different reports.

4- Launch JMeter & Execute JMeter scripts

There are multiple ways to start JMeter. We can start it in GUI mode by opening jmeter.bat file or we can simply run commands in CMD to execute jmeter scripts without opening it in GUI mode.

4.1) To open JMeter GUI, just navigate to apache-jmeter-2.13>bin directory and double-click ApacheJMeter.jar or jmeter.bat file.

Steps to launch JMeter GUI
Steps to launch JMeter GUI

It should open up JMeter in GUI mode as in image below:

4.2) As discussed earlier, JMeter consumes lot of system resources while running in GUI mode. Therefore, it is best to use it in command-line non-GUI mode while performing actual load tests. JMeter scripts can be executed from CMD by using command below:

jmeter -n -t myScript.jmx 

Where...

–n means that JMeter will run in command line mode
-t myScript.jmx mentions the path and Filename of JMeter script

There are other parameter as well which you can pass along with command like path to JTL results file, server IP and port number etc. Command prompt will show progress messages during the script execution and also a summary after successful execution of script. You may also check additional tips for JMeter tuning in my other blog.

Still face any issues while setting up JMeter? Feel free to ask and I will try my best to help out 🙂

The post How to Setup and Configure JMeter in Windows appeared first on Software QA, Functional, Automation & Load Testing with Arif.

]]>
/how-setup-configure-jmeter-windows/feed/ 2
Top 4 Performance Testing Tools Comparison /top-performance-testing-tools-comparison/ /top-performance-testing-tools-comparison/#comments Sat, 29 Aug 2015 20:41:55 +0000 /?p=1108 If we look back into history of performance testing; then it is evident that the importance of performance testing was realized as businesses started developing large scale applications; that were expected to serve hundreds and thousands of concurrent users. This created a whole new market for performance & load testing tools. Today, we have hundreds […]

The post Top 4 Performance Testing Tools Comparison appeared first on Software QA, Functional, Automation & Load Testing with Arif.

]]>
If we look back into history of performance testing; then it is evident that the importance of performance testing was realized as businesses started developing large scale applications; that were expected to serve hundreds and thousands of concurrent users. This created a whole new market for performance & load testing tools. Today, we have hundreds of performance testing tools available in market offering different type of features and can be used by software testing teams as per performance requirements.

In this blog, I will do a brief comparison of Top 4 performance & load testing tools, which are considered best by professional performance testers due to their extensive feature set, maturity level and reliable results.

 1. Apache JMeter:

Apache JMeter is an open source performance & load testing tool, which is developed and maintained by Apache. JMeter is mostly used for load testing of web services and web application servers. Testing teams are also known to use it for functional testing of web services. Following are some key points about JMeter.

a) Open-source: JMeter is open source and available free of cost; therefore many software teams prefer to use it for its cost effectiveness.

b) Components: JMeter has test elements like Thread Group, Samplers, Listeners, Pre & Post processors. Other than that, there are tons of third party free/commercial tools which can be integrated with JMeter to enhance its capabilities like JMeter Extras plugin, BlazeMeter, UBIK load pack and Loadosophia etc.

c) Platform compatibility: JMeter is compatible with Windows, Mac and all UNIX based systems.

d) Supported applications: JMeter primarily supports Java & Java server page applications. But it is also equally good to test server applications / web services / databases developed in other technologies. JMeter can also be used for load testing of mobile application server-side.

e) Reporting: In open source/free tools category, JMeter is one of most mature tools as its first was version was released in 1998 and since then there have been many upgrades to it. Thanks to continuous support it delivers reliable results. Reports generated though are very limited and teams tend to use external plugins/tools for more detailed reporting.

f) Available resources: JMeter has one of largest online community which shares helpful information with each other through different forums and software testing blogs. Because of this reason JMeter is considered a great option for beginners in performance and load testing.

2. Micro Focus (HP) LoadRunner:

LoadRunner is a commercial performance testing solution originally developed by HP and now acquired by Micro Focus. It has very advanced set of features which usually do not come built in with open-source or free tools. Some of the key points about LoadRunner are listed below.

a) Commercial tool: LoadRunner is a commercial product, falling in category of most expensive performance testing tools. Micro Focus (previously HP) LoadRunner license cost varies depending on required virtual users, protocols and perpetual licenses etc. Despite its high cost, it is still a preferable choice of enterprise testing teams because of its advanced features and dedicated customer support.

b) Components: LoadRunner is not a single application but a complete suite of tools like VU Generator, Controller, Analyzer, Load generator, Load calculator and protocol advisor.

c) Platform compatibility: LoadRunner can operate from Windows operating system or can be used as a cloud solution.

d) Supported applications: LoadRunner (performance center) provides support for widest range of applications. It can be used to test performance of databases, server side applications and native/browser based mobile applications.

e) Advanced reports: LoadRunner is best known for its very detailed reports which help a lot in analyzing the performance issues.

f) Available resources: Micro Focus provides dedicated support & knowledge base for LoadRunner to all licensed customers. Other than that, one can also find plenty of articles & video tutorials online on Micro Focus LoadRunner.

3. SmartBear LoadUI:

LoadUI is a load testing tool which was introduced by SmartBear after success of famous web service functional testing tool called SoapUI. LoadUI works very well when used with SoapUI for performance testing of APIs and Web services. Following are some key points about LoadUI.

a) Free & Commercial version: LoadUI comes both in free and licensed version. Free version has all the load testing features but the reporting options are limited in it. Because of this option, LoadUI is a good choice for those who want to start free of cost and later want to switch to paid version.

b) Platform compatibility: LoadUI can run from Windows operating system.

c) Supported applications: LoadUI can collect data from servers developed on top of any mainstream technology.

d) User friendly/Interactive features: LoadUI stands out in rest of performance tools because of high usability. It requires comparatively lesser time to understand and operate. Moreover it has features which give a very interactive load testing experience. Test engineer can create, configure and modify tests during the execution. Reports can be examined and analyzed as the scripts/data is changed. This enables tester to understand and trace the real performance issues.

e) Visual reports: LoadUI Pro presents reports in a very easy to understand graphical format. LoadUI free version has very limited reporting features providing only the basic reports.

f) Available resources: LoadUI team has put in a special effort to create video tutorials, blogs, and articles that can be really helpful for learning LoadUI. Sample LoadUI projects are also available on SmartBear website; that can be explored by anyone for practical understanding.

4. IBM Rational Performance Tester:

Rational Performance Tester is a performance testing solution developed by IBM. Rational Performance Tester is a commercial product just like HP LoadRunner. It is often used to test enterprise level applications like SAP, Oracle etc. Following are some major points related to IBM Rational Performance tester.

a) Commercial tool: IBM Rational Performance tester is a commercial product with very high license cost. Because of its expensive price tag it is mostly acquired by enterprises having complex performance testing requirements which cannot be fulfilled by open source or low cost performance tools.

b) Platform compatibility: IBM Rational performance tester can run on Windows, Mac and Linux AIX.

c) Supported applications: IBM RPT supports majority of applications/protocols including Web HTTP, SAP, Oracle, SOA, Citrix, Siebel and TCP. Support for additional protocols can be added by using IBM Rational Performance Tester Extensibility Software Development Kit (SDK).

d) Infrastructure requirements: IBM Rational performance tester has complex infrastructure requirements. Highly skilled and specialized resources are required to setup the test environment.

e) Code-free scripts: Rational performance tester gives ability to create code-free scripts that can be generated by recording test flows. These test recordings can also be viewed in form of rendered HTML.  For advanced and customized actions, java code can be inserted anywhere in the script.

f) Available resources: IBM provides dedicated support to its licensed customers. But other than that availability of help material is quite little, if compared to other famous tools like JMeter & LoadRunner.

End Note:

When it comes to selection of best tool, then there is no straightforward best option that works for everyone. As different tools have different strengths and drawbacks, so it largely depends on factors like project requirements, availability of skilled resources and budget etc. Good amount of time should be spent on selection of right tool as this may prove to be decisive factor for getting the right results.

The post Top 4 Performance Testing Tools Comparison appeared first on Software QA, Functional, Automation & Load Testing with Arif.

]]>
/top-performance-testing-tools-comparison/feed/ 3
Performance Testing: Key Concepts, Issues & Testing Types /performance-testing-types-concepts-issues/ /performance-testing-types-concepts-issues/#comments Sun, 23 Aug 2015 18:08:23 +0000 /?p=1067 As more businesses have turned towards IT based solutions, it has resulted in continuous development of large scale & complex applications; which are expected to serve large number of users. Most of users from this era have near-zero tolerance level for poor or slow performing applications. Statistics tell that slow performance of any application leaves a […]

The post Performance Testing: Key Concepts, Issues & Testing Types appeared first on Software QA, Functional, Automation & Load Testing with Arif.

]]>
As more businesses have turned towards IT based solutions, it has resulted in continuous development of large scale & complex applications; which are expected to serve large number of users. Most of users from this era have near-zero tolerance level for poor or slow performing applications. Statistics tell that slow performance of any application leaves a very negative impact on end users; which ultimately affects the business revenue.

To tackle these factors, it is must to have performance testing as an integral part of test plan. We can define Performance testing as “a non-functional software testing technique which determines responsiveness, stability, reliability and resource usage of system under a certain user load”.

Performance testing can be further categorized into different types; which are conducted by testing teams as per project requirements. Before going into details of performance testing types, we will first look into common performance issues found in software applications and the factors that can be used to identify these performance issues.

a)  Load Time: Load time is mostly associated with the time taken by a page to load or the initial time which any desktop, mobile application takes to start completely. This time should be as low as possible. According to industry standards it should be less than 5 seconds in case of web pages and less than 5-10 seconds in case of most mobile and desktop applications.

b) Response Time: Response time usually indicates the performance of an individual transaction or query. It is the time which starts from sending a request till the time of receiving response. Lower response time indicates good performance and higher response time indicates performance issues in application which need to be traced.

c) Performance Bottlenecks: Some common performance bottlenecks are related to CPU, memory and network utilization. To trace and resolve bottlenecks different approaches and tools can be used at different levels.

  • at application level, developers can look into code to find poor algorithms and code inefficiencies
  • at database level, database administrators can use profilers and improve queries
  • at operating system level, system engineers can use performance monitors to find resource usage and ensure that it remains below the industry standard of 60%

Performance Testing Types:

Since the nature of performance issues vary from system to system; therefore we have various performance testing types which are normally performed by professional performance testers to identify performance issues. All these testing types have been given unique names as per their approaches but ultimately all these testing types come under the umbrella of performance testing.

Performance Test: A performance test is any test that can be used to measure performance, capacity, reliability, scalability and/or response/throughput time of software application.

Load Test: It is the type of performance testing which is used to understand performance behavior of any system under a specific user load for specific period of time.

In this approach, load is constantly increased on the system until the threshold value reaches. Increasing load means increasing the number of concurrent users and the transactions they are performing. This approach helps in identifying performance metrics like response time, throughput time, resource utilization etc. Similar load tests can be executed before and after code changes to check the difference in performance metrics. Such usage of load test is also termed as ‘Benchmark performance testing’.

For example, we have a load test for total 1000 concurrent users for total time span of 30 minutes. So, this test can be started from 10 users which can be constantly increased to 1000 concurrent users in time span of 30 minutes.

Stress Test:  It is the type of performance test which is used to measure stability of system by testing it on its upper capacity limits and then pushing it beyond its capacity; while keeping the hardware resources constant. Because of this approach, it is considered a negative type of performance testing; as the objective here is to break the system under the extreme / unexpected conditions.

Software teams use this performance testing approach to identify the system components which fail first under soak test. These components are then tuned and optimized to either do not fail at all or recover more gracefully under extreme conditions.

Spike Test: Spike test is often considered a subset of stress test as in this form of testing; stress on system is put by increasing the number of users suddenly by a very large amount. Spike test can be defined as type of performance test; which is carried out to validate the performance characteristics of system when the load volumes are repeatedly increased beyond expected levels within short periods of time.

The objective of spike test is to determine whether the system will be able to sustain the sudden user load beyond expectation.

Soak Test: Soak test also known as endurance test, is a type of performance test in which load is put on system for a longer duration of time. Soak test duration can range from couple of hours to even a day.

Soak testing is performed because an application/server may work well for an hour or two, but may start giving issues if continuous load is exerted for a longer period of time. These issues normally arise because of memory leaks or because of hardware limitations and soak testing is very useful in finding such issues.

Capacity Test: Capacity test is a common type of performance testing which is used to determine how many users application can handle easily before its performance becomes unstable or unacceptable.

Capacity performance testing is often considered very important as it helps in determining the number of users which the application/server can handle easily. Results from capacity tests can be used to further optimize the usage of hardware resources or tune the application as per requirements.

End Note:

In this blog, I did a brief overview of Performance testing and its major types. Performance testing is a vast domain and certainly there are many other areas which must be explored to understand the performance testing from its core. In future I will be exploring key software performance metrics and top performance testing tools like JMeter and LoadRunner. If you have a request for specific topic or have any feedback on this blog then do share it in comments section.
Arif Masood

The post Performance Testing: Key Concepts, Issues & Testing Types appeared first on Software QA, Functional, Automation & Load Testing with Arif.

]]>
/performance-testing-types-concepts-issues/feed/ 1
2 Easy ways to set Environment variables in Linux /easy-ways-set-environment-variables-linux/ /easy-ways-set-environment-variables-linux/#respond Wed, 24 Sep 2014 19:23:59 +0000 /?p=1030 Environment variables are the ‘strings’ that hold a value related to environment of operating system, which in turn can be used by different programs or processes. Most environment variables are automatically set up, while software is being installed. But in some scenarios, software developers and testers need to set environment variables manually, while working in development or […]

The post 2 Easy ways to set Environment variables in Linux appeared first on Software QA, Functional, Automation & Load Testing with Arif.

]]>
Environment variables are the ‘strings’ that hold a value related to environment of operating system, which in turn can be used by different programs or processes. Most environment variables are automatically set up, while software is being installed. But in some scenarios, software developers and testers need to set environment variables manually, while working in development or testing environments. Setting up Path and Home variables for Java, Maven and Apache tomcat Catalina is a common example of it.

In this blog, I will take you through the steps to set environment variables in Linux (and its flavours like Fedora). If you are looking to set environment variables in windows then visit my other blog ‘3 Easy steps to set Environment variables in Windows’. Coming back to Linux, I will use the following examples in this tutorial:

1. JAVA_HOME and JAVA Path variables (Java)
2. CATALINA_HOME (Apache Tomcat)

Before moving on to actual steps, you should know that in Linux you have option to either set environment variables permanently or for a single session. Similarly, you also have the option to set environment variables for single user or all users. Let us start from steps to set environment variables for a single session. Let’s start with most easiest but temporary way of setting these variables.

1- Temporarily set environment variables in Linux:

Setting up environment variables for single session is very easy and if you are in a scenario where you will not need to use it again then it is best choice for you. You may also use this approach if you frequently need to test in different environments using different versions of processes.

To add Java home and path variable run following commands in linux terminal:

export JAVA_HOME=/root/java/jdk-xyz
export PATH=$PATH: /root/java/jdk-xyz/bin

Replace /root/java/jdk-xyz and /root/java/jdk-xyz/bin by path of JDK root and bin directory paths. You can find these paths by ‘whereis’ command or through GUI if you are using Fedora etc.

set Java environment variables Linux Terminal
set Java environment variables Linux Terminal

Similarly, to add Tomcat CATALINA_HOME variable, run following command on Terminal:

export CATALINA_HOME=/root/tomcat

Where ‘/root/tomcat’ is the path of apache tomcat directory in your system.

2– Permanently set environment variables in Linux:

To set environment variables permanently, we need to put commands in system files. It means that whenever Linux OS will start, these commands will be automatically executed. We can use this approach to add permanent variables for single user or all users.

For Single user:

To add permanent variables for a single user, we will need to make changes to profile file of the user. Path to this file is ‘/etc/profile’
If we have a GUI (like fedora), then we can simply navigate to this path under system files and edit it. Alternatively, we can access file by using following command in terminal…

vi /etc/profile

Once we are inside the file, we can put ‘export commands’ at end of file to add required variables. After that we can save and exit.

export JAVA_HOME=/root/java/jdk-xyz
export CATALINA_HOME =/root/tomcat-xyz
export PATH=$PATH:/root/java/jdk-xyz/bin

To activate new changes, we can either logout-login or run following command in terminal:

source /etc/profile

For ALL users:

To add permanent variables for all users, we will need to make changes to bashrc file which is located at ‘/etc/bashrc’

If we have a GUI, then we can simply navigate to this path under system files and edit the file. Alternatively, we can access file by using following command in terminal…

vi /etc/bashrc
set environment variables in Fedora (Linux) TesterLogic
set environment variables in Fedora (Linux) – TesterLogic

Once we are inside the file, we can put export commands at end of file to add required variables. After that we can save and exit.

export JAVA_HOME=/root/java/jdk-xyz
export CATALINA_HOME =/root/tomcat-xyz
export PATH=$PATH:/root/java/jdk-xyz/bin

To activate new changes, we can either logout-login or run following command in terminal:

source /etc/bashrc

Verify successful addition of environment variables:

To verify new variables, you may run following commands in Linux terminal:

set
echo $PATH
echo $CATALINA_HOME
echo $JAVA_HOME
java –version

Found this blog useful? or still having issues in setting up environment variables? Feel free ask in comments. I will be pleased to help : )

The post 2 Easy ways to set Environment variables in Linux appeared first on Software QA, Functional, Automation & Load Testing with Arif.

]]>
/easy-ways-set-environment-variables-linux/feed/ 0
Introduction to Apache Tomcat for Dummies /introduction-apache-tomcat-dummies/ /introduction-apache-tomcat-dummies/#respond Mon, 15 Sep 2014 17:07:37 +0000 /?p=976 Apache Tomcat is basically an open source [tooltip text=”A web server application is one that delivers content and service over the Internet.” trigger=”hover”]web server application[/tooltip] that executes Java servlets and renders web pages containing Java Server Page coding, thus providing a ‘purely Java’ environment for Java code to run. In simpler words, if you are […]

The post Introduction to Apache Tomcat for Dummies appeared first on Software QA, Functional, Automation & Load Testing with Arif.

]]>
Apache Tomcat is basically an open source [tooltip text=”A web server application is one that delivers content and service over the Internet.” trigger=”hover”]web server application[/tooltip] that executes Java servlets and renders web pages containing Java Server Page coding, thus providing a ‘purely Java’ environment for Java code to run. In simpler words, if you are using applications developed on top of Java technologies (JSP, Servlet) then Apache Tomcat is best choice for it.

Following are some of the key points that you should know about Apache Tomcat server…

  • Apache Tomcat was previously called as Jakarta Tomcat
  • Apache Tomcat is composed of components like Catalina, Jasper JSP and Coyote
  • Apache Tomcat server is available in both Binary and open-source versions
  • Apache Tomcat server requires Java Runtime environment (JRE) as a prerequisite
  • Apache Tomcat server can be used as a standalone product or can be integrated with other web servers like Microsoft IIS, Netscape Server and Apache HTTP server

Difference between Apache HTTP and Apache Tomcat:

Apache is the name of organization that developed both Apache HTTP and Apache Tomcat. Even though these are two different tools but in real time scenarios they are often used together as they compliment each other. Following are some key points that differentiate them from each other.

Apache HTTPApache Tomcat
Apache HTTP is primarily a web server written in CApache Tomcat is primarily a servlet and JSP container based on Java
Apache HTTP server is good for serving static content but it can also serve dynamic content if used with add-onsApache Tomcat is good for hosting servlets and JSPs but it can also host static content (though it is not preferable)
Apache HTTP is used mostly where we have to run PHP, Perl application and CGI scriptsApache Tomcat is used where we have to run servlets and JSPs (as they are not supported by Apache HTTP)

Benefits of Apache Tomcat from Testing perspective:

As Tomcat can be used as a standalone PC application, therefore it can be really helpful in testing tasks where we can turn local machine into a server by Tomcat and execute any testing task.

You can find further instructions to download, install and configure Tomcat on Tomcat official page. Do try it and share your experience and feedback with us!

The post Introduction to Apache Tomcat for Dummies appeared first on Software QA, Functional, Automation & Load Testing with Arif.

]]>
/introduction-apache-tomcat-dummies/feed/ 0
Guide to Configure NetBeans IDE for C++ /guide-configure-netbeans-ide-c/ /guide-configure-netbeans-ide-c/#comments Sun, 14 Sep 2014 20:26:52 +0000 /?p=932 Recently in a project, I had to test some APIs using C++. To setup the testing environment, I did some R&D and decided to use NetBeans IDE for C++. Decision was based on many factors but mainly it was because of some project requirements. As we all know NetBeans is primarily a Java IDE, but […]

The post Guide to Configure NetBeans IDE for C++ appeared first on Software QA, Functional, Automation & Load Testing with Arif.

]]>
Recently in a project, I had to test some APIs using C++. To setup the testing environment, I did some R&D and decided to use NetBeans IDE for C++. Decision was based on many factors but mainly it was because of some project requirements. As we all know NetBeans is primarily a Java IDE, but it also has a very good support for C++ as well. In NetBeans, we can work with C/C++ applications by using dynamic or static libraries.  We can also start projects from existing code, and there are many advanced features that make it a very good option to work on c++. In this blog I will walk you through the steps that you will need to perform to completely setup the NetBeans IDE and make it ready to work on C++ projects.

1-Download the suitable version NetBeans IDE from NetBeans Download Page. You can either choose the Full version containing all components or the CPP version with components required for C/C++.

2- Install the NetBeans. It is quite simple and straight forward process to do it. If you face any difficulty let me know in comments or consult the NetBeans on site guide.

3- After the NetBeans is successfully installed, open it and check if c++ is already integrated or not.

You can check it by going to menu >>> File > New Project > and see if c++ directory is displaying or not. If it is displaying, then it means that C++ is integrated and you can move to step-5. Otherwise follow the process in step-4

4- If directory is not displaying, then it means that we need to install plugin for c++

We can do it by going to menu >>> Tools > Plugins > Available Plugins > C++

Select it and Install (Select download server of your choice and accept to agreement)

After the Plugin has been installed, restart the IDE.

5- On this stage, you can try to create a new c++ project to verify if everything is ready. While doing so you might get the following error message..

Build host is not connected. Compiler is not set for NetBeans c++.

If you observe this message, then it means that c++ compilers and tools are missing from your system and you need to install them to work with c++ projects. For installing compilers we have options to either install Cygwin  or MinGW. I found that MinGW is easier to proceed so I decided to go with it. Following are the steps to install and configure MinGW…

a) Download the MinGW exe. I used following Softpedia link to download MinGw.

Once downloaded, Run the MinGW installer and choose to install the required components. I selected all of them (except MinGW make, as we will be using make from MSYS, as instructed in NetBeans official guide. We will download and configure it in later steps.). This installation process can take some time depending on net connection as some components will be downloaded during installation. After the installation has been completed add the MinGW directory to Windows Environment variables “path”.

It can be done by following these steps…

Windows> Start > Settings> Control panel> Settings > Advanced > Environment Variables..

Edit already present "path" in the list, and enter compiler directory path after a semi column ; like this..

;C:\MinGW\bin

Click OK.

If you still face any issues in setting up enviornment variables then visit my detailed blog on ‘How to setup windows environment variables’.

b) Next you need to  download and install MSYS exe and run it.

To avoid any issues and conflicts, it is preferable to choose MinGW directory as the destination installation directory for MSYS.

c) After MSYS installation, next we need to install gdb Debugger. Visit this download gdb Debugger link to download it.

After all these installations are finished, restart NetBeans IDE.

Now to very ending steps:

Go to TOOLS > OPTIONS > C++ > BUILD HOST>>

Press ADD button to add build host..
Browse to C:\MinGW\bin in Base Directory.
Select MinGW in Tool Collection family and Tool collection Name.. (or they will automatically get selected)

mingw-netbeans-add (1)

Press OK.

 After going through all these steps, you are ready to work with NetBeans IDE for C++. If you have any confusion in above steps or face any other issue then feel free to ask in comments.

The post Guide to Configure NetBeans IDE for C++ appeared first on Software QA, Functional, Automation & Load Testing with Arif.

]]>
/guide-configure-netbeans-ide-c/feed/ 1
Implementing Assert and Verify logic in Selenium WebDriver /assert-verify-logic-selenium-webdriver/ /assert-verify-logic-selenium-webdriver/#comments Mon, 08 Sep 2014 19:24:17 +0000 /?p=901 One of the actions that we always need to perform while doing test automation is to apply different assertions or verification to check results of automated tests. Selenium IDE has built in VerifyTextPresent, AssertElementPresent commands. But how we do it in Selenium WebDriver? There are definitely many ways to do it in Slenium WebDriver with support of […]

The post Implementing Assert and Verify logic in Selenium WebDriver appeared first on Software QA, Functional, Automation & Load Testing with Arif.

]]>
One of the actions that we always need to perform while doing test automation is to apply different assertions or verification to check results of automated tests. Selenium IDE has built in VerifyTextPresent, AssertElementPresent commands. But how we do it in Selenium WebDriver? There are definitely many ways to do it in Slenium WebDriver with support of testing frameworks like JUnit or TestNG etc. In this blog, I will discuss few of those approaches that can be used with Selenium WebDriver to..

  1. Verify/Assert Text Present
  2. Verify/Assert Element Present

1.1 Verify Text Present

In many test automation scenarios, before or after the test step we need to check if the specific text is displaying or not. We donot our test scripts to stop irrespective the result (text found or not). To achieve this objective, we have various approaches that can be used. In below I have shared some of the java code examples that can be used to implement this strategy.

if(driver.getPageSource().contains("Text - Testing with Arif"))
{
System.out.println("Text is Present");
}
else
{
System.out.println("Text is not Present");
}

OR

try {
assertTrue(driver.findElement(By.cssSelector("BODY")).getText().matches("^[\\s\\S]*verify text is present[\\s\\S]*$"));
} catch (Error e) {
verificationErrors.append(e.toString());
}

OR

driver.findElement(By.xpath("//span[contains(.,'Transaction was added successfully')]"));
System.out.println("Transaction successful");

OR

try {
assertEquals("VerifyText in Element", driver.findElement(By.cssSelector("div.bbMargin")).getText());
} catch (Error e) {
verificationErrors.append(e.toString());
}

1.2 Assert Text Present

Similarly, in testing scenarios where we want our scripts to stop if certain assertion fails, we can use assert methods from Junit, TestNG (and other alternative frameworks) to implement the assertion strategy. In below are some examples of assertions on text.

assertTrue(driver.getPageSource().contains("1,500.00"));
System.out.println("1500.00 found in page source");

OR

assertTrue(driver.findElement(By.cssSelector("BODY")).getText().matches("^[\\s\\S]*assert text is present[\\s\\S]*$"));

OR

assertEquals("1,500.00", driver.findElement(By.cssSelector("div.eoh.")).getText();
System.out.println("1500 found written in div");

OR

assertTrue(driver.findElement(By.cssSelector("BODY")).getText().matches("^[\\s\\S]*Record found successfully[\\s\\S]*$"));

OR

assertTrue(findElement(By.id("myElement")).getText().equals("foo");


2.1 Verify Element Present

Selenium WebDriver has some built-in methods that can be used with TestNG or Junit methods to implement Element verification logic. Few code examples are given below.

!driver.findElements(By.id("xyz")).isEmpty();

OR

if(isElementPresent(By.linkText("Submit")))
{
System.out.println("SUBMIT Link/Button found");
}
else
{
System.out.println("SUBMIT Link/Button not found");
}

OR

try {
assertTrue(isElementPresent(By.cssSelector("div.bbMargin")));
} catch (Error e) {
verificationErrors.append(e.toString());
}

2.2 Assert Element Present

IsElementPresent method from Selenium WebDriver API can be used together with AssertTrue method to implement Element assertion logic as demonstrated in code below.

assertTrue(isElementPresent(By.cssSelector("div.bbMargin")));

OR

Alternatively, If you want to assert Element Not Present, then you can use following example, which verifies that there are NO matching elements present in DOM and returns the value of zero. So when zero value is returned, assertion will pass. On other hand if there is any matching element present then zero will not be returned and assertion will fail.

Assert.assertEquals(0, wd.findElements(By.locator("locator")).size());

 


End Note: These are just few of the verification/assertion methods. There are many other approaches as well to do it. Have you ever used these in your test automation scripts? Or would like to recommend a better approach to our readers! Please share your thoughts and experiences in comments section.

The post Implementing Assert and Verify logic in Selenium WebDriver appeared first on Software QA, Functional, Automation & Load Testing with Arif.

]]>
/assert-verify-logic-selenium-webdriver/feed/ 1