Testing obfuscated .dll's :?:
eric-914
Posts: 46
I'm wondering if someone's got suggestions about my situation:
I've got tests that reference classes in my .dll. Now after obfuscation, these class names do not exist, they've been changed.
This, will of course, cause the tests to fail, as they can't load the named class type: TypeLoadException
Anybody have an idea on how to flag the test (or testclass) to NOT execute?
I only have two ideas:
1) Categorize the test (or testclass), and run the tests ignoring those of that category. Unfortunately, this doesn't work. My guess is the testclass still has to load before NUnit can read it to be ignored. And the loading of the test class loads its references.
2) Use a compilation directive that excludes problem tests. The problem I have here is I have to recompile the test classes I already have.
#2 is probably what I'll go with, but I'm wondering if someone else has a better idea?
I've got tests that reference classes in my .dll. Now after obfuscation, these class names do not exist, they've been changed.
This, will of course, cause the tests to fail, as they can't load the named class type: TypeLoadException
Anybody have an idea on how to flag the test (or testclass) to NOT execute?
I only have two ideas:
1) Categorize the test (or testclass), and run the tests ignoring those of that category. Unfortunately, this doesn't work. My guess is the testclass still has to load before NUnit can read it to be ignored. And the loading of the test class loads its references.
2) Use a compilation directive that excludes problem tests. The problem I have here is I have to recompile the test classes I already have.
#2 is probably what I'll go with, but I'm wondering if someone else has a better idea?