Jenkins needs *Repository.cs files. Why?

Ranorex Studio, Spy, Recorder, and Driver.
boegvald
Posts: 62
Joined: Wed Mar 13, 2019 9:02 am

Jenkins needs *Repository.cs files. Why?

Post by boegvald » Wed Jul 10, 2019 12:55 pm

We are versioning our Ranorex solutions in GitLab. In order to avoid peronal preferences to be shared among testers, I inserted a .gitignore file in the GitLab project to filter out preference files (see file below). The .gitignore file (I found elsewhere in this forum) also excluded other file types, of which most are already excluded by Ranorex.

That worked fine... for regular users. But not for building Ranorex solutions via the Jenkins plugin.

I had to remove *.sln files from .gitignore as Jenkins use that file for building. Then things worked fine... until someone created a new project... Seems like the Jenkins plugin needs *Repository.cs files in order to build. After removing that one from the .gitignore file, Jenkins builds were fine again.

Anyone knows why? Are solutions built differently by the Jenkins plugin and the Ranorex GUI?

Code: Select all

# Taken from https://www.ranorex.com/forum/viewtopic.php?f=4&t=10988&p=44185&hilit=gitignore#p44185
# CHANGE: removed *.sln from list - Jenkins needs it.
#User specific files
*.csproj.rxuser
Solution specific files
*.rxsln.pref
#Project specific files
*.csproj.pref
#Autogenerated files
# CHANGE: *Repository.cs removed. Jenkins needs it. 
#Reports Directory
Reports/
#Output Directories
Bin/
Obj/
#Repository Images
*.rximg
RepositoryImages/
#Nuget Packages
*.nupkg
**/packages/
!**/packages/build
Best Regards

Bo Bøgvald
Best Regards

Bo

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Jenkins needs *Repository.cs files. Why?

Post by odklizec » Wed Jul 10, 2019 1:10 pm

Hi,

Repository.cs file is generated by Ranorex Studio and not by MS Build, which actually builds the test from source files. Therefore, it must be included in source control. The same apply for Recording.cs files and other auto-generated cs files.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

boegvald
Posts: 62
Joined: Wed Mar 13, 2019 9:02 am

Re: Jenkins needs *Repository.cs files. Why?

Post by boegvald » Thu Jul 11, 2019 10:51 am

Thank much , Pavel. Sometimes a few words makes a big difference in one's perception! It now makes great sense to me why the .ignore file was made as it was, and why I needed to make changes to it in order to allow for builds via Jenkins. Best Regards, Bo
Best Regards

Bo