Forum Discussion

PorscheWen's avatar
PorscheWen
Occasional Contributor
11 days ago

How to simplify process of embedded module into two applications

I have a module would be embedded into two applications, app_A and app_B.

app_A name mapping :  NameMapping.Sys.app_A.MainForm.tableLayoutPanel.toolBarPanel

app_B name mapping : NameMapping.Sys.app_B.MainForm.tableLayoutPanel.toolBarPanel

  1. How cloud I implement current auto testcases from app_A to app_B?
  2. Should I build a brand new name mapping for app_B?
  3. Is there other solution to simplify this process?

Thanks for reply

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Use Wildcard for the parent object. If the property Name value is e.g. "app_A" and the other is "app_B", you can define the property Name value as "app_*"

     

     

  • PorscheWen's avatar
    PorscheWen
    Occasional Contributor

    Thanks for suggestion. 

    However, name mapping is more different but reset part of name mapping is the same.

    app_A name mapping :  NameMapping.Sys.AAAAA.MainForm.tableLayoutPanel.toolBarPanel

    app_B name mapping : NameMapping.Sys.BBBB.MainForm.tableLayoutPanel.toolBarPanel

    Besides, do I need to build a new name mapping for app_b?   

    • rraghvani's avatar
      rraghvani
      Champion Level 3

      The object identification criteria that you have defined and which TestComplete uses to search for objects in the application uniquely, needs to be updated to include a wildcard.

      The criteria used here is ObjectType equals "Button" and Name equals "Default Button". TestComplete will use this criteria to search for the object within the application.

      Whereas, using a wildcard

      TestComplete will search for ObjectType equals "Button" and Name that matches "* Button". The search will match one or more objects within the application.

      It's vital to understand https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/index.html as this is used to instruct TestComplete on how to locate the object in your tested application.

      The child object of NameMapping.Sys. need to be correctly defined to include a wildcard (if possible), and MainForm.tableLayoutPanel.toolBarPanel will refer to the parent object that matches the criteria.

      • JDR2500's avatar
        JDR2500
        Frequent Contributor

        100% with rraghvani. 

        You can deal with this using your existing name mapping with minor modifications.  We accomplish the same thing via a project variable and wildcards. 

        In our case we want the ability to run automation with previous and future versions of our application.  Our approach uses a project variable to store the application name.  That variable includes wildcards as you'll see below.  We then use that project variable as the ProcessName identification property for the root application object in the name mapping.

        We can edit the project variable any time if needed.