SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Jun 2001
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: naming conventions

    my naming conventions for identifiers is that I add a shortcut name as a suffix to the object. Like for instance I add the suffix Pg for web page, Fld for fields etc.
    So when I have a script of ExchangePg.SubmitBtn.Click()

    I know that there is a Submit button in the Exchange page and that button is clicked.

    ------------------

  2. #2
    Moderator
    Join Date
    May 2001
    Location
    SanJose,CA,USA
    Posts
    363
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    naming conventions

    Hello

    Any one has naming conventions in SilkTest- 4Test.

    I badly need of that

    thanks

  3. #3
    Member
    Join Date
    May 2000
    Location
    Philadelphia
    Posts
    40
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: naming conventions

    I tend to prefix the name of the control with the following using a control that has the title ‘Account Code’ as an example

    pbAccCde = PushButton
    tfAccCde = Textfield
    stAccCde = StaticText
    dbAccCde = DialogBox
    etc…

    Therefore I know exactly what StaticText goes with what TextField etc. Also by using two letter prefixes, you can process the controls as strings if the need arises. I also abbreviate the control names. If anything was to go wrong with the script it’s easier to read what control the problem occurred on without having to scroll the page left and right.

    This has saved me a lot of time creating declarations as well. I have my own method to declare windows which prefixes the controls and creates the declaration in the format that I require. Unfortunately this is very specific to our product but it can save a lot of time if the declaration for the window needs to conform to a certain standard.
    Mr Benn

  4. #4
    Senior Member
    Join Date
    Mar 2000
    Location
    Dublin, Ireland
    Posts
    152
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: naming conventions

    Hi,

    Why not follow the Hungarian notation when naming variables (as recommended by Segue - see page xiii of the SilkTest User's Guide)? When naming object identifiers for windows I use the path of invocation. For example 'OptionsRuntimeY2KRules' in SilkTest corresponds to the dialog invoked when you select 'Y2K Rules' on the 'Runtime Options' dialog. The identifier for the 'Runtime Options' dialog (invoked by selecting the menu option 'Options / Runtime') is 'OptionsRuntime'.

    John.

    ------------------

    John O'Neill.
    Quality Automation Ltd.
    www.quality-automation.com
    John O'Neill.
    Quality Automation Ltd.
    www.quality-automation.com

  5. #5
    Senior Member
    Join Date
    Aug 1999
    Location
    San Diego, CA USA
    Posts
    219
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: naming conventions

    All of my naming conventions started as the ones I was trained to use by Segue - primarily Hungarian Notation. I have expanded on that for our own purposes. For example, I use a "f" prefix for all functions that we write so we can easily know if it's one of ours or a built-in one. I currently use "x" for data types that we define, such as records and enums but am re-thinking that a bit for the future.

    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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:23 PM.

Copyright BetaSoft Inc.