Testing Brush Up
Testing Brush Up
Testing Brush Up
A methodology is a package of methods. In simple words , its a bundle of practical ideas and proven practises which help in efficient software project management.
Waterfall model
What is it? In the waterfall model ,software development progress through various phases like Requirements Analysis , Design etc - sequentially. In this model, next phase begins only when the earlier phase is completed. What Is The Testing Approach? The first phase in waterfall model is the requirements phase in which all the project requirements are completely defined before starting the testing. During this phase , the test team brainstorms the scope of testing , test strategy and drafts a detailed test plan. Only once the design of software is complete, the team will move on to execution of the test cases to ensure that the developed software behaves as it expected. In this methodology, the testing team proceeds to the next phase only when the previous phase is completed. Advantages This model is very simple to plan and manage. Hence, projects where requirements are clearly defined and stated beforehand can be easily tested using waterfall model. Disadvantages In the waterfall model , you can begin with the next phase only once the previous phase is completed. Hence , this model cannot accommodate unplanned events and uncertainty. This methodology is not suitable for projects where the requirements change frequently.
Iterative development
What is it? In this model , a big project is divided into small parts , and each part is subjected to multiple iterations of the waterfall model. At the end of iteration, a new module is developed or an existing module is enhanced. This module is integrated into the software architecture and the entire system is tested all together What is the testing Approach? As soon as iteration is completed, the entire system is subjected to testing. Feedback from testing is immediately available and is incorporated in next cycle. The testing time required in successive iteration can be reduced based on the experience gained from past iterations. Advantages The main advantage of iterative development is the test feedback is immediately available at the end of each cycle. Disadvantages This model increases communication overheads significantly since at the end of each cycle, feedback about deliverables , effort etc must be given.
Agile methodology
What is it ? Traditional software development methodologies work on the premise that software requirements remain constant throughout the project. But with increase in complexity , the requirements undergo numerous changes and continuously evolve. At times, the customer himself is not sure what he wants. Though iterative model addresses this issue, its still based on the waterfall model. In Agile methodology , software is developed in incremental, rapid cycles. Interactions amongst customers, developers and client are emphasized rather than processes and tools. Agile methodology focuses on responding to change rather than extensive planning. What Is The Testing Approach? Incremental testing is used in agile development methods and hence, every release of the project is tested thoroughly. This ensures that any bugs in the system are fixed before the next release. Advantages It is possible to make changes in the project at any time to comply with the requirements. This incremental testing minimizes risks. Disadvantages Constant client interaction means added time pressure on all stake holders including the client themselves , software development and test teams .
Extreme programming
What is it? Extreme programming is a type of agile methodology which believes in short development cycles. A project is divided into simple engineering tasks. Programmers code a simple piece of software and get back to customer for feedback. Review points from the customer are incorporated and the developers proceed with the next task. In extreme programming developers usually work in pairs. Extreme Programming is used in places where customer requirements are constantly changing. What Is The Testing Approach? 1. 2. 3. 4. Extreme programming follows a Test-driven development which is described as follows Add a test case to the test suite to verify the new functionality which is yet to be developed Run the all tests and obviously the new test case added must fail since the functionality is not coded yet Write some code to implement the feature/functionality Run the test suite again .This time , the new test case should pass since the functionally has been coded Advantages Customers having a vague software design in mind could use extreme programming Continuous testing and continuous integration of small releases ensure software code is delivered is of high quality Disadvantages Meetings amongst the software development team and clients add to time requirements.
There are tons of methodologies available for software development and its corresponding testing. Each methodology is designed for a specific purpose and has its relative merits and de-merits. Selection of a particular methodologies depends on many factors such as the nature of project, client requirement, project schedule , etc. From a testing perspective, some methodologies push for testing input early in the development life cycle , while others wait until a working model of the system is ready.
This is one of the methods for regression testing in which all the tests in the existing test bucket or suite should be re-executed. This is very expensive as it requires huge time and resources.
Instead of re-executing the entire test suite, it is better to select part of test suite to be run Test cases selected can be categorized as 1) Reusable Test Cases 2) Obsolete Test Cases. Re-usable Test cases can be used in succeeding regression cycles. Obsolete Test Cases cant be used in succeeding cycles.
Prioritize the test cases depending on business impact, critical & frequently used functionalities . Selection of test cases based on priority will greatly reduce the regression test suite.
Following are the major testing problems for doing regression testing:
With successive regression runs, test suites become fairly large. Due to time and budget constraints, the entire regression test suite cannot be executed Minimizing test suite while achieving maximum test coverage remains a challenge Determination of frequency of Regression Tests , i.e., after every modification or every build update or after a bunch of bug fixes, is a challenge.
Functional Testing
Functional testing verifies that each function of the software application operates in conformance with the requirement specification. This testing mainly involves black box testing and it is not concerned about the source code of the application. Each and every functionality of the system is tested by providing appropriate input, verifying the output and comparing the actual results with the expected results. This testing involves checking of User Interface, APIs, Database, security, client/ server applications and functionality of the Application Under Test. The testing can be done either manually or using automation
Business requirements are the inputs to Performance parameters like speed , scalability are inputs to non-functional testing. functional testing Functional testing describes what the product does Easy to do manual testing Types of Functional testing are Unit Testing Smoke Testing Sanity Testing Nonfunctional testing describes how good the product works Tough to do manual testing
Types of Non functional testing are Performance Testing Load Testing Volume Testing
Integration Testing White box testing Black Box testing User Acceptance testing Regression Testing
Stress Testing Security Testing Installation Testing Penetration Testing Compatibility Testing Migration Testing
JUnit Used mainly for Java applications and this can be used in Unit and system testing soapUI This is an open source functional testing tool, mainly used for Web service testing. It supports multiple protocols such HTTP, SOAP and JDBC. Watir This is functional testing tool for web applications. It supports tests executed at the web browser and uses ruby scripting language
Performance Testing
Software performance testing is a means of quality assurance (QA). It involves testing software applications to ensure they will perform well under their expected workload. Features and Functionality supported by a software system is not the only concern. A software applications performance like its response time, do matter. The goal of performance testing is not to find bugs but to eliminate performance bottlenecks
The focus of Performance testing is checking a software programs 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
Spike testing tests the softwares reaction to sudden large spikes in the load generated by users. Volume testing Under Volume Testing large no. of. Data is populated in database and the overall software systems behavior is monitored. The objective is to check software applications performance under varying database volumes. Scalability testing The objective of scalability testing is to determine the software applications effectiveness in scaling up to support an increase in user load. It helps plan capacity addition to your software system.
Long Load time Load time is normally the initial time it takes an application to start. This should generally be kept to a minimum. While some applications are impossible to make load in under a minute, Load time should be kept under a few seconds if possible. Poor response time Response time is the time it takes from when a user inputs data into the application until the application outputs a response to that input. Generally this should be very quick. Again if a user has to wait too long, they lose interest. Poor scalability A software product suffers from poor scalability when it cannot handle the expected number of users or when it does not accommodate a wide enough range of users. Load testing should be done to be certain the application can handle the anticipated number of users. Bottlenecking Bottlenecks are obstructions in system which degrade overall system performance. Bottlenecking is when either coding errors or hardware issues cause a decrease of throughput under certain loads. Bottlenecking is often caused by one faulty section of code. The key to fixing a bottlenecking issue is to find the section of code that is causing the slow down and try to fix it there. Bottle necking is generally fixed by either fixing poor running processes or adding additional Hardware. Some common performance bottlenecks are CPU utilization Memory utilization Network utilization Operating System limitations Disk usage
1.
2.
Identify your testing environment Know your physical test environment, production environment and what testing tools are available. Understand details of the hardware, software and network configurations used during testing before you begin the testing process. It will help testers create more efficient tests. It will also help identify possible challenges that testers may encounter during the performance testing procedures. Identify the performance acceptance criteria This includes goals and constraints for throughput, response times and resource allocation. It is also necessary to identify project success criteria outside of these goals and constraints. Testers should be empowered to set performance criteria and goals because often the project specifications will not include a wide enough variety of performance benchmarks.
3. 4. 5. 6. 7.
Sometimes there may be none at all. When possible finding a similar application to compare to is a good way to set performance goals. Plan & design performance tests Determine how usage is likely to vary amongst end users and identify key scenarios to test for all possible use cases. It is necessary to simulate a variety of end users, plan performance test data and outline what metrics will be gathered. Configuring the test environment Prepare the testing environment before execution. Also, arrange tools and other resources. Implement test design Create the performance tests according to your test design. Run the tests Execute and monitor the tests. Analyze, tune and retest Consolidate, analyze and share test results. Then fine tune and test again to see if there is an improvement or decrease in performance. Since improvements generally grow smaller with each retest, stop when bottlenecking is caused by the CPU. Then you may have the consider option of increasing CPU power.
Processor Usage amount of time processor spends executing non-idle threads. Memory use amount of physical memory available to processes on a computer. Disk time amount of time disk is busy executing a read or write request. Bandwidth shows the bits per second used by a network interface. Private bytes number of bytes a process has allocated that cant be shared amongst other processes. These are used to measure memory leaks and usage. Committed memory amount of virtual memory used. Memory pages/second number of pages written to or read from the disk in order to resolve hard page faults. Hard page faults are when code not from the current working set is called up from elsewhere and retrieved from a disk. Page faults/second the overall rate in which fault pages are processed by the processor. This again occurs when a process requires code from outside its working set. CPU interrupts per second is the avg. number of hardware interrupts a processor is receiving and processing each second. Disk queue length is the avg. no. of read and write requests queued for the selected disk during a sample interval. Network output queue length length of the output packet queue in packets. Anything more than two means a delay and bottlenecking needs to be stopped. Network bytes total per second rate which bytes are sent and received on the interface including framing characters. Response time time from when a user enters a request until the first character of the response is received. Throughput rate a computer or network receives requests per second. Amount of connection pooling the number of user requests that are met by pooled connections. The more requests met by connections in the pool, the better the performance will be.
Maximum active sessions the maximum number of sessions that can be active at once. Hit ratios This has to do with the number of SQL statements that are handled by cached data instead of expensive I/O operations. This is a good place to start for solving bottlenecking issues. Hits per second the no. of hits on a web server during each second of a load test. Rollback segment - the amount of data that can rollback at any point in time. Database locks - locking of tables and databases needs to be monitored and carefully tuned. Top waits are monitored to determine what wait times can be cut down when dealing with the how fast data is retrieved from memory Thread counts An applications health can be measured by the no. of threads that are running and currently active. Garbage collection has to do with returning unused memory back to the system. Garbage collection needs to be monitored for efficiency.
There are a wide variety of performance testing tools available in market. The tool you choose for testing will depend on many factors such as types of protocol supported , license cost , hardware requirements , platform support etc. Below is a list of popularly used testing tools. HP Loadrunner is the most popular performance testing tools on the market today. This tool is capable of simulating hundreds of thousands of users, putting applications under real life loads to determine their behavior under expected loads. Loadrunner features a virtual user generator which simulates the actions of live human users. HTTP Load - a throughput testing tool aimed at testing web servers by running several http or https fetches simultaneously to determine how a server handles the workload. Proxy Sniffer one of the leading tools used for load testing of web and application servers. It is a cloud based tool thats capable of simulating thousands of users. Summary
The chief activities involved in End to End Testing are Study of end to end testing requirements Test Environment setup and hardware/software requirements Describe all the systems and its subsystems processes. Description of roles and responsibilities for all the systems Testing methodology and standards End to end requirements tracking and designing of test cases Input and output data for each system
1. 2. 3.
End to End Testing Design framework consists of three parts Build user functions Build Conditions Build Test Cases Lets look at them in detail: -
1. 2. 3. 4. 5.
Login into the banking system Check for the balance amount in the account Transfer some amount from your account to some other bank account (3rdparty sub-system) Check the your latest account balance Logout of the application
It checks the complete end-to-end process flow. It checks system functionalities and features.
Conclusion End to end testing is the process verifying a software system along with its sub-systems. The biggest challenge in this testing is to have enough knowledge of the whole system as well as interconnected subsystem.
Usability Testing
In Usability Testing, a small-set of target end-users, of a software system, use it to expose usability defects. This testing mainly focuses on the users-ease to use the application, flexibility in handling controls and ability of the system to meet its objectives. This testing is recommended during the initial design phase of SDLC, which gives more visibility on the expectations of the users.
Aesthetics and design are important. How well a product looks usually determines how well it works. There are many software applications / websites, which miserably fail, once launched, due to following reasons Where do I click next? Which page needs to be navigated? Which Icon or Jargon represents what? Error messages are not consistent or effectively displayed Session time not sufficient. Usability Testing identifies usability errors in the system early in development cycle and can save a product from failure.
Planning:- During this phase the goals of usability test are determined. Having volunteers sit in front of your application and recording their actions is not a goal. You need to determine critical functionalities and objectives of system. You need to assign tasks to your testers, which exercise these critical functionalities. During this phase , usability testing method, number & demographics of usability testers , test report formats are also determined Recruiting: During this phase, you recruit the desired number of testers as per your usability test plan. Finding testers who match your demographic (age , sex etc ) and professional ( education , job etc .) profile can take time. Usability Testing: During this phase, usability tests are actually executed. Data Analysis: Data from usability tests is thoroughly analyzed to derive meaningful inferences and give actionable recommendations to improve overall usability of your product. Reporting: Findings of the usability test is shared with all concerned stakeholders which can include designer, developer, client, and CEO
Research ( Virzi, 1992 and Neilsen & Landauer , 1993) indicates that 5 users are enough to uncover 80% of usability problems. Some researchers suggest other numbers. The truth is , the actual number of user required depends on the complexity of the given application and your usability goals. Increase in usability participants results into increased cost , planning , participant management and data analysis.
But as a general guideline , if you on a small budget and interested in DIY usability testing 5 is a good number to start with. If budget is not a constraint its best consult experienced professionals to determine number of users.
Manual Testing
In Manual Testing , Testers manually execute test cases without using any automation tools. Manual testing is the most primitive of all testing types and helps find bugs in the software system. Any new application must be manually tested before its testing can be automated. Manual testing requires more effort, but is necessary to check automation feasibility. Manual Testing does not require knowledge of any testing tool. One of the Software Testing Fundamental is "100% Automation is not possible". This makes Manual Testing imperative.
Any type of application can be tested manually but automated testing is recommended only for stable systems and is mostly used for regression testing. Also, certain testing types like ad-hoc and monkey testing are more suited for manual execution. Manual testing can be become repetitive and boring. On the contrary, the boring part of executing same test cases time and again, is handled by automation software in automation testing. Conclusion Manual testing is an activity where the tester needs to be very patient, creative & open minded.They need to think and act with an End User perspective.