{"id":388347,"date":"2024-06-29T07:53:24","date_gmt":"2024-06-29T07:53:24","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=388347"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=388347","title":{"rendered":"<span>\u0422\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u043f\u043e JUnit 5 &#8212;\u00a0\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @RepeatedTest<\/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>\u042d\u0442\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430 \u043f\u043e JUnit 5. \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043e\u00a0<a href=\"https:\/\/habr.com\/ru\/post\/590607\/\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<\/blockquote>\n<p>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f <code>@RepeatedTest<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0432 JUnit. \u0427\u0430\u0441\u0442\u043e\u0442\u0443 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u0430\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 <code>@RepeatedTest<\/code>.<\/p>\n<p><strong>\u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/strong><\/p>\n<ol>\n<li>\n<p>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @RepeatedTest <\/p>\n<ul>\n<li>\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434\u044b \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0438\u043c\u0435\u043d\u0430<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 RepetitionInfo <\/p>\n<\/li>\n<\/ol>\n<h3>1. \u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @RepeatedTest <\/h3>\n<p>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f <em>@RepeatedTest<\/em> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437 \u0441 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0442\u0435\u0441\u0442 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 <em>@ParameterizedTest<\/em>.<\/p>\n<h4>1.1. \u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441<\/h4>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c\u044b\u0439 \u0442\u0435\u0441\u0442, \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u043c\u0435\u0442\u043e\u0434 \u0442\u0435\u0441\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e @RepeatedTest.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u00a0<em>\u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e @RepeatedTest (5)<\/em>.\u00a0\u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u0435\u0441\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u043f\u044f\u0442\u044c \u0440\u0430\u0437.<\/p>\n<pre><code>@DisplayName(\"Add operation test\") @RepeatedTest(5) void addNumber(TestInfo testInfo) {     Calculator calculator = new Calculator();     Assertions.assertEquals(2, calculator.add(1, 1), \"1 + 1 should equal 2\"); }<\/code><\/pre>\n<h4>1.2.\u00a0\u041c\u0435\u0442\u043e\u0434\u044b \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430<\/h4>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u044b\u0437\u043e\u0432\u00a0\u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430\u00a0\u0441 \u043f\u043e\u043b\u043d\u043e\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0442\u0435\u0445 \u0436\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430.<\/p>\n<p>\u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e\u00a0\u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435\u00a0\u043c\u0435\u0442\u043e\u0434\u044b \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 <em>@BeforeEach<\/em><strong> <\/strong>\u0438 <em>@AfterEach<\/em><strong> <\/strong>\u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435\u00a0\u0442\u0435\u0441\u0442\u0430.<\/p>\n<pre><code class=\"java\">package com.howtodoinjava.junit5.examples;  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.DisplayName; import org.junit.jupiter.api.RepeatedTest; import org.junit.jupiter.api.RepetitionInfo; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInfo; import org.junit.platform.runner.JUnitPlatform; import org.junit.runner.RunWith;  @RunWith(JUnitPlatform.class) public class RepeatedTestExample {  @BeforeAll public static void init(){ System.out.println(\"Before All init() method called\"); }  @BeforeEach public void initEach(){ System.out.println(\"Before Each initEach() method called\"); }  @DisplayName(\"Add operation test\") @RepeatedTest(5) void addNumber(TestInfo testInfo, RepetitionInfo repetitionInfo) { System.out.println(\"Running addNumber test -> \" + repetitionInfo.getCurrentRepetition()); Assertions.assertEquals(2, Calculator.add(1, 1), \"1 + 1 should equal 2\"); }  @AfterEach public void cleanUpEach(){ System.out.println(\"After Each cleanUpEach() method called\"); }  @AfterAll public static void cleanUp(){ System.out.println(\"After All cleanUp() method called\"); } }<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430:<\/p>\n<pre><code class=\"bash\">Before All init() method called Before Each initEach() method called After Each cleanUpEach() method called Before Each initEach() method called Running addNumber test -> 1 After Each cleanUpEach() method called Before Each initEach() method called Running addNumber test -> 2 After Each cleanUpEach() method called Before Each initEach() method called Running addNumber test -> 3 After Each cleanUpEach() method called Before Each initEach() method called Running addNumber test -> 4 After Each cleanUpEach() method called Before Each initEach() method called Running addNumber test -> 5 After Each cleanUpEach() method called After All cleanUp() method called<\/code><\/pre>\n<h3>2. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0438\u043c\u0435\u043d\u0430<\/h3>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0439, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u044e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u043e\u0435 \u0438\u043c\u044f. \u042d\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u043e\u0435 \u0438\u043c\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0435\u0439 {<em>\u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0442\u0435\u043a\u0441\u0442 + \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u0438<\/em>}. <\/p>\n<p>\u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0440\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044f (placeholder):<\/p>\n<ul>\n<li>\n<p><code>{displayName}<\/code>: \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u043e\u0435 \u0438\u043c\u044f \u043c\u0435\u0442\u043e\u0434\u0430\u00a0<code>@RepeatedTest<\/code>.<\/p>\n<\/li>\n<li>\n<p><code>{currentRepetition}<\/code>: \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><code>{totalRepetitions}<\/code>: \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"java\">public class JUnit5AnnotationsExample {     @DisplayName(\"Add operation test\")     @RepeatedTest(value = 5, name = \"{displayName} - repetition {currentRepetition} of {totalRepetitions}\")     void addNumber(TestInfo testInfo) {         Assertions.assertEquals(2, Calculator.add(1, 1), \"1 + 1 should equal 2\");     } }<\/code><\/pre>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u0434\u0430\u0435\u0442 \u0432\u044b\u0432\u043e\u0434 \u043d\u0438\u0436\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a38\/b5d\/372\/a38b5d372ec54df4550572e6d33396e4.png\" alt=\"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 JUnit 5\" title=\"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 JUnit 5\" width=\"545\" height=\"189\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a38\/b5d\/372\/a38b5d372ec54df4550572e6d33396e4.png\"\/><figcaption>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 JUnit 5<\/figcaption><\/figure>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0434\u0432\u0443\u0445 \u043f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432, \u0442\u043e \u0435\u0441\u0442\u044c <code>LONG_DISPLAY_NAME<\/code> \u0438 <code>SHORT_DISPLAY_NAME<\/code>. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0435\u0441\u043b\u0438 \u043e\u043d \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d.<\/p>\n<ul>\n<li>\n<p><code>RepeatedTest.LONG_DISPLAY_NAME<\/code>\u00a0\u2013 {displayName} :: \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435 {currentRepetition} \u0438\u0437 {totalRepetitions}<\/p>\n<\/li>\n<li>\n<p><code>RepeatedTest.SHORT_DISPLAY_NAME<\/code>\u00a0\u2013 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435 {currentRepetition} \u0438\u0437 {totalRepetitions}<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"java\">@DisplayName(\"Add operation test\") @RepeatedTest(value = 5, name = RepeatedTest.LONG_DISPLAY_NAME) void addNumber(TestInfo testInfo) {     Assertions.assertEquals(2, Calculator .add(1, 1), \"1 + 1 should equal 2\"); }<\/code><\/pre>\n<h3>3. \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 RepetitionInfo <\/h3>\n<p>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <a href=\"http:\/\/junit.org\/junit5\/docs\/current\/api\/org\/junit\/jupiter\/api\/RepetitionInfo.html\" rel=\"noopener noreferrer nofollow\">RepetitionInfo<\/a>\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u0442\u0435\u0441\u0442\u0430 \u0432\u043d\u0443\u0442\u0440\u0438\u00a0<code>@RepeatedTest<\/code> \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a\u00a0<code>@BeforeEach<\/code>, \u0438\u00a0<code>@AfterEach<\/code>.<\/p>\n<pre><code class=\"java\">public class JUnit5AnnotationsExample {  @BeforeEach public void initEach(RepetitionInfo info){ int currentRepetition = info.getCurrentRepetition();         int totalRepetitions = info.getTotalRepetitions();         \/\/Use information as needed }  @DisplayName(\"Add operation test\") @RepeatedTest(value = 5, name=\"{displayName} :: repetition {currentRepetition} of {totalRepetitions}\") void addNumber(TestInfo testInfo) { Calculator calculator = new Calculator(); Assertions.assertEquals(2, calculator.add(1, 1), \"1 + 1 should equal 2\"); }  @AfterEach public void cleanUpEach(RepetitionInfo info){ int currentRepetition = info.getCurrentRepetition();         int totalRepetitions = info.getTotalRepetitions();         \/\/Use information as needed } }<\/code><\/pre>\n<p>\u0425\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f!!!<\/p>\n<blockquote>\n<p><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<\/blockquote>\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\/590927\/\"> https:\/\/habr.com\/ru\/articles\/590927\/<\/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>\u042d\u0442\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430 \u043f\u043e JUnit 5. \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043e\u00a0<a href=\"https:\/\/habr.com\/ru\/post\/590607\/\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<\/blockquote>\n<p>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f <code>@RepeatedTest<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0445\u0441\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0432 JUnit. \u0427\u0430\u0441\u0442\u043e\u0442\u0443 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u0430\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 <code>@RepeatedTest<\/code>.<\/p>\n<p><strong>\u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/strong><\/p>\n<ol>\n<li>\n<p>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @RepeatedTest <\/p>\n<ul>\n<li>\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434\u044b \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0438\u043c\u0435\u043d\u0430<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 RepetitionInfo <\/p>\n<\/li>\n<\/ol>\n<h3>1. \u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f @RepeatedTest <\/h3>\n<p>\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f <em>@RepeatedTest<\/em> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437 \u0441 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0442\u0435\u0441\u0442 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 <em>@ParameterizedTest<\/em>.<\/p>\n<h4>1.1. \u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441<\/h4>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c\u044b\u0439 \u0442\u0435\u0441\u0442, \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u043c\u0435\u0442\u043e\u0434 \u0442\u0435\u0441\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e @RepeatedTest.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u00a0<em>\u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e @RepeatedTest (5)<\/em>.\u00a0\u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u0435\u0441\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u043f\u044f\u0442\u044c \u0440\u0430\u0437.<\/p>\n<pre><code>@DisplayName(\"Add operation test\") @RepeatedTest(5) void addNumber(TestInfo testInfo) {     Calculator calculator = new Calculator();     Assertions.assertEquals(2, calculator.add(1, 1), \"1 + 1 should equal 2\"); }<\/code><\/pre>\n<h4>1.2.\u00a0\u041c\u0435\u0442\u043e\u0434\u044b \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430<\/h4>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u044b\u0437\u043e\u0432\u00a0\u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430\u00a0\u0441 \u043f\u043e\u043b\u043d\u043e\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0442\u0435\u0445 \u0436\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430.<\/p>\n<p>\u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e\u00a0\u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435\u00a0\u043c\u0435\u0442\u043e\u0434\u044b \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 <em>@BeforeEach<\/em><strong> <\/strong>\u0438 <em>@AfterEach<\/em><strong> <\/strong>\u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435\u00a0\u0442\u0435\u0441\u0442\u0430.<\/p>\n<pre><code class=\"java\">package com.howtodoinjava.junit5.examples;  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.DisplayName; import org.junit.jupiter.api.RepeatedTest; import org.junit.jupiter.api.RepetitionInfo; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInfo; import org.junit.platform.runner.JUnitPlatform; import org.junit.runner.RunWith;  @RunWith(JUnitPlatform.class) public class RepeatedTestExample {  @BeforeAll public static void init(){ System.out.println(\"Before All init() method called\"); }  @BeforeEach public void initEach(){ System.out.println(\"Before Each initEach() method called\"); }  @DisplayName(\"Add operation test\") @RepeatedTest(5) void addNumber(TestInfo testInfo, RepetitionInfo repetitionInfo) { System.out.println(\"Running addNumber test -> \" + repetitionInfo.getCurrentRepetition()); Assertions.assertEquals(2, Calculator.add(1, 1), \"1 + 1 should equal 2\"); }  @AfterEach public void cleanUpEach(){ System.out.println(\"After Each cleanUpEach() method called\"); }  @AfterAll public static void cleanUp(){ System.out.println(\"After All cleanUp() method called\"); } }<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430:<\/p>\n<pre><code class=\"bash\">Before All init() method called Before Each initEach() method called After Each cleanUpEach() method called Before Each initEach() method called Running addNumber test -> 1 After Each cleanUpEach() method called Before Each initEach() method called Running addNumber test -> 2 After Each cleanUpEach() method called Before Each initEach() method called Running addNumber test -> 3 After Each cleanUpEach() method called Before Each initEach() method called Running addNumber test -> 4 After Each cleanUpEach() method called Before Each initEach() method called Running addNumber test -> 5 After Each cleanUpEach() method called After All cleanUp() method called<\/code><\/pre>\n<h3>2. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0438\u043c\u0435\u043d\u0430<\/h3>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0439, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u044e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u043e\u0435 \u0438\u043c\u044f. \u042d\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u043e\u0435 \u0438\u043c\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0435\u0439 {<em>\u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0442\u0435\u043a\u0441\u0442 + \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u0438<\/em>}. <\/p>\n<p>\u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0440\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044f (placeholder):<\/p>\n<ul>\n<li>\n<p><code>{displayName}<\/code>: \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u043e\u0435 \u0438\u043c\u044f \u043c\u0435\u0442\u043e\u0434\u0430\u00a0<code>@RepeatedTest<\/code>.<\/p>\n<\/li>\n<li>\n<p><code>{currentRepetition}<\/code>: \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><code>{totalRepetitions}<\/code>: \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"java\">public class JUnit5AnnotationsExample {     @DisplayName(\"Add operation test\")     @RepeatedTest(value = 5, name = \"{displayName} - repetition {currentRepetition} of {totalRepetitions}\")     void addNumber(TestInfo testInfo) {         Assertions.assertEquals(2, Calculator.add(1, 1), \"1 + 1 should equal 2\");     } }<\/code><\/pre>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u0434\u0430\u0435\u0442 \u0432\u044b\u0432\u043e\u0434 \u043d\u0438\u0436\u0435:<\/p>\n<figure class=\"full-width\"><figcaption>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 JUnit 5<\/figcaption><\/figure>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0434\u0432\u0443\u0445 \u043f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432, \u0442\u043e \u0435\u0441\u0442\u044c <code>LONG_DISPLAY_NAME<\/code> \u0438 <code>SHORT_DISPLAY_NAME<\/code>. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0435\u0441\u043b\u0438 \u043e\u043d \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d.<\/p>\n<ul>\n<li>\n<p><code>RepeatedTest.LONG_DISPLAY_NAME<\/code>\u00a0\u2013 {displayName} :: \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435 {currentRepetition} \u0438\u0437 {totalRepetitions}<\/p>\n<\/li>\n<li>\n<p><code>RepeatedTest.SHORT_DISPLAY_NAME<\/code>\u00a0\u2013 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435 {currentRepetition} \u0438\u0437 {totalRepetitions}<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"java\">@DisplayName(\"Add operation test\") @RepeatedTest(value = 5, name = RepeatedTest.LONG_DISPLAY_NAME) void addNumber(TestInfo testInfo) {     Assertions.assertEquals(2, Calculator .add(1, 1), \"1 + 1 should equal 2\"); }<\/code><\/pre>\n<h3>3. \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 RepetitionInfo <\/h3>\n<p>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <a href=\"http:\/\/junit.org\/junit5\/docs\/current\/api\/org\/junit\/jupiter\/api\/RepetitionInfo.html\" rel=\"noopener noreferrer nofollow\">RepetitionInfo<\/a>\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u0442\u0435\u0441\u0442\u0430 \u0432\u043d\u0443\u0442\u0440\u0438\u00a0<code>@RepeatedTest<\/code> \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a\u00a0<code>@BeforeEach<\/code>, \u0438\u00a0<code>@AfterEach<\/code>.<\/p>\n<pre><code class=\"java\">public class JUnit5AnnotationsExample {  @BeforeEach public void initEach(RepetitionInfo info){ int currentRepetition = info.getCurrentRepetition();         int totalRepetitions = info.getTotalRepetitions();         \/\/Use information as needed }  @DisplayName(\"Add operation test\") @RepeatedTest(value = 5, name=\"{displayName} :: repetition {currentRepetition} of {totalRepetitions}\") void addNumber(TestInfo testInfo) { Calculator calculator = new Calculator(); Assertions.assertEquals(2, calculator.add(1, 1), \"1 + 1 should equal 2\"); }  @AfterEach public void cleanUpEach(RepetitionInfo info){ int currentRepetition = info.getCurrentRepetition();         int totalRepetitions = info.getTotalRepetitions();         \/\/Use information as needed } }<\/code><\/pre>\n<p>\u0425\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f!!!<\/p>\n<blockquote>\n<p><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<\/blockquote>\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\/590927\/\"> https:\/\/habr.com\/ru\/articles\/590927\/<\/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-388347","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/388347","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=388347"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/388347\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=388347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=388347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=388347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}