I'm looking at NSubstitute for a fairly large project I am working on where currently we have used Rhino for our mocking framework. Converting tests over to NSubstitute is fairly easy and the code is much easier to read and understand ( not that we are planning to refactor them all- we just need to compare the frameworks ) but I am noticing that the test runs are taking a good deal longer - usually twice as long, sometimes several orders of magnitude. Although this is not a massive deal when the time per test is still well under a second, across thousands of tests it is going to start to make a difference and another part of the current evaluation we are doing on the project is trying to reduce our build time- slower tests would impede this goal.Can anyone offer any performance tips for NSubstitute that might help the tests run a little quicker? I'd certainly be happy to move over to it in terms of writing and maintaining tests, but I am a little anxious about these test durations.--
You received this message because you are subscribed to the Google Groups "NSubstitute" group.
To view this discussion on the web visit https://groups.google.com/d/msg/nsubstitute/-/qweqTHrIQtAJ.
To post to this group, send email to nsubs...@googlegroups.com.
To unsubscribe from this group, send email to nsubstitute...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nsubstitute?hl=en.
It may be just time taken to load a couple of dependencies Nsub has (a few more than RM IIRC) .
That said, I've spiked out a change today that speeds up a large test suite from another project by 5 to 10%, so I'm really glad you raised this. :)
To view this discussion on the web visit https://groups.google.com/d/msg/nsubstitute/-/EnRVh97RU1MJ.