2. SOFTWARE TESTING PRINCIPLES
• Testing shows presence of defects
• Exhaustive testing is impossible.
• Early Testing
• Defect Clustering
• Pesticide Paradox
• Testing is context dependent
• Absence of errors fallacy
3. Test Strategy and Test Plan
• Test Strategy:
• A high level document which defines approach for software testing
• It is developed by project manager or business analyst.
• It a kind of static document which sets the standards for testing.
• Test Plan:
• Derived from SRS which is prepared by test lead or manager.
• Main goal is to include all the details related to testing.
4. Test Strategy
• Scope and objectives
• Business Issues
• Testing approach
• Test deliverables
• Defect Tracking approach
• Training
• Automation
• Risks
5. Test Plan
• Test Plan ID
• Test Environment
• Features to be tested or Not tested
• Entry/Exit Criteria
• Status
• Types of testing
• Brief Intro
6. Features of Testing Process
• Integrates with automation and CI tools.
• Provided Traceability reports & Metrics.
• Integrates with issue tracking tools.
• Supports Reusable and modular Test Cases.
• Imparts Scalability and Collaborative Capabilities.
• Provides Security.
7. Test Plan Creation
• As per IEEE standard 829
• Analyze the product
• Define Test Strategy
• Define Test Objectives
• Define Test Criteria
• Resource Planning
• Plant Test Environment
• Schedule & Estimation
• Determine Test Deliverables
8. MUTATION TESTING
• It is a type of software testing where we mutate (change) certain statements
in the source code and check if the test cases are able to find the errors.
• It is type of White Box testing which is mainly used for Unit Testing.
• The changes in mutant program are kept extremely small so that it doest not
affect the overall objective.
• It was originally proposed in 1971.
9. How to Execute Mutation Testing
• Faults are introduced in mutant program.
• Test Cases are applied to the original program and mutant program.
• Compare the results of the original and mutant program.
• If the original and mutant program generate different output then that
mutant is killed by the test cases. Hence the test case should be good enough
to detect change between the mutant and original program.
10. Types of Mutation Testing
• Statement Mutation
• Value Mutation
• Decision Mutation
11. Defects in Software Engineering
• A defect is an error or bug in the application created.
• Various Defects are:
• Bug/Defect : Term used by tester.
• Failure : Term used by end user.
• Mistake : Term for human.
• Error: Term for developer.
12. Categories of Defects
• Functional Defects : Application not behaving in the way the requirements suggests.
• Non- Functional Defects: Spelling Mistake or Wrong Messages.
• Severity Based :
• Critical : Whole System Crash
• Major :Affect Core Functionality
• Minor : Product’s Working
• Trivial - Spelling or grammatical mistake
13. • Probability Based :
• High
• Medium
• Low
• Priority Based:
• High
• Medium
• Low
15. Software Testing Misconceptions
• Software Testing requires no Brains.
• A Tester can test anything
• The job of tester is to find the bugs
• Testers are of no value to the software
• Test Automation will replace the human testers.
• Testers love to break the code.
• Testers and developers are not friends.
16. Manual and Automation Testing
Challenges
• Testing the complete application.
• Misunderstanding of Company Processes.
• Relationship with developers – communication, troubleshooting and analysis
• Regression Testing
• Lack of skilled Testers.
• Testing always under time constraints.
• Which test to execute first
• Understanding the Requirements
17. • Automation Testing
• The decision to stop Testing.
• One test team under multiple projects.
• Reuse of test scripts – test scripts migration or reuse is very essential.
• Testers focusing on finding the bugs – Tester’s Performance.
• To Cope with attrition
18. Skills of Quality Testers
• Analytical & Logical Thinking – analyze business situations, judging all
possible scenarios, capability to tackle unfamiliar problems and developing
strategy, to examine complexity, to develop logical arguments etc.
• The ability to envision business situations. – to envisage the real time
business solutions, to anticipate complex problems, to do complete system
simulation, conceptualization skills etc.
• A sense of intellectual curiosity and creativity
• A “glocal” approach
19. • Critical thought and rational enquiry – The thought process should be undistorted, impartial
and without any prejudices.
• He should be able to raise the vital questions precisely and clearly.
• Gather and assess the information and interpret it effectively.
• He should be open minded, suspend any judgement in absence of sufficient eveidance.
• The ability to apply basic and fundamental knowledge.
• Continue to learn.
• Respect for truth intellectual integrity.
• Planning and timing management skills.
20. Agile Testing
• Principles:
• Testing is continuos
• Continuous Feedback
• Tests Performed by Whole Team
• Decrease time of feedback response
• Simplified & Clean Code
• Less Documentation
• Test Driven
21. Agile Testing Methods
• BDD (Behavioral Driven Development
• ADD (Acceptance Test Driven)
• Exploratory Testing
22. UNIT –III ( Design& Architecture)
• Components of Test Automation
• External Moudules
• Scenario & Config Fils modules
• Test Case & Tet Framewoek Modules
• Tools & Results Modules
• Report Generator & Metrics Modules
23. • External Module
• TCDS & defect DB
• They store all test cases(manual & automated), steps to execute them and history of
execution
• Interaction happens between external and internal modules through intereface between
them.
• Defect db contains all defects with their details(e.g. defect name,when was found,by
whom current status, type of defect, its impact etc.
24. • Scenario & Config File Module
• It contains set of variables used in automation
• Variables are related to test framework, tools & metrics, test suite, set of test cases.
• Changing the values of variable in config file will allow test the code dynamically and also to
different execution depending on diff values of input and output.
• Test Cases & Test Framework Modules
• Automated test cases taken from TCDB are executed by the framework.
• It takes the specific test cases that are automated by TCDB nad takes scenario & executes them.
• Also it takes the variable values and executes test cases.
• Tools & Results Module
• Set of runtime tools & utilities required by framework
• Result of each execution is stored and used for future analysis & actions.
• Current results should not overwrite the previous results.
25. • Report Generator & Metrics Module
• They are generated after execution of Test
• It generates some customized reports such as Executive Report, Technical Report & Detailed or debug
report
• It take necessary input and prepared formatted output.
• It the generated metrics based on available results.
• The generated reports can be kept for futre analysis and actions.
• Generic Requirements for Test Tool/Framework
• No hard coding in test suite
• Test case/suite expandability
• Reuse of code
• Automatic Setup & cleanup
• Indpendent test cases
• Test Case Dependancy.
• Insulating test cases during execution
• Coding Standards & directory structure
26. • Selective execution of test cases
• Parallel execution
• Random execution
• Looping test Cases
• Grouping test scenarios
• Test case execution based on past results
• Remote execution
• Automatic archival of test data
• Reporting scheme
• Independent Languages
• Portability across platforms.
27. • Automation in Extreme Programming:
• It is an agile software development model of framework that produces a higher wualitu
software and higher quality of life for development people.
• Automation is an integral part of product development in XP.
• Requirements are collected at the time of requirements itself.
• Test Cases are written well before the coding phase starts.
• All Unit Test cases should be executed with 100% of passing coverage.
• There is no gap between development and coding skills for automation team.
• It is responsible for overall improvement of software quality and customer requirments.
• It follows the best practices and lightweight, efficient, low-risk, flexible,predictable,
scientific etc.
28. • Agile Model:
• Combination of Iterative and Incremental Model with focus on process adaptability and
customer satisfaction by rapid delivery of software product.
• The product to be built is broken down into small incremental builds which are provided in
iterations.
• Each iteration involves all phases of SDLC.
• Once completed all iterations then the product is displayed to customer and other
stakeholders who will approve and will accept the product.
• Phases of Agile Model:
• Requirement Gathering
• Design the requirements
• Construction
• Testing & Quality Assurance
• Deployment
• Feedback.
29. • Agile Model:
• Combination of Iterative and Incremental Model with focus on process adaptability and
customer satisfaction by rapid delivery of software product.
• The product to be built is broken down into small incremental builds which are provided in
iterations.
• Each iteration involves all phases of SDLC.
• Once completed all iterations then the product is displayed to customer and other
stakeholders who will approve and will accept the product.
• Phases of Agile Model:
• Requirement Gathering
• Design the requirements
• Construction
• Testing & Quality Assurance
• Deployment
• Feedback.
30. UNIT – IV Selenium Tool
• Introduction:
• Selenium is a set of different software tools each with a different approach to
supporting test automation.
• The entire suite of tools results in a rich set of testing functions .
• These operations are highly flexible.
• It allows many options for locating UI elements and comparing expected test results
against actual application behavior.
• . One of Selenium’s key features is the support for executing one’s tests on multiple
browser platforms.
31. • History of Selenium:
• Selenium first came to life in 2004 when Jason Huggins was testing an internal application at
ThoughtWorks.
• He developed a Javascript library that could drive interactions with the page, allowing him to
automatically rerun tests against multiple browsers.
• In 2006 a plucky engineer at Google named Simon Stewart started work on a project he called
WebDriver.
• Simon wanted a testing tool that spoke directly to the browser using the ‘native’ method for
the browser and operating system.
• Jumping to 2008 ,The Beijing Olympics mark China’s arrival as a global power, massive
mortgage default in the United States triggers the worst international recession since the
Great Depression, The Dark Knight is viewed by every human (twice), still reeling from the
untimely loss of Heath Ledger.
32. Selenium Test Suites
• The suite contains following main 4 tools
• Selenium IDE
• Selenium RC
• Selenium Web Driver
• Selenium Grid
33. • Selenium IDE:
• Its an extension to Chrome and Firefix.
• Selenium IDE should only be used as a prototyping tool for building test scripts.
• Selenium IDE has a recording feature, which records user actions as they are performed
and then exports them as a reusable script in one of many programming languages that
can be later execute.
• Selenium RC (Remote Control)
• Selenium RC was the flagship testing framework of the whole Selenium project.
• This is the first automated web testing tool that allowed users to use a programming
language they prefer.
• It supports the programming languages like Java , C#, PHP, Python Perl, Ruby etc.
34. • Selenium Web Driver
• This brand new automation tool provides all sorts of awesome features, including a
more cohesive and object oriented API as well as an answer to the limitations of the old
implementation.
• It supports the WebDriver API and underlying technology, along with the Selenium 1
technology
• It makes test flexible and portable
• Selenium 2 (Web Driver) still runs Selenium 1’s Selenium RC interface for backwards
compatibility.
• WebDriver, unlike Selenium RC, does not rely on JavaScript for Automation. It controls
the browser by directly communicating with it.
35. • Selenium Grid
• Selenium-Grid allows the Selenium RC solution to scale for large test suites and for test
suites that must be run in multiple environments.
• Selenium Grid allows you to run your tests in parallel, that is, different tests can be run at
the same time on different remote machines.
• If you have a large test suite, or a slow-running test suite, you can boost its performance
substantially by using Selenium Grid to divide your test suite to run different tests at the
same time using those different machines.
• If you must run your test suite on multiple environments you can have different remote
machines supporting and running your tests in them at the same time.
• In each case Selenium Grid greatly improves the time it takes to run your suite by making
use of parallel processing.
• Utilizes the hub-and-nodes concept. The hub acts as a central source of Selenium
commands to each node connected to it.