Transcript Document
Automation of Software Test Eunyoung Hwang Agenda • What is software test automation? • pros and cons • Return on investment (ROI) • Test automation tools • Demo for Selenium IDE Motivation! 143,529,861 Links Test Automation • To automate a manual process by using testing tool • The use of software to control the execution of tests • The comparison of actual outcomes to predicted outcomes • The setting up of test preconditions, other test control , test reporting functions • Using the right tool for the project can reduce time and costs Pros. And Cons. Pros.(Cases need automated tests) Cons.(Cases need manual tests) • a set of same test cases repeatedly • costs more to automate • regression tests with frequent changes in timely manner • visual setting (eg. Right color and font have been populated on screen or not) • a large test matrix (running different languages on different OS platforms at the same time) => reduce the number of manual testers => Test with abnormal random data Return on Investment gains costs By company, Keane Return on Investment By company, Keane Two General Approaches • Code-driven testing • Uses testing frameworks such as the xUnits (eg. Junit, PHPUnit) • Executes unit tests to verify that the program runs as expected • Key feature of Agile software development for Test-driven development • Graphical user interface testing • Allows users to interactively record and playback any number of times, comparing actual results to those expected • Pros - requires little or no software development on any GUI application • Cons - relabeling a button or moving it to another part of the window may require re-recording Tools Selenium (IDE, RC) Watir QTP SoapUI Company Open source Open source HP Quick Test Professional Open Source Features •IDE: Firefox add-on provide record and playback Also, generate code to run the tests with Selenium RC •RC(Remote Control): a client/server system allows you to control web browsers locally or on other computers •Web Application Testing in Ruby is a functional testing tool for web applications •Modular (Record & Playback) driven, Data driven (Data tables), Keyword driven (Keyword view, function libraries etc) framework •Strong in reporting and database application Web service testing tool for service-oriented architectures (SOA), both SOAP and Rest cons Have to learn a vendorscript(Selenese) Have to learn Ruby •Use only Vbscript •Expensive licence cost Free of charge Free of charge $14,000 per licence Trial version available $349/yr SoapUI Pro. Trial 14days seleniumhq.org/ watir.com/ http://www8.hp.com/u s/en/softwaresolutions/software.ht ml?compURI=117295 soapui.org Simple example in PHPUnit (1) Regular PHP code Simple Automated Testing Code Simple example in PHPUnit (2) Testing array operations with PHPUnit Selenium RC and PHPUnit Selenium RC is a test tool that allows you to write automated user-interface tests for web applications in any programming language Result if fails Selenium IDE Summary • Test automation • pros and cons • Return on investment (ROI) • Tools • PHPUnit • Selenium IDE References [1] http://www.opensourcetesting.org [2] http://www.nickjenkins.net/prose/testingPrimer.pdf [3] http://www.softwareqatest.com/qatweb1.html [4] http://www.keane.com/resources%2Fpdf%2FWhitePapers%2FWP_ROIforTestA utomation.pdf [5] Jussi Kasurinen, Ossi Taipale, and Kari Smolander, “Software Test Automation in Practice: Empirical Observations,” Advances in Software Engineering, vol. 2010, Article ID 620836, 18 pages, 2010. doi:10.1155/2010/620836 [6] http://www.csd.uwo.ca/courses/CS614b/DiLoreto1.pdf [7] http://en.wikipedia.org/wiki/Test_automation Backup Slides Return on Investment By company, Keane 3