Automated Testing for Web application Kiattikhun Prathumma June 21, 2012 © Copyright 2010, Accellence (Thailand) Ltd.
Agenda • What is Automated Testing • Automated Testing vs Manual testing • Automated Testing Framework • Demo • Q&A © 2010 Accellence (Thailand) Limited.
What is Automated Testing “…Test automation is the process of writing a computer program to do testing that would otherwise need to be done manually…” Source: http://en.wikipedia.org/wiki/Test_automation © 2010 Accellence (Thailand) Limited.
Advantages Automated Testing Manual Testing If Test Cases have to be run a small If you have to run a set of tests number of times it's more likely to repeatedly automation is a huge gain perform manual testing Helps performing "compatibility It allows the tester to perform more testing" - testing the software on ad-hoc (random testing) different configurations It gives you the ability to run automation scenarios to perform Short term costs are reduced regressions in a shorter time It gives you the ability to run The more time tester spends testing a regressions on a code that is module the grater the odds to find continuously changing real user bugs Can be run simultaneously on different machines thus decreasing testing time Long term costs are reduced © 2010 Accellence (Thailand) Limited.
Disadvantages Automated Testing Manual Testing It's more expensive to Manual tests can be very time automate. Initial investments consuming are bigger than manual testing You cannot automate For every release you must everything, some tests still have rerun the same set of tests to be done manually which can be tiresome © 2010 Accellence (Thailand) Limited.
Use Automated Testing? “…It only makes sense to use automated testing tools when the costs of acquiring the tool and building and maintaining the tests is less than the efficiency gained from the effort" John Overbaugh, Senior Lead Software Development Engineer In Test (SDET) at Microsoft © 2010 Accellence (Thailand) Limited.
Use Manual Testing? “…Once a team is good at managing testing risk and test coverage and applying the right testing techniques, then talking about automation makes sense." Mike Kelly, Software development manager for a Fortune 100 company © 2010 Accellence (Thailand) Limited.
Other factors • The performance of your test tools • The knowledge level of your testing team • The continuous growth of software to be tested • Number of necessary regressions © 2010 Accellence (Thailand) Limited.
General approaches to test automation 1. Code-driven testing - Testing frameworks such as the xUnit frameworks 2. Graphical user interface testing - A testing framework generates user interface events such as keystrokes and mouse clicks, and observes the changes that result in the user interface © 2010 Accellence (Thailand) Limited.
Automated Testing Framework Tool name Produced by Latest version HP QuickTest Professional HP Software Division 11.0 HTTP Test Tool Open source 2.0.8 IBM Rational Functional IBM Rational 8.2.1 Tester LabVIEW National Instruments 2011 Maveryx Maveryx 1.2.0 Oracle Application Testing Oracle Corporation 12.1 Suite QF-Test Quality First Software GmbH 3.4.7 Ranorex Ranorex GmbH 3.2.3 Rational robot IBM Rational 2003 Selenium Open source 2.20 SilkTest Micro Focus 2011 © 2010 Accellence (Thailand) Limited.
Automated Testing Framework (Cont.) Tool name Produced by Latest version eggPlant TestPlant 2012 EiffelStudio AutoTest Eiffel Software 7.0, Nov 2011 SOAtest Parasoft 9.2 TestComplete SmartBear Software 8.7 Testing Anywhere Automation Anywhere 7.5 TestPartner Micro Focus 6.3 TPT PikeTec GmbH 4.0 TRICENTIS Technology & TOSCA Testsuite 7.3.1 Consulting Visual Studio Test Microsoft 2010 Professional WATIR Open source 3.0 Telerik Test Studio Telerik, Inc. 2012.1 © 2010 Accellence (Thailand) Limited.
Watir • It‟s a Ruby library • Multi browser (& OS) support • Has a rich API • Has a „Simple‟ class (for non-tech users) • Watij & Watin (Java & .NET) © 2010 Accellence (Thailand) Limited.
Watir Users Source: http://wiki.openqa.org/display/WTR/Watir+Users © 2010 Accellence (Thailand) Limited.
What kind of automated testing does Facebook do? © 2010 Accellence (Thailand) Limited.
Watir at Facebook * Steven Grimm, Facebook‟s test engineering tech lead © 2010 Accellence (Thailand) Limited.
Watir Demo © 2010 Accellence (Thailand) Limited.
Selenium • Multi browser, OS & language support • Install server-side or as FF add-on • Has its own IDE • Record and playback tests © 2010 Accellence (Thailand) Limited.
Selenium Demo © 2010 Accellence (Thailand) Limited.
Q&A Problem? © 2010 Accellence (Thailand) Limited.
Reference •http://www.slideshare.net/vivek_prahlad/web-test-automation-with-selenium •http://www.slideshare.net/sebastian_bergmann/testing-phpweb-applications-with-phpunit-and-selenium •http://davidweiss.blogspot.com/2006/08/when-to-automate-testing.html •http://en.wikipedia.org/wiki/Test_automation •http://en.wikipedia.org/wiki/List_of_GUI_testing_tools •http://www.fitnesse.org/FrontPage •http://seleniumhq.org/ •http://www.chapterpiece.com/software-development-process/2010/02/06/choosing-automated-testing-or-manual-testing/ •http://www.welovebug.com/software-testing/manual-vs-automated-testing/ •http://www.chapterpiece.com/software-development-process/2010/01/21/tell-us-why-automated-testing-failed/ •http://www.chapterpiece.com/software-development-process/2010/01/30/why-automated-testing-fails/ •http://www.chapterpiece.com/software-development-process/2010/01/03/testing-in-agile/ •http://blogs.mulesoft.org/web-testing-selenium/ •http://watir.com/ •http://www.outsourcebazaar.com/index_Article_AutomatedVsManualTesing.html •http://www.slideshare.net/directi/automated-testing-vs-manual-testing-391121 © 2010 Accellence (Thailand) Limited.
Reference (Cont.) •http://allfacebook.com/how-facebook-automatically-tests-code-phpunit-watir_b15369 •http://www.quora.com/Facebook-Engineering/What-kind-of-automated-testing-does-Facebook-do •http://www.slideshare.net/sumanth/watir-presentation-sumanth-krishna-a •http://java-thai-talk.blogspot.com/2011/01/automated-testing-vs-manual-testing.html •http://googletesting.blogspot.com/2007/10/automating-tests-vs-test-automation.html •http://www.hanselman.com/blog/NewReleaseOfWatirMakerNowWatirRecorder.aspx •http://wiki.openqa.org/display/WTR/Example+Test+Case •http://blog.sahi.co.in/2010/04/sahi-vs-selenium.html © 2010 Accellence (Thailand) Limited.

