{"id":30,"date":"2004-08-25T11:07:59","date_gmt":"2004-08-25T01:07:59","guid":{"rendered":"http:\/\/www.thunderguy.com\/plusplus\/20050422\/write-useful-junit-test-suites\/"},"modified":"2005-04-22T11:10:11","modified_gmt":"2005-04-22T01:10:11","slug":"write-useful-junit-test-suites","status":"publish","type":"post","link":"https:\/\/thunderguy.com\/semicolon\/2004\/08\/25\/write-useful-junit-test-suites\/","title":{"rendered":"Write useful JUnit test suites"},"content":{"rendered":"<p>Structure your JUnit test suites to simplify unit testing &#8212; you can easily run all your tests with one command.<\/p>\n<p>In every package directory, create a test suite called AllTests, containing all TestCases in that directory. For example: <code>com.zikzak.widget.util.AllTests<\/code> (This can be generated automatically by the <a href=\"http:\/\/www.eclipse.org\/eclipse\/\">Eclipse IDE<\/a>.)<\/p>\n<p>Create a global test suite, e.g. <code>com.zikzak.widget.AllTestsGlobal<\/code>, and add all new <code>AllTests<\/code> classes to its <code>suite()<\/code> method. This way you will be able to run every single JUnit test with a single command, just by running the global test suite.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Structure your JUnit test suites to simplify unit testing &#8212; you can easily run all your tests with one command. In every package directory, create a test suite called AllTests, containing all TestCases in that directory. For example: com.zikzak.widget.util.AllTests (This can be generated automatically by the Eclipse IDE.) Create a global test suite, e.g. com.zikzak.widget.AllTestsGlobal, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[8],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","tag-junit"],"_links":{"self":[{"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":0,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"wp:attachment":[{"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}