Forum Discussion

SmartBST's avatar
SmartBST
Contributor
7 years ago
Solved

Cannot run a test cases pulled from repository

Hi Everyone,

My project use costume name mapping, and I am running into the following issue :

1.User 1 create test cases
2. Commit into the repository (two files are committed manually into the repository.

1.User 2
2.Pull testcase from the repository
3. Run the testcase in local machine (testcase run successful)
4. Append new steps to the testcase
5.Save and commit changes to the repository (same two files from User1 are committed manually.

1. User 3 pull from repository
2. Run test cases (testcase (Fail)


Can anyone help me understand why the test case is failing for user 3.


Thanks
  • So, you've answered your question.  When User3 did a NameMapping merge of files, it changed the mappings in some way so that the test case itself won't run properly.  As noted in the message you received, the merging of the files resulted in some object mappings not resolving correctly requiring a manual review and potential correction.  Since the manual review was not done and the file was checked into the repository un-checked, this is what caused your errors.

     

    Solution: Go through your NameMapping file and work through correcting those mapped objects that need to be corrected so that the tests will run.  As noted, this is not a problem with the repository but a process that needs to be followed when merging mapping files.

     

    Check out the following article. https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/managing/merging.html

     

    At the end, there's information about why conflicts occur and what are suggestions on how to resolve them when they do.

4 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Without knowing the nature of the failure, it's hard to say.  I can guarentee you, on a general level, it doesn't have anything to do with the actual checking in and checking out... too many people use source control for their automation for that to be the root cause.

     

    What we need is several things:

     

    1) more details as to what the error messages are, if any, for when the test case fails

    2) more details as to what is being attempted by the automation at the time of failure

    3) more details as to the nature of the changes made by User 2

     

    That will give us at least a starting point.  As a rough guess, there are 2 things that I think could be the cause:

     

    1) User 2, when they made their changes, changed more than just the two files that User 1 changed.  Things like NameMapping, TestedApps, other keyword tests or script files, etc., that could have been changed by User 2 but did not get checked in to the repository

    2) The environment for User 3 may be different with regards to OS, browser version, installation options for either TestComplete or your AUT.  This could either cause a general problem with TestComplete or some of the changes User 2 put in place were specific to User 2's environment (directory path strutures, machine name, etc).

     

    Again... we need more details to know how best to answer your question.

    • SmartBST's avatar
      SmartBST
      Contributor

      Thanks for you replay.

       

      Please read the information below;

       

      When I try to merge  the name mapping from User2  with User 3 I received the message “Name conflicts detected. Please check whether the generated results are valid.”

       

      After that User2  and User3 TCs were ran.

       

      User2 TC errors:

      • Failed to find the exact match for the test object:

      NameMapping.Sys.browser.pageBihLrdv24a22appCBOS.panelExtComp.panelCBOSsplitterpanel.CBOSsplitterpanel.panelCBOSpanel

       

      • The test object was not found when executing the SendCBOS4 command:

      Aliases.browser.pageBihLrdv24a22appCBOS.panelExtComp.panelCBOSsplitterpanel.CBOSsplitterpanel.panelCBOSpanel

       

       

      • I am trying to call the "SendButton" method or property of the "panelCBOSpanel.SendCBOSbutton2" object that does not exist.

       

      User1  TC errors:

      • Failed to find the exact match for the test object:

      NameMapping.Sys.browser.pageBihLrdv24a22appCBOS.panelExtComp.panelCBOSsplitterpanel.CBOSsplitterpanel.panelCBOSpanel

       

       

      • The test object was not found when executing the SendCBOSbutton6 command:

      Aliases.browser.pageBihLrdv24a22appCBOS.panelExtComp.panelCBOSsplitterpanel.CBOSsplitterpanel.panelCBOSpanel

       

       

      • I am trying to call the "SendButton" method or property of the "panelCBOS panel.linkCBOSbutton6" object that does not exist.

       

       

       

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        So, you've answered your question.  When User3 did a NameMapping merge of files, it changed the mappings in some way so that the test case itself won't run properly.  As noted in the message you received, the merging of the files resulted in some object mappings not resolving correctly requiring a manual review and potential correction.  Since the manual review was not done and the file was checked into the repository un-checked, this is what caused your errors.

         

        Solution: Go through your NameMapping file and work through correcting those mapped objects that need to be corrected so that the tests will run.  As noted, this is not a problem with the repository but a process that needs to be followed when merging mapping files.

         

        Check out the following article. https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/managing/merging.html

         

        At the end, there's information about why conflicts occur and what are suggestions on how to resolve them when they do.