Manual Testing Course-Day 13
Manual Testing
What is Automation Testing?
Automation testing is a Software testing technique to test and compare the actual outcome with the expected outcome. This can be achieved by writing test scripts or using any automation testing tool. Test automation is used to automate repetitive tasks and other testing tasks which are difficult to perform manually.
Performance Testing
Performance Testing is a software testing process used for testing the speed, response time, stability, reliability, scalability and resource usage of a software application under particular workload. The main purpose of performance testing is to identify and eliminate the performance bottlenecks in the software application. It is a subset of performance engineering and also known as “Perf Testing”.
The focus of Performance Testing is checking a software program's
- Speed - Determines whether the application responds quickly
- Scalability - Determines maximum user load the software application can handle.
- Stability - Determines if the application is stable under varying loads
Load Testing
Load Testing is a non-functional software testing process in which the performance of software application is tested under a specific expected load. It determines how the software application behaves while being accessed by multiple users simultaneously. The goal of Load Testing is to improve performance bottlenecks and to ensure stability and smooth functioning of software application before deployment.
This testing usually identifies -
- The maximum operating capacity of an application
- Determine whether the current infrastructure is sufficient to run the application
- Sustainability of application with respect to peak user load
- Number of concurrent users that an application can support, and scalability to allow more users to access it.
Stress Testing
Stress Testing is a type of software testing that verifies stability & reliability of software application. The goal of Stress testing is measuring software on its robustness and error handling capabilities under extremely heavy load conditions and ensuring that software doesn't crash under crunch situations. It even tests beyond normal operating points and evaluates how software works under extreme conditions.
In Software Engineering, Stress Testing is also known as Endurance Testing. Under Stress Testing, AUT is be stressed for a short period of time to know its withstanding capacity. A most prominent use of stress testing is to determine the limit, at which the system or software or hardware breaks. It also checks whether the system demonstrates effective error management under extreme conditions.
The application under testing will be stressed when 5GB data is copied from the website and pasted in notepad. Notepad is under stress and gives 'Not Responded' error message.
Need for Stress Testing
Consider the following scenarios -
- During festival time, an online shopping site may witness a spike in traffic, or when it announces a sale.
- When a blog is mentioned in a leading newspaper, it experiences a sudden surge in traffic.
It is imperative to perform Stress Testing to accommodate such abnormal traffic spikes. Failure to accommodate this sudden traffic may result in loss of revenue and repute.
Stress testing is also extremely valuable for the following reasons:
- To check whether the system works under abnormal conditions.
- Displaying appropriate error message when the system is under stress.
- System failure under extreme conditions could result in enormous revenue loss
- It is better to be prepared for extreme conditions by executing Stress Testing.
Goals of Stress Testing
The goal of stress testing is to analyze the behavior of the system after a failure. For stress testing to be successful, a system should display an appropriate error message while it is under extreme conditions.
To conduct Stress Testing, sometimes, massive data sets may be used which may get lost during Stress Testing. Testers should not lose this security-related data while doing stress testing.
The main purpose of stress testing is to make sure that the system recovers after failure which is called as recoverability.
Load Testing Vs Stress Testing
Load Testing | Stress Testing |
---|---|
Load Testing is to test the system behavior under normal workload conditions, and it is just testing or simulating with the actual workload | Stress testing is to test the system behavior under extreme conditions and is carried out till the system failure. |
Load testing does not break the system | stress testing tries to break the system by testing with overwhelming data or resources. |
Types of Stress Testing:
Following are the types of stress testing and are explained as follows:
Distributed Stress Testing:
In distributed client-server systems, testing is done across all clients from the server. The role of stress server is to distribute a set of stress tests to all stress clients and track on the status of the client. After the client contacts the server, the server adds the name of the client and starts sending data for testing.
Meanwhile, client machines send signal or heartbeat that it is connected with the server. If the server does not receive any signals from the client machine, it needs to be investigated further for debugging. From the figure, a server can connect with the 2 clients (Client1 and Client2), but it cannot send or receive a signal from Client 3 & 4.
Night run is the best option to run these stress testing scenarios. Large server farms need a more efficient method for determining which computers have had stress failures that need to be investigated.
Application Stress Testing:
This testing concentrate on finding defects related to data locking and blocking, network issues and performance bottlenecks in an application.
Transactional Stress Testing:
It does stress testing on one or more transactions between two or more applications. It is used for fine-tuning & optimizing the system.
Systemic Stress Testing:
This is integrated stress testing which can be tested across multiple systems running on the same server. It is used to find defects where one application data blocks another application.
Exploratory Stress Testing:
This is one of the types of stress testing which is used to test the system with unusual parameters or conditions that are unlikely to occur in a real scenario. It is used to find defects in unexpected scenarios like
- A large number of users logged at the same time
- If a virus scanner started in all machines simultaneously
- If Database has gone offline when it is accessed from a website,
- When a large volume of data is inserted to the database simultaneously
How to do Stress Testing?
Stress Testing process can be done in 5 major steps:
- Planning the Stress Test. Here you gather the system data, analyze the system, define the stress test goals
- Create Automation Scripts: In this phase, you create the Stress testing automation scripts, generate the test data for the stress scenarios.
- Script Execution: In this stage, you run the Stress testing automation scripts and store the stress results.
- Results Analysis: In this stage, you analyze the Stress Test results and identify bottlenecks.
- Tweaking and Optimization: In this stage, you fine-tune the system, change configurations, optimize the code with goal meet the desired benchmark.
Lastly, you again run the entire cycle to determine that the tweaks have produced the desired results. For example, it's not unusual to have to 3 to 4 cycles of the Stress Testing process to achieve the performance goals
Tools recommended for Stress Testing:
LoadRunner
LoadRunner from HP is a widely-used Load Testing tool. Load Test Results shaped by Loadrunner are considered as a benchmark.
Jmeter is an Open Source testing tool. It is a pure Java application for stress and Performance Testing. Jmeter is intended to cover types of tests like load, functional, stress, etc. It needs JDK 5 or higher to function.
Stress Tester
This tool provides extensive analysis of the web application performance, provides results in graphical format, and it is extremely easy to use. No high-level scripting is required and gives a good return on investment.
Neo load
This is a popular tool available in the market to test the web and Mobile applications. This tool can simulate thousands of users in order to evaluate the application performance under load and analyze the response times. It also supports Cloud-integrated - performance, load and stress testing. It is easy to use, cost-effective and provides good scalability.
Metrics for Stress Testing
Metrics help in evaluating a System's performance and generally studied at the end of Stress Test. Commonly used metrics are -
Measuring Scalability & Performance
- Pages per Second: Measures how many pages have been requested / Second
- Throughput: Basic Metric - Response data size/Second
- Rounds: Number of times test scenarios have been planned Versus Number of times a client has executed
Application Response
- Hit time: Average time to retrieve an image or a page
- Time to the first byte: Time is taken to return the first byte of data or information
- Page Time: Time is taken to retrieve all the information in a page
Failures
- Failed Connections: Number of failed connections refused by the client (Weak Signal)
- Failed Rounds: Number of rounds it gets failed
- Failed Hits: Number of failed attempts done by the system (Broken links or unseen images)
Endurance Testing
Endurance Testing is non-functional type of software testing where a software is tested with high load extended over a significant amount of time to evaluate the behavior of software application under sustained use. The main purpose of endurance testing is to ensure that the application is capable enough to handle extended load without any deterioration of response time.
Endurance Testing is non-functional type of software testing where a software is tested with high load extended over a significant amount of time to evaluate the behavior of software application under sustained use. The main purpose of endurance testing is to ensure that the application is capable enough to handle extended load without any deterioration of response time.
This type of testing is performed at the last stage of the performance run cycle. Endurance testing is a long process and sometimes lasts for even up to a year. This may include applying external loads such as Internet traffic or user actions. This makes endurance testing differ from Load Testing, which usually ends in a couple of hours or so.
Endurance means capacity so in other words, you can term Endurance Testing as Capacity Testing.
What is Volume Testing?
VOLUME TESTING is a type of Software Testing, where the software is subjected to a huge volume of data. It is also referred to as flood testing. Volume testing is done to analyze the system performance by increasing the volume of data in the database.
VOLUME TESTING is a type of Software Testing, where the software is subjected to a huge volume of data. It is also referred to as flood testing. Volume testing is done to analyze the system performance by increasing the volume of data in the database.
With the help of Volume testing, the impact on response time and system behavior can be studied when exposed to a high volume of data.
For example, testing the music site behavior when there are millions of user to download the song.
Benefits of Volume Testing
- By identifying load issues, a lot of money can be saved which otherwise will be spent on application maintenance.
- It helps in a quicker start for scalability plans
- Early identification of bottlenecks
- It assures your system is now capable of real-world usage
What is Functional Testing?
Functional Testing is a testing technique that is used to test the features/functionality of the system or Software, should cover all the scenarios including failure paths and boundary cases.
Functional Testing Techniques:
There are two major Functional Testing techniques as shown below:
The other major Functional Testing techniques include:
Unit Testing
Integration Testing
Smoke Testing
User Acceptance Testing
Localization Testing
Interface Testing
Usability Testing
System Testing
Regression Testing
Globalization Testing
Black-box testing
is a method of software testing that examines the functionality of an application without peering into its internal structures or workings. This method of test can be applied virtually to every level of software testing: unit, integration, system and acceptance.
White Box Testing
White Box Testing is software testing technique in which internal structure, design and coding of software are tested to verify flow of input-output and to improve design, usability and security. In white box testing, code is visible to testers so it is also called Clear box testing, Open box testing, Transparent box testing, Code-based testing and Glass box testing.
Grey Box Testing
Grey Box Testing or Gray box testing is a software testing technique to test a software product or application with partial knowledge of internal structure of the application. The purpose of grey box testing is to search and identify the defects due to improper code structure or improper use of applications.
In this process, context-specific errors that are related to web systems are commonly identified. It increases the testing coverage by concentrating on all of the layers of any complex system.
Gray Box Testing is a software testing method, which is a combination of both White Box Testing and Black Box Testing method.
- In White Box testing internal structure (code) is known
- In Black Box testing internal structure (code) is unknown
- In Grey Box Testing internal structure (code) is partially known
In Software Engineering, Gray Box Testing gives the ability to test both sides of an application, presentation layer as well as the code part. It is primarily useful in Integration Testing and Penetration Testing.
Example of Gray Box Testing: While testing websites feature like links or orphan links, if tester encounters any problem with these links, then he can make the changes straightaway in HTML code and can check in real time.
Why Gray Box Testing
Gray Box Testing is performed for the following reason,
- It provides combined benefits of both black box testing and white box testing both
- It combines the input of developers as well as testers and improves overall product quality
- It reduces the overhead of long process of testing functional and non-functional types
- It gives enough free time for a developer to fix defects
- Testing is done from the user point of view rather than a designer point of view
Gray Box Testing Strategy
To perform Gray box testing, it is not necessary that the tester has the access to the source code. A test is designed based on the knowledge of algorithm, architectures, internal states, or other high -level descriptions of the program behavior.
To perform Gray box Testing-
- It applies a straightforward technique of black box testing
- It is based on requirement test case generation, as such, it presets all the conditions before the program is tested by assertion method.
Techniques used for Grey box Testing are-
- Matrix Testing: This testing technique involves defining all the variables that exist in their programs.
- Regression Testing: To check whether the change in the previous version has regressed other aspects of the program in the new version. It will be done by testing strategies like retest all, retest risky use cases, retest within a firewall.
- Orthogonal Array Testing or OAT: It provides maximum code coverage with minimum test cases.
- Pattern Testing: This testing is performed on the historical data of the previous system defects. Unlike black box testing, gray box testing digs within the code and determines why the failure happened
Usually, Grey box methodology uses automated software testing tools to conduct the testing. Stubs and module drivers are created to relieve tester to manually generate the code.
Steps to perform Grey box Testing are:
- Step 1: Identify inputs
- Step 2: Identify the outputs
- Step 3: Identify the major paths
- Step 4: Identify Subfunctions
- Step 5: Develop inputs for Subfunctions
- Step 6: Develop outputs for Subfunctions
- Step 7: Execute test case for Subfunctions
- Step 8: Verify the correct result for Subfunctions
- Step 9: Repeat steps 4 & 8 for other Subfunctions
- Step 10: Repeat steps 7 & 8 for other Subfunctions
The test cases for grey box testing may include, GUI related, Security related, Database related, Browser related, Operational system related, etc.
Gray Box Testing Challenges
- When a component under test encounter a failure of some kind may lead to abortion of the ongoing operation
- When test executes in full but the content of the result is incorrect.
Summary:
- The overall cost of system defects can be reduced and prevented from passing further with Grey box testing
- Grey box testing is suited more for GUI, Functional Testing, security assessment, web applications, web-services, etc.
- Techniques used for Grey box Testing
- Matrix Testing
- Regression Testing
- OAT or Orthogonal Array Testing
- Pattern Testing
Negative Testing
Negative Testing is a software testing type used to check the software application for unexpected input data and conditions. Unexpected data or conditions can be anything from wrong data type to strong hacking attack. The purpose of negative testing is to prevent the software application from crashing due to negative inputs and improve the quality and stability.
By just doing positive testing we can only make sure our system is working in normal conditions. We have to make sure that our system can handle unexpected conditions to ensure a 100% fault-free system.
Example of Negative Testing
Consider the case of a lift which is a commonly considered example of negative testing
We all know the functionality of a lift. These will be considered as the requirements of a lift like pressing the floor number make the lift go to that particular floor.
The door opens automatically once the lift reaches the specified floor and so on.
Now let's consider some negative scenarios for lift. Some of them are,
|
|
|
|
|
|
All these cases will come under negative testing. The importance of this is that we can't make sure that all the above mentioned won't happen, so we need them contained.
Consider the case that the overweight condition is checked and on implementation, the lift performs abnormal when there is an overweight condition. This will make a potential impact on the reliability of the system and can even cause danger to life. This explains what is negative testing and its importance.
The same case is applied in software also. For negative testing, we have deviated from a normal operational procedure. Let's go through some examples.
Consider a registration form for example.
|
|
|
|
|
|
|
|
As we said earlier, we have to make sure in all these negative cases our system will work properly. Consider the case if someone tries to enter a character in the number field and the system can't process the unexpected data since it is expecting a number, and finally, the system crashes. Or what if someone tries to do an SQL injection and erase all our data from the database. We can't bear such potential losses. So negative testing is important.
Why do Negative Testing?
Since testing is time and cost consuming task, deciding 'what', 'how' and 'how much' to test is really important. We have to choose wisely whether we have to do negative testing in our system or not. So let's have a look at the importance of negative testing.
Organization perspective
It is the responsibility of the organization to provide a good quality product to its client. To achieve this, one has to do negative testing.
As a part of confirmation against a failure, an organization has to do negative testing.
Maybe we can't build a 100% error free system, but we have to make sure that we have done everything to prevent a failure, in order to achieve that we should do negative testing.
The impact is one factor which we have to consider. Consider we have done positive testing on an e-commerce site and make sure everything is fine. But what if there is a loophole in our system that someone can do SQL injection and erase all our data. That will be a great security breach. To avoid this type of cases, one has to do negative testing too.
For applications open for public, mainly websites we have to always keep in mind that we don't have much control the using procedure of the application, so we have to do negative testing to make sure that all such cases are covered and contained.
Another thing we need to take care is that there are a lot of black hackers out there who are looking for an opportunity to destroy the system. Hacking is an important case covered in negative testing
Client perspective
Clients always expect zero vulnerability products, in order to ensure that negative testing is a must
If it is a sensitive product like e-commerce, online stock, etc., then security and negative testing is a must.
The only concern to the client regarding negative testing is that the cost. But once the impact is analyzed it is up to the client to decide whether to do or not negative testing.
How to do negative testing
To do negative testing we have to consider all the possible cases. That is if it is possible we have to consider it in the Test Case no matter whether it is not the right way to use it. For example, if we see an email field think about all possible inputs we can put there other than correct email format. Same way when we see an image upload option, we have to test it with all possible files.
While creating negative test cases we have to prioritize the inputs otherwise, there will be a lot of cases possible. For example, for an image field where only '.png' files are supposed to enter we can have a lot of options to upload like 'jpeg', 'xml', 'xls', etc.. So we need to prioritize the options like XML and SQL can have greater impact than that of jpeg and xls so we should take care of SQL and XML cases first. Like this, we have to prioritize the cases before execution to save time and testing cost.
Pros and cons of negative testing
Like all other testing techniques, there are pros and cons for negative testing mainly based on the 'where', 'when' and 'how' to use. Let's take a look at this.
Advantages of Negative Testing
- As we all know negative testing is very important to ensure the quality of a product. A good quality product is a zero vulnerability product, to ensure that negative testing is very important.
- Doing negative testing makes sure that all possible cases are covered. Intentionally or unintentionally there is a chance of negative test cases to occur. So to make sure all cases are covered we have to do negative testing along with positive testing.
- Negative testing will make more confidence to the client before going live.
Disadvantages of Negative Testing
- In Software Engineering, Negative testing in some cases becomes a waste of time and energy. In many cases, there is no need for excessive negative testing. For example, if an application is created for single person use, then we don't have to consider the case that 100 user uses the system at a time. So deciding conditions in negative test cases are very important. There will be times where we don't have to do negative testing on a particular system.
- Require skilled and experienced people to create negative test cases.
- To the client, negative testing is another thing that causes unnecessary delay in release and cost adder.
- A chance that a team spends more time and energy on negative testing. There is a chance that testers spend a lot of time and energy in negative testing that results in a lower concentration in positive testing.
Alpha Testing
Alpha Testing is a type of acceptance testing; performed to identify all possible issues and bugs before releasing the final product to the end users. Alpha testing is carried out by the testers who are internal employees of the organization. The main goal is to identify the tasks that a typical user might perform and test them.
To put it as simple as possible, this kind of testing is called alpha only because it is done early on, near the end of the development of the software, and before beta testing. The main focus of alpha testing is to simulate real users by using a black box and white box techniques.
Beta Testing
Beta Testing is performed by "real users" of the software application in "real environment" and it can be considered as a form of external User Acceptance Testing. It is the final test before shipping a product to the customers. Direct feedback from customers is a major advantage of Beta Testing. This testing helps to test products in customer's environment.
Beta version of the software is released to a limited number of end-users of the product to obtain feedback on the product quality. Beta testing reduces product failure risks and provides increased quality of the product through customer validation.
KEY DIFFERENCE
- Alpha Testing is performed by the Testers within the organization whereas Beta Testing is performed by the end users.
- Alpha Testing is performed at Developer's site whereas Beta Testing is performed at Client's location.
- Reliability and Security testing are not performed in-depth in Alpha Testing while Reliability, Security and Robustness are checked during Beta Testing.
- Alpha Testing involves both Whitebox and Blackbox testing whereas Beta Testing mainly involves Blackbox testing.
- Alpha Testing requires testing environment while Beta Testing doesn't require testing environment.
- Alpha Testing requires long execution cycle whereas Beta Testing requires only few weeks of execution.
- Critical issues and bugs are addressed and fixed immediately in Alpha Testing whereas issues and bugs are collected from the end users and further implemented in Beta Testing.
Alpha Testing Vs Beta testing:
Following are the differences between Alpha and Beta Testing:
Alpha Testing | Beta Testing |
---|---|
Alpha testing performed by Testers who are usually internal employees of the organization | Beta testing is performed by Clients or End Users who are not employees of the organization |
Alpha Testing performed at developer's site | Beta testing is performed at a client location or end user of the product |
Reliability and Security Testing are not performed in-depth Alpha Testing | Reliability, Security, Robustness are checked during Beta Testing |
Alpha testing involves both the white box and black box techniques | Beta Testing typically uses Black Box Testing |
Alpha testing requires a lab environment or testing environment | Beta testing doesn't require any lab environment or testing environment. The software is made available to the public and is said to be real time environment |
Long execution cycle may be required for Alpha testing | Only a few weeks of execution are required for Beta testing |
Critical issues or fixes can be addressed by developers immediately in Alpha testing | Most of the issues or feedback is collected from Beta testing will be implemented in future versions of the product |
Alpha testing is to ensure the quality of the product before moving to Beta testing | Beta testing also concentrates on the quality of the product, but gathers users input on the product and ensures that the product is ready for real time users. |
Types of Beta Testing
There are different types of Beta tests in software testing, and they are as follows:
Traditional Beta testing: Product is distributed to the target market, and related data is gathered in all aspects. This data can be used for Product improvement.
Public Beta Testing: Product is publicly released to the outside world via online channels and data can be gathered from anyone. Based on feedback, product improvements can be done. For example, Microsoft conducted the largest of all Beta Tests for its OS -- Windows 8 before officially releasing it.
Technical Beta Testing: Product is released to the internal group of an organization and gathers feedback/data from the employees of the organization.
Focused Beta: Product is released to the market for gathering feedback on specific features of the program. For example, important functionality of the software.
Post-release Beta: Product is released to the market and data is gathered to make improvements for the future release of the product.
Phases of Testing
Alpha and Beta tests are typically carried for "off-the-shelf" software or product-oriented companies. The Phases of Testing for a product company typically varies from a service-oriented organization. Following is the testing phase adopted by product firms
Pre-Alpha:- Software is a prototype. UI is complete. But not all features are completed. At this stage, software is not published.
Alpha: Software is near its development and is internally tested for bugs/issues
Beta: Software is stable and is released to a limited user base. The goal is to get customer feedback on the product and make changes in software accordingly
Release Candidate (RC): Based on the feedback of Beta Test, you make changes to the software and want to test out the bug fixes. At this stage, you do not want to make radical changes in functionality but just check for bugs. RC is also put out to the public
Release: All works, software is released to the public.
Note: Above is a standard definition of the Testing stages but in order to garner marketing buzz, companies combine stages like "pre-alpha beta", "pre-beta" etc.
Entry Criteria for Alpha testing:
- Software requirements document or Business requirements specification
- Test Cases for all the requirements
- Testing Team with good knowledge about the software application
- Test Lab environment setup
- QA Build ready for execution
- Test Management tool for uploading test cases and logging defects
- Traceability Matrix to ensure that each design requirement has alteast one Test Case that verifies it
Exit Criteria for Alpha testing
- All the test cases have been executed and passed.
- All severity issues need to be fixed and closed
- Delivery of Test summary report
- Make sure that no more additional features can be included
- Sign off on Alpha testing
Entrance Criteria for Beta Testing:
- Sign off a document on Alpha testing
- Beta version of the software should be ready
- Environment ready to release the software application to the public
- Tool to capture real time faults
Exit Criteria for Beta Testing:
- All major and minor issues are closed
- Feedback report should be prepared from public
- Delivery of Beta test summary report
Advantages of Alpha Testing:
- Provides better view about the reliability of the software at an early stage
- Helps simulate real time user behavior and environment.
- Detect many showstopper or serious errors
- Ability to provide early detection of errors with respect to design and functionality
Advantages of Beta Testing
- Reduces product failure risk via customer validation.
- Beta Testing allows a company to test post-launch infrastructure.
- Improves product quality via customer feedback
- Cost effective compared to similar data gathering methods
- Creates goodwill with customers and increases customer satisfaction
Disadvantages of Alpha Testing:
- In depth, functionality cannot be tested as software is still under development stage Sometimes developers and testers are dissatisfied with the results of alpha testing
Disadvantages of Beta Testing
- Test Management is an issue. As compared to other testing types which are usually executed inside a company in a controlled environment, beta testing is executed out in the real world where you seldom have control.
- Finding the right beta users and maintaining their participation could be a challenge
Myths of Alpha and Beta Testing:
Myth: Alpha and Beta testing are carried out too late in the testing life cycle to merit a benefit
Truth: Alpha and Beta testing help highlight crucial issues with the software application and provide user feedback.
Myth: the Same type of testing is done in Alpha and Beta Testing and they are not different scenarios
Truth: Alpha Testing is done in a lab environment, whereas Beta testing is done by real users reporting real problems based on firsthand experience. Both scenarios are remarkably different.
Myth: Beta type of testing is difficult and time-consuming
Truth: Beta testing takes time/experience to obtain the most value. But the data/feedback it provides is invaluable.
Myth: Beta testing generates little or no useful data
Truth: A successful Beta Test can generate tons of valuable information which is otherwise difficult to procure in a lab environment.
Conclusion
In Software Engineering, no matter how many tests you perform, how many bugs you kill, your software is useless if your end-users do not like it. Beta testing (second letter of Greek alphabet) helps provide authentic feedback of your software from real users.
Alpha testing (first letter in the Greek alphabet) helps simulate real-time user environment before the software is sent for Beta Testing and helps shape a stable software candidate eligible for Beta Tests.
Alpha and Beta Testing are indispensable in your testing lifecycle.
Comments
Post a Comment