Re: Obfuscation & unit testing
"Charlie Poole" <[email protected]>
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <02db01c82877$96955f10$6401a8c0@FERRARI> |
Hi Michael, > I appreciate the support problems with obfuscation, and I > guess I'm just going to have to live with them as it is > mostly not my call there. I had already raised that issue > with management and agreed to lose on it :-) > > I want to be able to run the unit tests with and without > obfuscation. I am pretty leery of the idea of taking nicely > tested code and then going and futzing with it right before > packaging a release! But if the unit test run is clean, it's > probably not more broken than what I wrote in the first place. > > What I envision is a TDD process without obfuscation most of > the time. > When an external release is made, the normal tests will be > run, the application dlls will be obfuscated and the tests > will be rerun to verify that there were no issues introduced > by obfuscation. I then want to package those very same dlls > as the release items, so the release itself is tested. Now that you mention it, that makes sense. I'd also want to have a higher-level, acceptance-style test, which could be run on the shipping release. This is actually a new argument for something I have talked about before: don't do acceptance tests in NUnit. > Our application is complicated by the fact that we have a > compact framework application which is 80% of the code and a > small desktop component that is the remainder, so we've got > two different platforms to target. Off topic... keep an eye peeled for coming integration between NUnit and NUnitLite for testing compact framework apps. > It seems if I rearrange how we are handling strong naming > issues and set up the solution to deploy the application dlls > and test dlls to one folder I can obfuscate the application > dlls but not the test dlls and still have them linked and the > tests continue to have their highly descriptive names but the > stack traces show that they are testing the obfuscted dlls. Interesting. I wouldn't have thought you could do that. If that works, it makes sense: no reason to obfuscate the tests. Charlie > That all seemed to work fine. The only potentially fatal > flaw I found is with the strong naming issue, something I > don't entirely understand in .net, particularly the > differences between reflection on the desktop and handheld. > The help & support from the Dotfuscator people seemed to have > a process for applying strong names after the fact, which I > can follow after I spend some time figuring out what's going on. > > Anyway, that's what I've figured out so far. Any thoughts, > advice & experience appreciated! > > -Mikey Reppy > [email protected] > > > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by: Microsoft Defy all > challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Nunit-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/nunit-users > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/