Jenkins Integration

Ask general questions here.
Punashri M S
Posts: 10
Joined: Tue Jan 30, 2018 12:56 pm

Jenkins Integration

Post by Punashri M S » Thu Oct 04, 2018 11:02 am

Hello,

We are not able to run the Test suite on Test Server machine through Jenkins, where Jenkins is installed. Getting an error that project file doesn’t exist.
Jenkins1.JPG
Jenkins1.JPG (236.66 KiB) Viewed 155 times
for other project we are getting an error .

Please ensure all required prerequisites are installed:
- .Net Framework 4.5
- VC ++ Redistributable (2008, 2010, 2015)
Jenkins.PNG
Jenkins.PNG (40.22 KiB) Viewed 155 times
we checked the prerequisites, all the prerequisites are installed.

can anybody please help me with the solution.

Thanks in advance.

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

Re: Jenkins Integration

Post by odklizec » Thu Oct 04, 2018 11:11 am

Hi,

As for the first problem, have you examined the job directory (in Jenkins workspace) if it contains all necessary project/testsuite files? It looks as if there is missing file(s)? Have you tried to run the project from Studio (on Jenkins machine)?

As for the second issue, have you tried to install the pre-requisities manually? Ideally, install them via Ranorex Studio installation. If the installation of pre-requisities fails, then there is something wrong with the target machine. What OS is installed on that machine?
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

Punashri M S
Posts: 10
Joined: Tue Jan 30, 2018 12:56 pm

Re: Jenkins Integration

Post by Punashri M S » Thu Oct 04, 2018 11:17 am

Thanks for the reply,

.net framework and VC++ are installed manually.

what about the below error

at __RxMain.__RxProgram.Main(String[] args) in c:\Users\Santhosh\Documents\Ranorex\RanorexStudio
Projects\Jenkins\Jenkins\obj\x86\Debug\__RxPrograms.g.cs:line 32

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

Re: Jenkins Integration

Post by odklizec » Thu Oct 04, 2018 11:25 am

Sadly, without seeing your test suite and exact code where it crashed, it's hard to tell what's wrong. Does it work on another machine? Have you tried to run the test from Ranorex Studio (on the machine where it crashes via Jenkins)? If it fails also in Studio, then there is most probably something wrong at OS level? Maybe incorrectly installed/corrupted .Net or VC redistributable files? BTW, what Ranorex version do you use?
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

Punashri M S
Posts: 10
Joined: Tue Jan 30, 2018 12:56 pm

Re: Jenkins Integration

Post by Punashri M S » Thu Oct 04, 2018 12:21 pm

hello,

the same project is working fine in Ranorex studio, the same folder is copied into the workspace folder and installed 4.5.2 .net version
this is what the error am getting.

C:\Program Files (x86)\Jenkins\workspace\Punashri>c:

C:\Program Files (x86)\Jenkins\workspace\Punashri>cd UsercodeCollection\UsercodeCollection\bin\Debug

C:\Program Files (x86)\Jenkins\workspace\Punashri\UsercodeCollection\UsercodeCollection\bin\Debug>UsercodeCollection.exe
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at Ranorex.Core.ElementEngine.CheckTrial(Boolean verbose, AuthenticatedLicense nodeLockedLicense, Boolean isLimitedTrial)
at Ranorex.Core.ElementEngine.CheckMachineLicense(Boolean verbose, AuthenticatedLicense nodeLockedLicense, NodeLockedLicenseStatus nodeLockedStatus)
at Ranorex.Core.ElementEngine.CheckLicenseInternal(Boolean verbose)
at Ranorex.Core.ElementEngine.AssertLicense()
at Ranorex.Core.ElementEngine..ctor()
at Ranorex.Core.ElementEngine.get_Instance()
at Ranorex.Core.InputDispatcher.EnsureReady()
at Ranorex.Keyboard.UpdateLowLevelKeyboardHookCallback()
at Ranorex.Keyboard.set_AbortKey(Keys value)
at UsercodeCollection.Program.Main(String[] args) in c:\Users\Punashri\Documents\Ranorex\RanorexStudio Projects\UsercodeCollection\UsercodeCollection\Program.cs:line 34
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Ranorex.Core.Resolver.MainInvoker.Invoke(Assembly callerAssembly, String startUpObject, String[] args)
at __RxMain.__RxProgram.Main(String[] args) in c:\Users\Punashri\Documents\Ranorex\RanorexStudio Projects\UsercodeCollection\UsercodeCollection\obj\x86\Debug\__RxPrograms.g.cs:line 32

Test executable crashed with unhandled exception.
Please ensure all required prerequisites are installed:
- .Net Framework 4.5
- VC ++ Redistributable (2008, 2010, 2015)

For more information visit: https://www.ranorex.com/help/v8.2/xcopy-deployment


C:\Program Files (x86)\Jenkins\workspace\Punashri\UsercodeCollection\UsercodeCollection\bin\Debug>exit 111
Build step 'Execute Windows batch command' marked build as failure
Gitcolony notification failed - java.lang.IllegalArgumentException: Invalid url:
Finished: FAILURE

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

Re: Jenkins Integration

Post by odklizec » Thu Oct 04, 2018 12:45 pm

Well, if it works in Studio (on the very same machine and project loaded from Jenkins workspace), then there is most probably something wrong with the project itself? This path mentioned in error does not look to be a part of Jenkins workspace path?...
c:\Users\Punashri\Documents\Ranorex\RanorexStudio Projects\UsercodeCollection\UsercodeCollection
So I think there is something wrong with your project.
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