SPONSORS:






User Tag List

Results 1 to 8 of 8
  1. #1
    Senior Member
    Join Date
    Dec 2001
    Location
    Bozeman, MT, USA
    Posts
    265
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    creating re-usable silk framework

    I have been using silk for about 9 months now and have some questions.

    I was browsing these forums the other day looking for a solution to a problem I was having with the HtmlPopupList class and a javascript OnChange event. I didnt get an answer that worked for me but I did notice someone mentioned that if your silk engineers are spending most of their time maintaining their silk framework they are doing something wrong.

    We are constantly updating out silk framework for each project. When I talk about framework I mean our .inc files for that product, .t files, testdata, and baselines.

    For instance, I was working on a product a couple months ago that proved extremely challenging for silk. The application worked very similar to MS Word and MS Outlook in many respects. Those applications were used to model the look and feel of our app.

    We had a master window I guess you could call it. From that window you could launch many other windows that are all theoretically children of the master window but are also sort of like their own MainWin. To see kind of what I am talking about open MS Word and create 2 documents. Notice that they are both their and show up like seperate MainWin objects. If you do a file exit on one, it affects the other but to silk they look like 2 different applications.

    Aside from dealing with this, which was almost impossible to create a basestate for, window titles were constantly changing, modules being added, menus switched around, and baseline files changing.

    Now my question is this, am I doing something wrong or is it expected that with a moving target like this that we are going to spend alot of time maintaining the existing framework?

    It is really difficult to use the $ tags as they seem to change every build, indexes are ok but alot of dialogs have controls added and removed through the development process. I have found Object names to work best as tags and even they are not perfect as it seems we get into the last week of development and windows titles or button names are getting changed on me.

    What can I do to prevent this?

    I welcome any suggestions but I feel the answer coming my way is going to be to change developments process, which isnt going to happen.

    ------------------
    Ryan McCullough
    RightNow Tech. Inc.

  2. #2
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: creating re-usable silk framework

    Maintaining .inc files isn't uncommon if your UI is constantly changing. The .t files should remain pretty stable once you create them. The way we accomplish this is we create lots of custom functions. So as long as the concept of what you are doing remains the same from UI to UI but the way to go about it changes, you need only change the custom function and not each .t file. For example, you mentioned that placement of menu items change. What we do with menu items is declare a window in an .inc file such as

    WINDOW MIOpenWindow = WindowMaker.File.OpenWindow

    In my testcase I call MIOpenWindow.Pick(). So if the Open Window menu item moves someplace other than the File menu All I have to do is change the MIOpenWindow declaration in the .inc file to point it to the new location and all of my .t files will remain unchanged.

    And so goes the same with a custom function. If I call OpenWindow() custom function in a testcase but the way I go about performing this task changes, All I have to do is change the custom function in the .inc file and all the .t files that call this function will still work.

    Hope this helps.

    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  3. #3
    Senior Member
    Join Date
    Jan 2002
    Location
    Des Moines, Iowa
    Posts
    289
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: creating re-usable silk framework

    This is the same way I go about the task too. I do try to use all the tricks of the trade to keep the window declarations as small as possible.

    I seem to learn more about how to do that every day.

    I recently had to throw up my hands due to the changes our AUT took. The applet is completely customizable based on data about the user. The controls may or may not be there and the parent child relationship changes from instance to instance. What is constant is the whole list of possible controls, their classes and most of the tags. So I wrote a function that looks at the page and finds all the controls that I care about and places the handle for the controls that it finds into their slot of a record and returns it to the testcase. The testcase will then use the record and field to interact with the desired control.

    Slows down the testcase but it never fails now and I don't spend much time updating the function.

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

  4. #4
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: creating re-usable silk framework

    Last minute GUI changes will always add more work for you but keep mentioning it to development and they'll cut it down sooner or later so you can all meet the deadline.
    Something along this line "Programmer 'so-so': I could have run all these tests already and told you if anything got broken in your area of the application but because you made all these GUI changes in the last minute..... you'll have to wait longer for my test results.".

    In the meantime, you can always make use of the multitag statement.
    For example:
    Pushbutton is called Cancel (ver 1.0 thru 4.0). In version 5.0, dev decided to change it to Close button.

    your .inc had:
    PushButton Cancel
    tag "Cancel"

    and many of scripts already have:
    SampleDialog.Cancel.Click () // for example

    if you really really want to avoid the changes to your scripts, you can just use multitag in your .inc as follows:
    PushButton Cancel
    multitag "Cancel"
    [] "Close"

    Now your scripts should run in both old and new versions.


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


    [This message has been edited by Gilbert (edited 08-29-2002).]

  5. #5
    Senior Member
    Join Date
    Jul 2000
    Posts
    117
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: creating re-usable silk framework

    We found fairly early on that it really paid to have "flexible" tags (with Windoze GUI apps).

    What that meant was that we defined some functions -- ReadWindowIDs(), GetWindowID() -- that we use to obtain the RESOURCE ID from the application header files, then use this in the tag based on the #define name.

    I'll clarify a bit:

    1) During framework init, we read all the resource IDs from the application header files and put the name / number pair in a list. For example, #define IDC_ELEMENTFINDER_ELEMENTSLB 30020 gets read into a global list of window names and ids.

    2) We then modified our window decls to be similar to:
    [-] CheckListBox Elements
    [ ] tag "$" + GetWindowID ("IDC_ELEMENTFINDER_ELEMENTSLB")

    3) At runtime, then, we do the lookup to get the resource ID (which happens to be the $-tag) and voila, we're in synch!

    This way, we're more directly tied to the application, and much less dependent on tag names or numbers.

    Granted, this does require a reasonable amount of discipline on the dev side -- they can't go around changing the symbolic names (which they typically don't, anyway) at will. Any other changes are nearly transparent, though.

    This might help you in the realm of those darn changing tags. It sure seemed to make our lives easier.

    Now, if you're dealing with Java or HTML based stuff ... you'll obviously need a different approach ... sigh ...


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

  6. #6
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: creating re-usable silk framework

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Brent Rolland:
    Now, if you're dealing with Java or HTML based stuff ... you'll obviously need a different approach ... sigh ...

    <HR></BLOCKQUOTE>

    Then throw in a couple of die-hard Delphi programmers who just love customizing those already "Custom" objects, and you'll say...
    "Ayayay...I'm just glad SilkTest let me get by these stuffs with all types of 'work-arounds'.".



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

  7. #7
    Senior Member
    Join Date
    Dec 1999
    Location
    Sarasota FL USA
    Posts
    109
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: creating re-usable silk framework

    In our case we had an application that is in development mode and a GUI that would change once a week. They would move buttons from one frame to another, add frames, add button, change the caption of the buttons (and other controls). To get around the problem of out scripts breaking every other day, we scarped the windows declarations and went with a different process. We created a Type for each dialog that was in the application. We added a window for each element that we needed to work with to the type and created one location where they get defined.

    Type LOGIN_SCREEN is record
    Window LoginName
    Window LoginPassword
    Window LoginOK
    Window LoginCancel

    We then declare a global var of this type LOGIN_SCREEN LoginScreen and have one central process that sets all the windows.

    Void SetFrame()
    LoginScreen.LoginName = Dialog(“Login”).VBFrame(“LoginInput”).VBText(“txtN ame”)
    LoginScreen.LoginName = Dialog(“Login”).VBFrame(“LoginInput”).VBText(“txtP assword”)

    In the functions that we create our code looks like this:
    LoginScreen.LoginName.SetText(“MyName”)
    LoginScreen.LoginPassword.SetText(“MyPassword”)
    LoginScreen.LoginOK.Click()

    The good:
    If (or when) the developers add or remove frames around the controls all we change in the definitions and not the code.

    The Bad:
    You cannot use record and playback, or windows identifiers with this approach. For us that is not a problem since our automation development team is separate from the testers and we all have software development experience.


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

  8. #8
    Senior Member
    Join Date
    Jun 2001
    Location
    Bend, Oregon
    Posts
    102
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: creating re-usable silk framework

    tlvranas, et al
    What you just described is why I prefer to use Performer for these kinds of tests! Who cares about all those GUI things when you are field testing?!?


    ------------------
    Social Engineering - do they ever use QA?

 

 

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 04:06 PM.

Copyright BetaSoft Inc.