Prepared By: R K SinghSoftware Testing & Introduction to Test Automation
Brief IntroductionWho am I?7+ Years of IT Experience ISTQB Advanced and CSTE CertifiedMy Roles so far-
Software Developer, Development Tester, Test Lead, Trainer-Teaching TDD and Automation TestingAdvisor-Assesses projects and Tools for Test Automation
INTRODUCTION OF TESTINGWhat is Testing: Software testing is the process of evaluation of a software item to detect differences between actual and expected output on given input.
The purposes of testing are:
Quality assurance, Verification and Validation,To find the bugs before the product is released to customer. To improve the quality of the product To evaluate that the product is according to requirements.Software Testing is the process of assuring that product which is manufactured by developer is meeting the user requirement. The motive to perform testing is to find the bugs and make sure that they get fixed.
TYPE OF TESTINGManual testing: This type includes the testing of the Software manually i.e. without using any automated tool or any script. A manual tester would typically perform the following steps for manual testing:Understand the functionality of programPrepare a test environment.Execute test case(s) manuallyVerify the actual resultRecord the result as Pass or FailMake a report of the Pass and Fail test cases Publish the report
WHO AND WHEN TO START TESTINGWho does testing: Following professionals are involved in testing of a system within their respective capacities:Software TesterSoftware DeveloperProject Lead/ManagerEnd UserWhen to Start Testing? Testing is done in different forms at every phase of SDLC like during Requirement gathering phase, the analysis and verifications of requirements are also considered testing.
Pros - ConsAdvantage:- Manual testing can be use in both small and big project. We can easily reduce and add our test case according to project movement. Easy to learn for new people who enters in manual testing. Manual testing is more reliable then automated (in many cases automated test not cover all cases) .
Disadvantage:- GUI object size difference and color combination etc is not easy to find out in manual testing.Actual load and performance is not possible to cover in manual testing for large number of users.
Automation testingAutomation testing: Automation testing which is also known as Test Automation. In this testing, the tester writes scripts and uses another software to test the software. There are many Tools are use in automation Testing.
Software testing tools:HP Quick Test ProfessionalSeleniumTest stack.WhiteTesting AnywhereWinRunnerLaodRunner
Pros - ConsAdvantagesEasy to cover up all cases in a limited time period.You can perform different types of testings like load testing, performance testing using tool.Automated testing can be performed on different operating systems.
DisadvantagesPurchase a tools and Maintenance. Automation testing is more expensive work as comparing with manual testing.Language wise there are many tools to test various type of software, means all tools will not support to all software which are developed in different languages.
SDLC AND STLCSoftware Development Life Cycle: There are six type of SDLC.Requirement phaseDesign phaseCoding (programming)TestingRelease (Production)Maintenance (Support)Software Testing Life Cycle: There are seven type of STLC.Requirement StudyTest PlanningWriting Test CasesReview the Test CasesExecuting the Test CasesBug loggingClose or Reopen bugs
BASIC TYPE OF TESTINGBlack Box Testing: The technique of testing without having any knowledge of the interior workings of the application is Black Box testing. The tester is oblivious to the system architecture and does not have access to the source code. It is also called behavioral, functional and close box testing.
White Box Testing: White box testing is require understanding of internal logic and structure of the code. White box testing is also called glassbox testing or open box, structural,clearbox testing.
Different types of software testing:Unit testingSmoke testing
Functional testing Integration testingRegression testingSystem testingLoad testingStress testing
Performance testingUser acceptance testingBlack box testingWhite box testingAlpha testingBeta testing
SAMPLE OF TEST CASE AND BUG LIFE CYCLESample of Test case:
Bug Life Cycle: There are six phases of Bug Life cycle. a. New b. Assigned c. Resolved d. Verified e. Closed f. Reopen
Test Case IDTest Case DescriptionInput DataExpected ResultTest ResultRemarks
Sample of Bug : Bug Name: Application crash on clicking the SAVE button. Bug ID: (It will be automatically created by the BUG Tracking tool once you save this bug) Area Path: USERS menu > New Users Severity: High (High/medium/Low) Priority: High (High/medium/Low) Assigned to: Developer-X Reported By: Your Name Reported On: Date Reason : Defect Environment: Windows 2003/SQL Server 2005
Bug detailscontinuedSeverity: Describes the bug in terms of functionality.Priority: Describes the bug in terms of customer.Ex.High Priority and Low Severity: Company logo is not properly displayed on their website. High Priority and High Severity: Suppose you are doing online shopping and filled payment information, but After submitting the form, you get a message like "Order has been cancelled." Low Priority and High Severity: If we have a typical scenario in which the application get crashed, but that scenario exists rarely. Low Priority and Low Severity: There is a mistake like "You have registered success" instead of successfully, success is written.
Windows Application Automation using WHITE Framework
Need for Automation in any Windows ApplicationRepetitive and Multiple actions as a part of Functional testingParallel verifications in third party applicationsPost every deployment in the environment, smoke tests to have health check.Type of testing tasks that are routine while doing Verifications.
Some light on WHITE FrameworkFramework for automating rich client applications based on Win32/Win Forms/WPF/ Silverlight, Java platforms.NET based and does not require the use of any proprietary scripting languagesOpen SourceCustom Commands, Custom Controls and performs complex actions of any windows applicationIntegration with SELENIUM is hassle free Browse for more http://teststack.github.io/White/WHITEFRAMEWORK
Time for a Demo!!!Lets have a Demo!!
Some light on SeleniumWeb testing frameworkRuns in a browserHTML & Java scriptOpen SourceBrowse for more- http://openqa.orgSelenium is a robust set of tools that supports rapid development of test automation for web-based applications.Selenium operations are highly flexible, allowing many options for locating UI elements and comparing expected test results against actual application behavior.
Some light on Selenium(Continued)Selenium FeaturesSupports Cross Browser Testing. The Selenium tests can be run on multiple browsers.Allows scripting in several languages like Java, C#, PHP and Python.Assertion statements provide an efficient way of comparing expected and actual results.Inbuilt reporting mechanism.
Selenium FlavorsSelenium IDESelenium Remote ControlSelenium Webdrivers
Seleniums Advantages over other toolsMultiple browser support (supports almost all browsers)Ease in Custom Control IdentificationTest playback is very fast. Very easy to get your initial tests running. Highly in-built interface and Good workflow since it is visible side-by-side with your browser. Test script is easily readable/understandable Tests can be exported in many different programming languages
Custom Controls identification was difficult
Browser compatibility Issues.
Tool tips were not recognized.
Maintaining the single UI Map was a bit difficult.
Few controls were recognized on the basis of coordinates on the browser which is not supporting our scripts on different screen sizes.
Few Common Challenges during Automation
Steps to start with Selenium!Selenium Remote Control (RC) Download and add ThoughtWorks.Selenium.Core dll to C# solutionDownload Run Selenium server in your systemCreate a test script in C# and run it.
Selenium Test Automation ProcessOnce the Selenese script is converted into your preferred language you can run them using Selenium Server.For running the script you also need the client driver for that particular language.
BrowsersVersionsSelenium IDESelenium Remote ControlSelenium CoreSelenium 2/Web driver API
FF4.x-FF10-xOnly Record & PlaybackIE 7/8/9Safari 2/3/4/5
BrowsersVersionsSelenium IDESelenium Remote ControlSelenium CoreSelenium 2/Webdriver API
Chrome v 5- v 19 ** Selenium Core is written in Java script so it should work (in theory) on most browsers with decent Java script support. Some operations are only possible via Selenium Remote Control because of browser security settings** Selenium Remote Control server can start any executable, but depending on browser security settings, there may be technical limitations that would limit certain features.Opera 8/9/10
And Some LimitationsNo support for https on Google chrome in Selenium.
Selenium is only for Web Test Automation
Sometimes issues with object identificationResourcesYou can checkout for more details of Selenium at :http://www.openqa/org/selenium