Forum Discussion

santoguya's avatar
santoguya
Contributor
14 years ago

Install

Our company recently started using InstallShield to create .exe installers instead of the traditional .msi install using windows installer tools; I recreated my Keyword Test to go through the steps in my new .exe InstallShield install, however, I get an exception in the TestComplete Summary when I my keyword test tries to click the first next button.



Attached are the screenshots I am experiencing, it seems that each time I run my .exe install it opens up two instances of msiexec also so there might be some ambiguous declaration of a program problem, but I do not get that error in the TC project run summary, instead i get a very vague "Exception."



I've taken a look at the following threads to get help but not really sure that my problem is the same:



http://smartbear.com/forums/forum/post/?mode=singleThread&thread=5c38d0c4-24e9-406d-a768-fbff570088d8



http://smartbear.com/forums/forum/post/?mode=singleThread&thread=f225f226-8855-45c0-9a0e-39a537a89b75



Please advise.
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    You're looking at the log through the web page.  If you scroll right in the test log view, there will be a link for "Memo".  Click that link and you'll see more detail about the actual exception.
  • Hi,



    I tried that already, when I click Memo it says "Member not found" in the below window.
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    "Member not found" is the error message from the exception.  Apparently, the object you're trying to click on cannot be found.  You might want to double check your namemapping/aliasing for your objects to make sure that everything is as it should be.
  • Hi Robert,



    I have checked my Name Mapping, and it seems to be okay, theres only one name mapped to the msiexec object (wndMsiDialogCloseClass) and evertything in that object looks fine; I am not sure though, maybe it just looks fine but something is wrong.



    The weird thing about Installshield installs is that the TestedApp (the .exe file) isn't the actual file thats being clicked on when you walk through the steps - it extracts the .msi file and then does the clicking keyword steps on the .msi. And the .msi does not show up in the TestedApps.



    So I tried running the project locally (before it was running on a virtual image) and I got this error instead of exception->member not found:



    An error occurred while calling the "ClickButton" method or property of the "btnNext" object.

    The object or one of its parent objects does not exist.


    Tested Object

    Alias: Aliases.MSIEXEC.wndMsiDialogCloseClass.btnNext

    Mapping item: NameMapping.Sys.MSIEXEC.wndMsiDialogCloseClass.btnNext


    Missing Object

    Alias: Aliases.MSIEXEC.wndMsiDialogCloseClass

    Mapping item: NameMapping.Sys.MSIEXEC.wndMsiDialogCloseClass




    Can I send you my project privately so that you can take a look? I dont want to post it on forums for anyone to see.
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Sure.  My address is linked in through the TeamAQA link in my signature.



    Keep in mind that I can't necessarily promise a time frame for response but I'll try to get to it quickly without long delay.
  • Hey AQA/ SmartBear Team,



    Still cant figure this out. Robert has advised me but I am unsure about what his advise means, can someone please help out.



    Here are our messages:



    Robert -

    Each step in your install, while it shares the same class, has a different caption.  What I would do is actually map each step as a different object in NameMapping, each one utilizing the caption to distinguish.  This will help mitigate some problems

    later.

    Secondly, you’re MSIEXEC name mapping is very non-specific.  As mentioned elsewhere, there are multiple MSIEXEC processes launched, usually, so you’ll need to make sure that you create a distinction between the processes.  Figure out which MSIEXEC process is the one you want and add the process index in.

    Take care of these two things and try again.  If nothing else, work with your name mapping for the MSIEXEC because what might be happening is that you’re automation is grabbing the wrong one and using the one that doesn’t actually have the window attached to it, hence the error you’re getting.



    My response -

    I am not sure how to do any of the things you have described. Are there articles on how to utililize the captions to distinguish between objects, and how to add a process index? When I go to Name Mapping for MSIEXEC I do not see a process index and for each button in the subtree under MSIEXEC i see the WndCaption field but do not understand what is wrong with these values.

    Basically everything in Name Mapping looks "okay" to me, I do not know how to spot what is wrong with it.



    I've also attached the project files if any of you want to take a look. The keyword test in question is "Install" - i did not include AERMOD.exe that is referenced in the TestedApps because the file size is 100+ MB.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Sorry I haven't been able to get back to you, Randy.  



    It's not a matter that there's something "wrong" with your NameMapping, but that you might want to consider a different schema.



    For example, I'm working through a project with a Flash driven quiz.  Technically speaking, each "page" maps as almost exactly the same thing if I were just to keep the defaults.  However, if I link in a child object as a "required" child, I can map each individual stage of the test as a different item in my NameMapping scheme.



    This is what I was referring to in that each "step" in your install, even though they are the same WndClass, if you map them differently based upon the caption or based upon some required child object, you can make your automation "smart" in that it will detect which step it is on and run the test appropriately.


  • Hi Robert,



    Again, I see your explanation for different steps but I still do not know the details of how to do such things.



    For instance, you say "link in a child object as a required child", how do I do that? How do I map steps differently based on captions or required child objects? If there are screenshots or articles you can provide that show exactly how to do these things, this is what I would like. If you have an example of the same problem and show me exactly how to fix it (Like, click on Name Mapping, goto the XX property, create new YYY, etc) then I can figure this out better.







  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Take a look at the following webinar/screencast from SmartBear.  It's not a specific "how to do X" kind of thing but it demonstrates editing NameMapping, applying conditional modes, apply required children, etc., which are the concepts I mention.



    http://smartbear.com/support/screencasts/testcomplete/reliable-tests-for-dynamic-objects/



    You might also benefit from just going through the NameMapping topics in the help file, specifically starting with the "Managing Mapped Objects" topic and going through the various areas.



    http://smartbear.com/support/viewarticle/12449/



    Even more specifically, my suggestions for corrections in this topic run the lines of Modifying Mapping Criteria found here



    http://smartbear.com/support/viewarticle/12451/



    Hope these topics get you started but I think you'll find, once you get a handle on manual manipulation of NameMapping (and not just relying on the automatic recording), there's a LOT that can be accomplished simply by creating a detailed, smart, and intuitive mapping structure.
  • I had the same problem with my product, the difference is that I am using msi installer, to fix this I added the UserName of process as identifier so I have two identifiers: ProcessName and UserName, with both properties as identifiers testcomplete can diference and use the correct application, currently it is working but I will  continue verifying