Monday, 5 March 2012

Loadrunner Simulation With Safari


How to Simulate the Load from Safari Browser
There was an interesting requirement where we had to simulate Safari browser at the time of  load execution.This article provides information on how to achieve this.

Client Requirement:-
  • Recently we were involved in a PoC to check the feasibility of SalesForce.com with LoadRunner.
  • There was one interesting requirement that the customer wanted to simulate the load from Safari browser.
  • The reason behind this is that the SalesForce.com will be primarily accessed by Sales team who will be mostly traveling using iPad with Safari browser.
Challenge:-
  • By default, LoadRunner supports only I.E, Mozilla & Netscape browsers.
  • And it does not support safari to emulate the load.
Analysis and Solution:-
  • This can be achieved through Custom settings in loadrunner.
  • For this all we need is safari – User Agent String that suits our requirement.
The following is an example of Safari – user agent string:

Mozilla/5.0 (iPad; U; CPU OS 4_3 like Mac OS X; nl-nl) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8F190 Safari/6533.18.5

*Please note for recording you can use any browser and simulate the user load with any required browser using User Agent String as above.

Friday, 2 March 2012

Cloud Computing – Technical Evolution


There is a growing belief that over the next five years, Cloud Computing will become a major stimulus for change in how corporations view and use information technology.

Cost, efficiency, scalability and availability are the main drivers in the discussion regarding cloud computing. Security and privacy are the main issues, which needs to be dealt with when using services in the cloud.

Trestle group consulting” made a Group research publication which talks about the Technical Evolution that’s under Cloud Test. The below articles says all about it.

Cloud computing?

Over the last decade, sourcing has become one of the most commonly used methods for a business to acquire services. The expression Cloud Computing is widely used in IT and business circles. Many users, however, are confused as to what the underlying service actually is and how it can be integrated into their IT and business process landscape.

The organizations see Cloud Computing as a model that enables access to a configurable computing resource, which is easily accessible with no or only minimal Service Provider input. It is a “Flexible and on a need-based IT service”.

One of the many advantages for the user is the fact that instead of high upfront Fixed cost investments, most if not all, costs are variable and can be spread over the duration of the usage. Cloud Computing can be seen as the next level of sourcing.

In the following section, we summarize the different types of Cloud Computing options depending on services delivered.

Cloud Computing Layers

Cloud computing itself can be separated into three service models, also defined as service layers.

Layer 1: Infrastructure as a Service (IaaS), offering virtual IT infrastructure (i.e., hardware, storage)

Layer 2: Platform as a Service (PaaS): offering virtual application infrastructure services (i.e.. database and middleware)

Layer 3: Software as a Service (SaaS): offering virtual application services (i.e.. applications and processes)
As in other service offerings, Cloud Services cover those specifics supplied by the service provider for a user or a specific set of users. The diagram below shows how users access the Cloud.

Cloud Services and Participants

Trestle Group Recommendations

Based upon the experience gained during reviews at customer locations, Trestle Group recommends the following points to be considered when evaluating Cloud as an IT- and/or Business-driven solution.

Before engaging in Cloud Computing, initiate a project that reviews existing processes and products. The review process should go through the following steps in order to optimize use of Cloud Services:
  • Evaluate the actual level of process automation within the business being serviced.

  • Identify the opportunities (from an IT and process perspective) within the existing operating model to virtualizes services.
  • Analyze level of automation of processes and identification of potential by using the Cloud for virtualized processes.
  • Introduce those selected services into the Cloud and define how to integrate the Cloud services into the existing IT/Process Environment.
Within Cloud Computing, a variety of technically innovative solutions are combined and can deliver the potential for an innovative business approach leading to cost reduction, cost structure improvement, variability of cost, flexibility of services and ultimately entire new business models.

Security, Legal and Regulatory Aspects of Cloud Computing

