Caliburn.Micro icon indicating copy to clipboard operation
Caliburn.Micro copied to clipboard

Caliburn.Micro and multitasking testing

Open tapika opened this issue 2 years ago • 2 comments

Following API's

IoC.GetInstance
IoC.GetAllInstances
IoC.BuildUp

are by default global statics.

Meanwhile - I would like to use multitasking for UI testing if and when it's possible.

Would it be possible to re-design Caliburn.Micro so it would allow use of multitasking for UI testing ?

In theory you could use AsyncLocal instead of global static variable.

tapika avatar Feb 26 '22 09:02 tapika

I am not sure that I follow the issue here. Perhaps I am not familiar with 'multitasking for UI testing' could you elaborate?

KasperSK avatar Mar 07 '22 08:03 KasperSK

Hmm... I by myself never tried actually to run UI with multitasking testing.

But independently of that - I think it should be possible to launch multiple unit tests, where each task will have it's own instance of caliburn micro container. Having global static variables like above is not from multitasked unit test perspective.

tapika avatar Mar 08 '22 18:03 tapika