MonkeyTalk DataDriven Script

Posted: September 18, 2012 in Android, Automation, Monkeytalk
Tags: , , , ,

Data Driven Script:

In MonkeyTalk you can use/create the Data Driven Script by using RunWith action and three files are required for Data Driven Script.

1. Main file– Its extension is .mt.In this main script is written.

datadriven.mt

Vars * Define user pass
Input username tap
Input username EnterText ${user}
Input password EnterText ${pass}
Button LOGIN Verify LOGIN %thinktime=1000
Button LOGIN tap
Label * Verify “Welcome, ${user}!” %thinktime=3000
Button LOGOUT VerifyNot LOGIN
Button LOGOUT tap %thinktime=5000

you can view tabular form of Tabular form datadriven.mt script:

 

2. Driver script: Its extension is .mt. This script is use to run the main file.

Script datdriven.mt RunWith credentials.csv

you can view tabular form of Tabular form Driver script:

3. CSV File:Its extension is .csv.

You can create csv file in your MonkeyTalk project by following below mentioned steps :

Right click on project folder

new >>other >>Click on General >>choose file >> give a name with extension .csv

Now  in this file give values for variables which you are defined in main file/script. In first row of this file mention variables name separated by space which you have define in main file.

user pass
joew,sword1
jyoti,password1
charlie,test

you can view tabular form of Tabular form csv file:

Advertisements
Comments
  1. testingshine says:

    Nice initiative..
    Keep posting…informative

  2. Anand Naikar says:

    How can I enter numerical values,can you help me pls

  3. prabhusrinivasan says:

    i created driver script and csv file.After that if i click on run..Its not showing any thisng.Just showing run configuration.So help me wat to do for run this script

  4. Yos Ra says:

    helpful thx

  5. Vijay says:

    Hi All –

    Please give me the elaborated steps for the Data driven scripts.

    Thanks in advance

    Regards,
    Vj

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s