{"id":743,"date":"2022-12-27T16:56:56","date_gmt":"2023-06-04T21:49:19","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/index.php\/2023\/11\/30\/junit%e8%ae%be%e7%bd%aemaven-junit-4%e5%92%8cjunit-5\/"},"modified":"2025-08-03T05:52:13","modified_gmt":"2025-08-02T21:52:13","slug":"junit%e8%ae%be%e7%bd%aemaven-junit-4%e5%92%8cjunit-5","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/junit%e8%ae%be%e7%bd%aemaven-junit-4%e5%92%8cjunit-5\/","title":{"rendered":"Maven\u9879\u76ee\u4e2d\u914d\u7f6eJUnit 4\u4e0eJUnit 5\u7684\u5b8c\u6574\u6307\u5357"},"content":{"rendered":"<p>JUnit 4\u548cJUnit 5\u662f\u5b8c\u5168\u4e0d\u540c\u7684\u6846\u67b6\u3002\u5b83\u4eec\u90fd\u6709\u540c\u6837\u7684\u7528\u9014\uff0c\u4f46JUnit 5\u662f\u4e00\u4e2a\u5b8c\u5168\u4ece\u96f6\u5f00\u59cb\u7f16\u5199\u7684\u6d4b\u8bd5\u6846\u67b6\uff0c\u4e0d\u4f7f\u7528\u4efb\u4f55JUnit 4\u7684API\u3002\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728\u6211\u4eec\u7684Maven\u9879\u76ee\u4e2d\u8bbe\u7f6eJUnit 4\u548cJUnit 5\u3002<\/p>\n<h2>JUnit Maven \u4f9d\u8d56<\/h2>\n<p>\u5982\u679c\u4f60\u60f3\u4f7f\u7528JUnit 4\uff0c\u90a3\u4e48\u4f60\u53ea\u9700\u8981\u4ee5\u4e0b\u5355\u4e00\u7684\u4f9d\u8d56\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;dependency&gt;\r\n\t&lt;groupId&gt;junit&lt;\/groupId&gt;\r\n\t&lt;artifactId&gt;junit&lt;\/artifactId&gt;\r\n\t&lt;version&gt;4.12&lt;\/version&gt;\r\n\t&lt;scope&gt;test&lt;\/scope&gt;\r\n&lt;\/dependency&gt;\r\n<\/code><\/pre>\n<p>JUnit 5\u88ab\u5206\u4e3a\u51e0\u4e2a\u6a21\u5757\uff0c\u4f60\u81f3\u5c11\u9700\u8981JUnit Platform\u548cJUnit Jupiter\u624d\u80fd\u5728JUnit 5\u4e2d\u7f16\u5199\u6d4b\u8bd5\u3002\u53e6\u5916\uff0c\u8bf7\u6ce8\u610fJUnit 5\u9700\u8981Java 8\u6216\u66f4\u9ad8\u7248\u672c\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;dependency&gt;\r\n\t&lt;groupId&gt;org.junit.jupiter&lt;\/groupId&gt;\r\n\t&lt;artifactId&gt;junit-jupiter-engine&lt;\/artifactId&gt;\r\n\t&lt;version&gt;5.2.0&lt;\/version&gt;\r\n\t&lt;scope&gt;test&lt;\/scope&gt;\r\n&lt;\/dependency&gt;\r\n&lt;dependency&gt;\r\n\t&lt;groupId&gt;org.junit.platform&lt;\/groupId&gt;\r\n\t&lt;artifactId&gt;junit-platform-runner&lt;\/artifactId&gt;\r\n\t&lt;version&gt;1.2.0&lt;\/version&gt;\r\n\t&lt;scope&gt;test&lt;\/scope&gt;\r\n&lt;\/dependency&gt;\r\n<\/code><\/pre>\n<p>\u5982\u679c\u4f60\u60f3\u8981\u8fdb\u884c\u53c2\u6570\u5316\u6d4b\u8bd5\uff0c\u90a3\u4e48\u4f60\u9700\u8981\u6dfb\u52a0\u4e00\u4e2a\u989d\u5916\u7684\u4f9d\u8d56\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;dependency&gt;\r\n\t&lt;groupId&gt;org.junit.jupiter&lt;\/groupId&gt;\r\n\t&lt;artifactId&gt;junit-jupiter-params&lt;\/artifactId&gt;\r\n\t&lt;version&gt;5.2.0&lt;\/version&gt;\r\n\t&lt;scope&gt;test&lt;\/scope&gt;\r\n&lt;\/dependency&gt;\r\n<\/code><\/pre>\n<h2>\u5728Maven\u6784\u5efa\u8fc7\u7a0b\u4e2d\u8fdb\u884cJUnit\u6d4b\u8bd5<\/h2>\n<p>\u5982\u679c\u4f60\u5e0c\u671b\u5728Maven\u6784\u5efa\u8fc7\u7a0b\u4e2d\u6267\u884c\u6d4b\u8bd5\uff0c\u4f60\u9700\u8981\u5728pom.xml\u6587\u4ef6\u4e2d\u914d\u7f6emaven-surefire-plugin\u63d2\u4ef6\u3002<\/p>\n<p>JUnit 4\u7248\u672c\uff1a<\/p>\n<pre class=\"post-pre\"><code>&lt;build&gt;\r\n\t&lt;plugins&gt;\r\n\t\t&lt;plugin&gt;\r\n\t\t\t&lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;maven-surefire-plugin&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;2.22.0&lt;\/version&gt;\r\n\t\t\t&lt;dependencies&gt;\r\n\t\t\t\t&lt;dependency&gt;\r\n\t\t\t\t\t&lt;groupId&gt;org.apache.maven.surefire&lt;\/groupId&gt;\r\n\t\t\t\t\t&lt;artifactId&gt;surefire-junit4&lt;\/artifactId&gt;\r\n\t\t\t\t\t&lt;version&gt;2.22.0&lt;\/version&gt;\r\n\t\t\t\t&lt;\/dependency&gt;\r\n\t\t\t&lt;\/dependencies&gt;\r\n\t\t\t&lt;configuration&gt;\r\n\t\t\t\t&lt;includes&gt;\r\n\t\t\t\t\t&lt;include&gt;**\/*.java&lt;\/include&gt;\r\n\t\t\t\t&lt;\/includes&gt;\r\n\t\t\t&lt;\/configuration&gt;\r\n\t\t&lt;\/plugin&gt;\r\n\t&lt;\/plugins&gt;\r\n&lt;\/build&gt;\r\n<\/code><\/pre>\n<p>JUnit 5\u7248\u672c\uff1a<\/p>\n<pre class=\"post-pre\"><code>&lt;build&gt;\r\n\t&lt;plugins&gt;\r\n\t\t&lt;plugin&gt;\r\n           &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;\r\n           &lt;artifactId&gt;maven-surefire-plugin&lt;\/artifactId&gt;\r\n           &lt;version&gt;2.22.0&lt;\/version&gt;\r\n           &lt;dependencies&gt;\r\n               &lt;dependency&gt;\r\n                   &lt;groupId&gt;org.junit.platform&lt;\/groupId&gt;\r\n                   &lt;artifactId&gt;junit-platform-surefire-provider&lt;\/artifactId&gt;\r\n                   &lt;version&gt;1.2.0&lt;\/version&gt;\r\n               &lt;\/dependency&gt;\r\n           &lt;\/dependencies&gt;\r\n           &lt;configuration&gt;\r\n           \t&lt;additionalClasspathElements&gt;\r\n           \t\t&lt;additionalClasspathElement&gt;src\/test\/java\/&lt;\/additionalClasspathElement&gt;\r\n           \t&lt;\/additionalClasspathElements&gt;\r\n           &lt;\/configuration&gt;\r\n       &lt;\/plugin&gt;\r\n\t&lt;\/plugins&gt;\r\n&lt;\/build&gt;\r\n<\/code><\/pre>\n<h2>JUnit HTML\u62a5\u544a<\/h2>\n<p>Maven Surefire \u63d2\u4ef6\u53ef\u4ee5\u751f\u6210\u6587\u672c\u548cXML\u62a5\u544a\uff0c\u800c\u4f7f\u7528maven-surefire-report-plugin\u53ef\u4ee5\u751f\u6210\u57fa\u4e8eHTML\u7684\u62a5\u544a\u3002\u4e0b\u9762\u7684\u914d\u7f6e\u9002\u7528\u4e8eJUnit 4\u548cJUnit 5\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;reporting&gt;\r\n\t&lt;plugins&gt;\r\n\t\t&lt;plugin&gt;\r\n\t\t\t&lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;\r\n\t\t\t&lt;artifactId&gt;maven-surefire-report-plugin&lt;\/artifactId&gt;\r\n\t\t\t&lt;version&gt;2.22.0&lt;\/version&gt;\r\n\t\t&lt;\/plugin&gt;\r\n\t&lt;\/plugins&gt;\r\n&lt;\/reporting&gt;\r\n<\/code><\/pre>\n<p>\u53ea\u9700\u8981\u8fd0\u884cmvn site\u547d\u4ee4\uff0cHTML\u62a5\u544a\u5c06\u4f1a\u5728target\/site\/\u76ee\u5f55\u4e0b\u751f\u6210\u3002\u8fd9\u5c31\u662f\u5173\u4e8eMaven\u9879\u76eeJUnit\u8bbe\u7f6e\u7684\u5feb\u901f\u6982\u8ff0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>JUnit 4\u548cJUnit 5\u662f\u5b8c\u5168\u4e0d\u540c\u7684\u6846\u67b6\u3002\u5b83\u4eec\u90fd\u6709\u540c\u6837\u7684\u7528\u9014\uff0c\u4f46JUnit 5\u662f\u4e00\u4e2a\u5b8c\u5168\u4ece\u96f6\u5f00\u59cb\u7f16\u5199\u7684\u6d4b [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[970,245,954],"class_list":["post-743","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-junit","tag-maven","tag-954"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Maven\u9879\u76ee\u4e2d\u914d\u7f6eJUnit 4\u4e0eJUnit 5\u7684\u5b8c\u6574\u6307\u5357 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728Maven\u9879\u76ee\u4e2d\u914d\u7f6e\u548c\u4f7f\u7528JUnit 4\u548cJUnit 5\u6d4b\u8bd5\u6846\u67b6\u3002\u901a\u8fc7\u6e05\u6670\u7684\u6b65\u9aa4\u548c\u793a\u4f8b\u4ee3\u7801\uff0c\u5e2e\u52a9Java\u5f00\u53d1\u8005\u8f7b\u677e\u96c6\u6210JUnit\u5230Maven\u9879\u76ee\u4e2d\uff0c\u5305\u62ec\u4f9d\u8d56\u914d\u7f6e\u3001\u6d4b\u8bd5\u7528\u4f8b\u7f16\u5199\u548c\u6267\u884c\u3002\u9002\u5408\u521d\u5b66\u8005\u548c\u6709\u7ecf\u9a8c\u7684\u5f00\u53d1\u8005\u53c2\u8003\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/junit\u8bbe\u7f6emaven-junit-4\u548cjunit-5\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Maven\u9879\u76ee\u4e2d\u914d\u7f6eJUnit 4\u4e0eJUnit 5\u7684\u5b8c\u6574\u6307\u5357\" \/>\n<meta property=\"og:description\" content=\"\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728Maven\u9879\u76ee\u4e2d\u914d\u7f6e\u548c\u4f7f\u7528JUnit 4\u548cJUnit 5\u6d4b\u8bd5\u6846\u67b6\u3002\u901a\u8fc7\u6e05\u6670\u7684\u6b65\u9aa4\u548c\u793a\u4f8b\u4ee3\u7801\uff0c\u5e2e\u52a9Java\u5f00\u53d1\u8005\u8f7b\u677e\u96c6\u6210JUnit\u5230Maven\u9879\u76ee\u4e2d\uff0c\u5305\u62ec\u4f9d\u8d56\u914d\u7f6e\u3001\u6d4b\u8bd5\u7528\u4f8b\u7f16\u5199\u548c\u6267\u884c\u3002\u9002\u5408\u521d\u5b66\u8005\u548c\u6709\u7ecf\u9a8c\u7684\u5f00\u53d1\u8005\u53c2\u8003\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/junit\u8bbe\u7f6emaven-junit-4\u548cjunit-5\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-04T21:49:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-02T21:52:13+00:00\" \/>\n<meta name=\"author\" content=\"\u79d1, \u96c5\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u79d1, \u96c5\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/junit%e8%ae%be%e7%bd%aemaven-junit-4%e5%92%8cjunit-5\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/junit%e8%ae%be%e7%bd%aemaven-junit-4%e5%92%8cjunit-5\/\",\"name\":\"Maven\u9879\u76ee\u4e2d\u914d\u7f6eJUnit 4\u4e0eJUnit 5\u7684\u5b8c\u6574\u6307\u5357 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-06-04T21:49:19+00:00\",\"dateModified\":\"2025-08-02T21:52:13+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a\"},\"description\":\"\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728Maven\u9879\u76ee\u4e2d\u914d\u7f6e\u548c\u4f7f\u7528JUnit 4\u548cJUnit 5\u6d4b\u8bd5\u6846\u67b6\u3002\u901a\u8fc7\u6e05\u6670\u7684\u6b65\u9aa4\u548c\u793a\u4f8b\u4ee3\u7801\uff0c\u5e2e\u52a9Java\u5f00\u53d1\u8005\u8f7b\u677e\u96c6\u6210JUnit\u5230Maven\u9879\u76ee\u4e2d\uff0c\u5305\u62ec\u4f9d\u8d56\u914d\u7f6e\u3001\u6d4b\u8bd5\u7528\u4f8b\u7f16\u5199\u548c\u6267\u884c\u3002\u9002\u5408\u521d\u5b66\u8005\u548c\u6709\u7ecf\u9a8c\u7684\u5f00\u53d1\u8005\u53c2\u8003\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/junit%e8%ae%be%e7%bd%aemaven-junit-4%e5%92%8cjunit-5\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/junit%e8%ae%be%e7%bd%aemaven-junit-4%e5%92%8cjunit-5\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/junit%e8%ae%be%e7%bd%aemaven-junit-4%e5%92%8cjunit-5\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Maven\u9879\u76ee\u4e2d\u914d\u7f6eJUnit 4\u4e0eJUnit 5\u7684\u5b8c\u6574\u6307\u5357\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a\",\"name\":\"\u79d1, \u96c5\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g\",\"caption\":\"\u79d1, \u96c5\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keya\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/junit%e8%ae%be%e7%bd%aemaven-junit-4%e5%92%8cjunit-5\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Maven\u9879\u76ee\u4e2d\u914d\u7f6eJUnit 4\u4e0eJUnit 5\u7684\u5b8c\u6574\u6307\u5357 - Blog - Silicon Cloud","description":"\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728Maven\u9879\u76ee\u4e2d\u914d\u7f6e\u548c\u4f7f\u7528JUnit 4\u548cJUnit 5\u6d4b\u8bd5\u6846\u67b6\u3002\u901a\u8fc7\u6e05\u6670\u7684\u6b65\u9aa4\u548c\u793a\u4f8b\u4ee3\u7801\uff0c\u5e2e\u52a9Java\u5f00\u53d1\u8005\u8f7b\u677e\u96c6\u6210JUnit\u5230Maven\u9879\u76ee\u4e2d\uff0c\u5305\u62ec\u4f9d\u8d56\u914d\u7f6e\u3001\u6d4b\u8bd5\u7528\u4f8b\u7f16\u5199\u548c\u6267\u884c\u3002\u9002\u5408\u521d\u5b66\u8005\u548c\u6709\u7ecf\u9a8c\u7684\u5f00\u53d1\u8005\u53c2\u8003\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/junit\u8bbe\u7f6emaven-junit-4\u548cjunit-5\/","og_locale":"zh_CN","og_type":"article","og_title":"Maven\u9879\u76ee\u4e2d\u914d\u7f6eJUnit 4\u4e0eJUnit 5\u7684\u5b8c\u6574\u6307\u5357","og_description":"\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728Maven\u9879\u76ee\u4e2d\u914d\u7f6e\u548c\u4f7f\u7528JUnit 4\u548cJUnit 5\u6d4b\u8bd5\u6846\u67b6\u3002\u901a\u8fc7\u6e05\u6670\u7684\u6b65\u9aa4\u548c\u793a\u4f8b\u4ee3\u7801\uff0c\u5e2e\u52a9Java\u5f00\u53d1\u8005\u8f7b\u677e\u96c6\u6210JUnit\u5230Maven\u9879\u76ee\u4e2d\uff0c\u5305\u62ec\u4f9d\u8d56\u914d\u7f6e\u3001\u6d4b\u8bd5\u7528\u4f8b\u7f16\u5199\u548c\u6267\u884c\u3002\u9002\u5408\u521d\u5b66\u8005\u548c\u6709\u7ecf\u9a8c\u7684\u5f00\u53d1\u8005\u53c2\u8003\u3002","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/junit\u8bbe\u7f6emaven-junit-4\u548cjunit-5\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-06-04T21:49:19+00:00","article_modified_time":"2025-08-02T21:52:13+00:00","author":"\u79d1, \u96c5","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u79d1, \u96c5","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/junit%e8%ae%be%e7%bd%aemaven-junit-4%e5%92%8cjunit-5\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/junit%e8%ae%be%e7%bd%aemaven-junit-4%e5%92%8cjunit-5\/","name":"Maven\u9879\u76ee\u4e2d\u914d\u7f6eJUnit 4\u4e0eJUnit 5\u7684\u5b8c\u6574\u6307\u5357 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-06-04T21:49:19+00:00","dateModified":"2025-08-02T21:52:13+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a"},"description":"\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728Maven\u9879\u76ee\u4e2d\u914d\u7f6e\u548c\u4f7f\u7528JUnit 4\u548cJUnit 5\u6d4b\u8bd5\u6846\u67b6\u3002\u901a\u8fc7\u6e05\u6670\u7684\u6b65\u9aa4\u548c\u793a\u4f8b\u4ee3\u7801\uff0c\u5e2e\u52a9Java\u5f00\u53d1\u8005\u8f7b\u677e\u96c6\u6210JUnit\u5230Maven\u9879\u76ee\u4e2d\uff0c\u5305\u62ec\u4f9d\u8d56\u914d\u7f6e\u3001\u6d4b\u8bd5\u7528\u4f8b\u7f16\u5199\u548c\u6267\u884c\u3002\u9002\u5408\u521d\u5b66\u8005\u548c\u6709\u7ecf\u9a8c\u7684\u5f00\u53d1\u8005\u53c2\u8003\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/junit%e8%ae%be%e7%bd%aemaven-junit-4%e5%92%8cjunit-5\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/junit%e8%ae%be%e7%bd%aemaven-junit-4%e5%92%8cjunit-5\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/junit%e8%ae%be%e7%bd%aemaven-junit-4%e5%92%8cjunit-5\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"Maven\u9879\u76ee\u4e2d\u914d\u7f6eJUnit 4\u4e0eJUnit 5\u7684\u5b8c\u6574\u6307\u5357"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a","name":"\u79d1, \u96c5","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g","caption":"\u79d1, \u96c5"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keya\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/junit%e8%ae%be%e7%bd%aemaven-junit-4%e5%92%8cjunit-5\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/743","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=743"}],"version-history":[{"count":4,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/743\/revisions"}],"predecessor-version":[{"id":110603,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/743\/revisions\/110603"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=743"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=743"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=743"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}