• 不理解的一点是判断有失败的case的情况后,怎么结合到邮件和Jenkins自动发送的测试报告中😖

  • Author only
  • 在哪个测试环节跑接口自动化?在整个测试过程中一般需要跑多少次?是否测试、预发布和正式环境都要跑呢?

  • 生成HTML报告报错

  • Testing started at 21:17 ...
    C:\Users\anny\PycharmProjects\TestCode\venv\Scripts\python.exe "D:\studysoft\pycharm\PyCharm Community Edition 2018.3.4\helpers\pycharm_jb_pytest_runner.py" --path C:/Users/anny/PycharmProjects/TestCode/src/test_app/test_report11.py
    Launching pytest with arguments C:/Users/anny/PycharmProjects/TestCode/src/test_app/test_report11.py in C:\Users\anny\PycharmProjects\TestCode\src\test_app

    Traceback (most recent call last):
    File "D:\studysoft\pycharm\PyCharm Community Edition 2018.3.4\helpers\pycharm_jb_pytest_runner.py", line 31, in
    pytest.main(args, plugins_to_load)
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages_pytest\config_init.py", line 61, in main
    config = _prepareconfig(args, plugins)
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages_pytest\config__init
    .py", line 196, in _prepareconfig
    pluginmanager=pluginmanager, args=args
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages\pluggy\hooks.py", line 284, in __call
    _
    return self.hookexec(self, self.get_hookimpls(), kwargs)
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages\pluggy\manager.py", line 68, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages\pluggy\manager.py", line 62, in
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages\pluggy\callers.py", line 203, in _multicall
    gen.send(outcome)
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages_pytest\helpconfig.py", line 93, in pytest_cmdline_parse
    config = outcome.get_result()
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages\pluggy\callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages\pluggy\callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages_pytest\config__init
    .py", line 655, in pytest_cmdline_parse
    self.parse(args)
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages_pytest\config__init
    .py", line 841, in parse
    self._preparse(args, addopts=addopts)
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages_pytest\config__init
    .py", line 787, in _preparse
    self.pluginmanager.load_setuptools_entrypoints("pytest11")
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages\pluggy\manager.py", line 276, in load_setuptools_entrypoints
    self.register(plugin, name=ep.name)
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages_pytest\config__init
    _.py", line 311, in register
    ret = super(PytestPluginManager, self).register(plugin, name)
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages\pluggy\manager.py", line 102, in register
    hook._maybe_apply_history(hookimpl)
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages\pluggy\hooks.py", line 331, in _maybe_apply_history
    res = self._hookexec(self, [method], kwargs)
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages\pluggy\manager.py", line 68, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages\pluggy\manager.py", line 62, in
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages\pluggy\callers.py", line 208, in _multicall
    return outcome.get_result()
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages\pluggy\callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages\pluggy\callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
    File "C:\Users\anny\AppData\Local\Programs\Python\Python35\lib\site-packages\allure_pytest\plugin.py", line 44, in pytest_addoption
    severities = [x.value for x in list(allure.severity_level)]
    AttributeError: module 'allure' has no attribute 'severity_level'

    Process finished with exit code 1

    运行时报错,查了很多方式都没解决