Forum Discussion

bastien's avatar
bastien
Occasional Contributor
4 years ago

Can I put multiple project in one Git repository?

Dear Community,

 

I'm setting up Gitlab repository to allow multiple tester to work together on scripts for the different modules we develop.

 

I initially thought to create one repository named "API-Script" and put all the ReadyAPI project in it (one ReadyAPI project per module we develop).

 

Is somebody could tell me if it's possible?

And if it's not a good practice, why?

 

Thanks,

 

  • nmrao's avatar
    nmrao
    4 years ago
    Hope you might have seen the real time usage of github repo with different project and their respective resources used in project as well.
    However, i am not sure that will work well with ReadyAPI. But, if you install and use git out side the tool for all the git operations, that model / approach should work well for you and your team.
  • bastien's avatar
    bastien
    Occasional Contributor

    Is having all my script in the same project/repository a bad practice?

    Do you know of a best practice to how we should architecture our script in ReadyAPI?

    Our product have different front end modules, that have some specifique and commun REST server.

    Is it better to create a project for each module or one project with test suite for each module?

    I'm a new user of Ready API this is why it's difficult to me to decide what is the best solution.

    If a best practice is to have everything in one project the question about the Git Repo can be canceled.

    • nmrao's avatar
      nmrao
      Champion Level 3
      Hope you might have seen the real time usage of github repo with different project and their respective resources used in project as well.
      However, i am not sure that will work well with ReadyAPI. But, if you install and use git out side the tool for all the git operations, that model / approach should work well for you and your team.
      • bastien's avatar
        bastien
        Occasional Contributor

        Yes that's the solution, but as you say you cannot use the ReadyAPI integrated Git interface. You have to use direct Git command line or a third party Git manager like Sourcetree.

        Thanks,.

    • bastien's avatar
      bastien
      Occasional Contributor

      Thanks for your answer,

      I've try putting different project in the same repository but it was not working very well with the git integration in ReadyAPI asking me to pull then generating some changes to commit without me having to do anything.

      I didn't spend more time on that solution.

  • CoreyVernon's avatar
    CoreyVernon
    SmartBear Alumni (Retired)

    Yes. You can put multiple projects in one Git repository but they would need to be on different branches within that repo. The Git console in ReadyAPI gives you the ability to create or switch branches from the UI. More information on the Git integration can be found here in the documentation. 

    https://support.smartbear.com/readyapi/docs/integrations/git/branches.html?sbsearch=create%20branch

    https://support.smartbear.com/readyapi/docs/integrations/git/index.html

     

    • bastien's avatar
      bastien
      Occasional Contributor

      Thanks for the answer,

      I'll  keep that solution in mind but if possible we would like to keep our branching policy similar of the one we use for our source code.

      We create a branch after each release from the "dev" branch your solution will required to do the same on all project branche "dev-prj1", "dev-prj2" ...