Within the Cloud, users expect to find an identical security framework as generally available in traditional IT environments. Items such as controlled access, data security and data protection need to be ensured and not assumed.
The following points are considered when it comes to Security under Cloud Computing :
  • Between the supplier and the user, SLAs need to be defined to ensure transparency of services supplied, especially in the case of outages.
  • In principle, Cloud Computing, as a new form of sourcing, does not lead to new challenges on a legal and regulatory basis.
  • The importance of reviewing the security and the legal & regulatory aspects increases significantly when Public Clouds are being used.
  • It is up to the providers to set-up the necessary frameworks that guarantee the user a secure processing environment adhering to the legal standards, rules and regulations within the country the user is registered in.
  • Prior to using Cloud Services, organizations should obtain a clear and transparent overview from the supplier which services are performed under which conditions.
  • The definition of clear, agreed upon SLAs and KPIs covering availability, quality of service and adherence to data security and legal/regulatory requirements is essential.
  • Once the overall structure of the services is defined, details should be documented in a contract defining duration of the services, payment cycles and clauses for termination and liability in case of non-delivery.
  • Additionally, organizations should include what needs to be done when services are taken out of the Cloud or obtained from a different supplier.

Conclusion

All major providers offer services in the Cloud, which can bring enormous advantages to large, small and midsized companies when properly implemented and used. A clear understanding of the different types of Cloud Services and their advantages, disadvantages and related risks need to be evaluated prior to making a decision on how to use the Cloud.

There are challenges in implementing Cloud services, which are similar to those inherent in IT sourcing engagements and can be successfully dealt with when addressed in a structured way.

The recommendations outlined in this post should serve as a starting point to effectively address a number of challenges under industries which enables to evaluate to which extent the available cloud services can be used in an optimal and secure manner.

Wednesday, 29 February 2012

Database Tuning


Why Database Tuning?

It is a primary responsibility of a performance Engineer to provide tuning recommendations for a database server when it fails to respond as expected.
Performance tuning can be applied when you face the following scenarios:-
  • If the real user waiting time is high
  • To keep your database updated on par with your business
  • If you want to use your hardware optimally
General Tuning Recommendations
  • SQL Query Optimization:-
Poorly written SQL queries can push any database to respond badly. It is widely accepted that 75% of performance issues arise due to poorly written SQL. Manual Tuning of SQL query is practically difficult; but we have more SQL Profiler tools available in the market.

The following types of SQL Queries are suggested to use

✔  Avoid table scan queries – especially long table scans.
✔  Utilize the indexes promptly.
✔  Avoid complex joins wherever possible – especially unions.
  • Memory Tuning
Most of the Oracle Database can operate efficiently by utilizing its memory structures instead of disk IO’s.

The theme behind this is - A read from (or) write to memory is much faster than a read from (or) write to disk.


For efficient Memory
✔  Ensure that the buffer hit ratio, shared pool (library and dictionary hit ratio) meet the recommended levels.
✔  Properly size all other buffers including the redo log buffer, PGA, java pool, etc.
  • Disk IO Tuning
It is crucial that there be no IO contention on the physical disk devices. It is therefore important to spread IO’s across many devices.

Spreading data across disks to avoid I/O contention

✔  You can avoid bottlenecks by spreading data storage across multiple disks and multiple disk controllers:
✔  Put databases with critical performance requirements on separate devices. If possible, also use separate controllers from those used by other databases. Use segments as needed for critical tables and partitions as needed for parallel queries.
✔  Put heavily used tables on separate disks.
✔  Put frequently joined tables on separate disks.
✔  Use segments to place tables and indexes on their own disks.
✔  Ensure that indexes are properly tuned.
  • Sorting Tuning
Ensure that your sort area size is large enough so that most of your sorts are done in memory; not on disk.
  • Operating System Concerns
Ensure that no memory paging or swapping is occurring.
  • Lock Contention
Performance can be devastated if a user waiting for another user to free up a resource.
  • Wait Events
Wait events help to locate where the database issues may be.

