Re-using a repository

Best practices, code snippets for common functionality, examples, and guidelines.
HansSchl
Posts: 23
Joined: Wed Sep 19, 2018 10:05 am

Re-using a repository

Post by HansSchl » Thu Jun 25, 2020 9:25 am

I want to use the same repository across a number of Ranorex projects. I thought I'd do it the way I'm going to describe, but this seems to be wrong.

- I started creating a Ranorex project which contains only the repository and has output type ".NET module". I compiled the project and comitted it to subversion, including the resulting binaries.
- I then imported the bin folder into my first test project and aded the compiled DLL to the list of references.
- Now, I tried to use the repository from the DLL in the test project, but there was no way to select it. FAIL.

- In a second attempt, I imported the source code folder of the repository project (effectively, the complete project) into the test project.
- Then, I used the "Open from disk" item in the repository selection dropdown and selected the imported *.rxrep file.
- This made the imported repo available, but when I inspected the source code, I found that Ranorex had changed the name of the namespace in the imported directory; it was decorated with the relative folder path.
-- If I commit this modification, the original repository projects will receive the decorated name, which is probably not a good idea.
-- If I don't commit it, I may get into trouble when the repository changes.
-- When I revert the changes, Ranorex re-ads the decoration as soon as I use the imported reposiory in the test project.
So it's FAIL again.

For clarity: By "import" I mean using the "svn:externals" property which pulls a folder from the subversion repository into a folder of the importing project.