Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
target/
.allure/
.idea/
*.iml
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Задание 2. Автотесты для API Stellar Burgers

Maven-проект с API-автотестами для Stellar Burgers.

Покрыты сценарии:
- создание пользователя;
- логин пользователя;
- создание заказа.

В проекте используются JUnit 4, REST Assured и Allure.

## Запуск тестов

```shell
mvn clean test
```

## Allure-отчёт

Сгенерированный статический отчёт лежит в папке `allure-report`.

Для генерации нового отчёта:

```shell
mvn allure:serve
```
58 changes: 58 additions & 0 deletions allure-report/allure-maven.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<!DOCTYPE html>


<!--
| Generated by Apache Maven Doxia Site Renderer 2.0.0 from io.qameta.allure:allure-maven:2.15.2:report at 2026-08-30
| Rendered using Apache Maven Fluido Skin 2.0.0-M9
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="generator" content="Apache Maven Doxia Site Renderer 2.0.0" />
<title>Allure – stellar-burgers-api-tests</title>
<link rel="stylesheet" href="./css/apache-maven-fluido-2.0.0-M9.min.css" />
<link rel="stylesheet" href="./css/site.css" />
<link rel="stylesheet" href="./css/print.css" media="print" />
<script src="./js/apache-maven-fluido-2.0.0-M9.min.js"></script>
</head>
<body>
<div class="container container-top">
<header>
<div id="banner">
<div class="pull-left"><div id="bannerLeft"><h1>stellar-burgers-api-tests</h1></div></div>
<div class="pull-right"></div>
<div class="clear"><hr/></div>
</div>

<div id="breadcrumbs">
<ul class="breadcrumb">
<li id="publishDate">Last Published: 2026-08-30<span class="divider">|</span>
</li>
<li id="projectVersion">Version: 1.0-SNAPSHOT</li>
<li class="pull-right"><a href="${project.url}">stellar-burgers-api-tests</a></li>
</ul>
</div>
</header>
<main id="bodyColumn">
<br /><meta http-equiv="refresh" content="0;url=allure-maven-plugin\index.html" /><a href="allure-maven-plugin\index.html">
</main>
</div>
<hr/>
<footer>
<div class="container">
<div class="row">
<p>© 2026
</p>
</div>
<p id="poweredBy" class="pull-right"><a href="https://maven.apache.org/" class="builtBy" target="_blank"><img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /></a>
</p>
</div>
</footer>
<script>
if(anchors) {
anchors.add();
}
</script>
</body>
</html>
2 changes: 2 additions & 0 deletions allure-report/app.js

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions allure-report/css/apache-maven-fluido-2.0.0-M9.min.css

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions allure-report/css/print.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

#banner,
#footer,
#leftcol,
#breadcrumbs,
.docs #toc,
.docs .courtesylinks,
#leftColumn,
#navColumn {
display: none !important;
}

#bodyColumn,
body.docs div.docs {
margin: 0 !important;
border: none !important;
}
1 change: 1 addition & 0 deletions allure-report/css/site.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* You can override this file with your own styles */
17 changes: 17 additions & 0 deletions allure-report/data/attachments/2508417b8aca23cb.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<div>DELETE to https://stellarburgers.education-services.ru/api/auth/user</div>


<h4>Headers</h4>
<div>
<div>Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjZhOTQwYTE1OTg0MjcwMDAxYmVjZTgyOCIsImlhdCI6MTc4ODA4NjgwNSwiZXhwIjoxNzg4MDg4MDA1fQ.eSCFzm1ETdzwbN1-GmA1dfzlNBEs7Tx2goyIy2ToqmE</div>
<div>Accept: */*</div>
<div>Content-Type: application/json</div>
</div>



<h4>Curl</h4>
<div>
curl -v -X DELETE &#39;https://stellarburgers.education-services.ru/api/auth/user&#39; -H &#39;Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjZhOTQwYTE1OTg0MjcwMDAxYmVjZTgyOCIsImlhdCI6MTc4ODA4NjgwNSwiZXhwIjoxNzg4MDg4MDA1fQ.eSCFzm1ETdzwbN1-GmA1dfzlNBEs7Tx2goyIy2ToqmE&#39; -H &#39;Accept: */*&#39; -H &#39;Content-Type: application/json&#39;
</div>

17 changes: 17 additions & 0 deletions allure-report/data/attachments/2de6a7c9acceeff5.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<div>DELETE to https://stellarburgers.education-services.ru/api/auth/user</div>


<h4>Headers</h4>
<div>
<div>Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjZhOTQwYTE4OTg0MjcwMDAxYmVjZTgyZSIsImlhdCI6MTc4ODA4NjgwOCwiZXhwIjoxNzg4MDg4MDA4fQ.uAs62r1EmIY2PSFFuh3DqehihBx9YOzLMO_LBM13N3s</div>
<div>Accept: */*</div>
<div>Content-Type: application/json</div>
</div>



<h4>Curl</h4>
<div>
curl -v -X DELETE &#39;https://stellarburgers.education-services.ru/api/auth/user&#39; -H &#39;Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjZhOTQwYTE4OTg0MjcwMDAxYmVjZTgyZSIsImlhdCI6MTc4ODA4NjgwOCwiZXhwIjoxNzg4MDg4MDA4fQ.uAs62r1EmIY2PSFFuh3DqehihBx9YOzLMO_LBM13N3s&#39; -H &#39;Accept: */*&#39; -H &#39;Content-Type: application/json&#39;
</div>

