Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
I have manually built many test cases for my windows user control. these test cases are built against user control project.

after I obfuscated my user control, I want to build these same test cases against my obfuscated user control and test if my obfuscated DLL if works.

what is the best way/architecture to build my test cases against this obfuscated DLL?

all my test cases are stored in my version control system and is separate with my user control project.

Thank you very much!!!
Posted
Comments
BillWoodruff 18-Oct-14 20:25pm    
If the names in your code are changed by an obfuscator, don't the corresponding names in the tests have to be changed/synchronized ?
[no name] 26-Oct-14 21:03pm    
If i am incorrect; correct me; in which case I assume i am right, because to use a majority of obfuscation is to change strings, integer, Boolean names structures, and everything else in-between. Which means that you should be making your DLL files as PART of your executable and obfuscate from there and not before hand.

There is a very good article to confuse coders who try to reverse engineer a project on this site. But I will need to dig in to try find it again.
[no name] 26-Oct-14 21:07pm    
' So far, this question lacks the subject. '

How does it? The OP clearly mentioned obfuscation which is related to obfuscated software.
Sergey Alexandrovich Kryukov 26-Oct-14 21:39pm    
Thank you. I misplaced that comment, it was for another answer. I answered the question, please see.
—SA
[no name] 26-Oct-14 21:42pm    
Not a problem Sergey, If your comment and solution was meant for another question, please link me that question and I will alter my vote if you alter your solution.

Kind regards.

1 solution

Please see my comment to the question.

The only essential part here is the obfuscation. The solution of the problem is simple: you should do all the tests before obfuscation. Obfuscation, by definition, should not change any properties of the code. However, the code should be correct and obfuscation-tolerant. The code based on hard-coded names of some types and members is very popular and fundamentally wrong, poorly maintainable (such names then can be used in reflection, with the use of .NET attributes or without them). Such problem exist, but is unrelated to the problem of testing.

More about obfuscation: if you hope to protect your code from modification and the copycat, don't hold your breath. It's way too easy to reverse-engineer your code. Obfuscation makes it harder to understand, but does not really protect from modifications, such as elimination of license check and the like.

—SA
 
Share this answer
 
Comments
[no name] 26-Oct-14 21:18pm    
I have built my own software for forcing licensing checks, which is totally secure and so-far unbreakable in terms of license protection. Your comments make obfuscation and License checks seem week and pointless when they are not. It's effort to protect and the distance you are willing to go to protect your application from exploiters is all that counts; and there are countless measures you can take to ensure manipulation is not succeeded. In which case; you've not explained one countermeasure which results in a bad solution on your behalf.
Sergey Alexandrovich Kryukov 26-Oct-14 21:41pm    
It's up to you what do you do with own software. My advice remains the same. I answered on how to do the testing of the software with obfuscation; that's all that matters.
—SA
[no name] 26-Oct-14 21:46pm    
Should that be your answer, its a very negative response from a MVP with such high reputation; I'm sure you can come-up with something to add of a positive approach to the question of securing code and De-Obfuscation techniques, and I will gladly change my vote for you.
Sergey Alexandrovich Kryukov 26-Oct-14 22:06pm    
Who told you answers should be negative or possible? They should only be useful. The approach to securing code is 1) irrelevant to OP's question, 2) out of the fields of my interests. I'm not interested in any changes to this answer, sorry. And I don't know against who or what you voted; it's not my concern.
—SA
[no name] 26-Oct-14 22:22pm    
I quote the OP: what is the best way/architecture to build my test cases against this obfuscated DLL? How is that not related to securing his code?

Secondly Obfuscation is not done for fun; its done as preventable measures to protect against DE-compiling or recompiling compiled software, not to mention that recompiling is illegal in most cases of legal terms of the distribution of software.

May I make a suggestion; don't make comments or post solutions you do not know or have experience in. Since you claim this is outside your bounds of interest. You really don't have anything to contribute to the OPS question. The sole purpose of a site providing positive results to questions was to provide adequate answering relative to the OP question. . .

Nothing further and no hard feelings. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900