Duplicate a complete solution

Ask general questions here.
Florian
Posts: 75
Joined: Fri Jul 27, 2012 12:57 pm
Location: France (Lyon)
Contact:

Duplicate a complete solution

Post by Florian » Tue Jun 02, 2015 3:11 pm

Hello,

I worked on a website with a complete test suite.
Today I was asked to work on the same website but on another language (.be instead of .com), but the actions will not be exactly the same. Therefore I would like to duplicate the first solution in another folder, using a different name.

Is it possible to do such a thing?

I try to add existing items inside a new solution but modules are not available in the test suite.
Can I simply copy all files inside a new folder and change the name of the solution?

Thanks for your help :)

CookieMonster
Certified Professional
Certified Professional
Posts: 74
Joined: Mon Aug 14, 2006 7:17 pm
Location: CH

Re: Duplicate a complete solution

Post by CookieMonster » Tue Jun 02, 2015 5:03 pm

Hi Florian,

Yes this is possible!
There are a few ways, but for the last way is the you should go.
  • Just copy and paste the solution or project.
    Then reopen it and rename the solution and project file over the Ranorex Studio Solution Explorer.
  • Or create a new solution with a new Ranorex Project in it and save it.
    Close the solution and reopen the old solution and add the newly created project into the old solution (add existing project).
    Select the project and with a right mouse click, select "set as startup project". Then create new / copy your testcases into the new test suite.
    Now you can switch between the projects.
  • Or you create in you existing testsuite a sub test cases. One for .com and .be.
Cheers
Dan

ssawale
Posts: 7
Joined: Fri Mar 03, 2017 7:52 pm

Re: Duplicate a complete solution

Post by ssawale » Wed Mar 08, 2017 1:06 am

Why can't Ranorex just provide save as for the solution and manage all renaming of files and folders internally for better user experience? This will be also useful for backups and avoid file and repository corruptions.
Please take this as ER.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Duplicate a complete solution

Post by Support Team » Thu Mar 09, 2017 11:42 pm

These are good suggestions for the new "User Voice Feature Voting" section of our website. You can add issues, and vote/comment on the issues that you like, and it is very helpful to us, and if you use it correctly, then it can be very helpful to you! The link for this new section is on the bottom left under "Products" on most pages of the site (not this page), so if you go to Ranorex.com and look for products in bottom left you can always find the link.

Or click here: http://uservoice.ranorex.com/forums/150 ... ve-ranorex

Visual Studio and Ranorex mostly have the same functionality when it comes to renaming projects, and it is difficult. Most IDE documentation and help documents would recommend creating a new solution, and then add existing project to import things created in another project. This can be time consuming.

** CAUTION: The steps below assume you are working on a copy of your solution, and you have backups, so that mistakes here do not matter. You should never perform an action like this on a production test solution that does not have good backups or source control that you can roll-back **

Since we are working in a copy of the primary solution you might try this for speed:

1. Copy the top most directory of your solution to another folder on your computer, so you don't get name conflict at the start. (We have no more need for the primary solution)
2. Open the browse to the "Debug" folder, and delete the entire debug folder. We will build solution with new name later.
3. Open the new solution in Ranorex Studio
4. Right click the solution name, select "rename" from the menu, and rename it to a new name
5. Right click the project name, select "rename" from the menu, and name that the same as the solution name
6. Close the solution either by "close solution" in file menu of studio, or by closing studio
7. Rename the solution folder to new name. this is the folder containing the ".sln" file, and it is the top most folder of your solution.
8. Rename the project folder inside the solution folder to the new name. This is the folder containing the project ".csproj" file, and is the second to top most folder of your solution.
9. Open the solution file ".sln" in a text editor and rename the directory where it points to the project file ".csproj" from the old name to the new name. You will need to do this for all projects in the solution.
10. Open the solution again in Ranorex Studio and build the solution it so the "Debug" folder is created again with your test .exe file, and you should notice that it too now has the new name.
11. Run the test to see if anything is broken

The steps above are likely the quickest way to get a copy of your primary solution that will not conflict in source control, the resulting test will have different name as well so as not to conflict with the original test, and you do not have to manually recreate a large test suite by adding an original project to a new project in the project view of Ranorex studio. Please note this solution might not work in all cases, but I tested it on one of my solutions, and everything appeared to work correctly and the goal was achieved very quickly. These steps will likely work on a visual studio solution as well, and I did not see any functionality in visual studio that would assist in renaming a solution.

Please reply to this post if any of the above steps did not work for you, and I am happy to assist.
.
Image