★ wanayoo — archive 1999 https://github.com/allure-framework/allure2/issues/1123Nouvelle recherche | Portail wanayoo
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In pytest,when class have doc,allure report setup no png #1123

Open
landhu opened this issue Aug 24, 2020 · 0 comments
Open

In pytest,when class have doc,allure report setup no png #1123

landhu opened this issue Aug 24, 2020 · 0 comments
Labels

Comments

@landhu
Copy link

@landhu landhu commented Aug 24, 2020

In pytest,when class have doc,allure report setup no png

Steps to reproduce the behavior:

  1. pytest use unittest fixture
  2. In Testclass,use doc, like this
    class testBB(DdTestCase):
    """adfda"""
  3. In setupclass, raise failed and attach png,like this
    @classmethod
    def setUpClass(cls):
    try:
    cls.driver = webdriver.Chrome()
    cls.driver.maximize_window()
    cls.driver.get("http://www.google.com")
    # cls.driver.find_element_by_id("user-login")
    aa = 1/0
    cls.setup_resource()
    except Exception as e:
    cls.driver.get_screenshot_as_file("data/qq.png")
    allure.attach.file(name="setupFailed", source="data/qq.png", attachment_type=allure.attachment_type.PNG)
    cls.driver.quit()
    raise e
  4. use allure serve to see report,but did't see setupFailed png

Environment (please complete the following information):

Allure version 2.13.5
Test framework
Python 3.6.2, pytest-5.4.3, py-1.9.0, pluggy-0.13.1
plugins: allure-pytest-2.8.16, pspec-0.0.4
@landhu landhu added the type:bug label Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.