Automated testing web application

  • 1.
    Automated Testing forWeb application Kiattikhun Prathumma June 21, 2012 © Copyright 2010, Accellence (Thailand) Ltd.
  • 2.
    Agenda • What is Automated Testing • Automated Testing vs Manual testing • Automated Testing Framework • Demo • Q&A © 2010 Accellence (Thailand) Limited.
  • 3.
    What is AutomatedTesting “…Test automation is the process of writing a computer program to do testing that would otherwise need to be done manually…” Source: http://en.wikipedia.org/wiki/Test_automation © 2010 Accellence (Thailand) Limited.
  • 4.
    Advantages Automated Testing Manual Testing If Test Cases have to be run a small If you have to run a set of tests number of times it's more likely to repeatedly automation is a huge gain perform manual testing Helps performing "compatibility It allows the tester to perform more testing" - testing the software on ad-hoc (random testing) different configurations It gives you the ability to run automation scenarios to perform Short term costs are reduced regressions in a shorter time It gives you the ability to run The more time tester spends testing a regressions on a code that is module the grater the odds to find continuously changing real user bugs Can be run simultaneously on different machines thus decreasing testing time Long term costs are reduced © 2010 Accellence (Thailand) Limited.
  • 5.
    Disadvantages Automated Testing Manual Testing It's more expensive to Manual tests can be very time automate. Initial investments consuming are bigger than manual testing You cannot automate For every release you must everything, some tests still have rerun the same set of tests to be done manually which can be tiresome © 2010 Accellence (Thailand) Limited.
  • 6.
    Use Automated Testing? “…It only makes sense to use automated testing tools when the costs of acquiring the tool and building and maintaining the tests is less than the efficiency gained from the effort" John Overbaugh, Senior Lead Software Development Engineer In Test (SDET) at Microsoft © 2010 Accellence (Thailand) Limited.
  • 7.
    Use Manual Testing? “…Once a team is good at managing testing risk and test coverage and applying the right testing techniques, then talking about automation makes sense." Mike Kelly, Software development manager for a Fortune 100 company © 2010 Accellence (Thailand) Limited.
  • 8.
    Other factors • The performance of your test tools • The knowledge level of your testing team • The continuous growth of software to be tested • Number of necessary regressions © 2010 Accellence (Thailand) Limited.
  • 9.
    General approaches totest automation 1. Code-driven testing - Testing frameworks such as the xUnit frameworks 2. Graphical user interface testing - A testing framework generates user interface events such as keystrokes and mouse clicks, and observes the changes that result in the user interface © 2010 Accellence (Thailand) Limited.
  • 10.
    Automated Testing Framework Toolname Produced by Latest version HP QuickTest Professional HP Software Division 11.0 HTTP Test Tool Open source 2.0.8 IBM Rational Functional IBM Rational 8.2.1 Tester LabVIEW National Instruments 2011 Maveryx Maveryx 1.2.0 Oracle Application Testing Oracle Corporation 12.1 Suite QF-Test Quality First Software GmbH 3.4.7 Ranorex Ranorex GmbH 3.2.3 Rational robot IBM Rational 2003 Selenium Open source 2.20 SilkTest Micro Focus 2011 © 2010 Accellence (Thailand) Limited.
  • 11.
    Automated Testing Framework(Cont.) Tool name Produced by Latest version eggPlant TestPlant 2012 EiffelStudio AutoTest Eiffel Software 7.0, Nov 2011 SOAtest Parasoft 9.2 TestComplete SmartBear Software 8.7 Testing Anywhere Automation Anywhere 7.5 TestPartner Micro Focus 6.3 TPT PikeTec GmbH 4.0 TRICENTIS Technology & TOSCA Testsuite 7.3.1 Consulting Visual Studio Test Microsoft 2010 Professional WATIR Open source 3.0 Telerik Test Studio Telerik, Inc. 2012.1 © 2010 Accellence (Thailand) Limited.
  • 12.
    Watir • It‟s a Ruby library • Multi browser (& OS) support • Has a rich API • Has a „Simple‟ class (for non-tech users) • Watij & Watin (Java & .NET) © 2010 Accellence (Thailand) Limited.
  • 13.
    Watir Users Source: http://wiki.openqa.org/display/WTR/Watir+Users © 2010 Accellence (Thailand) Limited.
  • 14.
    What kind ofautomated testing does Facebook do? © 2010 Accellence (Thailand) Limited.
  • 15.
    Watir at Facebook * Steven Grimm, Facebook‟s test engineering tech lead © 2010 Accellence (Thailand) Limited.
  • 16.
    Watir Demo © 2010 Accellence (Thailand) Limited.
  • 17.
    Selenium •Multi browser, OS & language support • Install server-side or as FF add-on • Has its own IDE • Record and playback tests © 2010 Accellence (Thailand) Limited.
  • 18.
    Selenium Demo © 2010 Accellence (Thailand) Limited.
  • 19.
    Q&A Problem? © 2010 Accellence (Thailand) Limited.
  • 20.
    Reference •http://www.slideshare.net/vivek_prahlad/web-test-automation-with-selenium •http://www.slideshare.net/sebastian_bergmann/testing-phpweb-applications-with-phpunit-and-selenium •http://davidweiss.blogspot.com/2006/08/when-to-automate-testing.html •http://en.wikipedia.org/wiki/Test_automation •http://en.wikipedia.org/wiki/List_of_GUI_testing_tools •http://www.fitnesse.org/FrontPage •http://seleniumhq.org/ •http://www.chapterpiece.com/software-development-process/2010/02/06/choosing-automated-testing-or-manual-testing/ •http://www.welovebug.com/software-testing/manual-vs-automated-testing/ •http://www.chapterpiece.com/software-development-process/2010/01/21/tell-us-why-automated-testing-failed/ •http://www.chapterpiece.com/software-development-process/2010/01/30/why-automated-testing-fails/ •http://www.chapterpiece.com/software-development-process/2010/01/03/testing-in-agile/ •http://blogs.mulesoft.org/web-testing-selenium/ •http://watir.com/ •http://www.outsourcebazaar.com/index_Article_AutomatedVsManualTesing.html •http://www.slideshare.net/directi/automated-testing-vs-manual-testing-391121 © 2010 Accellence (Thailand) Limited.
  • 21.
    Reference (Cont.) •http://allfacebook.com/how-facebook-automatically-tests-code-phpunit-watir_b15369 •http://www.quora.com/Facebook-Engineering/What-kind-of-automated-testing-does-Facebook-do •http://www.slideshare.net/sumanth/watir-presentation-sumanth-krishna-a •http://java-thai-talk.blogspot.com/2011/01/automated-testing-vs-manual-testing.html •http://googletesting.blogspot.com/2007/10/automating-tests-vs-test-automation.html •http://www.hanselman.com/blog/NewReleaseOfWatirMakerNowWatirRecorder.aspx •http://wiki.openqa.org/display/WTR/Example+Test+Case •http://blog.sahi.co.in/2010/04/sahi-vs-selenium.html © 2010 Accellence (Thailand) Limited.