Conclusion

In an actual Load Testing, it is an essential practice to simulate the database as in production. Due to this, a lots of database issues may be encountered. The above given solutions are general tuning mechanisms for any database. These solutions may be ideal for most of the performance issues in a database.

Thanks For Reading This Blog. Please Visit At: Database Tuning Know More

Tuesday, 28 February 2012

Performance Testing in the Cloud


What is Cloud?

A cloud consists of three components, one or multiple datacenters, a network and a “zillion” number of devices. That’s what it’s all about, the components and their interaction. Ultimately the user is interested in the end-to-end experience, regardless of the components.

A cloud is grouped into private or public cloud based on the location of the data center where the services are being virtualized. In general, a public cloud is an environment that exists outside the purview of company firewall, could be a service/technology offered by a third party vendor while private cloud acts behind the firewall for the exclusive benefit of an organization and its customers.


Source : HP

Testing and the Cloud
While many companies are approaching cloud computing with cautious optimism, testing appears to be one area where they are willing to be more adventurous. There are several factors that account for this openness toward testing in the cloud:

Testing is a periodic activity and requires new environments to be set up for each project
  Test labs in companies typically sit idle for longer periods, consuming capital, power and space.   Approximately 50% to 70% of the technology infrastructure earmarked for testing is underutilized, according  to both anecdotal and published reports.

Testing is considered an important but non-business-critical activity. Moving testing to the cloud is seen as a safe bet because it doesn’t include sensitive corporate data and has minimal impact on the organization’s business-as-usual activities.

Applications are increasingly becoming dynamic, complex, distributed and component- based, creating a multiplicity of new challenges for testing teams. 
For instance,mobile and Web applications must be tested for multiple operating systems and updates,multiple browser platforms and versions, different types of hardware and a large number of concurrent users to understand their performance in real-time. The conventional approach of manually creating in-house testing environments that fully mirror these complexities and multiplicities consumes huge capital and resources.

Why Opting for Cloud Computing as source of Performance testing
Many companies use their Web sites for sales and marketing purposes. In fact, a company can spend millions of pounds creating engaging content and running promotional campaigns to draw users to its site. Unfortunately, if the site crashes or response time crawls all that time, energy and money could be wasted.
A first case is when demand for a service varies with time. Provisioning a data center for the peak load it must sustain a few days per month leads to underutilization at other times, for example. Instead, Cloud Computing lets an organization pay by the hour for computing resources, potentially leading to cost savings even if the hourly rate to rent a machine from a cloud provider is higher than the rate to own one. A second case is when demand is unknown in advance.

For example, a web startup will need to support a spike in demand when it becomes popular, followed potentially by a reduction once some of the visitors turn away. Finally, organizations that perform batch analytics can use the ”cost associativity” of cloud computing to finish computations faster: using 1000 EC2 machines for 1 hour costs the same as using 1 machine for 1000 hours. For the first case of a web business with varying demand over time and revenue proportional to user hours, we have captured the tradeoff in the equation below.The left-hand side multiplies the net revenue per user-hour by the number of user-hours, giving the expected profit from using Cloud Computing. The right-hand side performs the same calculation for a fixed-capacity datacenter by factoring in the average utilization, including nonpeak workloads, of the datacenter. Whichever side is greater represents the opportunity for higher profit.

Cloud Areas and their Differentiators:
  • Private cloud is on premise, dedicated to one organization, often located in the same datacenter(s) as the legacy applications; address the needs of mission critical applications and applications having access to large amount of confidential data.
  • Hosted private cloud is really a variant of the previous category, located either in the client’s or the hoster datacenter, but managed by a hosting provider. It addresses the same needs as the private cloud.
  • Virtual private cloud is a single or multi-tenant environment, located in a clearly defined geography, with documented and auditable security processes & procedures, clear SLA’s, addressing the needs of business critical applications. Formal contracts are established, payment is by consumption, but with regular invoices. Access to the environment can be over the internet, VPN or leased lines. HP calls this an Enterprise Class Cloud.
  • Public Cloud is a multi-tenant environment providing IaaS, PaaS and/or SaaS services on a pay- per-use basis without formal contracts. Payment is typically via credit card. Such environments address the needs of web applications, test & development, large scale processing, (if not too much data needs to be transferred).


