SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Aug 2006
    Location
    mumbai
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    parametrization of empid in script

    Hi Guys,

    anyone please help me in parametrization of empid in script....

    1] steps I have followed in application are ==> Login with admin => create user screen => enter employee details (like empid, name, emailid, mobile no, designation......etc) => submit button => logout

    2] For new user creation only empid should be different and duplication allowed in all other fields (like name, emailid, mobil......etc)

    3]I have generated a script. Now I would like to run the script for the creation of 20 user by parametrization of empid.

    4] Can anyone give any idea about the variable define, for loop or array used in script....... so that I can run the script and 20 users will get generated with different empid....

    Thanks in advance....

  2. #2
    Moderator
    Join Date
    Sep 2001
    Location
    Boston, MA
    Posts
    4,348
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: parametrization of empid in script

    Corey Goldberg
    Homepage: goldb.org
    Twitter: twitter.com/cgoldberg
    Google+: gplus.to/cgoldberg

  3. #3
    Moderator
    Join Date
    Jun 2003
    Location
    Hollis, NH, USA
    Posts
    1,551
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: parametrization of empid in script

    You asked about parametrization. You should also read about correlation.

    http://www.sqaforums.com/showflat.ph...vc=#Post500366

  4. #4
    Junior Member
    Join Date
    Aug 2006
    Location
    mumbai
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: parametrization of empid in script

    Following is my recorded script:

    !Browser:IE5
    !Date : 2/12/2010
    Environment
    Description ""
    Mode HTTP
    Wait UNIT MILLISECONDS

    Definitions
    ! Standard Defines
    Include "RESPONSE_CODES.INC"
    Include "GLOBAL_VARIABLES.INC"

    CHARACTER*512 USER_AGENT
    Integer USE_PAGE_TIMERS
    CHARACTER*256 MESSAGE

    Timer T_PARA
    CHARACTER*1024 cookie_1_0

    CONSTANT DEFAULT_HEADERS = "server....^J" &
    "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"

    Code
    ! This is the request where our session id is set (via cookie)
    PRIMARY GET URI "server HTTP/1.0" ON 1 &
    HEADER DEFAULT_HEADERS &
    ,WITH {"Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, " &
    "application/x-shockwave-flash, */*", &
    "Accept-Language: en-us", &
    "Connection: Keep-Alive"}

    Load Response_Info Header on 1 &
    Into cookie_1_0 &
    ,WITH "Set-Cookie,JSESSIONID"

    ! ... multiple secondary GET requests omitted ...
    ! with this request we actually log in to this site

    PRIMARY POST URI "server HTTP/1.0" ON 5 &
    HEADER DEFAULT_HEADERS &
    ,WITH {"Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, " &
    "application/x-shockwave-flash, */*", &
    "Referer: http://172.16.0.17:9001/Login.action", &
    "Accept-Language: en-us", &
    "Content-Type: application/x-www-form-urlencoded", &
    "Connection: Keep-Alive", &
    "Content-Length: 51", &
    "Pragma: no-cache", &
    "Cookie: "+cookie_1_0} &
    ,BODY "loginId=u0000008&password=password%3B&use rRole=R002"

    ! this is the line of code that we need to modify to data iterate the employeeId while executing the test

    PRIMARY POST URI "server HTTP/1.0" ON 21 &
    HEADER DEFAULT_HEADERS &
    ,WITH {"Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, " &
    "application/x-shockwave-flash, */*", &
    "Referer: http://172.16.0.17:9001/userCreation.action?unlock=unlock", &
    "Accept-Language: en-us", &
    "Content-Type: application/x-www-form-urlencoded", &
    "Connection: Keep-Alive", &
    "Content-Length: 426", &
    "Pragma: no-cache", &
    "Cookie: "+cookie_1_0} &
    ,BODY "corpId=2&vendorId=&gropuId=GP012&corp Name=-1&vendorName=5&vendorSelectionIndex=11&amp ;userLocation" &
    "=1116-BHO&locationSelectionIndex=1&employeeId=00 00111&prefix=Mr.&address=fsfsf&firstNa me=asdasd" &
    "&pincode=&middleName=&email=prashant. munjewar@g-t-s.in&lastName=adsasd&mobile=&countryCo deMob=0" &
    "91&mobileNo=9619364411&birthDate=&dat e=01&month=02&year=1911&telephone=&amp ;countryCodeTel=&cityCod" &
    "eTel=&telephoneNo=&designation=asdasd&amp ;deptId=-1"


    Please Can anyone give me the solution for this iterations....

  5. #5
    Moderator
    Join Date
    Jun 2003
    Location
    Hollis, NH, USA
    Posts
    1,551
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: parametrization of empid in script

    Corey's post answers your question. Read and try what you learn and you will be more likely to get help. Sitting back and asking others to do your learning and thinking for you won't get you very far.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 09:59 AM.

Copyright BetaSoft Inc.