Skip to main content

Report for unittest

Project description

#Introduction

    Based on TheRuffianReport development,
     new assertion failure screenshot,
      screenshot display and DingTalk function

#Installing pip install TheRuffianReport python≥3.0

#Author bugpz2779@gmail.com

#Function Introduction

 # screenshot
import unittest
from selenium import webdriver

from TheRuffianReport.HTMLTestRunner import failure_monitor


class Test_demo(unittest.TestCase):
    def setUp(self) -> None:
        self.driver = webdriver.Chrome()
        self.failureException = failure_monitor(self, 'images')
        self.driver.get('https://www.baidu.com')

    def test_baidu(self):
        self.driver.find_element('id', 'kw').send_keys('python')
        self.driver.find_element('id', 'su').click()
        self.assertEqual(self.driver.find_element('id', 'kw').get_attribute('value'), 'selenium')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

TheRuffianReport-1.0.1.tar.gz (12.4 kB view hashes)

Uploaded Source

Built Distribution

TheRuffianReport-1.0.1-py3-none-any.whl (12.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page