문제

We're finding it very cumbersome to develop automated nunit integration tests which require domain objects to be registered (e.g. in order to load and save projects with said objects), as things like DataSourceFactories need to be registered in the Integrate or Initalize phase.

Registered plugins seem to be ignored in test mode.

Essentially, it seems modules need to be registered the old fashioned way (in the test assembly .config), which becomes a pain to maintain when we have a significant amount of modules in various plugins.

Is there a way to make Petrel load plugins in test mode?

Is there a way to programmatically register modules during startup of Petrel in test mode?

Are there any best or suggested practices for structuring and automating unit/integration tests in a Petrel environment, where tests ideally should run with plugins and their modules having been loaded and initialized, as close to the end-user experience as possible?

도움이 되었습니까?

해결책

The only way to load plug-ins when running Petrel in test mode is registering the in the test assembly .config. As for structuring your plug-ins' tests, I can suggest to keep several copies of .config files, containing registration entities for different plugins/modules, and substituting the test assembly .config with the one you need when running a particular test.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top