30 changes: 30 additions & 0 deletions allure-report/data/attachments/3f2573cdec6cb84d.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<div>POST to https://stellarburgers.education-services.ru/api/orders</div>

<h4>Body</h4>
<div>
<pre class="preformated-text">
{
&quot;ingredients&quot;: [
&quot;not-a-valid-ingredient-hash&quot;
]
} </pre>
</div>

<h4>Headers</h4>
<div>
<div>Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjZhOTQwYTE1OTg0MjcwMDAxYmVjZTgyOCIsImlhdCI6MTc4ODA4NjgwNSwiZXhwIjoxNzg4MDg4MDA1fQ.eSCFzm1ETdzwbN1-GmA1dfzlNBEs7Tx2goyIy2ToqmE</div>
<div>Accept: */*</div>
<div>Content-Type: application/json</div>
</div>



<h4>Curl</h4>
<div>
curl -v -X POST &#39;https://stellarburgers.education-services.ru/api/orders&#39; -H &#39;Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjZhOTQwYTE1OTg0MjcwMDAxYmVjZTgyOCIsImlhdCI6MTc4ODA4NjgwNSwiZXhwIjoxNzg4MDg4MDA1fQ.eSCFzm1ETdzwbN1-GmA1dfzlNBEs7Tx2goyIy2ToqmE&#39; -H &#39;Accept: */*&#39; -H &#39;Content-Type: application/json&#39; -d &#39;{
&quot;ingredients&quot;: [
&quot;not-a-valid-ingredient-hash&quot;
]
}&#39;
</div>

29 changes: 29 additions & 0 deletions allure-report/data/attachments/3fcb9e285121672c.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<div>POST to https://stellarburgers.education-services.ru/api/auth/register</div>

<h4>Body</h4>
<div>
<pre class="preformated-text">
{
&quot;email&quot;: &quot;stellar-0d050611-78c3-414f-8b6c-594459f5762c@example.test&quot;,
&quot;password&quot;: &quot;password123&quot;,
&quot;name&quot;: &quot;Test Astronaut&quot;
} </pre>
</div>

<h4>Headers</h4>
<div>
<div>Accept: */*</div>
<div>Content-Type: application/json</div>
</div>



<h4>Curl</h4>
<div>
curl -v -X POST &#39;https://stellarburgers.education-services.ru/api/auth/register&#39; -H &#39;Accept: */*&#39; -H &#39;Content-Type: application/json&#39; -d &#39;{
&quot;email&quot;: &quot;stellar-0d050611-78c3-414f-8b6c-594459f5762c@example.test&quot;,
&quot;password&quot;: &quot;password123&quot;,
&quot;name&quot;: &quot;Test Astronaut&quot;
}&#39;
</div>

29 changes: 29 additions & 0 deletions allure-report/data/attachments/40e0ec2360b4a678.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<div>POST to https://stellarburgers.education-services.ru/api/auth/register</div>

<h4>Body</h4>
<div>
<pre class="preformated-text">
{
&quot;email&quot;: &quot;stellar-3862f5d3-b325-428a-b3ed-df781a94a145@example.test&quot;,
&quot;password&quot;: &quot;password123&quot;,
&quot;name&quot;: &quot;Test Astronaut&quot;
} </pre>
</div>

<h4>Headers</h4>
<div>
<div>Accept: */*</div>
<div>Content-Type: application/json</div>
</div>



<h4>Curl</h4>
<div>
curl -v -X POST &#39;https://stellarburgers.education-services.ru/api/auth/register&#39; -H &#39;Accept: */*&#39; -H &#39;Content-Type: application/json&#39; -d &#39;{
&quot;email&quot;: &quot;stellar-3862f5d3-b325-428a-b3ed-df781a94a145@example.test&quot;,
&quot;password&quot;: &quot;password123&quot;,
&quot;name&quot;: &quot;Test Astronaut&quot;
}&#39;
</div>

70 changes: 70 additions & 0 deletions allure-report/data/attachments/44889a0f519bcb0d.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<div>Status code 200 </div>


