specklesystems / xUnitRevit

xUnit runner for Revit
https://speckle.systems/blog/xunitrevit/
MIT License
122 stars 44 forks source link

v1.0.3 failing tests involving RunInTransaction #6

Closed Dre-Tas closed 4 years ago

Dre-Tas commented 4 years ago

I upgraded the xUnitRevitUtils package in my solution to 1.0.3 from NuGet and all the tests that had an xru.RunInTransaction() are now failing.

I then went back to my build of the dll (which has the context and uiapp exposed but not the logic to suppress warnings), overriding the dll from NuGet, and it works fine. Also, when I tried to use RunInTransaction from 1.0.3 I didn't set ignoreWarnings = true, but it was still failing.

You might want to have a look at that. Again, I'm not sure why this is happening but my suspects are on the logic to suppress warnings.

teocomi commented 4 years ago

Hey Tas,

All good on our end, sounds like there's an error firing inside your transaction code. If you debug xUnitRevit you should be able to see what's going on...

image

Dre-Tas commented 4 years ago

Mmmmh ok. It sounds odd because it all works with my build of the dll of the utils and the program works too, so I'm pretty sure my code is fine. I'll debug and let you know if I find out something.

Dre-Tas commented 4 years ago

Aaaactually! Could it be that's happening because I'm using 1.0.3 from NuGet, but what's in Revit is still built upon 1.0.1? I guess what's in Revit doesn't have the warning suppress logic so it freaks out?

teocomi commented 4 years ago

Yes, the version of xru in use by xUnitRevit and by your test library has to be the same. Closing this as we seem to have nailed it!

Dre-Tas commented 4 years ago

Yeah I just tried again by updating both xru and library and it works. (It didn't work this morning when I updated both, but then I tried again and it worked...I suspect I messed up something initially 😆 )

Maybe worth writing that both versions need to be the same as a reminder in the docs? It might happen that someone updates the library but doesn't think of updating the Revit runner.

Bella vez! 🤘