Source: HP

The first two categories are asset intensive and typically do not lend themselves to a pay-per-use model; the latter two are pay-per-use. The first two are typically single tenant, this means they are used by one organization; the latter two are most often multi-tenant environments where multiple companies share the same assets.

Performance Testing in Cloud – Benefits & Limitations:
• Fast provisioning using preconfigured images. You can set up the infrastructure you need in minutes.

• Simplified security. All required protections are set up by default, including firewall, certificates, and encryption.

• Improved scalability. Leading load testing solution providers have negotiated with cloud providers to allow users of their software to employ more virtual machines (for the purpose of load testing) than are allowed by default.

• A unified interface for multiple cloud providers. Load testing solutions can hide provisioning and billing details, so you can take maximum advantage of the cloud in a minimum of time.

• Advanced test launching. You can save time and effort by defining and launching load generators in the cloud directly from the load testing interface.

• Advanced results reporting. Distinct results from each geographic region involved in the test are available for analysis.

Limitations:
Although testing from the cloud is, in many cases, more realistic than testing in the lab, simply moving to the cloud is not enough to ensure the most realistic tests. Real users often have access to less bandwidth than a load generator in a cloud data center. With a slower connection, the real user will have to wait longer than the load generator to download all the data needed for a web page or application. This has two major implications:

• Response times measured as-is from the cloud with virtually unlimited bandwidth are better than for real users. This can lead test engineers to draw the wrong conclusions, thinking that users will see an acceptable response time when in reality they will not.

• The total number of connections established with the server will increase, because on average, connections for real users will be open longer than connections for the load generator. This can lead to a situation in which the server unexpectedly refuses additional connections under load.

Conclusion: The benefits of Cloud Computing Solution cannot be ignored by companies running Performance tests striving to overcome the constraints of their current IT hardware to simulate the realistic environment whilst struggling to justify the cost of investing in major upgrades.

Protocol – In Performance Testing View


Protocol in performance testing view is “Communication Protocol”. Communicating between the physical systems; it may be a Load Generator, Application and Web servers.

The key elements of a protocol are:

Syntax: Include Time data formats and signal levels.
Semantics: Includes control information and error handling.

Communication Protocol is a set of rules and regulations that determine how data is transmitted between the systems or a communications protocol is a system of digital message formats and rules for exchanging those messages in or between computing systems.

Protocols include sending, receiving, authentication and error detection and correction capabilities. Protocols are used for communications between entities in a system. Entities use protocols in order to implement their service definitions.

Multiple protocols could be used in different circumstances. Also communication Protocols are used as a suite or layering.  For Example: Internet Protocol (Web) suites consists application, transport, internet, and network interfaces.

Below listed communication protocols for performance testing could be used by Hexaware Performance Testing CoE.
  • Web – HTTP/HTTPS
  • J2EE
  • Citrix
  • .NET (Client & Web)
  • ERP – PeopleSoft (SAP, Siebel, Oracle Apps)
  • Web Services
  • SQL
  • Client – Server (COM/DCOM)
  • Mobile
  • Action Message Format (AMF)
  • AJAX (Click and Script)
Classification schemes for protocols usually focus on domain of use and function. Based on the application communication protocol could be selected or performance testing tool adviser is used to finalize the protocol.
From the above synopsis we could understand; what is protocol? How it works and an example for protocol layering/suite then which protocols is used by Hexaware performance testing CoE. And then final paragraph explains; how it is used or identifies the protocol for a particular domain, application or business functions.

Thanks For Reading This Blog. Know More Visit At: Performance Testing