<h4>Body</h4>
<div>
<pre class="preformated-text">
{
&quot;success&quot;: true,
&quot;name&quot;: &quot;Флюоресцентный бессмертный бургер&quot;,
&quot;order&quot;: {
&quot;ingredients&quot;: [
{
&quot;_id&quot;: &quot;61c0c5a71d1f82001bdaaa6d&quot;,
&quot;name&quot;: &quot;Флюоресцентная булка R2-D3&quot;,
&quot;type&quot;: &quot;bun&quot;,
&quot;proteins&quot;: 44,
&quot;fat&quot;: 26,
&quot;carbohydrates&quot;: 85,
&quot;calories&quot;: 643,
&quot;price&quot;: 988,
&quot;image&quot;: &quot;https://code.s3.yandex.net/react/code/bun-01.png&quot;,
&quot;image_mobile&quot;: &quot;https://code.s3.yandex.net/react/code/bun-01-mobile.png&quot;,
&quot;image_large&quot;: &quot;https://code.s3.yandex.net/react/code/bun-01-large.png&quot;,
&quot;__v&quot;: 0
},
{
&quot;_id&quot;: &quot;61c0c5a71d1f82001bdaaa6f&quot;,
&quot;name&quot;: &quot;Мясо бессмертных моллюсков Protostomia&quot;,
&quot;type&quot;: &quot;main&quot;,
&quot;proteins&quot;: 433,
&quot;fat&quot;: 244,
&quot;carbohydrates&quot;: 33,
&quot;calories&quot;: 420,
&quot;price&quot;: 1337,
&quot;image&quot;: &quot;https://code.s3.yandex.net/react/code/meat-02.png&quot;,
&quot;image_mobile&quot;: &quot;https://code.s3.yandex.net/react/code/meat-02-mobile.png&quot;,
&quot;image_large&quot;: &quot;https://code.s3.yandex.net/react/code/meat-02-large.png&quot;,
&quot;__v&quot;: 0
}
],
&quot;_id&quot;: &quot;6a940a0f984270001bece825&quot;,
&quot;owner&quot;: {
&quot;name&quot;: &quot;Test Astronaut&quot;,
&quot;email&quot;: &quot;stellar-a3511f57-3f84-423d-a329-1b1094b4e0f7@example.test&quot;,
&quot;createdAt&quot;: &quot;2026-08-30T10:46:38.767Z&quot;,
&quot;updatedAt&quot;: &quot;2026-08-30T10:46:38.767Z&quot;
},
&quot;status&quot;: &quot;done&quot;,
&quot;name&quot;: &quot;Флюоресцентный бессмертный бургер&quot;,
&quot;createdAt&quot;: &quot;2026-08-30T10:46:39.388Z&quot;,
&quot;updatedAt&quot;: &quot;2026-08-30T10:46:41.754Z&quot;,
&quot;number&quot;: 399524,
&quot;price&quot;: 2325
}
} </pre>
</div>

<h4>Headers</h4>
<div>
<div>Server: nginx/1.24.0 (Ubuntu)</div>
<div>Access-Control-Allow-Origin: *</div>
<div>ETag: W/&quot;524-qmU4XPDdIAZUzVOBCJZmr1MN2dY&quot;</div>
<div>Connection: keep-alive</div>
<div>Content-Length: 1316</div>
<div>Date: Sun, 30 Aug 2026 10:46:43 GMT</div>
<div>Content-Type: application/json; charset=utf-8</div>
<div>X-Powered-By: Express</div>
</div>


27 changes: 27 additions & 0 deletions allure-report/data/attachments/44a1eb7abe560d85.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<div>POST to https://stellarburgers.education-services.ru/api/auth/register</div>

<h4>Body</h4>
<div>
<pre class="preformated-text">
{
&quot;email&quot;: &quot;missing-5a93bf0c-9785-475f-b78b-5e1c31c6abec@example.test&quot;,
&quot;name&quot;: &quot;Test Astronaut&quot;
} </pre>
</div>

<h4>Headers</h4>
<div>
<div>Accept: */*</div>
<div>Content-Type: application/json</div>
</div>



<h4>Curl</h4>
<div>
curl -v -X POST &#39;https://stellarburgers.education-services.ru/api/auth/register&#39; -H &#39;Accept: */*&#39; -H &#39;Content-Type: application/json&#39; -d &#39;{
&quot;email&quot;: &quot;missing-5a93bf0c-9785-475f-b78b-5e1c31c6abec@example.test&quot;,
&quot;name&quot;: &quot;Test Astronaut&quot;
}&#39;
</div>

25 changes: 25 additions & 0 deletions allure-report/data/attachments/44c076992d48add9.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<div>Status code 401 </div>


<h4>Body</h4>
<div>
<pre class="preformated-text">
{
&quot;success&quot;: false,
&quot;message&quot;: &quot;email or password are incorrect&quot;
} </pre>
</div>

<h4>Headers</h4>
<div>
<div>Server: nginx/1.24.0 (Ubuntu)</div>
<div>Access-Control-Allow-Origin: *</div>
<div>ETag: W/&quot;3d-ad9nrqlzQBuoZ0AId1U3rIgKU84&quot;</div>
<div>Connection: keep-alive</div>
<div>Content-Length: 61</div>
<div>Date: Sun, 30 Aug 2026 10:46:50 GMT</div>
<div>Content-Type: application/json; charset=utf-8</div>
<div>X-Powered-By: Express</div>
</div>


Loading