Plugin load in headless Rhino.Inside C++

Hello there!

I am trying to integrate some Google testing for my Rhino plugin in C++.
This is the test I am trying to run:

#include <gtest/gtest.h>

#include "pch.h"
#include "RhinoCore.h"


TEST(TEST_INTEGRATION_CommandsSuite, MyIntegrationTest) {
    CRhinoCreateDocumentOptions options;
    options.SetCreateHeadless(true);  // <-- if true the plugin is not laoded
    int doc_runtime_serial_number = CRhinoDoc::CreateDocument(nullptr, &options);
    CRhinoDoc* pDoc = CRhinoDoc::FromRuntimeSerialNumber(doc_runtime_serial_number);

    bool resCmd = pDoc->RunScript(L"<any-command>", 1);
    ASSERT_TRUE(resCmd);
}

Ifoptions.SetCreateHeadless(true), my plugin (previously installed) won’t load, and the command will fail to be found.

I suppose what I am trying to do is load a Rhino plugin I am building and run at least their commands as smoke test.

Am I doing something wrong? Why is the headless not loading the plugins?
@dale ? :person_bowing: thanks!!

Hi @andrea.settimi - I’ve replied in your other post.

– Dale

Thank you @dale :raising_hands: , I flagged this to be removed but you were too fast, thanks again!