RefineryToolkits icon indicating copy to clipboard operation
RefineryToolkits copied to clipboard

Unit tests setup needs to be updated

Open radumg opened this issue 6 years ago • 1 comments

At the moment, the setup for the unit tests

  • depends on TestServices.dll.config
  • has a DynamoBasePath hardcoded to @SHKnudsen's Dynamo folder built from source

This means that cloning the the standard developer experience fails :

  • clone repo
  • build all
  • run tests <- fails here

Dynamo base path error

The error logged for every test that inherits from GeometricTestBase is :

SetUp : System.IO.DirectoryNotFoundException : C:\Users\SylvesterKnudsen\Documents\GitHub\Dynamo\bin\AnyCPU\Debug

Solving the Dynamo base path then gets you the next error below.

LibG ProtoInterface DLL not found error

System.NotImplementedException : Could not load file or assembly 'file:///C:\Program Files\Dynamo\Dynamo Core\2\libg_0_0_0\LibG.ProtoInterface.dll' or one of its dependencies. The system cannot find the file specified.

Adding a reference to LibG.ProtoInterface.dll found in C:\Program Files\Dynamo\Dynamo Core\2 does not solve the issue.

Downloading the DynamoCoreRuntime version 2.2.1 and changing the config in the TestServices.dll.config fixes that issue :

before

      <add key="DynamoBasePath" value="C:\Program Files\Dynamo\Dynamo Core\2"/>
      <add key="RequestedLibraryVersion" value="Version224"/>

after

      <add key="DynamoBasePath" value="C:\Users\Radu\Downloads\DynamoCoreRuntime2.2.1"/>

Turns out removing RequestedLibraryVersion key is safe.

Removing TestServices.dll.config

Tried removing the configuration file and of course the tests can no longer locate libG, with same error as first one above.

radumg avatar Jul 30 '19 14:07 radumg

We may need to loop @mjkkirschner to find out the latest changes to the Dynamo tests. Sylvester, please feel free to reach out to Mike on Slack 😄

radumg avatar Jul 30 '19 14:07 radumg