Build/Test Issues

Code with dynamic loading doesn't work as expected on grid nodes

Started by samholder on 1,426 views

Hi.

We have a project which is tested via end to end tests using playwright. The site has a system for overriding views in site specific libraries. When running locally everything works ok, but when I try and run the tests on grid nodes I find that the pages don't render currently because the DLLs that contain overriding views or view components are not loaded.

I assume this is because ncrunch is running the tests and keeping other DLLs in separate locations so they are not discovered.

What I don't understand is why the behaviour is different in the grid nodes and if there is anything I can do to make the behaviour the same?

Cheers

Sam
Hi Sam,

The grid nodes are designed to operate with the same structure as the NCrunch client, in that they have a replica of your solution and they separate the projects into workspaces. All build, test, and dependency handling logic is the same.

Where the nodes are different from the client is in the environment. For example, they may have a different install state of other software, different assemblies in the GAC, etc.

What I would suggest is hooking a debugger onto your code as it runs on your client machine under NCrunch (ideally some time late in the test run). Break into the code and examine the list of running modules. Check the loaded locations of the modules that the grid node is having trouble resolving and see where they are. You might find that these libraries are stored differently on the node or are absent outside of the files being copied over from the client. It might be something as simple as a missing SDK on the node that NCrunch can't automatically copy over and needs to be installed manually.

Post a reply

Log in to reply.