{"id":805,"date":"2023-03-01T06:43:05","date_gmt":"2023-02-28T22:43:05","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=805"},"modified":"2023-04-05T17:32:57","modified_gmt":"2023-04-05T09:32:57","slug":"testng-ignores-test","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/01\/testng-ignores-test\/","title":{"rendered":"TestNG\u5ffd\u7565\u6d4b\u8bd5"},"content":{"rendered":"<p>\u5ffd\u7565\u6d4b\u8bd5\uff1a\u901a\u8fc7\u6ce8\u89e3 @Test(enable = false) \u6765\u7981\u7528\u6b64\u6d4b\u8bd5\u7528\u4f8b<\/p>\n<ul>\n<li>\u6d4b\u8bd5\u7c7b\uff1aAppBlogTest.java<\/li>\n<\/ul>\n<p><!-- more --><\/p>\n<pre><code class=\"language-java\">package me.yezhou;\n\nimport org.testng.Assert;\nimport org.testng.annotations.Test;\n\npublic class AppBlogTest {\n    String message = &quot;AppBlog.CN&quot;;\n    AppBlog appBlog = new AppBlog(message);\n\n    @Test\n    public void testPrintMessage() {\n        System.out.println(&quot;Inside testPrintMessage()&quot;);\n        Assert.assertEquals(message, appBlog.printMessage());\n    }\n\n    @Test(enabled = false)\n    public void testCalculate() {\n        System.out.println(&quot;Inside testCalculate()&quot;);\n        appBlog.calculate();\n    }\n}<\/code><\/pre>\n<ul>\n<li>\u6d4b\u8bd5\u7ed3\u679c\uff1a<\/li>\n<\/ul>\n<pre><code>Inside testPrintMessage()\nAppBlog: printMessage\n\n===============================================\nSuite\nTotal tests run: 1, Failures: 0, Skips: 0\n===============================================<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5ffd\u7565\u6d4b\u8bd5\uff1a\u901a\u8fc7\u6ce8\u89e3 @Test(enable = false) \u6765\u7981\u7528\u6b64\u6d4b\u8bd5\u7528\u4f8b \u6d4b\u8bd5\u7c7b\uff1aAppBlogTes [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[224],"tags":[],"class_list":["post-805","post","type-post","status-publish","format-standard","hentry","category-testng"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=805"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/805\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}