I'm maintaining a package that is being sold to third-party organizations, and when doing support I've found out that data creation from within tests can clash with triggers from other packages/custom implementations that the client might have already installed.
The way I got to figure out that was what was happening was that since the package I'm maintaining uses chatter clases, some of the methods require the @seealldata annotation, and those tests didn't fail because the custom configurations required by some other trigger was in place.
Another problem I found, is that since I try to post chatter messages in my tests, I have to create other objects to act as parents for the messages, but I can't know in advance to what objects I can post (I wrote a bunch of tests to post to Account, only to have them fail because account posting was disabled in an org).
How do I prepare my tests to be able to work with triggers I don't know about? And how do I test when I don't know the permissions or configurations that may be in the destination org?