Forum Discussion

ANHristov01's avatar
ANHristov01
Occasional Contributor
8 months ago
Solved

How to work simultaneously on the same Test Complete project without conflict messages?

Situation:

Currently, two people are working on the same Test Complete project simultaneously. However, the issue we are facing is that whenever one user makes changes, Test Complete continuously displays a message to the other user saying that the file has been modified, and they need to confirm or discard the changes.

This is slowing down our workflow since we constantly have to manually confirm every change instead of having them sync automatically.

Question:

Is there a way to configure Test Complete so that:

  1. Two people can work on the same project at the same time without interfering with each other.
  2. Changes are saved automatically without prompting the other user to confirm them.
  3. We can avoid unnecessary conflicts when saving test scripts and Name Mapping objects?

What we have tried so far:

  • Disabling "Update Name Mapping during test run"
  • Turning off automatic saving in Log and Recording settings
  • Splitting tests into separate files to minimize conflicts
  • Using separate copies of the project, but manually merging the tests is not the most efficient solution for us

Additional Context:

  • We are using Test Complete 15
  • We primarily work with Keyword Tests, but we also use JavaScript/Python scripts
  • Currently, we are not using Git/SVN, but if that’s the only solution, we are open to implementing it
  • scot1967's avatar
    scot1967
    8 months ago

    Using Test Projects in Shared Mode - Messages:

    https://support.smartbear.com/testcomplete/docs/working-with/teamwork/messages/index.html?sbsearch=shared%20mode

    1. If Dev is using source control (I know Git & Azure DevOps) then you can simply get with one of your Devs and ask them to create a Repo for you and show you how to clone it to your local PC and manage it.  There is a learning curve but I really doubt you will regret it.
      • There are are a few ways to manage your teams code merges in Git and it is completely external to TestComplete and works at the file system level.  Any changes you make to files that are under version control will be tracked and managed even outside of TestComplete such as with notepad or even a file system name change or delete. 
      • Git has built in merge conflict resolution.  It will show you the file versions side by side and allow you to choose which file to keep or even select individual changes to resolve the conflict.  Depending on how you setup your repo access you can control this and resolve the conflicts yourself or kick them back to the team member or even go hands off and let team members merge directly.
      • You will need to setup TestComplete to use Git however so TestComplete will show you all the neat Git bells and whistles.
      • Tortoise Git is a nice add on supported in TestComeple that will let your team commit, push, merge, revert and compare code versions.
      • Visual Studio has a very nice interface for working with Git outside of TestComplete that will allow you and your team to manage code versions, history and merges and everything else Git does. 
    2. Here there isn't anything other than what I think you may already be doing.

6 Replies

  • ANHristov01's avatar
    ANHristov01
    Occasional Contributor

    Thank you for the detailed explanation! This makes a lot of sense regarding the issues with Name Mapping and the importance of using Source Control.

    I have two follow-up questions:

    1. What is the best way to set up Git/SVN for working with TestComplete?
      • Are there any best practices for managing a project with multiple users?
      • How can we configure Source Control in TestComplete to automatically handle conflicts and avoid losing changes?
    2. Is there an alternative approach for team collaboration that does not require Source Control?
      • Would it be possible to split tests into separate modules or projects that can be merged later?
      • Does Test Complete provide any built-in functionality for parallel work without Git/SVN?
    • rraghvani's avatar
      rraghvani
      Icon for Champion Level 3 rankChampion Level 3
      1. Check-in all your project files into the repository, this will be your main branch. Each user will then check-out the appropriate project/files and make the appropriate changes. Once finished, they'll then check-in their changes. If there's any conflicts, i.e. someone else has already checked-in their changes, you will be notified and will be given to option to merge your changes. Use TC to merge name mappings. Users can synchronise, and get the latest files. I suggest you learn about your chosen tool/file repository system.
      2. Not really. It's too much of an effort to synchronise your changes with your colleagues, manually.

       

      I'm in the process of getting rid of all our name mappings, and it will be all scripts based. The merge name mapping tool in TC, is not great. 

      • scot1967's avatar
        scot1967
        Icon for Champion Level 2 rankChampion Level 2

        rraghvani  

        "I'm in the process of getting rid of all our name mappings, and it will be all scripts based. The merge name mapping tool in TC, is not great. "

        We did the same here.  Sharing a namemap across projects and suites became hard to deal with.  And it was easier to see and track object definitions changes by scripting object definition properties into JavaScript objects and using the Find... methods in TestComplete.  👍

    • scot1967's avatar
      scot1967
      Icon for Champion Level 2 rankChampion Level 2

      Using Test Projects in Shared Mode - Messages:

      https://support.smartbear.com/testcomplete/docs/working-with/teamwork/messages/index.html?sbsearch=shared%20mode

      1. If Dev is using source control (I know Git & Azure DevOps) then you can simply get with one of your Devs and ask them to create a Repo for you and show you how to clone it to your local PC and manage it.  There is a learning curve but I really doubt you will regret it.
        • There are are a few ways to manage your teams code merges in Git and it is completely external to TestComplete and works at the file system level.  Any changes you make to files that are under version control will be tracked and managed even outside of TestComplete such as with notepad or even a file system name change or delete. 
        • Git has built in merge conflict resolution.  It will show you the file versions side by side and allow you to choose which file to keep or even select individual changes to resolve the conflict.  Depending on how you setup your repo access you can control this and resolve the conflicts yourself or kick them back to the team member or even go hands off and let team members merge directly.
        • You will need to setup TestComplete to use Git however so TestComplete will show you all the neat Git bells and whistles.
        • Tortoise Git is a nice add on supported in TestComeple that will let your team commit, push, merge, revert and compare code versions.
        • Visual Studio has a very nice interface for working with Git outside of TestComplete that will allow you and your team to manage code versions, history and merges and everything else Git does. 
      2. Here there isn't anything other than what I think you may already be doing.
    • rrobinson's avatar
      rrobinson
      Occasional Contributor

      One thing I recall, is the Name Mapping is an issue as well. If 2 people are changing/adding to it at the same time and the Name Mapping repository file is checked out for editing for both people, the first person checks in their work for the day.... some time later after the second person adds/edits many more objects - they check in their work as well. I believe in this case, the first person may lose all of their changes and his/her tests having objects from their last check-out/check-in session may no longer be valid at all - and errors would abound from object not found issues and maybe other out of date corrupt objects and so on.

      I believe I saw something about "merging" the Name Mapping repository.... so if that is true - it may be possible that both people start at the beginning of a work day from the same Name Mapping repository from source control. We will call that the BASE repository (repo for short). That is the key in this case. Then, at the END of the day one designated person would need to merge (right click on the NameMapping node in TestComplete project explorer and select merge) his/her new/edited objects in their Name Mapping repo changes into the BASE repo, which I believe you would select in said merge operation. Then check in the Name Mapping back into source control. Then the designated second person would get the latest NameMapping repo - and all files really (I personally would NOT edit/add tests that you know someone else is working on. Work in a different area of the application/web site for the day) from source control from the first person which includes their updates, then also merge his/her new/edited objects in their Name Mapping repo changes into the new BASE repo. Then check in all of their projects/files/tests/scripts/etc as well.

      Hopefully that made sense!

      Russ Robinson
      GDC, Incorporated