|
|
|
|
|
by jgeewax
6075 days ago
|
|
You could also break each test into a separate TestCase where each case uses the setUp() and tearDown() methods to do the repetitive stuff. On a slightly different note, perhaps the layout of the test looks off because you're testing too much. It's difficult to comment too much without code, but you might want to consider assuming that certain things "just work" when using them in more complex tests. That is, if a User depends on an Account being created, create the account and just assume that everything went fine. If that happens to fail, another test elsewhere should fail also which will be more helpful when debugging. PG's most recent essay said it nicely: every line of code is a liability, even tests. The more you repeat yourself (testing things were created correctly that are tested elsewhere) the more code you then need to maintain and update should the requirements ever change. |
|
It at least has to be tested thoroughly. The rest of the apps in the project are less important that in that respect (used internally, primarily).