{"id":394998,"date":"2024-06-29T11:57:07","date_gmt":"2024-06-29T11:57:07","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=394998"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=394998","title":{"rendered":"<span>\u0422\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u043f\u043e JUnit 5 \u00a0&#8212; \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<blockquote>\n<p>\u0422\u0440\u0438 \u0434\u043d\u044f \u043d\u0430\u0437\u0430\u0434 \u043c\u043d\u043e\u0439 \u0431\u044b\u043b \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d \u043f\u0435\u0440\u0435\u0432\u043e\u0434: <a href=\"https:\/\/habr.com\/ru\/post\/590199\/\" rel=\"noopener noreferrer nofollow\">JUnit \u2014 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 HTML<\/a><\/p>\n<p>\u0412 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u043d\u0435\u043c\u0443 <a class=\"mention\" href=\"\/users\/lesharb\">@LeshaRB<\/a> \u0437\u0430\u0434\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441: &#171;\u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0432\u0441\u0435\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 <a href=\"https:\/\/howtodoinjava.com\/junit5\/\" rel=\"noopener noreferrer nofollow\">\u0446\u0438\u043a\u043b\u0430 Junit5<\/a> \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0434\u043d\u0430?&#187;<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 &#8212; \u044d\u0442\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f. <\/p>\n<\/blockquote>\n<p>\u0412 \u044d\u0442\u043e\u043c\u00a0<strong>\u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435<\/strong> <strong>\u043f\u043e JUnit 5<\/strong>\u00a0\u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e \u0442\u043e\u043c, \u043a\u0430\u043a JUnit \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u00a0\u0441\u0442\u0438\u043b\u044c \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\u00a0<a href=\"https:\/\/howtodoinjava.com\/java-8-tutorial\/\" rel=\"noopener noreferrer nofollow\">Java 8<\/a>\u00a0\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.\u00a0\u0423\u0437\u043d\u0430\u0439\u0442\u0435, \u0447\u0435\u043c JUnit 5 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 JUnit 4.<\/p>\n<p>JUnit 5 \u2014 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0441\u0440\u0435\u0434\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 Java.\u00a0JUnit \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0441\u044f \u0441\u043e \u0441\u0432\u043e\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439.<\/p>\n<p>\u041c\u0435\u0436\u0434\u0443 \u0442\u0435\u043c, JDK 8 \u043f\u0440\u0438\u0432\u043d\u0435\u0441 \u0432 java \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438, \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c,\u00a0<a href=\"https:\/\/howtodoinjava.com\/java8\/lambda-expressions\/\" rel=\"noopener noreferrer nofollow\">\u043b\u044f\u043c\u0431\u0434\u0430-\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/a>.\u00a0JUnit 5 \u0431\u044b\u043b \u043d\u0430\u0446\u0435\u043b\u0435\u043d \u043d\u0430 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044e \u0441\u0442\u0438\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Java 8;\u00a0\u0432\u043e\u0442 \u043f\u043e\u0447\u0435\u043c\u0443 Java 8 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0432 JUnit 5 (\u0445\u043e\u0442\u044f \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e JUnit 3 \u0438\u043b\u0438 JUnit 4 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438).<\/p>\n<p><strong>\u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/strong><\/p>\n<ol>\n<li>\n<p>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 JUnit 5<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/p>\n<\/li>\n<li>\n<p>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 JUnit 5<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0442\u0435\u0441\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0423\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043b\u044f JUnit 4<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<\/ol>\n<h3>1. \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 JUnit 5<\/h3>\n<p>\u041f\u043e\u00a0<a href=\"https:\/\/howtodoinjava.com\/junit5\/junit-5-vs-junit-4\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 JUnit 4<\/a>, JUnit 5 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438\u0437 \u0442\u0440\u0435\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432:<\/p>\n<blockquote>\n<p><em>JUnit 5 = \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 JUnit + JUnit Jupiter + JUnit Vintage<\/em><\/p>\n<\/blockquote>\n<ul>\n<li>\n<p><strong>JUnit Jupiter<\/strong>: \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432.\u00a0\u0412 \u043d\u0435\u043c \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u043d\u043e\u0432\u044b\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 junit \u0438\u00a0<code>TestEngine<\/code> \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0441 \u044d\u0442\u0438\u043c\u0438 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 JUnit<\/strong>:\u00a0\u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b junit, IDE, \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0441\u0431\u043e\u0440\u043a\u0438 \u0438\u043b\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c API \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.\u00a0\u041e\u043d \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u00a0<code>TestEngine<\/code> API \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u043e\u0432\u044b\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435. \u041e\u043d \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0434\u043b\u044f Gradle \u0438 Maven.<\/p>\n<\/li>\n<li>\n<p><strong>JUnit Vintage<\/strong>: \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c &#8212; \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 JUnit 5 \u0442\u0435\u0441\u0442\u043e\u0432, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f JUnit 3 \u0438 JUnit 4.\u00a0\u042d\u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d87\/277\/e29\/d87277e291a08d3488681f512d1ac31a.png\" alt=\"\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 JUnit 5\" title=\"\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 JUnit 5\" width=\"794\" height=\"567\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d87\/277\/e29\/d87277e291a08d3488681f512d1ac31a.png\"\/><figcaption>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 JUnit 5<\/figcaption><\/figure>\n<h3>2. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h3>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c JUnit 5 \u0432 \u0441\u0432\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 Maven \u0438\u043b\u0438 Gradle, \u0432\u043a\u043b\u044e\u0447\u0438\u0432 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<ul>\n<li>\n<p><strong>junit-jupiter-api<\/strong>: \u044d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0432\u0441\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a @Test,\u00a0\u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0438\u00a0<a href=\"https:\/\/howtodoinjava.com\/junit5\/junit-5-assertions-examples\/\" rel=\"noopener noreferrer nofollow\">\u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f\u00a0<\/a><a href=\"https:\/\/howtodoinjava.com\/junit5\/junit-5-test-lifecycle\/\" rel=\"noopener noreferrer nofollow\">\u043c\u0435\u0442\u043e\u0434\u0430 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430<\/a>.<\/p>\n<\/li>\n<li>\n<p><strong>junit-jupiter-engine<\/strong>: \u043e\u043d \u0438\u043c\u0435\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>junit-platform-suite<\/strong>:\u00a0\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430\u00a0<a href=\"https:\/\/howtodoinjava.com\/junit5\/junit5-test-suites-examples\/\" rel=\"noopener noreferrer nofollow\">@Suite,<\/a>\u00a0\u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u0430\u044f \u044d\u0442\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 JUnitPlatform \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u043c.<\/p>\n<\/li>\n<\/ul>\n<p><strong>pom.xml<\/strong><\/p>\n<pre><code class=\"xml\">&lt;properties>     &lt;junit.jupiter.version>5.8.1&lt;\/junit.jupiter.version>     &lt;junit.platform.version>1.8.1&lt;\/junit.platform.version> &lt;\/properties> &lt;dependencies>     &lt;dependency>         &lt;groupId>org.junit.jupiter&lt;\/groupId>         &lt;artifactId>junit-jupiter-engine&lt;\/artifactId>         &lt;version>${junit.jupiter.version}&lt;\/version>         &lt;scope>test&lt;\/scope>     &lt;\/dependency>     &lt;dependency>         &lt;groupId>org.junit.jupiter&lt;\/groupId>         &lt;artifactId>junit-jupiter-api&lt;\/artifactId>         &lt;version>${junit.jupiter.version}&lt;\/version>         &lt;scope>test&lt;\/scope>     &lt;\/dependency>     &lt;dependency>         &lt;groupId>org.junit.jupiter&lt;\/groupId>         &lt;artifactId>junit-jupiter-params&lt;\/artifactId>         &lt;version>${junit.jupiter.version}&lt;\/version>         &lt;scope>test&lt;\/scope>     &lt;\/dependency>     &lt;dependency>         &lt;groupId>org.junit.platform&lt;\/groupId>         &lt;artifactId>junit-platform-suite&lt;\/artifactId>         &lt;version>${junit.platform.version}&lt;\/version>         &lt;scope>test&lt;\/scope>     &lt;\/dependency> &lt;\/dependencies><\/code><\/pre>\n<p><strong>build.gradle<\/strong><\/p>\n<pre><code class=\"java\">build.gradledependencies {     testRuntime(\"org.junit.jupiter:junit-jupiter-api:5.8.1\")     testRuntime(\"org.junit.jupiter:junit-jupiter-engine:5.8.1\")     testRuntime(\"org.junit.jupiter:junit-jupiter-params:5.8.1\")     testRuntime(\"org.junit.platform:junit-platform-suite:1.8.1\") } test {     useJUnitPlatform() }<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/198\/af7\/eb5\/198af7eb5239b11abdfa309b15c6deb0.jpeg\" alt=\"\u041c\u043e\u0434\u0443\u043b\u0438 JUNit 5\" title=\"\u041c\u043e\u0434\u0443\u043b\u0438 JUNit 5\" width=\"963\" height=\"443\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/198\/af7\/eb5\/198af7eb5239b11abdfa309b15c6deb0.jpeg\" data-blurred=\"true\"\/><figcaption>\u041c\u043e\u0434\u0443\u043b\u0438 JUNit 5<\/figcaption><\/figure>\n<blockquote>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:\u00a0<a href=\"https:\/\/howtodoinjava.com\/junit5\/junit5-maven-dependency\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u0438\u043c\u0435\u0440 Maven<\/a>\u00a0|\u00a0<a href=\"https:\/\/howtodoinjava.com\/junit5\/junit-5-gradle-dependency-build-gradle-example\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0438\u043c\u0435\u0440 Gradle<\/a><\/p>\n<\/blockquote>\n<h3>3. \u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 JUnit 5<\/h3>\n<p>JUnit 5 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"140\" width=\"140\">\n<p><strong>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438<\/strong><\/p>\n<\/th>\n<th>\n<p><strong>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/strong><\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"140\" width=\"140\">\n<p><code>@BeforeEach<\/code><\/p>\n<\/td>\n<td>\n<p>\u0410\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"140\" width=\"140\">\n<p><code>@AfterEach<\/code><\/p>\n<\/td>\n<td>\n<p>\u0410\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"140\" width=\"140\">\n<p><code>@BeforeAll<\/code><\/p>\n<\/td>\n<td>\n<p>\u0410\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043f\u0435\u0440\u0435\u0434 \u0432\u0441\u0435\u043c\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435.\u00a0\u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"140\" width=\"140\">\n<p><code>@AfterAll<\/code><\/p>\n<\/td>\n<td>\n<p>\u0410\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435.\u00a0\u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"140\" width=\"140\">\n<p><code>@Test<\/code><\/p>\n<\/td>\n<td>\n<p>\u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043c\u0435\u0442\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u043a\u0430\u043a \u0442\u0435\u0441\u0442 junit.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"140\" width=\"140\">\n<p><code>@DisplayName<\/code><\/p>\n<\/td>\n<td>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u043b\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"140\" width=\"140\">\n<p><code>@Disable<\/code><\/p>\n<\/td>\n<td>\n<p>\u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u043b\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0438\u0437 \u043d\u0430\u0431\u043e\u0440\u0430 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"140\" width=\"140\">\n<p><code>@Nested<\/code><\/p>\n<\/td>\n<td>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"140\" width=\"140\">\n<p><code>@Tag<\/code><\/p>\n<\/td>\n<td>\n<p>\u041f\u043e\u043c\u0435\u0442\u044c\u0442\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0441\u044b \u0442\u0435\u0441\u0442\u043e\u0432 \u0442\u0435\u0433\u0430\u043c\u0438 \u0434\u043b\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"140\" width=\"140\">\n<p><code>@TestFactory<\/code><\/p>\n<\/td>\n<td>\n<p>\u041e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 &#8212; \u044d\u0442\u043e \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0444\u0430\u0431\u0440\u0438\u043a\u0430 \u0434\u043b\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h3>4. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432<\/h3>\n<p>\u041c\u0435\u0436\u0434\u0443 JUnit 4 \u0438 JUnit 5 \u043d\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u0432 \u0441\u0442\u0438\u043b\u044f\u0445 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432.\u00a0\u0412\u043e\u0442 \u043e\u0431\u0440\u0430\u0437\u0446\u044b \u0442\u0435\u0441\u0442\u043e\u0432 \u0441 \u0438\u0445\u00a0\u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438\u00a0<a href=\"https:\/\/howtodoinjava.com\/junit5\/junit-5-test-lifecycle\/\" rel=\"noopener noreferrer nofollow\">\u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430<\/a>.<\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432\u0441\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0432\u0437\u044f\u0442\u044b \u0438\u0437\u00a0\u043f\u0430\u043a\u0435\u0442\u0430\u00a0<em>org.junit.jupiter.api<\/em>.<\/p>\n<p><strong>JUnit 5 Tests<\/strong><\/p>\n<pre><code class=\"java\">import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test;  import com.howtodoinjava.junit5.examples.Calculator;  public class AppTest {      @BeforeAll     static void setup(){         System.out.println(\"@BeforeAll executed\");     }      @BeforeEach     void setupThis(){         System.out.println(\"@BeforeEach executed\");     }      @Tag(\"DEV\")     @Test     void testCalcOne()     {         System.out.println(\"======TEST ONE EXECUTED=======\");         Assertions.assertEquals( 4 , Calculator.add(2, 2));     }      @Tag(\"PROD\")     @Disabled     @Test     void testCalcTwo()     {         System.out.println(\"======TEST TWO EXECUTED=======\");         Assertions.assertEquals( 6 , Calculator.add(2, 4));     }      @AfterEach     void tearThis(){         System.out.println(\"@AfterEach executed\");     }      @AfterAll     static void tear(){         System.out.println(\"@AfterAll executed\");     } }<\/code><\/pre>\n<h3>5. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0442\u0435\u0441\u0442\u043e\u0432<\/h3>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f\u00a0<strong>\u043d\u0430\u0431\u043e\u0440\u044b \u0442\u0435\u0441\u0442\u043e\u0432 JUnit 5<\/strong>, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u0430\u043c \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u043f\u0430\u043a\u0435\u0442\u0430\u043c.\u00a0JUnit 5 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u044d\u0442\u0438 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<ul>\n<li>\n<p>@Suite<\/p>\n<\/li>\n<li>\n<p><em>@SelectClasses<\/em><\/p>\n<\/li>\n<li>\n<p><em>@SelectPackages<\/em><\/p>\n<\/li>\n<li>\n<p><em>@IncludePackages<\/em><\/p>\n<\/li>\n<li>\n<p><em>@ExcludePackages<\/em><\/p>\n<\/li>\n<li>\n<p><em>@IncludeClassNamePatterns<\/em><\/p>\n<\/li>\n<li>\n<p><em>@ExcludeClassNamePatterns<\/em><\/p>\n<\/li>\n<li>\n<p><em>@IncludeTags<\/em><\/p>\n<\/li>\n<li>\n<p><em>@ExcludeTags<\/em><\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u043a\u0435\u0442\u0430 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00a0<code>@Suite<\/code> \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e \u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u00a0<em>\u043c\u043e\u0434\u0443\u043b\u044c junit-platform-suite<\/em>\u00a0\u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<pre><code class=\"java\">@Suite @SelectPackages(\"com.howtodoinjava.junit5.examples\") public class JUnit5TestSuiteExample { }<\/code><\/pre>\n<h3>6. Assertions<\/h3>\n<p>Assertions (\u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f) \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0442\u0435\u0441\u0442\u0430.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432\u0435\u0449\u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438, \u0432\u0441\u0435 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f JUnit Jupiter \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f <code>static<\/code> \u043c\u0435\u0442\u043e\u0434\u044b \u0432 \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"https:\/\/junit.org\/junit5\/docs\/current\/api\/org.junit.jupiter.api\/org\/junit\/jupiter\/api\/Assertions.html\" rel=\"noopener noreferrer nofollow\">org.junit.jupiter.Assertions<\/a>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>assertEquals()<\/code>, <code>assertNotEquals()<\/code>.<\/p>\n<pre><code class=\"java\">void testCase() {     \/\/Test will pass     Assertions.assertNotEquals(3, Calculator.add(2, 2));      \/\/Test will fail     Assertions.assertNotEquals(4, Calculator.add(2, 2), \"Calculator.add(2, 2) test failed\");      \/\/Test will fail     Supplier&lt;String> messageSupplier  = () -> \"Calculator.add(2, 2) test failed\";     Assertions.assertNotEquals(4, Calculator.add(2, 2), messageSupplier); }<\/code><\/pre>\n<blockquote>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:\u00a0<a href=\"https:\/\/howtodoinjava.com\/junit5\/junit-5-assertions-examples\/\" rel=\"noopener noreferrer nofollow\">JUnit 5 Assertions<\/a><\/p>\n<\/blockquote>\n<h3>7. Assumptions<\/h3>\n<p>\u041a\u043b\u0430\u0441\u0441 <a href=\"https:\/\/junit.org\/junit5\/docs\/current\/api\/org.junit.jupiter.api\/org\/junit\/jupiter\/api\/Assumptions.html\" rel=\"noopener noreferrer nofollow\">Assumptions<\/a>\u00a0(\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f)\u00a0\u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u00a0<code>static<\/code>\u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044e \u0442\u0435\u0441\u0442\u0430.<\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u0441\u044f\u043a\u0438\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.\u00a0\u0412 \u043e\u0442\u0447\u0435\u0442\u0435 \u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u044d\u0442\u0438 \u0442\u0435\u0441\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u044b \u043a\u0430\u043a \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u044b\u0435.<\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441 \u0438\u043c\u0435\u0435\u0442 \u0442\u0440\u0438 \u0442\u0430\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432: <code>assumeFalse()<\/code>, <code>assumeTrue()<\/code> \u0438 <code>assumingThat()<\/code><\/p>\n<pre><code class=\"java\">public class AppTest {     @Test     void testOnDev()     {         System.setProperty(\"ENV\", \"DEV\");         Assumptions.assumeTrue(\"DEV\".equals(System.getProperty(\"ENV\")), AppTest::message);     }      @Test     void testOnProd()     {         System.setProperty(\"ENV\", \"PROD\");         Assumptions.assumeFalse(\"DEV\".equals(System.getProperty(\"ENV\")));     }      private static String message () {         return \"TEST Execution Failed :: \";     } }<\/code><\/pre>\n<blockquote>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:\u00a0<a href=\"https:\/\/howtodoinjava.com\/junit5\/junit-5-assumptions-examples\/\" rel=\"noopener noreferrer nofollow\">JUnit 5 Assumptions<\/a><\/p>\n<\/blockquote>\n<h3>8. \u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 JUnit 4<\/h3>\n<p>JUnit 4 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0443\u0436\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u0430\u0432\u043d\u043e, \u0438 \u043d\u0430 junit 4 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0442\u0435\u0441\u0442\u043e\u0432. JUnit Jupiter \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0442\u0435\u0441\u0442\u044b.\u00a0\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e\u00a0\u0431\u044b\u043b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442\u00a0<em>JUnit Vintage<\/em>.<\/p>\n<p>JUnit Vintage \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u00a0<code>TestEngine<\/code> \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 JUnit 3 \u0438 JUnit 4 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 JUnit 5.<\/p>\n<h3>9. \u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>JUnit 5 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u043c \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u0438 \u043c\u043d\u043e\u0433\u043e\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c.\u00a0\u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043d \u043e\u0442\u043a\u0440\u044b\u0442 \u0434\u043b\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0438 API.\u00a0\u041a\u0430\u043a \u0430\u0432\u0442\u043e\u0440 \u0442\u0435\u0441\u0442\u043e\u0432, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0430\u0437\u043d\u0438\u0446\u044b, \u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f IDE, \u0432\u044b \u0435\u0433\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u0435.<\/p>\n<p>\u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u00a0<a href=\"https:\/\/howtodoinjava.com\/junit5\/code-test-templates-eclipse\/\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0432 Eclipse<\/a>\u00a0IDE, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.<\/p>\n<p>\u0425\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f!!!<\/p>\n<p>\u2192 <a href=\"https:\/\/github.com\/lokeshgupta1981\/Junit5Examples\/tree\/master\/JUnit5Examples\" rel=\"noopener noreferrer nofollow\">\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 <\/a><\/p>\n<p>\u041f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0447\u0430\u0441\u0442\u0438 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430: <\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/590699\/\" rel=\"noopener noreferrer nofollow\">\u0416\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b JUnit 5 \u0442\u0435\u0441\u0442\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/590715\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @BeforeAll<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/590741\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u00a0@BeforeEach<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/590757\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u00a0@AfterEach<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/590909\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u00a0@AfterAll<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/590927\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @RepeatedTest<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/590965\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @Disabled<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/591007\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @ParameterizedTest<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/591305\/\" rel=\"noopener noreferrer nofollow\">\u041e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 JUnit 5<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/591587\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0439 JUnit 5<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/591553\/\" rel=\"noopener noreferrer nofollow\">\u041e\u0442\u0447\u0435\u0442\u044b \u043e \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0438 \u043a\u043e\u0434\u0430 JUnit\u00a0\u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Maven \u043f\u043b\u0430\u0433\u0438\u043d\u0430 JaCoCo<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/590199\/\" rel=\"noopener noreferrer nofollow\">JUnit \u2014 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 HTML<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/590607\/\"> https:\/\/habr.com\/ru\/articles\/590607\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<blockquote>\n<p>\u0422\u0440\u0438 \u0434\u043d\u044f \u043d\u0430\u0437\u0430\u0434 \u043c\u043d\u043e\u0439 \u0431\u044b\u043b \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d \u043f\u0435\u0440\u0435\u0432\u043e\u0434: <a href=\"https:\/\/habr.com\/ru\/post\/590199\/\" rel=\"noopener noreferrer nofollow\">JUnit \u2014 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 HTML<\/a><\/p>\n<p>\u0412 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u043d\u0435\u043c\u0443 <a class=\"mention\" href=\"\/users\/lesharb\">@LeshaRB<\/a> \u0437\u0430\u0434\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441: &#171;\u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0432\u0441\u0435\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 <a href=\"https:\/\/howtodoinjava.com\/junit5\/\" rel=\"noopener noreferrer nofollow\">\u0446\u0438\u043a\u043b\u0430 Junit5<\/a> \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0434\u043d\u0430?&#187;<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 &#8212; \u044d\u0442\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f. <\/p>\n<\/blockquote>\n<p>\u0412 \u044d\u0442\u043e\u043c\u00a0<strong>\u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435<\/strong> <strong>\u043f\u043e JUnit 5<\/strong>\u00a0\u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e \u0442\u043e\u043c, \u043a\u0430\u043a JUnit \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u00a0\u0441\u0442\u0438\u043b\u044c \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\u00a0<a href=\"https:\/\/howtodoinjava.com\/java-8-tutorial\/\" rel=\"noopener noreferrer nofollow\">Java 8<\/a>\u00a0\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.\u00a0\u0423\u0437\u043d\u0430\u0439\u0442\u0435, \u0447\u0435\u043c JUnit 5 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 JUnit 4.<\/p>\n<p>JUnit 5 \u2014 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0441\u0440\u0435\u0434\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 Java.\u00a0JUnit \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0441\u044f \u0441\u043e \u0441\u0432\u043e\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439.<\/p>\n<p>\u041c\u0435\u0436\u0434\u0443 \u0442\u0435\u043c, JDK 8 \u043f\u0440\u0438\u0432\u043d\u0435\u0441 \u0432 java \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438, \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c,\u00a0<a href=\"https:\/\/howtodoinjava.com\/java8\/lambda-expressions\/\" rel=\"noopener noreferrer nofollow\">\u043b\u044f\u043c\u0431\u0434\u0430-\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/a>.\u00a0JUnit 5 \u0431\u044b\u043b \u043d\u0430\u0446\u0435\u043b\u0435\u043d \u043d\u0430 \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044e \u0441\u0442\u0438\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Java 8;\u00a0\u0432\u043e\u0442 \u043f\u043e\u0447\u0435\u043c\u0443 Java 8 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0432 JUnit 5 (\u0445\u043e\u0442\u044f \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e JUnit 3 \u0438\u043b\u0438 JUnit 4 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438).<\/p>\n<p><strong>\u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/strong><\/p>\n<ol>\n<li>\n<p>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 JUnit 5<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/p>\n<\/li>\n<li>\n<p>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 JUnit 5<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0442\u0435\u0441\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0423\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043b\u044f JUnit 4<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<\/ol>\n<h3>1. \u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 JUnit 5<\/h3>\n<p>\u041f\u043e\u00a0<a href=\"https:\/\/howtodoinjava.com\/junit5\/junit-5-vs-junit-4\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 JUnit 4<\/a>, JUnit 5 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438\u0437 \u0442\u0440\u0435\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432:<\/p>\n<blockquote>\n<p><em>JUnit 5 = \u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 JUnit + JUnit Jupiter + JUnit Vintage<\/em><\/p>\n<\/blockquote>\n<ul>\n<li>\n<p><strong>JUnit Jupiter<\/strong>: \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432.\u00a0\u0412 \u043d\u0435\u043c \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u043d\u043e\u0432\u044b\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 junit \u0438\u00a0<code>TestEngine<\/code> \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0441 \u044d\u0442\u0438\u043c\u0438 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 JUnit<\/strong>:\u00a0\u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b junit, IDE, \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0441\u0431\u043e\u0440\u043a\u0438 \u0438\u043b\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c API \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.\u00a0\u041e\u043d \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u00a0<code>TestEngine<\/code> API \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u043e\u0432\u044b\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435. \u041e\u043d \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0434\u043b\u044f Gradle \u0438 Maven.<\/p>\n<\/li>\n<li>\n<p><strong>JUnit Vintage<\/strong>: \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c &#8212; \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 JUnit 5 \u0442\u0435\u0441\u0442\u043e\u0432, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f JUnit 3 \u0438 JUnit 4.\u00a0\u042d\u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><figcaption>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 JUnit 5<\/figcaption><\/figure>\n<h3>2. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h3>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c JUnit 5 \u0432 \u0441\u0432\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 Maven \u0438\u043b\u0438 Gradle, \u0432\u043a\u043b\u044e\u0447\u0438\u0432 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<ul>\n<li>\n<p><strong>junit-jupiter-api<\/strong>: \u044d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0432\u0441\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a @Test,\u00a0\u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0438\u00a0<a href=\"https:\/\/howtodoinjava.com\/junit5\/junit-5-assertions-examples\/\" rel=\"noopener noreferrer nofollow\">\u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f\u00a0<\/a><a href=\"https:\/\/howtodoinjava.com\/junit5\/junit-5-test-lifecycle\/\" rel=\"noopener noreferrer nofollow\">\u043c\u0435\u0442\u043e\u0434\u0430 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430<\/a>.<\/p>\n<\/li>\n<li>\n<p><strong>junit-jupiter-engine<\/strong>: \u043e\u043d \u0438\u043c\u0435\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>junit-platform-suite<\/strong>:\u00a0\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430\u00a0<a href=\"https:\/\/howtodoinjava.com\/junit5\/junit5-test-suites-examples\/\" rel=\"noopener noreferrer nofollow\">@Suite,<\/a>\u00a0\u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u0430\u044f \u044d\u0442\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 JUnitPlatform \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u043c.<\/p>\n<\/li>\n<\/ul>\n<p><strong>pom.xml<\/strong><\/p>\n<pre><code class=\"xml\">&lt;properties>     &lt;junit.jupiter.version>5.8.1&lt;\/junit.jupiter.version>     &lt;junit.platform.version>1.8.1&lt;\/junit.platform.version> &lt;\/properties> &lt;dependencies>     &lt;dependency>         &lt;groupId>org.junit.jupiter&lt;\/groupId>         &lt;artifactId>junit-jupiter-engine&lt;\/artifactId>         &lt;version>${junit.jupiter.version}&lt;\/version>         &lt;scope>test&lt;\/scope>     &lt;\/dependency>     &lt;dependency>         &lt;groupId>org.junit.jupiter&lt;\/groupId>         &lt;artifactId>junit-jupiter-api&lt;\/artifactId>         &lt;version>${junit.jupiter.version}&lt;\/version>         &lt;scope>test&lt;\/scope>     &lt;\/dependency>     &lt;dependency>         &lt;groupId>org.junit.jupiter&lt;\/groupId>         &lt;artifactId>junit-jupiter-params&lt;\/artifactId>         &lt;version>${junit.jupiter.version}&lt;\/version>         &lt;scope>test&lt;\/scope>     &lt;\/dependency>     &lt;dependency>         &lt;groupId>org.junit.platform&lt;\/groupId>         &lt;artifactId>junit-platform-suite&lt;\/artifactId>         &lt;version>${junit.platform.version}&lt;\/version>         &lt;scope>test&lt;\/scope>     &lt;\/dependency> &lt;\/dependencies><\/code><\/pre>\n<p><strong>build.gradle<\/strong><\/p>\n<pre><code class=\"java\">build.gradledependencies {     testRuntime(\"org.junit.jupiter:junit-jupiter-api:5.8.1\")     testRuntime(\"org.junit.jupiter:junit-jupiter-engine:5.8.1\")     testRuntime(\"org.junit.jupiter:junit-jupiter-params:5.8.1\")     testRuntime(\"org.junit.platform:junit-platform-suite:1.8.1\") } test {     useJUnitPlatform() }<\/code><\/pre>\n<figure class=\"full-width\"><figcaption>\u041c\u043e\u0434\u0443\u043b\u0438 JUNit 5<\/figcaption><\/figure>\n<blockquote>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:\u00a0<a href=\"https:\/\/howtodoinjava.com\/junit5\/junit5-maven-dependency\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u0438\u043c\u0435\u0440 Maven<\/a>\u00a0|\u00a0<a href=\"https:\/\/howtodoinjava.com\/junit5\/junit-5-gradle-dependency-build-gradle-example\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0438\u043c\u0435\u0440 Gradle<\/a><\/p>\n<\/blockquote>\n<h3>3. \u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 JUnit 5<\/h3>\n<p>JUnit 5 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"140\" width=\"140\">\n<p><strong>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438<\/strong><\/p>\n<\/th>\n<th>\n<p><strong>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/strong><\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"140\" width=\"140\">\n<p><code>@BeforeEach<\/code><\/p>\n<\/td>\n<td>\n<p>\u0410\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"140\" width=\"140\">\n<p><code>@AfterEach<\/code><\/p>\n<\/td>\n<td>\n<p>\u0410\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"140\" width=\"140\">\n<p><code>@BeforeAll<\/code><\/p>\n<\/td>\n<td>\n<p>\u0410\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043f\u0435\u0440\u0435\u0434 \u0432\u0441\u0435\u043c\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435.\u00a0\u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"140\" width=\"140\">\n<p><code>@AfterAll<\/code><\/p>\n<\/td>\n<td>\n<p>\u0410\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435.\u00a0\u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"140\" width=\"140\">\n<p><code>@Test<\/code><\/p>\n<\/td>\n<td>\n<p>\u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043c\u0435\u0442\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u043a\u0430\u043a \u0442\u0435\u0441\u0442 junit.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"140\" width=\"140\">\n<p><code>@DisplayName<\/code><\/p>\n<\/td>\n<td>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u043b\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"140\" width=\"140\">\n<p><code>@Disable<\/code><\/p>\n<\/td>\n<td>\n<p>\u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u043b\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0438\u0437 \u043d\u0430\u0431\u043e\u0440\u0430 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"140\" width=\"140\">\n<p><code>@Nested<\/code><\/p>\n<\/td>\n<td>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"140\" width=\"140\">\n<p><code>@Tag<\/code><\/p>\n<\/td>\n<td>\n<p>\u041f\u043e\u043c\u0435\u0442\u044c\u0442\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0441\u044b \u0442\u0435\u0441\u0442\u043e\u0432 \u0442\u0435\u0433\u0430\u043c\u0438 \u0434\u043b\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"140\" width=\"140\">\n<p><code>@TestFactory<\/code><\/p>\n<\/td>\n<td>\n<p>\u041e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 &#8212; \u044d\u0442\u043e \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0444\u0430\u0431\u0440\u0438\u043a\u0430 \u0434\u043b\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h3>4. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432<\/h3>\n<p>\u041c\u0435\u0436\u0434\u0443 JUnit 4 \u0438 JUnit 5 \u043d\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u0432 \u0441\u0442\u0438\u043b\u044f\u0445 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432.\u00a0\u0412\u043e\u0442 \u043e\u0431\u0440\u0430\u0437\u0446\u044b \u0442\u0435\u0441\u0442\u043e\u0432 \u0441 \u0438\u0445\u00a0\u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438\u00a0<a href=\"https:\/\/howtodoinjava.com\/junit5\/junit-5-test-lifecycle\/\" rel=\"noopener noreferrer nofollow\">\u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430<\/a>.<\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432\u0441\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0432\u0437\u044f\u0442\u044b \u0438\u0437\u00a0\u043f\u0430\u043a\u0435\u0442\u0430\u00a0<em>org.junit.jupiter.api<\/em>.<\/p>\n<p><strong>JUnit 5 Tests<\/strong><\/p>\n<pre><code class=\"java\">import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test;  import com.howtodoinjava.junit5.examples.Calculator;  public class AppTest {      @BeforeAll     static void setup(){         System.out.println(\"@BeforeAll executed\");     }      @BeforeEach     void setupThis(){         System.out.println(\"@BeforeEach executed\");     }      @Tag(\"DEV\")     @Test     void testCalcOne()     {         System.out.println(\"======TEST ONE EXECUTED=======\");         Assertions.assertEquals( 4 , Calculator.add(2, 2));     }      @Tag(\"PROD\")     @Disabled     @Test     void testCalcTwo()     {         System.out.println(\"======TEST TWO EXECUTED=======\");         Assertions.assertEquals( 6 , Calculator.add(2, 4));     }      @AfterEach     void tearThis(){         System.out.println(\"@AfterEach executed\");     }      @AfterAll     static void tear(){         System.out.println(\"@AfterAll executed\");     } }<\/code><\/pre>\n<h3>5. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0442\u0435\u0441\u0442\u043e\u0432<\/h3>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f\u00a0<strong>\u043d\u0430\u0431\u043e\u0440\u044b \u0442\u0435\u0441\u0442\u043e\u0432 JUnit 5<\/strong>, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u0430\u043c \u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u043f\u0430\u043a\u0435\u0442\u0430\u043c.\u00a0JUnit 5 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u044d\u0442\u0438 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<ul>\n<li>\n<p>@Suite<\/p>\n<\/li>\n<li>\n<p><em>@SelectClasses<\/em><\/p>\n<\/li>\n<li>\n<p><em>@SelectPackages<\/em><\/p>\n<\/li>\n<li>\n<p><em>@IncludePackages<\/em><\/p>\n<\/li>\n<li>\n<p><em>@ExcludePackages<\/em><\/p>\n<\/li>\n<li>\n<p><em>@IncludeClassNamePatterns<\/em><\/p>\n<\/li>\n<li>\n<p><em>@ExcludeClassNamePatterns<\/em><\/p>\n<\/li>\n<li>\n<p><em>@IncludeTags<\/em><\/p>\n<\/li>\n<li>\n<p><em>@ExcludeTags<\/em><\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u043a\u0435\u0442\u0430 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00a0<code>@Suite<\/code> \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e \u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u00a0<em>\u043c\u043e\u0434\u0443\u043b\u044c junit-platform-suite<\/em>\u00a0\u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<pre><code class=\"java\">@Suite @SelectPackages(\"com.howtodoinjava.junit5.examples\") public class JUnit5TestSuiteExample { }<\/code><\/pre>\n<h3>6. Assertions<\/h3>\n<p>Assertions (\u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f) \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0442\u0435\u0441\u0442\u0430.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432\u0435\u0449\u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438, \u0432\u0441\u0435 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f JUnit Jupiter \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f <code>static<\/code> \u043c\u0435\u0442\u043e\u0434\u044b \u0432 \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"https:\/\/junit.org\/junit5\/docs\/current\/api\/org.junit.jupiter.api\/org\/junit\/jupiter\/api\/Assertions.html\" rel=\"noopener noreferrer nofollow\">org.junit.jupiter.Assertions<\/a>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>assertEquals()<\/code>, <code>assertNotEquals()<\/code>.<\/p>\n<pre><code class=\"java\">void testCase() {     \/\/Test will pass     Assertions.assertNotEquals(3, Calculator.add(2, 2));      \/\/Test will fail     Assertions.assertNotEquals(4, Calculator.add(2, 2), \"Calculator.add(2, 2) test failed\");      \/\/Test will fail     Supplier&lt;String> messageSupplier  = () -> \"Calculator.add(2, 2) test failed\";     Assertions.assertNotEquals(4, Calculator.add(2, 2), messageSupplier); }<\/code><\/pre>\n<blockquote>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:\u00a0<a href=\"https:\/\/howtodoinjava.com\/junit5\/junit-5-assertions-examples\/\" rel=\"noopener noreferrer nofollow\">JUnit 5 Assertions<\/a><\/p>\n<\/blockquote>\n<h3>7. Assumptions<\/h3>\n<p>\u041a\u043b\u0430\u0441\u0441 <a href=\"https:\/\/junit.org\/junit5\/docs\/current\/api\/org.junit.jupiter.api\/org\/junit\/jupiter\/api\/Assumptions.html\" rel=\"noopener noreferrer nofollow\">Assumptions<\/a>\u00a0(\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f)\u00a0\u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u00a0<code>static<\/code>\u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044e \u0442\u0435\u0441\u0442\u0430.<\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u0441\u044f\u043a\u0438\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.\u00a0\u0412 \u043e\u0442\u0447\u0435\u0442\u0435 \u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u044d\u0442\u0438 \u0442\u0435\u0441\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u044b \u043a\u0430\u043a \u043f\u0440\u043e\u0439\u0434\u0435\u043d\u043d\u044b\u0435.<\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441 \u0438\u043c\u0435\u0435\u0442 \u0442\u0440\u0438 \u0442\u0430\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432: <code>assumeFalse()<\/code>, <code>assumeTrue()<\/code> \u0438 <code>assumingThat()<\/code><\/p>\n<pre><code class=\"java\">public class AppTest {     @Test     void testOnDev()     {         System.setProperty(\"ENV\", \"DEV\");         Assumptions.assumeTrue(\"DEV\".equals(System.getProperty(\"ENV\")), AppTest::message);     }      @Test     void testOnProd()     {         System.setProperty(\"ENV\", \"PROD\");         Assumptions.assumeFalse(\"DEV\".equals(System.getProperty(\"ENV\")));     }      private static String message () {         return \"TEST Execution Failed :: \";     } }<\/code><\/pre>\n<blockquote>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:\u00a0<a href=\"https:\/\/howtodoinjava.com\/junit5\/junit-5-assumptions-examples\/\" rel=\"noopener noreferrer nofollow\">JUnit 5 Assumptions<\/a><\/p>\n<\/blockquote>\n<h3>8. \u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 JUnit 4<\/h3>\n<p>JUnit 4 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0443\u0436\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u0430\u0432\u043d\u043e, \u0438 \u043d\u0430 junit 4 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0442\u0435\u0441\u0442\u043e\u0432. JUnit Jupiter \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0442\u0435\u0441\u0442\u044b.\u00a0\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e\u00a0\u0431\u044b\u043b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u043f\u043e\u0434\u043f\u0440\u043e\u0435\u043a\u0442\u00a0<em>JUnit Vintage<\/em>.<\/p>\n<p>JUnit Vintage \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u00a0<code>TestEngine<\/code> \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 JUnit 3 \u0438 JUnit 4 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 JUnit 5.<\/p>\n<h3>9. \u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>JUnit 5 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u043c \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u0438 \u043c\u043d\u043e\u0433\u043e\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c.\u00a0\u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043d \u043e\u0442\u043a\u0440\u044b\u0442 \u0434\u043b\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0438 API.\u00a0\u041a\u0430\u043a \u0430\u0432\u0442\u043e\u0440 \u0442\u0435\u0441\u0442\u043e\u0432, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0430\u0437\u043d\u0438\u0446\u044b, \u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f IDE, \u0432\u044b \u0435\u0433\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u0435.<\/p>\n<p>\u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u00a0<a href=\"https:\/\/howtodoinjava.com\/junit5\/code-test-templates-eclipse\/\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0432 Eclipse<\/a>\u00a0IDE, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.<\/p>\n<p>\u0425\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f!!!<\/p>\n<p>\u2192 <a href=\"https:\/\/github.com\/lokeshgupta1981\/Junit5Examples\/tree\/master\/JUnit5Examples\" rel=\"noopener noreferrer nofollow\">\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 <\/a><\/p>\n<p>\u041f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0447\u0430\u0441\u0442\u0438 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430: <\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/590699\/\" rel=\"noopener noreferrer nofollow\">\u0416\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b JUnit 5 \u0442\u0435\u0441\u0442\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/590715\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @BeforeAll<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/590741\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u00a0@BeforeEach<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/590757\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u00a0@AfterEach<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/590909\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u00a0@AfterAll<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/590927\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @RepeatedTest<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/590965\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @Disabled<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/591007\/\" rel=\"noopener noreferrer nofollow\">\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @ParameterizedTest<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/591305\/\" rel=\"noopener noreferrer nofollow\">\u041e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 JUnit 5<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/591587\/\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0439 JUnit 5<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/591553\/\" rel=\"noopener noreferrer nofollow\">\u041e\u0442\u0447\u0435\u0442\u044b \u043e \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0438 \u043a\u043e\u0434\u0430 JUnit\u00a0\u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Maven \u043f\u043b\u0430\u0433\u0438\u043d\u0430 JaCoCo<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/ru\/post\/590199\/\" rel=\"noopener noreferrer nofollow\">JUnit \u2014 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 HTML<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/590607\/\"> https:\/\/habr.com\/ru\/articles\/590607\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-394998","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/394998","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=394998"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/394998\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=394998"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=394998"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=394998"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}