Ranorex and Bamboo: at first cannot load assembly Ranorex.Bootstrapper, then the test wants to display a modal

Ask general questions here.
boris0dev
Posts: 14
Joined: Fri Nov 09, 2018 11:28 am

Ranorex and Bamboo: at first cannot load assembly Ranorex.Bootstrapper, then the test wants to display a modal

Post by boris0dev » Fri Dec 14, 2018 10:02 am

Hi,
I try to make Bamboo and Ranorex work together.

On my design machine (32-bit) I'm running Ranorex 8.3, and the project platform (in the project options) is of course also 32-bit.
The testsuite itself does simply nothing (all tests disabled, except setting some environment variables from an ini file) and gets executed flawlessly from inside the Ranorex Studio as well from the command line. The testsuite can also be compiled from the command line via MSBuild 15.8

As the title suggest I want to integrate the Testsuite with Bamboo.

The Bamboo agent (the machine where the tests are executed) is a 64-bit Windows, with Ranorex 8.3 as 32-bit (I guess it is 32-bit as it is installed in C:\Program Files (x86)) and MSBuild 4.7. The Ranorex studio has also a premium license and the license manager has been installed on this machine.

As well as on my design machine I can execute the testsuite from within Ranorex Studio as well as from the command line and even build it from the command line without any issues. Also no modal licensing pops up which could inform about the evaluation period.

I integrated Ranorex into Bamboo the following way:
1. Checkout the testsuite solution
2. Build the solution with the Bamboo task "MSBuild 14.0 32-bit"
3. Start the test via a batch file, which just calls the compiled testsuite with some arguments:
Testsuite.exe /rf:"Reports/Report.html"

The first issue I encounter: I get the error "System.IO.FileNotFoundException: Could not load file or assembly Ranorex.Bootstrapper, Version=8.3.0.0":
Ranorex Testsuite Execution fails FileNotFoundException.png
Ranorex Testsuite Execution fails FileNotFoundException.png (128.9 KiB) Viewed 171 times
The strange thing: I executed this Bamboo plan around 30 times. 27 times it failed with the FileNotFoundException error, but 3 times it worked: the testsuite had been successfully executed.
Ranorex Testsuite executed successfully.png
Ranorex Testsuite executed successfully.png (81.75 KiB) Viewed 171 times
As described in other post regarding the FileNotFoundException error I enabled for the testsuite "copy runtime to output".

This led to another issue: "Unexpected exception occurred: 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"
Modal.png
Modal.png (202.63 KiB) Viewed 171 times
I read the error message the way that the licensing modal gets displayed. If this is the case: why?

I hope somebody has an idea...

Thanks for any help
Attachments
Ranorex Testsuite executed successfully.png
Ranorex Testsuite executed successfully.png (81.75 KiB) Viewed 172 times

User avatar
RobinHood42
Posts: 277
Joined: Fri Jan 09, 2015 3:24 pm

Re: Ranorex and Bamboo: at first cannot load assembly Ranorex.Bootstrapper, then the test wants to display a modal

Post by RobinHood42 » Mon Dec 17, 2018 1:31 pm

Hi,

To narrow down the issue, please try to build the Ranorex solution with Ranorex itself and use Bamboo just to run the compiled test executable.

Please let me know if that works.

Cheers,
Robin :mrgreen:

boris0dev
Posts: 14
Joined: Fri Nov 09, 2018 11:28 am

Re: Ranorex and Bamboo: at first cannot load assembly Ranorex.Bootstrapper, then the test wants to display a modal

Post by boris0dev » Wed Dec 19, 2018 2:12 pm

I could resolve the issue: I opened the project in Ranorex Studio on the machine that also contains the license manager and enabled "copy runtime to output" in the settings and (this was the solution) hit the button "include license information".
This way Bamboo can execute the test without any issues (so far ... ;))

Thanks for your help, Robin

User avatar
RobinHood42
Posts: 277
Joined: Fri Jan 09, 2015 3:24 pm

Re: Ranorex and Bamboo: at first cannot load assembly Ranorex.Bootstrapper, then the test wants to display a modal

Post by RobinHood42 » Thu Dec 20, 2018 10:10 am

Great!

Glad that I could help.

Cheers,
Robin