A
A
aleksandrovvolk2019-01-28 22:26:34
Python
aleksandrovvolk, 2019-01-28 22:26:34

I use Python + Selenium webdriver + unittest framework. IDE: PyCharm. How to properly connect Allure in my case and start the report assembly?

I will leave part of my code for testing the calculator:

import unittest
import allure
from selenium import webdriver
import dop

class Testing(unittest.TestCase):
    def setUp(self):
        executable_path = "C:\Python37-32\chromedriver_win32\chromedriver.exe"
        self.driver = webdriver.Chrome(executable_path)
        self.driver.get('http://XXXXXX')
        # self.driver.maximize_window()
        # self.driver.implicitly_wait(10)

    @allure.feature('Feature1')
    @allure.story('Story1')
    # Check first
    def test_is_button_1_valid(self):
        dop.check_button("/html/body/div[@class='buttons']/ul[@class='digits']/li[7]", "1", self)
        dop.check_input_field("1", self, False)

    def tearDown(self):
        self.driver.quit()


if __name__ == "__main__":
    unittest.main()

PS I tried to make something myself, but after dozens of unsuccessful attempts, I decided to ask for help... Junior

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kostya_KD, 2019-01-29
@Kostya_KD

install pytest-allure-adaptor
use pytest to run tests
here for more details: https://qaboy.com/2018/01/08/setup-test-reports-se...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question