zaelcovsky / skvot_boardshop_UI_project

The project is a part of graduation work of QA.GURU Python automation course

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"SKVOT" BOARDSHOP UI TESTING PROJECT

Used stack

Content

Description

Tests are developed using Python programming language, Selene and PyTest frameworks. Reports are generated by Allure Report. Test reports are also sent by Telegram Bot if you launch tests using Jenkins.
In this project we check the following:

  • Products' search.
  • Opening of desired products' category.
  • Sorting of products.
  • Checking that product name and product price in products list are the same as on the product description page.
  • Adding the product to cart.
  • Clearing the cart.

Tests launch

Local launch

Preparing the environment

Before launch, you need to install the following (installation guide links are provided):

Also, download the repository with this project on your PC/laptop:

  • Click on "<> Code" on the project page.
  • In the opened pop-up menu click on "Download ZIP".
  • Download it to preferred directory and unpack downloaded archive there.

Launch

Open any downloaded project's file in PyCharm (right click on file -> Edit with PyCharm). There will be the following window:

Click on Open in Project. After that there will be a following window:

Click on Trust Project.
Open a terminal in the opened PyCharm window by clicking on terminal button. The button locates at the bottom of the left sidebar as shown in the following figure:

The terminal will open in the bottom of PyCharm as shown in the following figure:

Launch tests using the following command:

pytest --remote=off

After running the command, Google Chrome will open and tests will start. Tests process is provided below:

After the last step of tests (clearing the cart), browser will close. There will be tests result line in terminal when tests will finish. Its example:

Generating a test report

Tests report is generated by Allure Report. To check it, run the following command after tests:

allure serve allure-results

After that, your system's default browser will open and there will be a generated report.

Tests options

By default, tests' options:

  • "Volcom" search request.
  • Launch on Selenoid server.
  • Google Chrome browser.
  • "Скейтбординг" category.
  • "Деки скейтовые" products' category.
  • "Сначала дешевое" products' sorting.

Also, you can set the options on tests using the following parameters in command line:

  • --search sets search request for search checking.
  • --category sets category that will be opened from "Весь каталог".
  • --product sets products' category that will be selected on products' list page.
  • --sort sets sorting of products.
  • --browser sets browser that will be used for tests. There is two options: chrome or firefox.
  • --remote sets tests launch locally or on Selenoid server. This mode can be turned on in Jenkins only. You can check tests process on the Selenoid server only.
  • --browser_version sets browser version on Selenoid server. For Mozilla Firefox there are 97.0 and 98.0 versions. For Google Chrome there are 99.0 and 100.0 versions. By default, browser version is 100.0 for Google Chrome. If you set incorrect browser version, there will be one of the following error messages:

For Mozilla Firefox:

Choose one of the following versions: 97.0 or 98.0.

For Google Chrome:

Choose one of the following versions: 99.0 or 100.0.

For example, if you want to open "Сноубординг" category, select "Крепления" products' category, sort by "сначала дорогое" and launch it locally, run the following command in command line:

pytest --remote=off --category="Сноубординг" --product="Крепления для сноуборда" --sort="сначала дорогое" .

Its command's tests process is provided below:

Options conflicts

It's OK if you don't set any option from command line because default values are already set (described above). But if you will set conflict options, tests will fail.

For example, if you set "Скейтбординг" category and "Крепления для сноуборда" products' category. There is no "Крепления" products' category in "Скейтбординг". That's why test will fail.

Launch using Jenkins

Open this project on Jenkins. The project's page example is provided below.

Click on "Build with parameters".

There will be the following parameters on the opened page:

  • SEARCH sets search request for search checking.
  • BROWSER_NAME sets browser that will be used for tests.
  • BROWSER_VERSION sets browser version. For Mozilla Firefox there are 97.0 and 98.0 versions. For Google Chrome there are 99.0 and 100.0 versions.
  • SORTING sets sorting of products.
  • CATEGORY sets category that will be opened from "Весь каталог".
  • PRODUCT_CATEGORY sets products' category that will be selected on products' list page.

NOTE: Don't set conflict options!

The parameters' settings page window is provided below.

Click on "Build" button after choosing desired parameters. You will be redirected back on project's page after clicking on "Build". There will be a new build below "Build History" title as shown in the following figure:

Build's status will change when tests will finish. And there will appear TestOps and Allure reports as shown in the following figure:

Tests results

TestOps report

Go to Jenkins project's page. Click on in one of successful builds. Tests report is provided below:

Allure report

If you generate report locally, follow the instruction. If you generate it on Jenkins, click on in one of successful builds. Tests report from Jenkins is provided below:

There will not be TREND in the report if you generate report locally. It will be in Jenkins only.

Telegram notification

After Jenkins' build will finish, Telegram Bot will send a notification with test results to Telegram chat. The chat is private. It is only for tests developer and responsible members. The notification is provided below:

Integration with Jira

Test results are also available in the corresponding Jira task as shown in the following figure:

About

The project is a part of graduation work of QA.GURU Python automation course


Languages

Language:Python 100.0%