robot framework basic level n.
Skip this Video
Loading SlideShow in 5 Seconds..
Robot Framework – Basic Level. PowerPoint Presentation
Download Presentation
Robot Framework – Basic Level.

Loading in 2 Seconds...

play fullscreen
1 / 38

Robot Framework – Basic Level. - PowerPoint PPT Presentation

  • Uploaded on

Robot Framework – Basic Level. Date: 2011- 10 -0 3 Version: 1.0. Robot Framework - Introduction. Robot Framework is a generic test automation framework for acceptance testing and acceptance test-driven development (ATDD). . Robot Framework - Introduction.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

Robot Framework – Basic Level.

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
    Presentation Transcript
    1. Robot Framework – Basic Level. Date: 2011-10-03 Version: 1.0

    2. Robot Framework - Introduction Robot Framework is a generic test automation framework for acceptance testing and acceptance test-driven development (ATDD).

    3. Robot Framework - Introduction It has easy-to-use tabular test data syntax and utilizes the keyword-driven testing approach.

    4. Robot Framework - Introduction Its testing capabilities can be extended by test libraries implemented either with Python or Java, and users can create new keywords from existing ones using the same syntax that is used for creating test cases.

    5. Robot Framework - Features • Enables easy-to-use tabular syntax for creating test cases in a uniform way. • Allows using keyword-driven, data-driven and behavior-driven (BDD) approaches. • Provides ability to create reusable higher-level keywords from the existing keywords. • Provides easy-to-read reports and logs in HTML format. • Is platform and application independent. • The modular architecture supports creating tests even for applications with several diverse interfaces. • Provides a simple library API for creating customized test libraries. • Provides a command line interface and XML based outputs for integration into existing build infrastructure (continuous integration systems). • Provides support for Selenium for web testing, Java GUI testing, running processes, Telnet, SSH,Swing, and so on. • Remote library interface enables distributed testing and implementing test libraries in any programming language. • Provides tagging to categorize and select test cases to be executed. • Has built-in support for variables, practical particularly for testing in different environments.

    6. How to install? ROBOT FRAMEWORK • SELENIUM RC •

    7. Pluginsand Libraries • FireFox: • Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page. • XPath Checker is a Firefox Extension for testing XPath expressions interactively.

    8. Pluginsand Libraries • ROBOT (buil in): • Selenium Library(used in the workshop).SeleniumLibrary is a Robot Framework test library that uses the popular Selenium web testing tool internally. It provides a powerful combination of simple test data syntax and support for different browsers. • Database LibraryDatabase Library is a Robot Framework test library that provides common funtionality for testing database contents. • SSH LibraryIt enables execution of commands on a remote machine over an SSH connection. It also offers possibility to transfer files from and to a remote machine. • Swing LibrarySwingLibrary is a Robot Framework test library for testing Java Swing applications. • Dialogs test libraryDialogs is Robot Framework's standard library that provides means for pausing the test execution and getting input from users.

    9. Documentation – for exampleSeleniumLibrary • All keywords in SeleniumLibrary that need to find an elementon the page take an argument, locator. • In the most common case, locator is matched against the values of key attributes of the particular element type. • For example, id and name are key attributes to all elements, and locating elements is easy using just the id as a locator

    10. How to find LOCATOR? • For example button <Szukaj w Google> from • 1. Click RMB on button<Szukaj w Google> • 2. Choose Inspect element(Zbadaj element) from menu.

    11. How to start using ROBOT? 1. Run Selenium Server RC (clickshortcut on desktop) orfrom Terminal* : java -jar /usr/local/lib/python2.6/dist-packages/SeleniumLibrary/lib/selenium-server.jar -port 4444 2. Run RIDE: Shortcut „ctrl+i” or from Terminal* Tips: run Terminal – Aplications>Accessories>Terminalorshortcut„ctr+~” (tylda)

    12. 1. Step - Creatingnew PROJECT • 1. Create NEW PROJECT (File>New Project) • and selectoptions:

    13. Add Libraries to PROJECT • Choose Project_nameand add threeLIBRARIES: • TIPS: Selenium Library is with argument value 15 – stands for 15 secondstimeout

    14. Test setup and teardown • Test setup and teardown • Robot Framework has similar test setup and teardown functions as many other test automation frameworks. • In short, a test setup is something that is executed before a test case and a test teardown is executed after a test case.

    15. Teardown – what for? • What makes a test teardown special is that it is executed also when a test case fails, so it can be used for clean-up activities that must be done regardless of the test case status. • Both a setup and a teardown can also easily be specified for all test cases in a test suite, so using them avoids repetition.

    16. 2 Step – Create Test Setup • 1. Click RMB on Project_name > New User Keyword

    17. 2 Step – Create Test Setup • 2. Type in table: • ff – stands for FireFoxbrowser

    18. 2 Step – Create Test Setup • Tips: Start typing ‚Open Br..’ and then use ‚ctr+space’ for autocompletion.

    19. 2 Step – Create Test Teardown • 1. Click RMB on Project_name > New User Keyword • 2. Type inscripttable:

    20. Adding setup and teardown - success • SelectTest Setup and Test TeardownintoProject SettingsPage

    21. SAVE • Save:Hit ‚ctrl+shift+s’ • orclick (savebutton):

    22. Createnew TEST CASE • Click RMB on Project_name > New test Case

    23. Excrsise 1 – Steps • Open FF and go to part is in Test Setup) • Input text ROWER in search field. • Clicksubmittbutton<Szukaj> • VALIDATE: Resultspageschouldcontaintext ‚ROWER’

    24. Excrsise 1 – Steps • Input stepsintoscripttable:

    25. Run test case • Select RUNbookmark • Select checkbox for test case • Hit ‚START’ and… Watch the magic….

    26. View Report and Logs • Afterfinish test caseview Report and Logs • Report and Logsopens in browser.

    27. Exercise 1a (variables)– Steps 1. Copyexercise1 test case 2. In script: • addnewrow (RMB>Insert Rows) • replace Value ‚Rower’ to ${item}

    28. Exercise - 2 • 1. Step:

    29. Exercise - 2 • 2. Step: • Input Text${item} • DropBox:‚którekolwiek ze słów’ • Chcechbox: ‚Szukaj równieżw opisach’ and ‚Odbiór osobisty’ • Radiobutton: ‚Wszystkie województwa’

    30. Exercise - 2

    31. Creating User keywords • ClickRMB on <Project_name> New User Keyword • Namedit as ‚Finditem’ • AddnewArgument ${item_name} • Hit <OK> New Keyword appears:

    32. Creating User keywords • Select allrows from Excercise 2 – copyto clipbord(ctr+c) • Pasteit to ‚Finditem’ keyowrd `

    33. Exercise 3 – usinguserkeywords • Use‚Finditem’ keyword to buildscript • Then on ResultsPagedeletedynamic link (shown as button) <Odbiór osobisty>

    34. Exercise 3 – usinguserkeywords Excercise 3 script:

    35. Excersise 4 - Loops • Findfewitems in one Test Case • Script for Loopis:

    36. How LOOP works?

    37. The End