SVN and Non-Versioned Files

Ranorex Spy, Recorder, and Studio.
AccidentReport
Posts: 76
Joined: Tue Dec 04, 2012 2:30 pm

SVN and Non-Versioned Files

Post by AccidentReport » Wed Dec 04, 2013 3:42 pm

I followed the guide here (http://www.ranorex.com/blog/subversion-and-ranorex) to setup SVN to work with Ranorex. After the initial setup it's been a while since I've actually used the project but I have now started building up my tests and started to commit. I noticed however that a large number of files are not committed - rather they are shown as "non-versioned" in the list. What is the reason for this? Some of the files that are non put into SVN are the executables that I use to run the tests (from teh command line). Is this a setting in Ranorex, Tortoise SVN on my PC or something on the SVN server I connect to?

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: SVN and Non-Versioned Files

Post by krstcs » Wed Dec 04, 2013 6:39 pm

As with any development project, you really should not be versioning certain artifacts of the Ranorex projects unless absolutely necessary.

Things you probably should not version include:
1. Executables (.exe and .dll files) created by Ranorex.
2. Report files (.rxlog and .rxlog.data) and related files.
3. IDE and user-specific files that are unique/different for each user (depending on the environment).
Shortcuts usually aren't...

AccidentReport
Posts: 76
Joined: Tue Dec 04, 2012 2:30 pm

Re: SVN and Non-Versioned Files

Post by AccidentReport » Thu Dec 05, 2013 3:54 pm

Normally that would be the case but I use the .exe that Ranorex produces to run the tests automatically, firing it off through a schedule batch file on various test boxes. The reports are set to be stored on a web server so they can be easily viewed but I definately need the .exe (and anything else it would need to run outside of Ranorex). Do I just need to check them to add them or what?

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: SVN and Non-Versioned Files

Post by krstcs » Thu Dec 05, 2013 4:56 pm

So, you actually need to keep EACH version of the EXE files in a history? The point of the version control system is to control the source, not the product. You can always re-create the product as long as the source is versioned.

I think what you actually want is for everyone (in this case everyone includes your batch file) to have access to the most current (in terms of newest build, not necessarily most up-to-date) EXE.

So, you could have your IT department set up a share that you copy the file to on compile (you can setup post-compile actions in the projects that will copy the files every time someone compiles).

My setup actually uses Jenkins and a dedicated QA "server" that compiles the code on the QA server any time there is a commit to the master branch. There are other Jenkins jobs set up to follow this one with our smoke tests, regression tests, etc.

I just copy the compiled exe files from the server to the test systems with Jenkins before each test run.
Shortcuts usually aren't...

AccidentReport
Posts: 76
Joined: Tue Dec 04, 2012 2:30 pm

Re: SVN and Non-Versioned Files

Post by AccidentReport » Fri Dec 06, 2013 12:32 pm

Yes...good point. It's nothing to do with keeping the file, just having it centrally located and updated automatically instead of me (or someone else) having to remember to put it somewhere.

So the post compile settings you speak of...is that from Ranorex or Jenkins? If Ranorex then where do I need to look. Sorry for my ignorance!

Also, using Jenkins sounds like a good idea. We already use it to build and deploy our application each time there is an SVN update so it shouldn't be too hard to do something similar. Can you build the Ranorex .exe file directly from Jenkins then?

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: SVN and Non-Versioned Files

Post by krstcs » Fri Dec 06, 2013 3:35 pm

The post-compile option is in Ranorex.

Right click the PROJECT in the Project view (upper left window in the IDE) and select "Properties". Then, select the "Build Events" tab. You should have 2 large boxes there, one for PRE-BUILD actions, the other for POST-BUILD actions. These are essentially BATCH files that are run before and after the build, respectively, so you can just do anything there you would do in a Windows *.BAT file.

I have an xcopy line like this:

Code: Select all

if %computername% == QAS1 xcopy /q /y /s $(TargetDir)*.* D:\RX_TESTS\$(SolutionName)\$(ProjectName)\
The $(SolutionName), $(TargetDir) and $(ProjectName) parts are MSBUILD variables. You can find info about them on MSDN. See this SO post for info: http://stackoverflow.com/questions/1452 ... -variables


As for Jenkins, it is one of the handiest tools out there. If you put a slave on a Windows server with MSBUILD on it (.NET SDK installed) then you can have that box be your build system.

I have our QA server setup to be our build slave (Jenkins server is a Linux system used by our dev teams) and about 7 other virtual machines with desktop OSs installed for doing test runs. The desktop VMs also have Jenkins slaves installed so we can control them. I just have each slave copy the build over to their local disk before running, and then copy the report back to the server when done.
Shortcuts usually aren't...

AccidentReport
Posts: 76
Joined: Tue Dec 04, 2012 2:30 pm

Re: SVN and Non-Versioned Files

Post by AccidentReport » Mon Dec 09, 2013 9:35 am

Brilliant. Thanks so much. Didn't even know you could do that but will make it much better.