VooDoo Driver

43
VooDooDriver ( Testing Framework)

Transcript of VooDoo Driver

Page 1: VooDoo Driver

VooDooDriver ( Testing Framework)

Page 2: VooDoo Driver

Agenda of Training

Introduction of VooDooDriver. How to setup VooDooDriver. VooDooDriver demo script. How to execute VooDooDriver. VooDooDriver Elements.

Page 3: VooDoo Driver

Introduction of VooDooDriver

Automation Framework Coded in Java Based on Selenium WebDriverTest script in xml format

Page 4: VooDoo Driver

Advantages of VooDoo over Selenium

No need to write code for initializing browser. No need to write code for reading input file. No need to write code for handling pop up

window. Facilitates to use simple tag elements to use

web elements in your test script. No need to use action builder for advanced

user interactions.

Page 5: VooDoo Driver

Challenges

To write to a file using XML.Does not generate interactive report. Conditions and looping doesn’t work in XML.

Page 6: VooDoo Driver
Page 7: VooDoo Driver
Page 8: VooDoo Driver
Page 9: VooDoo Driver
Page 10: VooDoo Driver
Page 11: VooDoo Driver
Page 12: VooDoo Driver
Page 13: VooDoo Driver
Page 14: VooDoo Driver
Page 15: VooDoo Driver
Page 16: VooDoo Driver

VooDoo Demo Script

<soda><link id="moduleTab_Accounts"

jscriptevent="onmouseover" click="false"/><link id="Accounts_link" click="true"/><textfield id="name_basic" set="Adams" /><button id="search_form_submit" click="true"/></soda>

Page 17: VooDoo Driver

How to execute VooDoo script? Go to src->VoodooDriver.java. Right click -> Run As -> Run Configuration. Select tab "Arguments". Input the command line arguments --

browser=firefox -- suite=C:\Users\Sanjeev\workspace\voodoo\tests\suites\VooDooTest.xml.

--browser=firefox -- suite=C:\Users\Sanjeev\ workspace\voodoo\tests\suites\VooDooTest.xml.

Page 18: VooDoo Driver
Page 19: VooDoo Driver
Page 20: VooDoo Driver
Page 21: VooDoo Driver
Page 22: VooDoo Driver

VooDooDriver Elements

1. Attach 2. Variable3. Wait4. Puts5. Browser6. TextField7. TextArea8. Label

Page 23: VooDoo Driver

VooDooDriver Elements

9. Button10.Unordered List (UL)11. Select12. Radio13. Checkbox14. Frame15. Div16. Link

Page 24: VooDoo Driver

VooDooDriver Elements

17. Span18. Assert19. Jscriptevent20. Alert21. Screenshot

Page 25: VooDoo Driver

VooDooDriver Elements

Attach

<attach title="The new Window">//attach that new window

<button id="save" /><browser action="close" /> //close the

popup browser</attach>

Page 26: VooDoo Driver

VooDooDriver Elements

Variable

<var var="test" set="123" /> //create a variable ‘test’ and set it to 123

<textfield id="foo" set="{@test}" /> //set value of test to the text field

Page 27: VooDoo Driver

VooDooDriver Elements

Wait

<wait /> //wait for a period of 5 seconds<wait timeout = “2” /> //wait for a period of 2 seconds

Puts

<puts text=”Hello World” /> // print the text “Hello World”

Page 28: VooDoo Driver

VooDooDriver Elements

Browser

<browser url="http://cnn.com" /> //browse to CNN.com

<browser assert="Lastest News" /> //make sure ‘Latest News’ shows up on page

<browser action="close" /> //closes the browser

Page 29: VooDoo Driver

VooDooDriver Elements

TextField

<textfield id="foo" set="tree“ /> /* sets the value of the text field to ‘tree’ */

Page 30: VooDoo Driver

VooDooDriver Elements

TextArea

<textarea id="foo" set="this can be a very long string" />

/* sets the value of the textarea to ‘this can be a very long string’ */

Page 31: VooDoo Driver

VooDooDriver Elements

Unordered List (UL)

<UL name=”user_select” click=”true” />/* looks for the Unordered List by the name and

then clicks on it */

Page 32: VooDoo Driver

VooDooDriver Elements

Select

<select id="sel" set="1" /><select id="sel" set="9" />/* selects two options in the HTML select

element*/

Page 33: VooDoo Driver

VooDooDriver Elements

Checkbox

<checkbox name="massall" click="true" />/* the checkbox with name ‘massall’ will be

checked */

Page 34: VooDoo Driver

VooDooDriver Elements

Frame

<Frame name=“xframe“ />/* the Frame with name ‘xframe’ is called*/

Page 35: VooDoo Driver

VooDooDriver Elements

Div<div id="list_div_win"> //focus on

the ‘list_div_win’ section of the page<button value="Add" click="true" />//click the

button in the page section</div>/* goes to the div field ‘list_div_win’ and clicks

the button ‘Add’ and the performs an ‘onmouseup’ event for the button */

Page 36: VooDoo Driver

VooDooDriver Elements

Span

<span class="pageNumbers" assert="(1 - 2 of 6)" />

/* asserts that class ‘pageNumbers’ has the text ‘1-2 of 6’ */

Page 37: VooDoo Driver

VooDooDriver Elements

jscriptevent

<button value="Add" jscriptevent="onmouseup" />//onmouseup event for add button

Page 38: VooDoo Driver

VooDooDriver Elements

Alert

<alert alert="true" assert="Your registration will now be submitted, do you wish to proceed?"/>

Page 39: VooDoo Driver

VooDooDriver Elements

Screenshot

<screenshot file="C:\Users\Sanjeev\Desktop\screen\a1.png"/>

Page 40: VooDoo Driver

Data Driven using CSV

<csv file="C:/scripts/sugarcrm/csvs/users.csv var="user" />

<puts text="{@user.username}" /></csv>

Page 41: VooDoo Driver

Test Scenarios and Test Cases

You can create script for multiple test cases under tests folder.

You can create Test Scenario in the form of test suites that will contain the set of test cases which will contain under tests->suites.

Page 42: VooDoo Driver

VooDooDriver Log

After running your script the test report generates in the form of log file.

Soda Test Report:--testlog:C:\Users\Sanjeev\workspace\Crmdev\06-19-2013-12-38-02.588\CheckCreateLeave-06-19-2013-12-38-08-331.log

Select the path of the testlog and view it on another window.

Page 43: VooDoo Driver

Thank You.