Solution
To avoid this error you have to load the class(es) into memory before running the test, for this, you have to manually open the project containing the class(es). However, this is not an optimal solution if you want to have an automated process.
To have an automatic process you can create a wrapper VI that calls the class(es) and runs the test using the Run Test from Project VI, and then, run the VI from CLI. This will load both, the class(es) and the test into the same memory allocation preventing the above error.
Section RunVI of Predefined Command Line Operations, explains how to call a VI from the CLI and the conditions this VI must meet. Through the input terminal, we pass the parameters of the VI as an array, and the output terminals provide information about any error that occurred during execution.
Attached to this article you will find an example of a wrapper VI used to load the class(es) into memory and call the test. To execute this VI from CLI, use the following syntax:
LabVIEWCLI -OperationName RunVI -VIPath <VI path> <project path> <report path>
Remember to add all the classes used in the test into the wrapper VI.