{"id":461686,"date":"2025-05-31T03:00:08","date_gmt":"2025-05-31T03:00:08","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=461686"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=461686","title":{"rendered":"<span>Scenax: \u043a\u0430\u043a \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c API-\u0442\u0435\u0441\u0442\u044b \u0432 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0441 Vitest \u0438 Allure (\u0427\u0430\u0441\u0442\u044c 1)<\/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<p>\u0427\u0442\u043e, \u0435\u0441\u043b\u0438 \u0431\u044b \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u044b \u0447\u0438\u0442\u0430\u043b\u0438\u0441\u044c \u043a\u0430\u043a \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439?<br \/>\u0427\u0442\u043e, \u0435\u0441\u043b\u0438 \u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0433 \u0431\u044b\u043b \u043f\u043e\u043d\u044f\u0442\u0435\u043d, \u043a\u0430\u0436\u0434\u0430\u044f \u043c\u0435\u0442\u043a\u0430 \u2014 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435, \u0430 \u043e\u0442\u0447\u0451\u0442 \u2014 \u043f\u0440\u0438\u0433\u043e\u0434\u0435\u043d \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f QA, \u043d\u043e \u0438 \u0434\u043b\u044f \u0431\u0438\u0437\u043d\u0435\u0441\u0430?<br \/>\u0422\u0430\u043a \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f <a href=\"https:\/\/scenax.com\">Scenax<\/a> \u2014 DSL-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043f\u043e\u0432\u0435\u0440\u0445 Vitest \u0438 Allure, \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0439 \u0442\u0435\u0441\u0442\u044b \u0432 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438.<\/p>\n<h2>\ud83d\udcd1 \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u0442\u0430\u0442\u044c\u0438<\/h2>\n<ol>\n<li>\n<p>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 1: DSL-\u043e\u0431\u0451\u0440\u0442\u043a\u0430 testCase, step, attach<\/p>\n<\/li>\n<li>\n<p>Scenax \u2014 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e DSL: \u044d\u0442\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/p>\n<\/li>\n<li>\n<p>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 2: \u041a\u043b\u0430\u0441\u0441\u044b, \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b \u0438 <code>runTest()<\/code><\/p>\n<\/li>\n<li>\n<p>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 3: \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0441 <code>@TestCase.each<\/code><\/p>\n<\/li>\n<li>\n<p>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 4: \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 <code>@Description<\/code>, <code>@Tag<\/code>, <code>@Owner<\/code>, <code>@Severity<\/code><\/p>\n<h4>\u0427\u0430\u0441\u0442\u044c 2<\/h4>\n<\/li>\n<li>\n<p>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 5: <code>@Suite<\/code>, <code>@ParentSuite<\/code>, <code>@SubSuite<\/code>, <code>@Layer<\/code> \u2014 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0432 Allure<\/p>\n<\/li>\n<li>\n<p>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 6: <code>@Setup<\/code>, <code>@Teardown<\/code>, <code>@Context<\/code>, <code>@Inject<\/code> \u2014 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0438 shared state<\/p>\n<\/li>\n<li>\n<p>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 7: <code>@BeforeAll<\/code>, <code>@AfterAll<\/code>, <code>@Setup(params)<\/code> \u2014 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432<\/p>\n<\/li>\n<li>\n<p>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 8: <code>@Step<\/code>, <code>@Scenario()<\/code> \u0438 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0448\u0430\u0433\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043a <code>scenax<\/code> \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0435\u043a \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435: \u043f\u043e\u0447\u0435\u043c\u0443 <code>scenax<\/code> \u2014 \u044d\u0442\u043e \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0434\u043b\u044f API-\u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0430 Vitest<\/p>\n<\/li>\n<\/ol>\n<h3>\ud83e\udd2f \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h3>\n<p>\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0449\u043d\u044b \u2014 \u043d\u043e \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0434\u0438\u0441\u0446\u0438\u043f\u043b\u0438\u043d\u044b \u0438 \u0440\u0443\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\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 vitest:<\/p>\n<ul>\n<li>\n<p><code>vitest.test()<\/code> \u0445\u043e\u0440\u043e\u0448 \u0434\u043b\u044f unit-\u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a, \u043d\u043e \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0441 \u0448\u0430\u0433\u0430\u043c\u0438 \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0442\u043a\u0438 (<code>feature<\/code>, <code>severity<\/code>, <code>tag<\/code>, <code>owner<\/code>) \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f<\/p>\n<\/li>\n<li>\n<p>\u0428\u0430\u0433\u0438 \u0447\u0435\u0440\u0435\u0437 <code>allure.step(...)<\/code> \u2014 \u043d\u0435 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u043d\u0435 \u0447\u0438\u0442\u0430\u0435\u043c\u044b, \u043d\u0435 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b: \u0448\u0430\u0433\u0438 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0442\u0435\u0441\u0442\u044b \u0442\u0435\u0440\u044f\u044e\u0442 \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u044e\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439. \u0412\u043c\u0435\u0441\u0442\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u2014 \u043a\u0430\u0448\u0430 \u0438\u0437 \u043a\u043e\u0434\u0430.<\/p>\n<h3>\ud83d\udca1 \u0418\u0434\u0435\u044f<\/h3>\n<p>\u041c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u0442\u0435\u0441\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b \u043a\u0430\u043a <strong>\u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u0435<\/strong>, \u0430 \u043d\u0435 \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f.<\/p>\n<pre><code class=\"typescript\">testCase(     '\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f',     { id: 'API-001', feature: 'Users', severity: 'critical' },     async () =&gt; {         const response = await step('POST \/users', () =&gt;             axios.post('\/users', { name: '\u0418\u0432\u0430\u043d' })         )         attach('\u041e\u0442\u0432\u0435\u0442', response.data, 'application\/json')         expect(response.status).toBe(201)     } ) <\/code><\/pre>\n<p>\u042d\u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442. \u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443, \u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443, \u0438 \u0431\u0438\u0437\u043d\u0435\u0441\u0443. \u0412\u0430\u0440\u0438\u0430\u043d\u0442, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0443\u0436\u0435 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u0435\u0435 \u0433\u043b\u0430\u0437\u0443, \u0447\u0435\u043c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u043d\u0430 <a href=\"https:\/\/www.npmjs.com\/package\/vitest\">vitest<\/a> + <a href=\"https:\/\/www.npmjs.com\/package\/allure-js-commons\">allure<\/a>.<\/p>\n<h3>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Scenax? \u041e \u0447\u0451\u043c \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f.<\/h3>\n<p>\u041c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u043c \u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0441\u043f\u0438\u0441\u043e\u043a, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439  \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 &#171;\u0445\u043e\u0442\u0435\u043b\u043e\u043a&#187;. <\/p>\n<p><strong>Scenax<\/strong> \u2014 \u044d\u0442\u043e:<\/p>\n<ul>\n<li>\n<p>DSL (\u044f\u0437\u044b\u043a \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432) \u043f\u043e\u0432\u0435\u0440\u0445 <a href=\"https:\/\/github.com\/allure-framework\/allure-js\">Vitest<\/a> + <a href=\"https:\/\/github.com\/allure-framework\/allure-js\">Allure<\/a> (\u043e\u043f\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438)<\/p>\n<\/li>\n<li>\n<p>Class-based \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430: \u0442\u0435\u0441\u0442\u044b = \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438, \u043c\u0435\u0442\u043e\u0434\u044b = \u0448\u0430\u0433\u0438<\/p>\n<\/li>\n<li>\n<p>\u0414\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b: <code>@TestCase<\/code>, <code>@Feature<\/code>, <code>@Step<\/code>, <code>@Context<\/code> \u0438 \u0434\u0440.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0448\u0430\u0433\u0438 \u0438 \u0441\u0446\u0435\u043d\u0430\u0440\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0430\u0446\u0438\u0438, lifecycle, \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438<\/p>\n<\/li>\n<li>\n<p>\u0427\u0438\u0441\u0442\u044b\u0435 \u043e\u0442\u0447\u0451\u0442\u044b Allure \u2014 \u0431\u0435\u0437 \u0440\u0443\u0447\u043d\u043e\u0433\u043e label\/step\/attach<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u043f\u0443\u0442\u044c \u2014 \u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e DSL \u0434\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430, \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0432 \u0432\u0441\u0435 \u043d\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u0430\u044f \u0431\u0443\u0434\u0435\u0442: <\/p>\n<ul>\n<li>\n<p>\u0414\u0430\u0432\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 value (\u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c)<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u043a\u043e\u0434<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u043a\u0440\u0435\u043f\u043b\u044f\u0442\u044c\u0441\u044f \u0436\u0438\u0432\u044b\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0444\u0438\u043d\u0430\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c:  <\/p>\n<ul>\n<li>\n<p>\ud83d\udce6 \u041f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <code>scenax<\/code><\/p>\n<\/li>\n<li>\n<p>\ud83d\udcbb \u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430 GitHub<\/p>\n<\/li>\n<li>\n<p>\u270d\ufe0f  \u0412\u0432\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u0434\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/p>\n<\/li>\n<li>\n<p>\u0418, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u043e\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u043d\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c.<\/p>\n<h2>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 1: DSL-\u043e\u0431\u0451\u0440\u0442\u043a\u0430 testCase, step, attach<\/h2>\n<h3>\ud83c\udfaf \u0426\u0435\u043b\u044c<\/h3>\n<p>\u0421\u0434\u0435\u043b\u0430\u0442\u044c API-\u0442\u0435\u0441\u0442 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c, \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0438 \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u043a \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0432 Allure TestOps \u2014 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0438\u0441\u0430\u0442\u044c <code>allure.label(...)<\/code>, <code>allure.step(...)<\/code> \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b.<\/p>\n<h3>\ud83e\udd2f \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h3>\n<p><code>allure-vitest<\/code> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0444\u0430\u0441\u0430\u0434\u0443 Allure (\u043c\u0435\u0442\u043a\u0438, \u0448\u0430\u0433\u0438, \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u044f), \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c API \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u043c \u0438 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u043c:<\/p>\n<pre><code class=\"typescript\">import * as allure from 'allure-js-commons'  test('profile', async () =&gt; {   await allure.label('AS_ID', 'API-123')   await allure.feature('Profile')   await allure.step('GET \/profile', async () =&gt; {     const res = await axios.get('\/profile')     await allure.attachment('response', JSON.stringify(res.data), 'application\/json')     expect(res.status).toBe(200)   }) })<\/code><\/pre>\n<p>\u041f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0432\u044b\u0437\u043e\u0432\u044b. \u041b\u0451\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0445 \u043a\u043b\u044e\u0447\u0430\u0445 (<code>AS_ID<\/code>, <code>severity<\/code>). \u0421\u043d\u0438\u0436\u0430\u0435\u0442\u0441\u044f \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0438 \u0442\u0435\u043c\u043f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<h3>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u043e\u0431\u0451\u0440\u0442\u043a\u0430<\/h3>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 DSL: <code>testCase<\/code>, <code>step<\/code>, <code>attach<\/code>  \u2192 \u0435\u0434\u0438\u043d\u044b\u0439 \u0441\u0442\u0438\u043b\u044c, \u0447\u0438\u0441\u0442\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u043c\u0435\u043d\u044c\u0448\u0435 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<pre><code class=\"typescript\">testCase(   '\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u044f',   { id: 'API-101', feature: '\u041f\u0440\u043e\u0444\u0438\u043b\u044c', severity: 'critical' },   async () =&gt; {     const response = await step('GET \/profile', () =&gt; axios.get('\/profile'))     attach('\u041e\u0442\u0432\u0435\u0442', response.data, 'application\/json')     expect(response.status).toBe(200)   } )<\/code><\/pre>\n<p>\u041a\u043e\u0440\u043e\u0442\u043a\u043e, \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e, \u043a\u0440\u0430\u0441\u0438\u0432\u043e. \u0412\u0441\u0451 \u043d\u0443\u0436\u043d\u043e\u0435 \u2014 \u043d\u0430 \u0432\u0438\u0434\u0443.<\/p>\n<h3>\ud83d\udd27 \u0427\u0442\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438<\/h3>\n<p>\u270d\ufe0f \u041d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 <code>testCase(name, meta, fn)<\/code> \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445<br \/>\ud83d\udcda \u041e\u0431\u0435\u0440\u043d\u0443\u043b\u0438 \u0448\u0430\u0433\u0438 \u0432 <code>step(name, fn)<\/code><br \/>\ud83d\udcce \u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 <code>attach(name, content)<\/code> \u0441 \u0430\u0432\u0442\u043e\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439<\/p>\n<h3>\ud83d\udca1 \u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e<\/h3>\n<ol>\n<li>\n<p>\u0422\u0435\u0441\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0447\u0438\u0442\u0430\u0435\u043c \u043a\u0430\u043a <strong>\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0423\u0434\u0430\u043b\u044f\u0435\u0442 boilerplate (<code>label<\/code>, <code>step<\/code>, <code>attachment<\/code>), c\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a (<code>label('AS_ID', ...)<\/code> \u2192 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043e)<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u043e\u0442\u0447\u0451\u0442\u0430\u0445<\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441\u0442\u0438\u043b\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b: \u043a\u043b\u0430\u0441\u0441\u044b, \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b, \u0441\u043b\u043e\u0438. \u0413\u043e\u0442\u043e\u0432\u0430 \u043f\u043e\u0447\u0432\u0430 \u0434\u043b\u044f class-based \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b<\/p>\n<\/li>\n<\/ol>\n<h3>\u2699\ufe0f \u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c<\/h3>\n<pre><code class=\"typescript\">import * as allure from 'allure-js-commons' import { test } from 'vitest'  export function testCase(name, meta, fn) {   test(name, async () =&gt; {     if (meta.id) await allure.label('AS_ID', meta.id)     if (meta.feature) await allure.feature(meta.feature)     if (meta.severity) await allure.severity(meta.severity)     await fn()   }) }  export async function step(name, fn) {   return await allure.step(name, fn) }  export function attach(name, data, type = 'text\/plain') {   allure.attachment(name, typeof data === 'string' ? data : JSON.stringify(data), type) }<\/code><\/pre>\n<h3>\u0418\u0442\u043e\u0433\u0438 \u0418\u0442\u0435\u0440\u0430\u0446\u0438\u0438 1: \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0435 \u0442\u0435\u0441\u0442\u044b, \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0438 \u044f\u0437\u044b\u043a \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u0439<\/h3>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u0430\u043b\u0430 \u043d\u0430\u043c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0436\u0438\u0437\u043d\u0435\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0439 DSL (<code>testCase<\/code>, <code>step<\/code>, <code>attach<\/code>) \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f API-\u0442\u0435\u0441\u0442\u043e\u0432.  \u0418 \u0432\u0440\u043e\u0434\u0435 \u0431\u044b \u2014 \u0432\u0441\u0435\u0433\u043e \u0442\u0440\u0438 \u043e\u0431\u0451\u0440\u0442\u043a\u0438. \u041d\u043e \u043e\u043d\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u0432\u0441\u0451.<\/p>\n<h4>\u041a\u0430\u043a \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c?<\/h4>\n<p>\u041c\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043f\u0438\u0448\u0435\u043c \u201c\u0442\u0435\u0441\u0442-\u0444\u0443\u043d\u043a\u0446\u0438\u044e\u201d. \u041c\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c <strong>\u0442\u0435\u0441\u0442-\u043a\u0435\u0439\u0441<\/strong>.<br \/>\u042d\u0442\u043e \u043d\u0435 <code>unit test<\/code>, \u044d\u0442\u043e <code>use-case<\/code> <br \/>\u042d\u0442\u043e \u043d\u0435 <code>test(name, () =&gt; {})<\/code>, \u044d\u0442\u043e <code>testCase(meta, steps)<\/code><br \/>\u042d\u0442\u043e \u043d\u0435 \u201c\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u201d, \u044d\u0442\u043e \u201c\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0431\u0438\u0437\u043d\u0435\u0441-\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u201d<\/p>\n<p>\u042d\u0442\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u043b\u0438\u0436\u0435 \u043a:<\/p>\n<p>Scenario-based testing \u2014 \u0435\u0441\u0442\u044c \u0448\u0430\u0433\u0438, \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438, feature<br \/>Use-case testing \u2014 \u043a\u0430\u0436\u0434\u044b\u0439 <code>testCase<\/code> \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 use-case<br \/>Structured test DSL \u2014 \u0443 \u043d\u0430\u0441 \u0441\u0432\u043e\u0439 \u044f\u0437\u044b\u043a \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f<\/p>\n<h3>\ud83d\udd1c \u0427\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435<\/h3>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u044b \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043c \u0442\u0435\u0441\u0442\u044b \u0432 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0441 <code>@TestCase<\/code>, <code>@Feature<\/code>, <code>@Severity<\/code> \u0438 \u0435\u0434\u0438\u043d\u044b\u043c <code>runTest()<\/code>.\u0422\u0430\u043a \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0448\u0430\u0433 \u043e\u0442 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u043a <strong>\u0442\u0435\u0441\u0442\u0443 \u043a\u0430\u043a \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044e<\/strong>.<\/p>\n<p>\ud83d\udcce  \u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c: <\/p>\n<blockquote>\n<p>\u201c\u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u0451\u0440\u0442\u043a\u0430 \u043d\u0430\u0434 vitest \u0438 allure, \u0434\u0430?\u201d  \u041d\u043e \u043d\u0435\u0442. \u041c\u044b \u0437\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443. \u0418 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e.<\/p>\n<\/blockquote>\n<h2>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 2: \u041a\u043b\u0430\u0441\u0441\u044b, \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b \u0438 runTest()<\/h2>\n<h3>\ud83c\udfaf \u0426\u0435\u043b\u044c<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0442\u0435\u0441\u0442\u044b \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 <strong>\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b<\/strong>, \u0447\u0442\u043e\u0431\u044b: <br \/>&#8212; \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0448\u0430\u0433\u043e\u0432<br \/>&#8212; \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c<br \/>&#8212; \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443<\/p>\n<h3>\ud83e\udd14 \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h3>\n<p>\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u044b \u043f\u0438\u0441\u0430\u043b\u0438 \u0442\u0435\u0441\u0442\u044b \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0442\u0438\u043b\u0435:<\/p>\n<pre><code class=\"javascript\">testCase('\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u044f', async () =&gt; {   const res = await step('GET \/profile', () =&gt; api.getProfile())   attach('\u041e\u0442\u0432\u0435\u0442', res.data)   expect(res.status).toBe(200) })<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0443\u0436\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0438 \u0447\u0438\u0442\u0430\u0435\u043c\u043e, \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043b\u043e\u0433\u0438\u043a\u0438 \u2014 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0432 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u043c\u043d\u043e\u0433\u043e \u0448\u0430\u0433\u043e\u0432 \u0438\u043b\u0438 \u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e. <br \/>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e: <br \/>&#8212; \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>this.ctx<\/code> <br \/>&#8212; \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0433\u0438 \u043a\u0430\u043a \u043c\u0435\u0442\u043e\u0434\u044b <br \/>&#8212; \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u043f\u043e feature<\/p>\n<h3>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043a\u043b\u0430\u0441\u0441\u0430\u043c<\/h3>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u0432 <code>@Feature<\/code>, <code>@TestCase<\/code>, <code>@Severity<\/code> \u0438 <code>runTest()<\/code> \u043c\u044b \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0435\u0441\u0442 \u0432 \u043c\u0435\u0442\u043e\u0434, \u0430 \u0432\u0435\u0441\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u2014 \u0432 \u043a\u043b\u0430\u0441\u0441.<\/p>\n<pre><code class=\"typescript\">@Feature('\u041f\u0440\u043e\u0444\u0438\u043b\u044c') class ProfileTest {   @TestCase('\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u044f', { id: 'API-102', severity: 'critical' })   async testProfile() {     const res = await step('GET \/profile', () =&gt; api.getProfile())     attach('\u041e\u0442\u0432\u0435\u0442', res.data)     expect(res.status).toBe(200)   } }  runTest(ProfileTest)<\/code><\/pre>\n<h3>\ud83d\udd27 \u0427\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u0438<\/h3>\n<p>&#8212; \u0421\u043e\u0437\u0434\u0430\u043b\u0438 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440 <code>@TestCase(name, meta)<\/code> \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430<br \/>&#8212; \u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 <code>@Feature<\/code> \u0438 <code>@Severity<\/code><br \/>&#8212; \u041d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 <code>runTest()<\/code> \u2014 \u0430\u0434\u0430\u043f\u0442\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0432 <code>test()<\/code><\/p>\n<pre><code class=\"typescript\">export function runTest(clazz) {   const instance = new clazz()   const proto = Object.getPrototypeOf(instance)    for (const key of Object.getOwnPropertyNames(proto)) {     const method = proto[key]     const meta = Reflect.getMetadata('testcase', instance, key)      if (typeof method === 'function' &amp;&amp; meta) {       test(meta.name, async () =&gt; {         if (meta.id) await label('AS_ID', meta.id)         if (meta.severity) await severity(meta.severity)         await method.call(instance)       })     }   } }<\/code><\/pre>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432 \u0441\u0442\u0438\u043b\u0435 Scenax<\/h3>\n<pre><code class=\"typescript\">@Feature('\u041f\u0440\u043e\u0444\u0438\u043b\u044c') class ProfileTest {   @TestCase('\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f', { id: 'API-103', severity: 'normal' })   async checkName() {     const res = await step('GET \/profile', () =&gt; api.getProfile())     expect(res.data.name).toBe('\u0418\u0432\u0430\u043d')   }    @TestCase('\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 email')   async checkEmail() {     const res = await step('GET \/profile', () =&gt; api.getProfile())     expect(res.data.email).toMatch(\/@example\\.com\/)   } }  runTest(ProfileTest)<\/code><\/pre>\n<h3>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u043b\u0430\u0441\u0441 \u0432 Scenax?<\/h3>\n<p>\u041a\u043b\u0430\u0441\u0441 \u0432 <code>Scenax<\/code> \u2014 \u044d\u0442\u043e <strong>\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u0430\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0430<\/strong>, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 <strong>\u0431\u0438\u0437\u043d\u0435\u0441-\u0444\u0438\u0447\u0438<\/strong> \u0438\u043b\u0438 <strong>\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430<\/strong>.<\/p>\n<p>\u0412 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<br \/>&#8212; \u042d\u0442\u043e <strong>\u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/strong> \u2014 \u044d\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u044f<br \/>&#8212; \u041e\u043d \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0442\u0435\u0441\u0442-\u043a\u0435\u0439\u0441\u044b \u043f\u043e \u043b\u043e\u0433\u0438\u043a\u0435, \u0430 \u043d\u0435 \u043f\u043e \u0442\u0438\u043f\u0443<br \/>&#8212; \u041e\u043d \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439 \u0432 Allure-\u043e\u0442\u0447\u0451\u0442\u0435, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435<\/p>\n<h4>\u0424\u0438\u0447\u0430 \u0438\u043b\u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c?<\/h4>\n<p>\u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u2014 <strong>\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c<\/strong>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <code>ProfileTest<\/code>, <code>AuthFlow<\/code>, <code>PaymentChecks<\/code>.  <\/p>\n<p>\u041d\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 <strong>\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u0430 \u0442\u0435\u0441\u0442\u043e\u0432<\/strong>: <code>RegressionSuite<\/code>, <code>MobileAPITests<\/code>, <code>UnauthorizedFlows<\/code>.<\/p>\n<h4>\u0427\u0442\u043e \u043c\u043e\u0436\u043d\u043e &#171;\u043f\u043e\u0432\u0435\u0441\u0438\u0442\u044c&#187; \u043d\u0430 \u043a\u043b\u0430\u0441\u0441?<\/h4>\n<p><code>@Feature('Profile')<\/code>\u2014 \u043d\u0430 \u043a\u043b\u0430\u0441\u0441, &#171;\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0437\u043d\u0435\u0441 \u0444\u0438\u0447\u0438&#187;<br \/><code>@Suite('API')<\/code> \u2014  \u043d\u0430 \u043a\u043b\u0430\u0441\u0441, &#171;\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0432 Allure&#187;<br \/><code>@ParentSuite('E2E')<\/code> \u2014  \u043d\u0430 \u043a\u043b\u0430\u0441\u0441, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 &#171;\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f (UI, e2e, regression \u0438 \u0442.\u043f.)&#187;<br \/><code>@Layer('e2e')<\/code> \u2014  \u043d\u0430 \u043a\u043b\u0430\u0441\u0441, &#171;\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0439 \u0441\u043b\u043e\u0439&#187;<br \/><code>@Context()<\/code>   \u2014  \u043d\u0430 \u043f\u043e\u043b\u0435, &#171;\u041f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 shared state \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432&#187;<br \/><code>@Inject()<\/code>  \u2014  \u043d\u0430 \u043f\u043e\u043b\u0435, &#171;\u0412\u043d\u0435\u0434\u0440\u044f\u0435\u0442 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 step-\u043a\u043b\u0430\u0441\u0441\u044b&#187;<\/p>\n<h4>\u041a\u043b\u0430\u0441\u0441 \u2014 \u044d\u0442\u043e:<\/h4>\n<ul>\n<li>\n<p><strong>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0442\u0435\u0441\u0442\u043e\u0432<\/strong> \u0441 \u0435\u0434\u0438\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435\u0439\u043c\u0441\u043f\u0435\u0439\u0441<\/strong>, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c <code>Feature<\/code>, <code>Suite<\/code>, <code>Layer<\/code><\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430<\/strong> \u0434\u043b\u044f Lifecycle-\u0445\u0443\u043a\u043e\u0432 (<code>@BeforeAll<\/code>, <code>@Setup<\/code>, <code>@Teardown<\/code>)<\/p>\n<\/li>\n<li>\n<p><strong>\u0415\u0434\u0438\u043d\u0438\u0446\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0432 Allure \u043a\u0430\u043a \u043c\u043e\u0434\u0443\u043b\u044c<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p>\ud83d\udca1 \u041a\u043b\u0430\u0441\u0441 \u0434\u0435\u043b\u0430\u0435\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0442\u0435\u0441\u0442\u043e\u0432 \u044f\u0432\u043d\u043e\u0439, \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e\u0439 \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0439<\/p>\n<\/blockquote>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u044b?<\/h3>\n<p>\u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u0447\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<ul>\n<li>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0448\u0430\u0440\u0438\u0442\u044c <code>this.ctx<\/code>, <code>this.client<\/code>, <code>this.steps<\/code> <\/p>\n<\/li>\n<li>\n<p>\u041b\u0435\u0433\u043a\u043e \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u043f\u043e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 (<code>@Feature('Profile')<\/code>)<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c lifecycle (<code>@BeforeAll<\/code>, <code>@Setup<\/code>, <code>@Teardown<\/code>)<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u0432\u044b\u0447\u043d\u043e \u0434\u043b\u044f backend-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p>\u041c\u044b \u043d\u0435 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c Vitest. \u041c\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435.<\/p>\n<\/blockquote>\n<h3>\u0427\u0442\u043e \u044d\u0442\u043e \u0434\u0430\u0435\u0442 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435?<\/h3>\n<p>\u0411\u044b\u043b\u043e\/\u0421\u0442\u0430\u043b\u043e:<\/p>\n<ul>\n<li>\n<p><code>testCase(name, fn)<\/code> \/ <code>@TestCase()<\/code> \u043d\u0430\u0434 \u043c\u0435\u0442\u043e\u0434\u043e\u043c<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0442\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0435\u043b\u0430 \u0442\u0435\u0441\u0442\u0430 \/ \u0414\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b \u043d\u0430\u0434 \u043c\u0435\u0442\u043e\u0434\u043e\u043c\/\u043a\u043b\u0430\u0441\u0441\u043e\u043c<\/p>\n<\/li>\n<li>\n<p>\u041e\u0434\u0438\u043d \u0442\u0435\u0441\u0442 = \u043e\u0434\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \/ \u041e\u0434\u0438\u043d \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 = \u043e\u0434\u0438\u043d \u043a\u043b\u0430\u0441\u0441<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0442 \u043e\u0431\u0449\u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \/ <code>this.ctx<\/code>, <code>this.steps<\/code>, \u0438 \u0434\u0440.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0427\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435?<\/h3>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u2014 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0442\u0435\u0441\u0442\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 <code>@TestCase.each()<\/code> \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0435\u0440\u0432\u0443\u044e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0443\u044e data-driven \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<\/p>\n<p>\u27a1\ufe0f \u041a \u043e\u0434\u043d\u043e\u043c\u0443 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044e \u2014 \u043c\u043d\u043e\u0433\u043e \u0432\u0445\u043e\u0434\u043e\u0432. \u041c\u043d\u043e\u0433\u043e \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u0434\u0438\u043d \u0441\u0442\u0438\u043b\u044c.<\/p>\n<h2>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 3: \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0441 @TestCase.each<\/h2>\n<p>\u041e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0447\u0430\u0441\u0442\u044b\u0445 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432 \u0432 \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u0430\u0445 \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.  Vitest \u0443\u043c\u0435\u0435\u0442 <code>test.each(...)<\/code>, \u043d\u043e \u043d\u0430\u0448 DSL \u2014 \u0442\u043e\u0436\u0435.<\/p>\n<h3>\u0426\u0435\u043b\u044c<\/h3>\n<p>&#8212; \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c <code>@TestCase.each([...])<\/code> \u2014 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432<br \/>&#8212; \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u043c\u0435\u0442\u043e\u0434<br \/>&#8212; \u0424\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043e\u0442\u0447\u0451\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 <code>allure.parameter<\/code><\/p>\n<h3>\u041a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442<\/h3>\n<pre><code class=\"typescript\">@Feature('\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f') class AuthTests {   @TestCase.each([     ['admin@example.com', 'admin123', 200],     ['user@example.com', 'user123', 200],     ['hacker@example.com', 'wrongpass', 401],   ])('\u041b\u043e\u0433\u0438\u043d \u0434\u043b\u044f %s', async (email, password, expectedStatus) =&gt; {     const res = await axios.post('\/login', { email, password })     expect(res.status).toBe(expectedStatus)   }) }<\/code><\/pre>\n<h4>\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442:<\/h4>\n<ul>\n<li>\n<p>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f 3 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u0430 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438: <code>\u041b\u043e\u0433\u0438\u043d \u0434\u043b\u044f <\/code><a href=\"mailto:admin@example.com\"><code>admin@example.com<\/code><\/a>, <code>\u041b\u043e\u0433\u0438\u043d \u0434\u043b\u044f <\/code><a href=\"mailto:user@example.com\">user@example.com<\/a> \u0438 \u0442.\u0434.<\/p>\n<\/li>\n<li>\n<p>\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b <code>email<\/code>, <code>password<\/code>, <code>expectedStatus<\/code> \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u043c\u0435\u0442\u043e\u0434<\/p>\n<\/li>\n<li>\n<p>Allure \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b: <code>param1 = <\/code><a href=\"mailto:admin@example.com\"><code>admin@example.com<\/code><\/a>, <code>param2 = admin123<\/code>, <code>param3 = 200<\/code><\/p>\n<\/li>\n<\/ul>\n<h4>\u041b\u044e\u0431\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/h4>\n<p>\u041c\u0435\u0442\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 <code>.each()<\/code>:<\/p>\n<pre><code class=\"typescript\">@TestCase.each([   ['admin', '123', 'desktop', true],   ['guest', 'qwerty', 'mobile', false] ])('\u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0432\u0445\u043e\u0434\u0430: %s', async (login, pass, platform, expected) =&gt; {   \/\/ \u0432\u0441\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043a\u0430\u043a \u0435\u0441\u0442\u044c })<\/code><\/pre>\n<blockquote>\n<p>DSL \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u2014 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a <code>(...args) =&gt; {}<\/code><\/p>\n<\/blockquote>\n<h3>\ud83d\udcc8 \u0412\u044b\u0433\u043e\u0434\u0430<\/h3>\n<p>&#8212; \u0427\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0438 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e\u0441\u0442\u044c<br \/>&#8212; \u0415\u0434\u0438\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0442\u0435\u0441\u0442\u0430 \u0438 \u0434\u0430\u043d\u043d\u044b\u0445<br \/>&#8212; Allure \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u0448\u0430\u0433\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f<br \/>&#8212; \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 <code>step()<\/code> \u0438 <code>attach()<\/code><\/p>\n<h3>\ud83c\udfaf \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448 DSL \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0447\u0430\u0441\u0442\u044b\u0445 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432 \u0432 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438.  \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u2014 <code>@BeforeEachCase<\/code>, \u0445\u0443\u043a\u0438 \u0438 re-use \u0448\u0430\u0433\u043e\u0432.<\/p>\n<h3>\ud83d\udcad \u00ab\u041f\u043e\u0441\u0442\u043e\u0439\u0442\u0435\u2026 \u0410 \u0447\u0435\u043c \u044d\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e test.each?\u00bb<\/h3>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441.<br \/>\u0412\u044b, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0441\u0435\u0439\u0447\u0430\u0441 \u0434\u0443\u043c\u0430\u0435\u0442\u0435:<\/p>\n<blockquote>\n<p>\u00ab\u041e\u043a\u0435\u0439, \u044f \u0432\u0438\u0436\u0443 <code>@TestCase.each<\/code>, \u043a\u0440\u0430\u0441\u0438\u0432\u043e, \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u2026  <br \/>\u041d\u043e \u0432\u0435\u0434\u044c \u0443 Vitest \u0443\u0436\u0435 \u0435\u0441\u0442\u044c <code>test.each(...)<\/code> \u2014 \u0440\u0430\u0437\u0432\u0435 \u043d\u0435 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435?\u00bb<\/p>\n<\/blockquote>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043f\u043e \u043f\u043e\u043b\u043e\u0447\u043a\u0430\u043c.<\/p>\n<h4>\ud83e\udd1c test.each \u2014 \u044d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e. \u041d\u043e\u2026<\/h4>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u0438\u0448\u0435\u0442\u0435 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"javascript\">test.each([   ['email1', 'pass1', 200],   ['email2', 'pass2', 401], ])('Login for %s', ...)<\/code><\/pre>\n<p>\u2014 \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u0431\u044b\u0441\u0442\u0440\u044b\u0439, \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u0442\u0435\u0441\u0442.<\/p>\n<p>\u041d\u043e \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435:<br \/>&#8212; \u041f\u043e\u0434\u0441\u0432\u0435\u0442\u0438\u0442\u044c \u0444\u0438\u0447\u0443 (<code>@Feature('\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f')<\/code>) &#8212; \u041f\u043e\u0432\u0435\u0441\u0438\u0442\u044c ID \u043d\u0430 \u0442\u0435\u0441\u0442 (<code>AS_ID<\/code>, <code>TMS<\/code>, <code>Issue<\/code>) &#8212; \u041f\u0440\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c severity \u0438\u043b\u0438 owner &#8212; \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0442\u0447\u0451\u0442\u0430 &#8212; \u041f\u0440\u0438\u043b\u043e\u0436\u0438\u0442\u044c response JSON \u0432 Allure<\/p>\n<p>\u0412\u0441\u0451 \u044d\u0442\u043e \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0441 \u043a\u0443\u0447\u0435\u0439 <code>allure.label(...)<\/code>, <code>allure.step(...)<\/code> \u0438 <code>allure.attachment(...)<\/code>.<\/p>\n<h3>\ud83c\udfaf \u0410 \u0432\u043e\u0442 @TestCase.each \u2014 \u0443\u0436\u0435 \u043f\u0440\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438<\/h3>\n<pre><code class=\"typescript\">@TestCase.each([   ['admin@example.com', 'admin123', 200],   ['user@example.com', 'user123', 200], ])('\u041b\u043e\u0433\u0438\u043d \u0434\u043b\u044f %s', { severity: 'critical' }) \/\/ \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c severity,feature \u0438 \u0442.\u0434. async login(email, password, expectedStatus) {   ... }<\/code><\/pre>\n<p>\u0418 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c:<br \/>&#8212; \u041e\u0434\u0438\u043d \u043c\u0435\u0442\u043e\u0434 \u2192 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0435\u0439\u0441\u043e\u0432 <br \/>&#8212; \u041c\u0435\u0442\u043a\u0438 (<code>severity<\/code>, <code>feature<\/code>) \u2014 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u044b <br \/>&#8212; \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u0435\u0439\u0441\u0430 \u2014 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u043e\u0435 <br \/>&#8212; \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u0432 Allure <br \/>&#8212; \u041e\u0442\u0447\u0451\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d: \u0448\u0430\u0433\u0438, \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/p>\n<h4>\ud83d\udca1 \u0412\u044b\u0432\u043e\u0434<\/h4>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0442\u0435\u0441\u0442 3 \u0440\u0430\u0437\u0430 \u2014 <code>test.each<\/code> \u0432\u0430\u0441 \u0441\u043f\u0430\u0441\u0451\u0442.  \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0435 <strong>\u0431\u0438\u0437\u043d\u0435\u0441-\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438<\/strong>, \u0445\u043e\u0442\u0438\u0442\u0435 <strong>\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043e\u0442\u0447\u0451\u0442\u044b<\/strong> \u0438 <strong>\u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u044b\u0439 DSL<\/strong>,  \u0442\u043e <code>@TestCase.each<\/code> \u2014 \u044d\u0442\u043e \u0443\u0436\u0435 \u044f\u0437\u044b\u043a, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f.  \u041f\u043e \u0441\u0443\u0442\u0438, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c <strong>\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043d\u0430 \u0431\u0430\u0437\u0435 Vitest<\/strong>,\u043d\u0435 \u043a\u043e\u043d\u043a\u0443\u0440\u0438\u0440\u0443\u044f \u0441 \u043d\u0438\u043c, \u0430 \u043d\u0430\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044f \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u043b\u043e\u0439.<\/p>\n<h2>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 4: \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 @Description, @Tag, @Owner, @Severity<\/h2>\n<h3>\ud83c\udfaf \u0426\u0435\u043b\u044c<\/h3>\n<p>\u0414\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043c\u044b\u0441\u043b\u0430 \u2014 \u043f\u0440\u044f\u043c\u043e \u0438\u0437 \u043a\u043e\u0434\u0430.  <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043c\u0435\u0442\u0430-\u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u0432: \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0439, \u0442\u0435\u0433\u043e\u0432, \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u0432, \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e?<\/h3>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0435 Allure \u0438 \u0432\u0438\u0434\u0438\u0442\u0435:  <strong>&#171;\u041b\u043e\u0433\u0438\u043d \u0434\u043b\u044f <\/strong><a href=\"mailto:admin@example.com\"><strong>admin@example.com<\/strong><\/a><strong>&#187; \u2014 \u043f\u0440\u043e\u0439\u0434\u0435\u043d \u2705&#187;<\/strong>  \u041d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u2014 \u043d\u0438\u0447\u0435\u0433\u043e. \u041d\u0438 \u043a\u0442\u043e \u0432\u043b\u0430\u0434\u0435\u043b\u0435\u0446, \u043d\u0438 \u0437\u0430\u0447\u0435\u043c \u0442\u0435\u0441\u0442, \u043d\u0438 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442.\u0412\u0441\u0451 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430:<\/p>\n<p>\u0412\u0441\u0451 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430:<br \/>&#8212; \ud83d\udc65 \u0442\u0435\u0441\u0442\u043e\u0432 \u043c\u043d\u043e\u0433\u043e<br \/>&#8212; \ud83d\udcca \u043d\u0443\u0436\u043d\u0430 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u0432 TestOps<br \/>&#8212; \ud83e\udd1d \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0445\u043e\u0447\u0435\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0442\u0435\u0441\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442<\/p>\n<h3>\u0427\u0442\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438<\/h3>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u0432:<\/p>\n<pre><code class=\"typescript\">@Description('\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441 \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u043e\u0436\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f') @Tag('auth') @Owner('dmitry.nkt') @Severity('critical')<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043a\u0430\u043a \u043d\u0430 \u043a\u043b\u0430\u0441\u0441, \u0442\u0430\u043a \u0438 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434.<\/p>\n<h3>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442?<\/h3>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 metadata \u0447\u0435\u0440\u0435\u0437 <code>reflect-metadata<\/code> <\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432 <code>runTest<\/code> \u2014 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a Allure \u0447\u0435\u0440\u0435\u0437 facade (<code>allure.description<\/code>, <code>allure.tag<\/code>, &#8230;)<\/p>\n<\/li>\n<\/ul>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<pre><code class=\"typescript\">@Feature('\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f') @Tag('api') @Owner('backend-team') class AuthTests {    @TestCase.each([     ['admin@example.com', 'admin123', 200],     ['hacker@example.com', 'wrongpass', 401]   ])('\u041b\u043e\u0433\u0438\u043d \u0434\u043b\u044f %s')   @Description('\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u043b\u043e\u0433\u0438\u043d\u0430 \u0441 \u0443\u0447\u0451\u0442\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438')   @Tag('login')   @Severity('critical')   @Owner('dmitry.nkt')   async login(email, password, expectedStatus) {     const res = await step(`POST \/login`, () =&gt;       axios.post('https:\/\/httpbin.org\/status\/' + expectedStatus, { email, password })     )     expect(res.status).toBe(expectedStatus)   } }<\/code><\/pre>\n<h3>\u0427\u0442\u043e \u044d\u0442\u043e \u0434\u0430\u0451\u0442<\/h3>\n<p>&#8212; \ud83d\udcce \u0412\u0438\u0434\u043d\u043e, \u0437\u0430\u0447\u0435\u043c \u0442\u0435\u0441\u0442 (\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435)<br \/>&#8212; \ud83e\udde9 \u041a\u0442\u043e \u0435\u0433\u043e \u0432\u043b\u0430\u0434\u0435\u043b\u0435\u0446 (<code>@Owner<\/code>)<br \/>&#8212; \ud83d\udea6 \u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043d \u0432\u0430\u0436\u0435\u043d (<code>@Severity<\/code>)<br \/>&#8212; \ud83c\udff7\ufe0f \u041a\u0430\u043a\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0438\u0442 (<code>@Tag<\/code>)<br \/>&#8212; \ud83d\udcca Allure \u0438 TestOps \u043c\u043e\u0433\u0443\u0442 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c, \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u043f\u043e owner\/feature<\/p>\n<h3>\u0418\u0442\u043e\u0433<\/h3>\n<p>\u041c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 <strong>\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u043b\u043e\u0439<\/strong> \u043d\u0430\u0434 \u0442\u0435\u0441\u0442\u0430\u043c\u0438.  \u0422\u0435\u043f\u0435\u0440\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0435\u0441\u0442-\u043a\u0435\u0439\u0441 \u043d\u0435\u0441\u0451\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0448\u0430\u0433\u0438, \u043d\u043e \u0438 <strong>\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442<\/strong> \u2014 \u0438 \u0434\u043b\u044f \u043b\u044e\u0434\u0435\u0439, \u0438 \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c.<\/p>\n<h3>\ud83d\udd01 \u0427\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435?<\/h3>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0437\u0430\u043b\u043e\u0436\u0438\u043b\u0438 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442:<\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 DSL (<code>testCase<\/code>)<\/p>\n<\/li>\n<li>\n<p>\u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0430\u0446\u0438\u044e (<code>@TestCase.each<\/code>)<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u043b\u044f Allure (<code>@Feature<\/code>, @Suite, <code>@Layer<\/code>)<\/p>\n<\/li>\n<li>\n<p>\u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b\u0438 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0432 \u043a\u043b\u0430\u0441\u0441\u044b<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u043e \u0443\u0436\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 <a href=\"https:\/\/scenax.com\">Scenax<\/a> \u043c\u043e\u0449\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u2014 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f API \u0438 E2E-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043a\u0430\u043a<strong> \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432,<\/strong> \u0430 \u043d\u0435 \u0433\u043e\u043b\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p>\u041d\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u2014<strong> \u0435\u0449\u0451 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435.<\/strong><\/p>\n<blockquote>\n<p>\u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u044b \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043e\u0442 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u043a<strong> \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0446\u0435\u043b\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a:<\/strong><\/p>\n<ul>\n<li>\n<p>\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c lifecycle-\u0445\u0443\u043a\u0438<\/p>\n<\/li>\n<li>\n<p>\u0432\u0432\u043e\u0434\u0438\u043c @Context \u0438 @Inject<\/p>\n<\/li>\n<li>\n<p>\u0441\u043e\u0437\u0434\u0430\u0451\u043c Step Library<\/p>\n<\/li>\n<li>\n<p>\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a \u0446\u0435\u043b\u044b\u0445 \u0441\u043b\u043e\u0451\u0432<\/p>\n<\/li>\n<\/ul>\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\/914450\/\"> https:\/\/habr.com\/ru\/articles\/914450\/<\/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<p>\u0427\u0442\u043e, \u0435\u0441\u043b\u0438 \u0431\u044b \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u044b \u0447\u0438\u0442\u0430\u043b\u0438\u0441\u044c \u043a\u0430\u043a \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439?<br \/>\u0427\u0442\u043e, \u0435\u0441\u043b\u0438 \u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0433 \u0431\u044b\u043b \u043f\u043e\u043d\u044f\u0442\u0435\u043d, \u043a\u0430\u0436\u0434\u0430\u044f \u043c\u0435\u0442\u043a\u0430 \u2014 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435, \u0430 \u043e\u0442\u0447\u0451\u0442 \u2014 \u043f\u0440\u0438\u0433\u043e\u0434\u0435\u043d \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f QA, \u043d\u043e \u0438 \u0434\u043b\u044f \u0431\u0438\u0437\u043d\u0435\u0441\u0430?<br \/>\u0422\u0430\u043a \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f <a href=\"https:\/\/scenax.com\">Scenax<\/a> \u2014 DSL-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043f\u043e\u0432\u0435\u0440\u0445 Vitest \u0438 Allure, \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0439 \u0442\u0435\u0441\u0442\u044b \u0432 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438.<\/p>\n<h2>\ud83d\udcd1 \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u0442\u0430\u0442\u044c\u0438<\/h2>\n<ol>\n<li>\n<p>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 1: DSL-\u043e\u0431\u0451\u0440\u0442\u043a\u0430 testCase, step, attach<\/p>\n<\/li>\n<li>\n<p>Scenax \u2014 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e DSL: \u044d\u0442\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/p>\n<\/li>\n<li>\n<p>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 2: \u041a\u043b\u0430\u0441\u0441\u044b, \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b \u0438 <code>runTest()<\/code><\/p>\n<\/li>\n<li>\n<p>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 3: \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0441 <code>@TestCase.each<\/code><\/p>\n<\/li>\n<li>\n<p>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 4: \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 <code>@Description<\/code>, <code>@Tag<\/code>, <code>@Owner<\/code>, <code>@Severity<\/code><\/p>\n<h4>\u0427\u0430\u0441\u0442\u044c 2<\/h4>\n<\/li>\n<li>\n<p>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 5: <code>@Suite<\/code>, <code>@ParentSuite<\/code>, <code>@SubSuite<\/code>, <code>@Layer<\/code> \u2014 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0432 Allure<\/p>\n<\/li>\n<li>\n<p>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 6: <code>@Setup<\/code>, <code>@Teardown<\/code>, <code>@Context<\/code>, <code>@Inject<\/code> \u2014 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0438 shared state<\/p>\n<\/li>\n<li>\n<p>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 7: <code>@BeforeAll<\/code>, <code>@AfterAll<\/code>, <code>@Setup(params)<\/code> \u2014 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432<\/p>\n<\/li>\n<li>\n<p>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 8: <code>@Step<\/code>, <code>@Scenario()<\/code> \u0438 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0448\u0430\u0433\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043a <code>scenax<\/code> \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0435\u043a \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435: \u043f\u043e\u0447\u0435\u043c\u0443 <code>scenax<\/code> \u2014 \u044d\u0442\u043e \u043d\u043e\u0432\u044b\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0434\u043b\u044f API-\u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0430 Vitest<\/p>\n<\/li>\n<\/ol>\n<h3>\ud83e\udd2f \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h3>\n<p>\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0449\u043d\u044b \u2014 \u043d\u043e \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0434\u0438\u0441\u0446\u0438\u043f\u043b\u0438\u043d\u044b \u0438 \u0440\u0443\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\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 vitest:<\/p>\n<ul>\n<li>\n<p><code>vitest.test()<\/code> \u0445\u043e\u0440\u043e\u0448 \u0434\u043b\u044f unit-\u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a, \u043d\u043e \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0441 \u0448\u0430\u0433\u0430\u043c\u0438 \u0438 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0442\u043a\u0438 (<code>feature<\/code>, <code>severity<\/code>, <code>tag<\/code>, <code>owner<\/code>) \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u043b\u0435\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f<\/p>\n<\/li>\n<li>\n<p>\u0428\u0430\u0433\u0438 \u0447\u0435\u0440\u0435\u0437 <code>allure.step(...)<\/code> \u2014 \u043d\u0435 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u043d\u0435 \u0447\u0438\u0442\u0430\u0435\u043c\u044b, \u043d\u0435 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b: \u0448\u0430\u0433\u0438 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0442\u0435\u0441\u0442\u044b \u0442\u0435\u0440\u044f\u044e\u0442 \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u044e\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439. \u0412\u043c\u0435\u0441\u0442\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u2014 \u043a\u0430\u0448\u0430 \u0438\u0437 \u043a\u043e\u0434\u0430.<\/p>\n<h3>\ud83d\udca1 \u0418\u0434\u0435\u044f<\/h3>\n<p>\u041c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u0442\u0435\u0441\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b \u043a\u0430\u043a <strong>\u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u0435<\/strong>, \u0430 \u043d\u0435 \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f.<\/p>\n<pre><code class=\"typescript\">testCase(     '\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f',     { id: 'API-001', feature: 'Users', severity: 'critical' },     async () =&gt; {         const response = await step('POST \/users', () =&gt;             axios.post('\/users', { name: '\u0418\u0432\u0430\u043d' })         )         attach('\u041e\u0442\u0432\u0435\u0442', response.data, 'application\/json')         expect(response.status).toBe(201)     } ) <\/code><\/pre>\n<p>\u042d\u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442. \u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443, \u0438 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443, \u0438 \u0431\u0438\u0437\u043d\u0435\u0441\u0443. \u0412\u0430\u0440\u0438\u0430\u043d\u0442, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0443\u0436\u0435 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u0435\u0435 \u0433\u043b\u0430\u0437\u0443, \u0447\u0435\u043c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u043d\u0430 <a href=\"https:\/\/www.npmjs.com\/package\/vitest\">vitest<\/a> + <a href=\"https:\/\/www.npmjs.com\/package\/allure-js-commons\">allure<\/a>.<\/p>\n<h3>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Scenax? \u041e \u0447\u0451\u043c \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f.<\/h3>\n<p>\u041c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u043c \u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0441\u043f\u0438\u0441\u043e\u043a, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439  \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 &#171;\u0445\u043e\u0442\u0435\u043b\u043e\u043a&#187;. <\/p>\n<p><strong>Scenax<\/strong> \u2014 \u044d\u0442\u043e:<\/p>\n<ul>\n<li>\n<p>DSL (\u044f\u0437\u044b\u043a \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432) \u043f\u043e\u0432\u0435\u0440\u0445 <a href=\"https:\/\/github.com\/allure-framework\/allure-js\">Vitest<\/a> + <a href=\"https:\/\/github.com\/allure-framework\/allure-js\">Allure<\/a> (\u043e\u043f\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438)<\/p>\n<\/li>\n<li>\n<p>Class-based \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430: \u0442\u0435\u0441\u0442\u044b = \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438, \u043c\u0435\u0442\u043e\u0434\u044b = \u0448\u0430\u0433\u0438<\/p>\n<\/li>\n<li>\n<p>\u0414\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b: <code>@TestCase<\/code>, <code>@Feature<\/code>, <code>@Step<\/code>, <code>@Context<\/code> \u0438 \u0434\u0440.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0448\u0430\u0433\u0438 \u0438 \u0441\u0446\u0435\u043d\u0430\u0440\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0430\u0446\u0438\u0438, lifecycle, \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438<\/p>\n<\/li>\n<li>\n<p>\u0427\u0438\u0441\u0442\u044b\u0435 \u043e\u0442\u0447\u0451\u0442\u044b Allure \u2014 \u0431\u0435\u0437 \u0440\u0443\u0447\u043d\u043e\u0433\u043e label\/step\/attach<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u043f\u0443\u0442\u044c \u2014 \u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e DSL \u0434\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430, \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0432 \u0432\u0441\u0435 \u043d\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u0430\u044f \u0431\u0443\u0434\u0435\u0442: <\/p>\n<ul>\n<li>\n<p>\u0414\u0430\u0432\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 value (\u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c)<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u043a\u043e\u0434<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u043a\u0440\u0435\u043f\u043b\u044f\u0442\u044c\u0441\u044f \u0436\u0438\u0432\u044b\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0444\u0438\u043d\u0430\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c:  <\/p>\n<ul>\n<li>\n<p>\ud83d\udce6 \u041f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <code>scenax<\/code><\/p>\n<\/li>\n<li>\n<p>\ud83d\udcbb \u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430 GitHub<\/p>\n<\/li>\n<li>\n<p>\u270d\ufe0f  \u0412\u0432\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u0434\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/p>\n<\/li>\n<li>\n<p>\u0418, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u043e\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u043d\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c.<\/p>\n<h2>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 1: DSL-\u043e\u0431\u0451\u0440\u0442\u043a\u0430 testCase, step, attach<\/h2>\n<h3>\ud83c\udfaf \u0426\u0435\u043b\u044c<\/h3>\n<p>\u0421\u0434\u0435\u043b\u0430\u0442\u044c API-\u0442\u0435\u0441\u0442 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c, \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0438 \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u043a \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0432 Allure TestOps \u2014 \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0438\u0441\u0430\u0442\u044c <code>allure.label(...)<\/code>, <code>allure.step(...)<\/code> \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b.<\/p>\n<h3>\ud83e\udd2f \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h3>\n<p><code>allure-vitest<\/code> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0444\u0430\u0441\u0430\u0434\u0443 Allure (\u043c\u0435\u0442\u043a\u0438, \u0448\u0430\u0433\u0438, \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u044f), \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c API \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u043c \u0438 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u043c:<\/p>\n<pre><code class=\"typescript\">import * as allure from 'allure-js-commons'  test('profile', async () =&gt; {   await allure.label('AS_ID', 'API-123')   await allure.feature('Profile')   await allure.step('GET \/profile', async () =&gt; {     const res = await axios.get('\/profile')     await allure.attachment('response', JSON.stringify(res.data), 'application\/json')     expect(res.status).toBe(200)   }) })<\/code><\/pre>\n<p>\u041f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0432\u044b\u0437\u043e\u0432\u044b. \u041b\u0451\u0433\u043a\u043e \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0445 \u043a\u043b\u044e\u0447\u0430\u0445 (<code>AS_ID<\/code>, <code>severity<\/code>). \u0421\u043d\u0438\u0436\u0430\u0435\u0442\u0441\u044f \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0438 \u0442\u0435\u043c\u043f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<h3>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u043e\u0431\u0451\u0440\u0442\u043a\u0430<\/h3>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 DSL: <code>testCase<\/code>, <code>step<\/code>, <code>attach<\/code>  \u2192 \u0435\u0434\u0438\u043d\u044b\u0439 \u0441\u0442\u0438\u043b\u044c, \u0447\u0438\u0441\u0442\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u043c\u0435\u043d\u044c\u0448\u0435 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<pre><code class=\"typescript\">testCase(   '\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u044f',   { id: 'API-101', feature: '\u041f\u0440\u043e\u0444\u0438\u043b\u044c', severity: 'critical' },   async () =&gt; {     const response = await step('GET \/profile', () =&gt; axios.get('\/profile'))     attach('\u041e\u0442\u0432\u0435\u0442', response.data, 'application\/json')     expect(response.status).toBe(200)   } )<\/code><\/pre>\n<p>\u041a\u043e\u0440\u043e\u0442\u043a\u043e, \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e, \u043a\u0440\u0430\u0441\u0438\u0432\u043e. \u0412\u0441\u0451 \u043d\u0443\u0436\u043d\u043e\u0435 \u2014 \u043d\u0430 \u0432\u0438\u0434\u0443.<\/p>\n<h3>\ud83d\udd27 \u0427\u0442\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438<\/h3>\n<p>\u270d\ufe0f \u041d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 <code>testCase(name, meta, fn)<\/code> \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445<br \/>\ud83d\udcda \u041e\u0431\u0435\u0440\u043d\u0443\u043b\u0438 \u0448\u0430\u0433\u0438 \u0432 <code>step(name, fn)<\/code><br \/>\ud83d\udcce \u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 <code>attach(name, content)<\/code> \u0441 \u0430\u0432\u0442\u043e\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439<\/p>\n<h3>\ud83d\udca1 \u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e<\/h3>\n<ol>\n<li>\n<p>\u0422\u0435\u0441\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0447\u0438\u0442\u0430\u0435\u043c \u043a\u0430\u043a <strong>\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0423\u0434\u0430\u043b\u044f\u0435\u0442 boilerplate (<code>label<\/code>, <code>step<\/code>, <code>attachment<\/code>), c\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a (<code>label('AS_ID', ...)<\/code> \u2192 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043e)<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u043e\u0442\u0447\u0451\u0442\u0430\u0445<\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441\u0442\u0438\u043b\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b: \u043a\u043b\u0430\u0441\u0441\u044b, \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b, \u0441\u043b\u043e\u0438. \u0413\u043e\u0442\u043e\u0432\u0430 \u043f\u043e\u0447\u0432\u0430 \u0434\u043b\u044f class-based \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b<\/p>\n<\/li>\n<\/ol>\n<h3>\u2699\ufe0f \u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c<\/h3>\n<pre><code class=\"typescript\">import * as allure from 'allure-js-commons' import { test } from 'vitest'  export function testCase(name, meta, fn) {   test(name, async () =&gt; {     if (meta.id) await allure.label('AS_ID', meta.id)     if (meta.feature) await allure.feature(meta.feature)     if (meta.severity) await allure.severity(meta.severity)     await fn()   }) }  export async function step(name, fn) {   return await allure.step(name, fn) }  export function attach(name, data, type = 'text\/plain') {   allure.attachment(name, typeof data === 'string' ? data : JSON.stringify(data), type) }<\/code><\/pre>\n<h3>\u0418\u0442\u043e\u0433\u0438 \u0418\u0442\u0435\u0440\u0430\u0446\u0438\u0438 1: \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0435 \u0442\u0435\u0441\u0442\u044b, \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0438 \u044f\u0437\u044b\u043a \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u0439<\/h3>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u0434\u0430\u043b\u0430 \u043d\u0430\u043c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0436\u0438\u0437\u043d\u0435\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0439 DSL (<code>testCase<\/code>, <code>step<\/code>, <code>attach<\/code>) \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f API-\u0442\u0435\u0441\u0442\u043e\u0432.  \u0418 \u0432\u0440\u043e\u0434\u0435 \u0431\u044b \u2014 \u0432\u0441\u0435\u0433\u043e \u0442\u0440\u0438 \u043e\u0431\u0451\u0440\u0442\u043a\u0438. \u041d\u043e \u043e\u043d\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u0432\u0441\u0451.<\/p>\n<h4>\u041a\u0430\u043a \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c?<\/h4>\n<p>\u041c\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043f\u0438\u0448\u0435\u043c \u201c\u0442\u0435\u0441\u0442-\u0444\u0443\u043d\u043a\u0446\u0438\u044e\u201d. \u041c\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c <strong>\u0442\u0435\u0441\u0442-\u043a\u0435\u0439\u0441<\/strong>.<br \/>\u042d\u0442\u043e \u043d\u0435 <code>unit test<\/code>, \u044d\u0442\u043e <code>use-case<\/code> <br \/>\u042d\u0442\u043e \u043d\u0435 <code>test(name, () =&gt; {})<\/code>, \u044d\u0442\u043e <code>testCase(meta, steps)<\/code><br \/>\u042d\u0442\u043e \u043d\u0435 \u201c\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u201d, \u044d\u0442\u043e \u201c\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0431\u0438\u0437\u043d\u0435\u0441-\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u201d<\/p>\n<p>\u042d\u0442\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u043b\u0438\u0436\u0435 \u043a:<\/p>\n<p>Scenario-based testing \u2014 \u0435\u0441\u0442\u044c \u0448\u0430\u0433\u0438, \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438, feature<br \/>Use-case testing \u2014 \u043a\u0430\u0436\u0434\u044b\u0439 <code>testCase<\/code> \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 use-case<br \/>Structured test DSL \u2014 \u0443 \u043d\u0430\u0441 \u0441\u0432\u043e\u0439 \u044f\u0437\u044b\u043a \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f<\/p>\n<h3>\ud83d\udd1c \u0427\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435<\/h3>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u044b \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043c \u0442\u0435\u0441\u0442\u044b \u0432 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0441 <code>@TestCase<\/code>, <code>@Feature<\/code>, <code>@Severity<\/code> \u0438 \u0435\u0434\u0438\u043d\u044b\u043c <code>runTest()<\/code>.\u0422\u0430\u043a \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0448\u0430\u0433 \u043e\u0442 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u043a <strong>\u0442\u0435\u0441\u0442\u0443 \u043a\u0430\u043a \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044e<\/strong>.<\/p>\n<p>\ud83d\udcce  \u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c: <\/p>\n<blockquote>\n<p>\u201c\u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u0451\u0440\u0442\u043a\u0430 \u043d\u0430\u0434 vitest \u0438 allure, \u0434\u0430?\u201d  \u041d\u043e \u043d\u0435\u0442. \u041c\u044b \u0437\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443. \u0418 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e.<\/p>\n<\/blockquote>\n<h2>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f 2: \u041a\u043b\u0430\u0441\u0441\u044b, \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b \u0438 runTest()<\/h2>\n<h3>\ud83c\udfaf \u0426\u0435\u043b\u044c<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0442\u0435\u0441\u0442\u044b \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 <strong>\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b<\/strong>, \u0447\u0442\u043e\u0431\u044b: <br \/>&#8212; \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0448\u0430\u0433\u043e\u0432<br \/>&#8212; \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c<br \/>&#8212; \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443<\/p>\n<h3>\ud83e\udd14 \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h3>\n<p>\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u044b \u043f\u0438\u0441\u0430\u043b\u0438 \u0442\u0435\u0441\u0442\u044b \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0442\u0438\u043b\u0435:<\/p>\n<pre><code class=\"javascript\">testCase('\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u044f', async () =&gt; {   const res = await step('GET \/profile', () =&gt; api.getProfile())   attach('\u041e\u0442\u0432\u0435\u0442', res.data)   expect(res.status).toBe(200) })<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0443\u0436\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0438 \u0447\u0438\u0442\u0430\u0435\u043c\u043e, \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043b\u043e\u0433\u0438\u043a\u0438 \u2014 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0432 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u043c\u043d\u043e\u0433\u043e \u0448\u0430\u0433\u043e\u0432 \u0438\u043b\u0438 \u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e. <br \/>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e: <br \/>&#8212; \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>this.ctx<\/code> <br \/>&#8212; \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0433\u0438 \u043a\u0430\u043a \u043c\u0435\u0442\u043e\u0434\u044b <br \/>&#8212; \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u043f\u043e feature<\/p>\n<h3>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043a\u043b\u0430\u0441\u0441\u0430\u043c<\/h3>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u0432 <code>@Feature<\/code>, <code>@TestCase<\/code>, <code>@Severity<\/code> \u0438 <code>runTest()<\/code> \u043c\u044b \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0435\u0441\u0442 \u0432 \u043c\u0435\u0442\u043e\u0434, \u0430 \u0432\u0435\u0441\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u2014 \u0432 \u043a\u043b\u0430\u0441\u0441.<\/p>\n<pre><code class=\"typescript\">@Feature('\u041f\u0440\u043e\u0444\u0438\u043b\u044c') class ProfileTest {   @TestCase('\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u044f', { id: 'API-102', severity: 'critical' })   async testProfile() {     const res = await step('GET \/profile', () =&gt; api.getProfile())     attach('\u041e\u0442\u0432\u0435\u0442', res.data)     expect(res.status).toBe(200)   } }  runTest(ProfileTest)<\/code><\/pre>\n<h3>\ud83d\udd27 \u0427\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u0438<\/h3>\n<p>&#8212; \u0421\u043e\u0437\u0434\u0430\u043b\u0438 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440 <code>@TestCase(name, meta)<\/code> \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430<br \/>&#8212; \u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 <code>@Feature<\/code> \u0438 <code>@Severity<\/code><br \/>&#8212; \u041d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 <code>runTest()<\/code> \u2014 \u0430\u0434\u0430\u043f\u0442\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0432 <code>test()<\/code><\/p>\n<pre><code class=\"typescript\">export function runTest(clazz) {   const instance = new clazz()   const proto = Object.getPrototypeOf(instance)    for (const key of Object.getOwnPropertyNames(proto)) {     const method = proto[key]     const meta = Reflect.getMetadata('testcase', instance, key)      if (typeof method === 'function' &amp;&amp; meta) {       test(meta.name, async () =&gt; {         if (meta.id) await label('AS_ID', meta.id)         if (meta.severity) await severity(meta.severity)         await method.call(instance)       })     }   } }<\/code><\/pre>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432 \u0441\u0442\u0438\u043b\u0435 Scenax<\/h3>\n<pre><code class=\"typescript\">@Feature('\u041f\u0440\u043e\u0444\u0438\u043b\u044c') class ProfileTest {   @TestCase('\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f', { id: 'API-103', severity: 'normal' })   async checkName() {     const res = await step('GET \/profile', () =&gt; api.getProfile())     expect(res.data.name).toBe('\u0418\u0432\u0430\u043d')   }    @TestCase('\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 email')   async checkEmail() {     const res = await step('GET \/profile', () =&gt; api.getProfile())     expect(res.data.email).toMatch(\/@example\\.com\/)   } }  runTest(ProfileTest)<\/code><\/pre>\n<h3>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u043b\u0430\u0441\u0441 \u0432 Scenax?<\/h3>\n<p>\u041a\u043b\u0430\u0441\u0441 \u0432 <code>Scenax<\/code> \u2014 \u044d\u0442\u043e <strong>\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u0430\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0430<\/strong>, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 <strong>\u0431\u0438\u0437\u043d\u0435\u0441-\u0444\u0438\u0447\u0438<\/strong> \u0438\u043b\u0438 <strong>\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430<\/strong>.<\/p>\n<p>\u0412 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<br \/>&#8212; \u042d\u0442\u043e <strong>\u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/strong> \u2014 \u044d\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438\u044f<br \/>&#8212; \u041e\u043d \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0442\u0435\u0441\u0442-\u043a\u0435\u0439\u0441\u044b \u043f\u043e \u043b\u043e\u0433\u0438\u043a\u0435, \u0430 \u043d\u0435 \u043f\u043e \u0442\u0438\u043f\u0443<br \/>&#8212; \u041e\u043d \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439 \u0432 Allure-\u043e\u0442\u0447\u0451\u0442\u0435, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435<\/p>\n<h4>\u0424\u0438\u0447\u0430 \u0438\u043b\u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c?<\/h4>\n<p>\u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u2014 <strong>\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c<\/strong>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <code>ProfileTest<\/code>, <code>AuthFlow<\/code>, <code>PaymentChecks<\/code>.  <\/p>\n<p>\u041d\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 <strong>\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u0430 \u0442\u0435\u0441\u0442\u043e\u0432<\/strong>: <code>RegressionSuite<\/code>, <code>MobileAPITests<\/code>, <code>UnauthorizedFlows<\/code>.<\/p>\n<h4>\u0427\u0442\u043e \u043c\u043e\u0436\u043d\u043e &#171;\u043f\u043e\u0432\u0435\u0441\u0438\u0442\u044c&#187; \u043d\u0430 \u043a\u043b\u0430\u0441\u0441?<\/h4>\n<p><code>@Feature('Profile')<\/code>\u2014 \u043d\u0430 \u043a\u043b\u0430\u0441\u0441, &#171;\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0437\u043d\u0435\u0441 \u0444\u0438\u0447\u0438&#187;<br \/><code>@Suite('API')<\/code> \u2014  \u043d\u0430 \u043a\u043b\u0430\u0441\u0441, &#171;\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0432 Allure&#187;<br \/><code>@ParentSuite('E2E')<\/code> \u2014  \u043d\u0430 \u043a\u043b\u0430\u0441\u0441, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 &#171;\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f (UI, e2e, regression \u0438 \u0442.\u043f.)&#187;<br \/><code>@Layer('e2e')<\/code> \u2014  \u043d\u0430 \u043a\u043b\u0430\u0441\u0441, &#171;\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0439 \u0441\u043b\u043e\u0439&#187;<br \/><code>@Context()<\/code>   \u2014  \u043d\u0430 \u043f\u043e\u043b\u0435, &#171;\u041f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 shared state \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432&#187;<br \/><code>@Inject()<\/code>  \u2014  \u043d\u0430 \u043f\u043e\u043b\u0435, &#171;\u0412\u043d\u0435\u0434\u0440\u044f\u0435\u0442 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 step-\u043a\u043b\u0430\u0441\u0441\u044b&#187;<\/p>\n<h4>\u041a\u043b\u0430\u0441\u0441 \u2014 \u044d\u0442\u043e:<\/h4>\n<ul>\n<li>\n<p><strong>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0442\u0435\u0441\u0442\u043e\u0432<\/strong> \u0441 \u0435\u0434\u0438\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435\u0439\u043c\u0441\u043f\u0435\u0439\u0441<\/strong>, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c <code>Feature<\/code>, <code>Suite<\/code>, <code>Layer<\/code><\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430<\/strong> \u0434\u043b\u044f Lifecycle-\u0445\u0443\u043a\u043e\u0432 (<code>@BeforeAll<\/code>, <code>@Setup<\/code>, <code>@Teardown<\/code>)<\/p>\n<\/li>\n<li>\n<p><strong>\u0415\u0434\u0438\u043d\u0438\u0446\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0432 Allure \u043a\u0430\u043a \u043c\u043e\u0434\u0443\u043b\u044c<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p>\ud83d\udca1 \u041a\u043b\u0430\u0441\u0441 \u0434\u0435\u043b\u0430\u0435\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0442\u0435\u0441\u0442\u043e\u0432 \u044f\u0432\u043d\u043e\u0439, \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e\u0439 \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0439<\/p>\n<\/blockquote>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u044b?<\/h3>\n<p>\u0412\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u0447\u0438\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<ul>\n<li>\n<p>\u0412\u043e<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-461686","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/461686","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=461686"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/461686\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=461686"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=461686"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=461686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}