Showing posts with label Independent software testing. Show all posts
Showing posts with label Independent software testing. Show all posts

Wednesday, 16 December 2015

Stress Testing of Web Applications



Stress Testing is performed to identify the issues of the application that can arise only in cases of extreme software and hardware conditions. These conditions may be heavy loads, extreme concurrency or limited resources. Stress Testing identifies the breaking point of the application and related system discrepancies that may occur just before that. Such inconsistencies may be:





- Loss or corruption of data.
- Unnecessary high resource utilization
.- Failure of application components to respond.
- Surfacing of new and un-handled exceptions.

Stress on an application can be due to one or more of the following reasons:

- Excessive user or data
- Denial of service
- Sudden spike in user transactions
- Unexpected outages

Steps for Stress Testing -

Step 1: Identify the test objectives

- The different ways that the system can possibly fail.
- Parameters to consider for building defenses against possible failures.
- Identify the behavior of the system under challenging situations.
- Ensure the stability of the system under stressful conditions.     
   
Step 2: Identify the main scenarios

-  Select scenarios critical to the overall application performance.
- Try operations that affect performance.
- Define scenarios based on potential bottlenecks through load testing and stress test in these areas.

Step 3: Identify the workload

- Incrementally increase the load and record the application performance under such conditions. Here, the key is to test the system with various workloads until a significant failure can be created.
The following activities help to identify the correct workload for stress testing:
- Observe the distribution of work
- Estimate the peak user load
- Simulate the anti-profile workload

Step 4: Identify the metrics

Metrics help to identify the potential problem areas in a system or application.The different types of metric categories are:

- Processor Utilization
- Memory Consumption
- Process recycles
- Available memory
- Utilized memory
- Disk utilization
- Network utilization
- Transaction Rate
- Successful transactions
- Failed transactions
- Successful orders
- Failed orders
- Rate of contention
- Deadlocks
- Thread allocation
- Transaction time

Step 5: Creation of Test Cases

In addition to workload profiles and key scenarios, additional parameters such as performance objectives, workload characteristics, test environment, test data and identified metrics are required to design a test case. The expected results should be mentioned for each test in such a way that the test can be marked as a pass or fail after its execution.

Step 6: Load Simulation

- Validate the test environment as expected.
- Ensure the correct configuration of the test and the test environment for metrics collection.
- Quickly execute a smoke test to ensure that the test script and the performance counters are correctly working.
- Reset and start the system.

Step 7: Result Analysis

Analyze and compare the results as per the accepted level for each metric. In case of any issues:
- Review the design.
- Review the code.
- Run the stress tests in environments where debugging is possible.

Conclusion

In practice, stress testing in generally applied in application testing, transaction testing and system testing. Exploratory stress testing is applied by subjecting the system to conditions that are very unlikely to occur. A stress test is sometimes confused with loadtest, which is a milder form of testing. Stress testing very brutally emphasizes on the robustness, reliability, stability and scalability of a web application.

Wednesday, 2 September 2015

Understanding Performance Testing in Agile Environment

Performance Testing is performed to evaluate the compliance level of an application or software with its initial requirements. It is an integral par Performance Testing is performed to evaluate the compliance level of an application or software with its initial requirements. It is an integral part of the agile process. Its main goal is to test performance and functionality in each sprint. In a traditional development cycle, performance testing usually takes place at the end of the development life cycle. However, this finds its place early in the Agile methodology.  


Managing Performance Testing in Agile Environment
The key element in Agile methodology is its flexibility. To ensure efficiency and thoroughness in this environment, the ways of performance testing may require changes. This approach requires an understanding of the project as a whole and further evaluates the contribution of performance testing into the project. This helps the team to estimate the success criteria for the effort.
Once these criteria are established, a strategy is formed to achieve these criteria by summarizing the testing activities to be performed that will add value at various points of the development cycle. These points refer to project delivery, sprints, iterations or weekly builds. With the continuous evolution in strategy, a performance test and load generation environment will be set up.
 With a strategy and a test set up in place, major tests are planned for the weekly builds. As a build is delivered, the plan is appropriately reported, recorded, revised, reprioritized, added and removed, thus improving the application and the overall strategy as the plan progresses.
Types of Performance Testing performed:
Load Testing is done to verify the application behavior under normal to peak load conditions. It enables to quantify the response time, throughput rate, resource utilization and the breaking point of the application. Endurance Testing determines the performance of the product when subjected to workload volumes over an extended period of time.
Stress test:  It determines the behavior of the application beyond normal to peak load conditions. It reveals errors and faults that arise only under high load conditions. It helps to identify the weak points of the application during extreme load conditions. Spike Test is a subset of stress test that validates the behavior of an application under extreme workload over a short period of time.
Capacity test: This determines the number of users or transactions the system can support.
Testing with JMeter:
JMeter is an open source testing tool in Java with a graphical interface. It is used to measure the performance and load management behavior on a variety of services. It is platform independent and capable of loading performance tests in variety of servers like HTTP, HTTPS, SOAP, Database through JDBC, LDAP, JMS and Mail POP3.It supports various kinds of testing such as Load, Distributed and Functional Testing and can generate heavy load against the application under test. It is capable of performing automated testing using Selenium. It generates the test results in easily understandable formats like chart, table and log file and can be easily installed by running the JMeter Shell script in Linux or by starting the .bat file in Windows.
Additional Considerations for Agile performance Testing:
All significant information must be communicated to the team.
For a major portion of the development life cycle, the testing is about compiling adequate information to enhance the performance as the design and development progresses.
Testing should not be forced on a build simply because it is planned in the strategy. If the current build is not appropriate for testing, then another build should be waited for on which the test can be performed.
Performance testing brings about significant changes in the application architecture, code, hardware and the environment. Hence, the test reports need to be read and understood efficiently to bring about appropriate changes.
Conclusion:
Performance testing in Agile is actually based on the principle of continuously asking what can be done at a point of time to increase the most value of the project. This approach allows managing the test process in a very flexible way. It helps to revise the project vision and context and reprioritize tasks based on their value addition.