Software Testing - Manual What is software? Software is a collection of programs that help us to perform a task. System software: device drivers, OS, servers etc.. Programming software’s: compilers, debuggers, interpreters. The main use of debugger is to run the target program under controlled conditions. Application software: web applications, mobile apps, desktop applications etc.. What is software testing? In order to deliver the quality product to the client we need to test the product before the delivery. It should be bug free. Software testing is a part of software development. Objective: The main objective is to release a quality product to the client. Define “quality” in terms of client or customer? Quality means customer justification. On which parameters u say the delivered software is a quality product? Ans: bug free, delivery on time, within budget, meet the functionality requirements/expectations and maintable (it should be user friendly and easy to maintain. Difference between project and product If software application is developed for specific customer based on his requirements then it called project. If software application is developed for multiple customer based on market requirements is called product. Different types of companies Companies are classified into two types Service based: they work for specific customer. (TCS, Infosys etc) Product based: Google, Microsoft etc… Why the software has bugs? When developing the software the software might have bugs We can say five reasons: Miscommunication (developer and tester) Programming errors Frequently changing requirements. (Agile) Lack of skilled testers. PPP (3P’s) are very important P- people P- Process P- Product. 3 dev, 1 tester, 1Business analyst, 1product owner, 1 scrum master, project manager (8 Team) What is the use of SDLC? SDLC is a process used by software industry to design, develop and test. Requirement analysis (BA) Designing (Designer) Coding(Developers) Testing (Tester) Maintenance. Different SDLC models 1) 2) 3) 4) 5) 6) Waterfall model V model Spiral Incremental Prototype model RAD model. Testing Time Estimation Note: MD (man days) 1) 2) 3) 4) Estimation sheet for project testing According to project cost According to resources available for testing And average time of resources. Features in project Time for UI testing(hrs) Time for functional testing Time for DB testing Time for miscellaneous testing MOM (minutes of meeting) sheet Prepared to manage the meeting time and to avoid the wastage of resource time. Fields in MOM sheet a) b) c) d) e) f) g) h) i) j) k) l) Date Time Topic No.of invitees Session taken by No of presence No of absence Agenda Discussion point Discussion description Outcome Action Test strategies 1) Static testing 2) Dynamic testing Static testing: The testing which is performed upto actual testing phase is called static testing. The tasks we do in static testing 1) Review on requirement gathering and analysis doc(BRD,FSD) 2) Test plan preparation 3) Preparation of RTM( requirement traceability matrix) 4) Writing test scenarios 5) Define test cases 6) Identifying dependencies and collecting data 7) Test environment preparation/ (test bed preparation) --Testing the project related documents is called static testing Testing the documents in the form of Reviews, walkthrough, Inspection. Different types of Reviews 1) 2) 3) 4) 5) Requirement review Design review Code review// Test plan review Test case review Review are done by managers, developers, tester etc anyone from team. Walkthrough: 1) 2) 3) 4) 5) It is an informal meeting No proper schedule Author reads the document or code and discuss with peers. It is not a preplanned meeting Walkthrough doesn’t have any minutes of meeting (MOM) . Inspection 1) Formal review meeting 2) In which atleast 3 to 8 people will sit in the meeting. 3) Reader, writer, moderator(mediator) plus concerned organizer(those who conduct the meeting) 4) Proper schedules via email to the concerned developers/testers. SDLC (V model) --Unit testing is usually done by developers --After completion of few modules they integrate everything then they do Integration testing. -- Integration testing also done by developers --Unit testing and integration testing comes under white box testing. SDLC (Water Fall Model) Winston Royce introduced the Waterfall Model in 1970.This model has five phases: Requirements analysis and specification, design, implementation, and unit testing, integration and system testing, and operation and maintenance. The steps always follow in this order and do not overlap. The developer must complete every phase before the next phase begins. This model is named "Waterfall Model". QA(Quality Assurance): QA is process oriented QA focuses on building in quality QA is for preventing defects QA process carries for entire life SDLC cycle. QC (Quality Controller): Actual testing of the software QC focuses on testing for quality. QC is for detecting the defects QC is product oriented QC is for testing part in SDLC QE (Quality Engineer): Those who write code for testing software are known as Quality Engineer (Automation engineers). Dynamic Testing Levels of software testing Unit Testing Integration Testing System Testing (Tester) User Acceptance Testing (UAT) Unit Testing: A small piece of code gets tested (or) A unit is a single component or modules. Unit testing conducts on a single program. Unit testing is a white box testing technique. (done by developers) Unit Testing Techniques: Basis path testing: Every path of code should be executed at least once Control structure testing: Conditional testing, data flow testing, loop testing Conditional coverage: If,IfElse, Working or not Loops coverage: for loop, while etc. Mutation testing: code mutation which is in the form of white box. Integration testing Integration testing is performed between 2 or more modules. Integration testing mainly focuses on checking data communication between multiple modules. A B C From 1st module A can be the output and A will be the input to second module and B remains as input to third module. Integration testing is also a part of white box testing technique. Note: Sometimes even testers also may conduct Integration testing. For testers they provide UI path. We will verify by sending proper credentials. Testing do testing at UI level What we do? The integration between multiple modules will be tested. Testing done at code level. Types of Integration testing Incremental Integration testing ( most of the times we use) Non incremental Integration testing. Incrementally adding the modules and testing the data flow. How do we achieve? We have 2 approaches for incremental integration testing 1) Top down 2) Bottom up Top Down Incremental Integration testing Incrementally adding the modules and testing the data flow between the modules and ensure the module added is the child of the previous module. Ex: In Gmail -----compose (parent)----sent mail(child) Bottom Up Incremental Integration testing Incrementally adding the modules and testing the data flow between modules and ensure the modules added is the parent to previous module Non Incremental Integration Testing Adding all the modules in a single shot and test the data flow between modules. Drawbacks We might miss data flow between some of the modules. If you find any defect we can’t understand the root cause of defect. Sandwich/Hybrid approach Combination of top down and bottom up approach is called sandwich approach. System Testing (Testers role) Testing the overall functionality off the application with respect to client requirement. It is a black box testing This testing is done by the testing team system testing. After completion of component (1 module or unit) and integration level testing we start system testing. Before conducting system testing we should know the customer requirements. Objective: System testing mainly focuses few aspects -User Interface Testing (GUI) - Functional testing - Non functional testing (like security testing, performance testing-There are very huge testing team which is completely dedicated for this) - Usability testing - UAT testing (User acceptance testing) After completion of system testing, UAT team conducts acceptance testing in two levels. Alpha testing (The user or tester do testing in development environment) Beta testing (In testing environment) What is GUI testing? Graphical user interface testing is a process of testing the user Interface of an application. A GUI testing includes all elements such as menus, checkbox, textbox, buttons, radio buttons, colors, fonts, sizes, icons, content and images. Need to check the properties of elements like visible, hide, can enter text or not etc. Usability Testing: During this testing we validate application provided context sensitive help or not to the user. Checks how easily the end users are able to understand and operate the application is called usability testing. Functional testing: Objective: Functional testing is nothing but testing the overall behavior of applications Functional testing talks about how your feature should work. 1. Object properties testing: Testing properties of objects like textbox, radio button(properties like visible or not, hide or focus) 2. Database testing/ backend testing : DML (data manipulation language) operations like Insert, update and delete, select) Table level validations like column type, column data type etc. We do test functions, procedures, triggers, indexes, views etc… 3. Error handling Testers verify the error messages while performing incorrect actions on the application. Error messages should be readable in user understandable language. 4. Calculations/manipulations testing In banking or financial domains we test mainly calculation part. We test calculation parts. Calculations are working properly or not. Testers should test calculations. Ex: Invalid user Incorrect data 5. Links execution & links existence Where exactly links are placed –links existence Whether links are navigating to proper page or not-----links execution Internal links External links Broken links 6. Cookies and sessions testing Cookies are temporary files created by the browser while browsing. We need to check whether the web application is able to create cookies or not. This is known as cookies testing. Whenever we open the application the time slot will be started on server side. Sessions are time slots created by the server. Session will be expired after sometime. If we are idle for some time. Non functional Testing Once the application functionalities are stable we do non functional testing. Focuses on performance, load, security etc.. 1) Performance testing: Speed of the application (we do check the response time when generally many users are interacting) Load testing Stress testing (Suddenly we increase or decrease the load on the application and we check the response time) Volume testing (we check how much data is able to handle by the application) 2) Security testing: How secure our application is— Authentication-----user are valid or not. 3) 4) 5) 6) 7) Authorization ---- access control--- permission of the valid user. Recovery Testing: Whether he data can be recovered or not? Compatibility testing: compatibility between versions of software. Configuration testing Installation testing Sanitation/ garbage testing: we need to remove unwanted functionalities or features, because we consider them as bug. Non functional testing will be done by skill set team. Regression testing: (Testing bugs along with modified builds) Testing conducted on modified build in order to make sure there will not be any impact on existing functionality because of changes like adding, deleting or modifying features. Unit regression testing: Testing only the changes or modifications done by the developer. Regional regression testing: Testing the modified build along with the impacted modules. During Impact analysis meeting QA & Dev will identify the impacted modules because of add/delete/modifying functionalities bugs might arise. Full Regression: Testing the main features and remaining part of the application. All most everything we will test because developers have modified 80% of all modules in order to fix a bug. So we do almost full testing. Re Testing (Testing again) Whenever the developer fixed a bug, then tester will test the bug then if everything is fine then we do signoff. Smoke Testing: Smoke testing is done to make sure the build we received from the developer is stable or not. Very very basic functionality testing we do on the build. Focuses on stability of the build like whether the installation is proper or not, etc. Smoke testing is performed by both developers and testers. Build may be unstable or stable. This testing will be done on initial builds. Part of basic testing On each and every release of new build we perform smoke testing. Sanity testing: Sanity testing is done during the release phase to check the main functionalities of the application without going deeper. Performed by testers only Build is relatively stable Sanity testing is done on stable builds Part of regression testing. Exploratory testing: No documentation but software is ready then we do exploratory testing. We have to explore the application and understand the application and test it. We do Document all the scenarios for testing. We do exploratory testing when the application is ready but no requirements. Drawbacks: We might misunderstand some features as a bug We might treat a bug as a feature since we do not have requirement with us Time consuming If there is any bug in app we never know it. Adhoc Testing: Testing application randomly without any test cases or requirement document. This is an informal testing with an aim to break the system. Testers should have knowledge of application even though he doesn’t have requirements or test cases. This testing is usually an unplanned activity. Monkey testing/ Gorilla testing: Testing application randomly without test cases and documentation. Testers do not have any knowledge of application. Suitable for gaming applications. Positive testing: Testing the applications with valid users or valid input. Negative testing: Testing the application with invalid inputs. End to End testing: Testing the overall functionality of system including data integration among all the modules. Test Design Techniques: Test design techniques helps to design better test cases. Reduce number of test cases to be executed. What are the techniques? Equivalence class partition (ECP) Boundary value analysis Decision table based testing State transition Error guessing. Equivalence class partitioning technique: Partition data into various classes and we can select data according to class then we do testing. Value check Divide values into equivalence class. Normal test data 1 2 Divide values into equivalence class -100 to 0 1 to 100 Test data using ECP -65 30 Boundary value analysis (BVA): They also reduce the data for checking. We will concentrate on boundary value of the input. Enter age: Min-1= 17 * Allow digits from 18-35 Min=18 Min+1= 19 max-1=34 Max=34 Max+1=36 BVA accepts six parameters Decision table techniques: It is also called as cause-effect table We will use if we have more conditions and corresponding actions In this technique we deal with combination of inputs We will list out all conditions and actions in this technique. Input domain testing: The value will be verified in text box or in input fields. State transition testing: It is basically a black box testing technique that is carried out to observe the behavior of the system. Manual testing project: Project Introduction Understanding and exploring the functionality (FRS- Functional requirement specification document) Test plan Identifying test scenarios Writing test cases, reviews and RTM (requirement traceability matrix) Environment setup & build deployment Test execution Bug reporting & tracking Sanity testing, Retesting and regression testing Test sign off