Hi, I am following the UnitTest sample to write tests for my Grasshopper plugin. My understanding is that Rhino must be installed for Rhino.Inside, and this method of writing unit tests, to work correctly. Please correct me if I am wrong.
Then, is there a way to completely silently install Rhino, to be able to run these tests in CI, for example? I tried following the Automating installation Rhino 7 for Windows: Scripted Install guide but when I provide a license key, the installation pops up a dialog for license validation, which requires human interaction to complete, or when I do not provide a license key the installation pops up a dialog requesting my email address to go look for a license key, which again requires human intervention.
Edited the post to include the āwindowsā tag because I am trying this install on Windows.
I am not sure how it is licensed. I am part of a team developing a Grasshopper plugin, and the list of license for my team shows licenses for Rhino 7 Not For Resale Lab. I tried providing the LICENSE_KEY parameter to the automated installation procedure, and I tried without.
Right now I am trying to get this workflow to run on my local workstation, so Windows 11, but eventually I want this to run in CI on Windows Server 2019 or 2022.
My preference is to start fresh on each CI run, so yes I would prefer installing Rhino each time. Eventually I want this to run on CircleCI on Windows Server 2019 or 2022.
Is the suggestion here to create a Docker image that has Rhino installed (and license validated) and use that as the basis for unit tests? Does this mean that there is no way to perform a silent install that does not require human interaction?
I have a basic question: NFR means ānot for resaleā?
And I still donāt quite know the answer to my original questions: Is Rhino required to be installed to use Rhino.Inside, even for something like unit testing? How to automate the install of Rhino so it is completely silent and does not require human interaction?
Hey @Paul_Novak Rhino.Inside uses Rhinos core library which requires a license. Even when we perform unit testing we have a Rhino Install that uses the Zoo License on a pre-installed machine.
I would love to be able to set up a machine from scratch each time we run tests, so Iāll be watching this thread closely.
Any reason not to set up an image that already has everything set up and boot one of those up each time?
@csykes I prefer to start from scratch each time for good test hygiene, making sure there are no unexpected dependencies, that sort of thing. It sounds like a setting up an image with Rhino installed and set up, as you have done, is something I will have to do.
@Paul_Novak I actually havenāt gotten to the clean image boot-up each time yet, Iād love to know how to do it. Our test machine opens/closes Rhino and does not reset each time which does cause issues
Hi, any update on this topic? Specifically, is there a way to completely silently install Rhino? I tried following the Automating installation Rhino 7 for Windows: Scripted Install guide but when I provide a license key, the installation pops up a dialog for license validation, which requires human interaction to complete, or when I do not provide a license key the installation pops up a dialog requesting my email address to go look for a license key, which again requires human intervention.
I recommend that you prototype your workflow on Windows Server, because the licensing requirements for Rhino are very different on Windows Desktop vs Server. Youāll need to use Core-Hour billing on Windows Server to run your CI workloads. And setting up core-hour billing is something that can be done in a completely automated way.
For details on setting up Rhino for automated workloads on Windows Server, please read Rhino - Licensing & Billing
If you stick with desktop, the only way to license Rhino in a way that install is completely automated is to use LAN Zoo. Put your license in the LAN Zoo server, and point to it from your Rhino install.
Iāve been trying this using CircleCI and a custom Rhino Orb. Iāve managed to install Rhino headlessly, and Iāve been attempting to use the core hour billing. However I keep getting this error
Setup failed for test fixture TestSetup
System.Runtime.InteropServices.COMException : Error HRESULT E_FAIL has been returned from a call to a COM component.
StackTrace: at Rhino.Runtime.InProcess.RhinoCore.InternalStartup(Int32 argc, String[] argv, StartupInfo& info, IntPtr hostWnd)
at Rhino.Runtime.InProcess.RhinoCore..ctor(String[] args, WindowStyle windowStyle, IntPtr hostWnd)
at NUnitTestFixture.StartRhino()
at NUnitTestFixture.Init(FixtureOptions options)
at TestSetup.Setup() in C:\Users\circleci.PACKER-64370BA5\project\tests\Tests\Setup.cs:line 12
Failed Any [2 s]
Error Message:
OneTimeSetUp: System.Runtime.InteropServices.COMException : Error HRESULT E_FAIL has been returned from a call to a COM component.
Iām assuming this is a licensing error, if not, hurray! Licensing works!
Is this possible to test locally? Iāve tried setting the env var on Windows, but Rhino still asks for a license.
Hey @csykes Iāve been talking with @will - heās suggesting trying to reproduce the install, setup, and launch process on a Windows Server instance that you have GUI access to?
Or, if you have GUI access to the CircleCI server, what happens when you start Rhino itself? Do you get licensing errors in this state? Unfortunately, the error messages coming from Rhino.Compute are pretty sparse.
I added a new step to open Rhino once with a 60s timeout, I hoped it would solve the issue, but when I RDP in I get the standard āWelcome to Rhino, please enter your email to get startedā? If I close then then open Rhino normally it works fine.
I opened up the repo for now. I was hoping to get it working with lots of lazy commit messages, then start from scratch and Open Source it with abit more effort, but here we find ourselves.