Rhino.Inside in CI for unit testing

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.

1 Like

Paul -

How are you licensing the Rhino 7? Cloud Zoo (Rhino account) or trying to type it directly into the installer?

Also, which Operating system are you installing on exactly?

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.

Yes, but is it Windows Desktop or Windows Server?

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.

Do you need to install Rhino every time your tests run? What environment or platform are you eventually hoping to run your tests in?

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?

The only option for CircleCI will be to use core-hour billing. Unfortunately we don’t have an NFR program for core-hour billing.

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?

@brian - knows the best approach to that. He happens to be out this week, He will be back next week to take a look at this.

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?

– cs

@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.

1 Like