SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 10 of 10
  1. #1
    Junior Member
    Join Date
    Oct 2005
    Location
    pak
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    one reusable action per test makes your test easy

    Hi All,

    I am currently working on Test automation of a web application. I am going with an approach where I am creating one reusable action to cater one application feature. On the other hand I am using one Test per Application module.
    So far things are fine for me, but we have a third party QTP consultant with us to review our work. In our last discussion He suggested to keep one reusable action per test rather than having one test with multiple user actions. This way your tests would be easier to maintain.
    This didn’t strike my mind as it will increase number of test scripts in multiplication. May cause dicrease in script execution as well

    Can anyone suggest some Pros and cons of having one reusable action per test

    Waiting for your valueable feedback

  2. #2
    Moderator ifraser's Avatar
    Join Date
    Jul 2004
    Location
    Brisbane, Australia
    Posts
    2,090
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: one reusable action per test makes your test e

    It all seems a bit old school to me. Ever since I have been using QTP I only use 1 script with one action. The sole purpose of that script is to start the framework.

    Anytime you use QTP in the way Mercury/HP intended causes a high maintenance over head.
    You can buy my Art from: "Post Cards now available"
    Ian Fraser Landscape Photography
    World Wide Shipping.

    http://mowogman.wordpress.com/

  3. #3
    Senior Member
    Join Date
    Sep 2006
    Location
    CA, USA
    Posts
    425
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: one reusable action per test makes your test e

    Is the question for one action, no matter what kinds, per test?

    I saw many people use one action per test to avoid using actions. Within the only action people call functions.

    QTP action is a special function and it associates not only the code logic, but also local OR, datasheet, and paras. Therefore, it can brings lots of over head. Moreover, reusiable actions can cause cross reference or recursion in the worst case.

    On the other hand, avoiding use actions defenitely loses QTP features. e.g. QTP datatable is very powerful and handy...

  4. #4
    Senior Member
    Join Date
    Jul 2009
    Posts
    162
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: one reusable action per test makes your test e

    Hi ,

    I feel that, creating reusable actions in a test will reduces the rework.

    Ex: Let think that we have 3 scenarios.

    1. Login in email & Verify the new mail & Logout.
    2. Login into Email & compose e mail & Logout
    3. Login into E mail & Delete the mail & Logout.

    In the first sceanrios we can write 3 reusable actions a.Login b.VerifyEmail c.Logout
    In second scenario Login,ComposeEMail,Logout.
    In third scenario Login,DeleteEMail,Logout.

    In all the scearios we required Login & Logout. So creating Reusable actions for these Login & Logout will redeces rework & we can reuse these actions any where.

    Thanks,
    Nagesh

  5. #5
    Member
    Join Date
    Jan 2008
    Location
    China
    Posts
    89
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: one reusable action per test makes your test e

    For one reusable action per test, it will produce a lot of files and folders, sometimes will make your version control tool crash.

  6. #6
    Senior Member
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    116
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: one reusable action per test makes your test e

    One test to start. Try to shell all Objects in functions.

    Call that functions (Keywords) by header names of the Exceltables collumns that you arrange from left to right and serve the data from the rows. Then the data rules the workflow not the script ask for data.

    And dont forget to serve the tests with a functionality to start even if the test before fail.

    Any question how to realize?

    Just ask
    Catch the train on rail of fasten, proven and easy solutions.

    I have succesfully arranged a workflow Independent Framework for QTP like the EMOS Framework for WR

  7. #7
    Moderator
    Join Date
    Sep 2001
    Location
    Doncaster, UK
    Posts
    5,788
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: one reusable action per test makes your test e

    [ QUOTE ]


    1. Login in email & Verify the new mail & Logout.
    2. Login into Email & compose e mail & Logout
    3. Login into E mail & Delete the mail & Logout.

    In the first sceanrios we can write 3 reusable actions a.Login b.VerifyEmail c.Logout
    In second scenario Login,ComposeEMail,Logout.
    In third scenario Login,DeleteEMail,Logout.

    In all the scearios we required Login & Logout. So creating Reusable actions for these Login & Logout will redeces rework & we can reuse these actions any where.


    [/ QUOTE ]

    Create Login function
    Create Logout Function
    Create VerifyNewMail Function
    Create ComposeEmail Function
    Create DeleteEmail Function

    Call then in any order you like from one QTP action

    Same as your idea but infinately more flexible/maintainable/scaleable

    The advise you are getting in this thread is from experienced QTP testers, some of who have used a methodology similar to yours and realised that there are better ways to use QTP. I am one of those who has been down your route and wasted valuable time doing so.

    People are not rubbishing your method, they are trying to help you see there are better ways that the HP documented way to use QTP.


    MArk Smith.

  8. #8
    Advanced Member Anshoo Arora's Avatar
    Join Date
    Oct 2007
    Location
    New Delhi, India
    Posts
    635
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: one reusable action per test makes your test e

    As Mark said, I would also like to recommend you to look at this OO approach to modularize your functionality(ies): http://relevantcodes.com/qtp-using-c...est-modules-i/
    Regards,

    Anshoo Arora
    Relevant Codes

  9. #9
    Junior Member
    Join Date
    Nov 2007
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: one reusable action per test makes your test e

    [ QUOTE ]
    It all seems a bit old school to me. Ever since I have been using QTP I only use 1 script with one action. The sole purpose of that script is to start the framework.

    Anytime you use QTP in the way Mercury/HP intended causes a high maintenance over head.

    [/ QUOTE ]

    I'm on the same page as you, Ian. I know that even using a one-reusable-action-per-script framework results in limitations, although it can work.

    I would like to know more about your style of scripting. You're externally launching your .vbs scripts, but is there more to it?

    Thanks,
    -ZR

  10. #10
    Junior Member
    Join Date
    Nov 2007
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: one reusable action per test makes your test e

    [ QUOTE ]
    [ QUOTE ]
    It all seems a bit old school to me. Ever since I have been using QTP I only use 1 script with one action. The sole purpose of that script is to start the framework.

    Anytime you use QTP in the way Mercury/HP intended causes a high maintenance over head.

    [/ QUOTE ]

    I'm on the same page as you, Ian. I know that even using a one-reusable-action-per-script framework results in limitations, although it can work.

    I would like to know more about your style of scripting. You're externally launching your .vbs scripts, but is there more to it?

    Thanks,
    -ZR

    [/ QUOTE ]

    I just realized that you have a framework concept like this posted in the forums already. I'm currently reading it.

    [ QUOTE ]

    (from your document...)
    I have provided examples of putting common actions into subs that can be called this allows for easy maintenance of common reusable actions.


    [/ QUOTE ]

    That should work just nicely. Thanks Ian!

 

 

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 7.89%
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 12:33 AM.

Copyright BetaSoft Inc.