Jenkins构建报错

来源:13-2 项目配置

没有昵称可用___

2022-05-19

jenkins构建后报:
Started by user admin
Running as SYSTEM
Building in workspace /Users/soushichao/Documents/workspace/py/jiekou/day1/ddt
[ddt] $ /bin/sh -xe /var/folders/ht/4jh4j5yx36n90rj1n865m73m0000gn/T/jenkins1243682121615477213.sh

  • python test_run/Run_test.py
    E test1 (unittest.loader.ModuleImportFailure)
    …/report/
    Traceback (most recent call last):
    File “test_run/Run_test.py”, line 24, in
    html_test_runner.run(suite)
    File “/Users/soushichao/Documents/workspace/py/venv/lib/python3.8/site-packages/HTMLTextTestRunner.py”, line 631, in run
    self.generateReport(test, result)
    File “/Users/soushichao/Documents/workspace/py/venv/lib/python3.8/site-packages/HTMLTextTestRunner.py”, line 679, in generateReport
    report = self._generate_report(result)
    File “/Users/soushichao/Documents/workspace/py/venv/lib/python3.8/site-packages/HTMLTextTestRunner.py”, line 743, in _generate_report
    self._generate_report_test(rows, cid, tid, n, t, o, e)
    File “/Users/soushichao/Documents/workspace/py/venv/lib/python3.8/site-packages/HTMLTextTestRunner.py”, line 789, in _generate_report_test
    status = self.STATUS[n],
    UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe6 in position 268: ordinal not in range(128)
    Build step ‘Execute shell’ marked build as failure
    Finished: FAILURE
写回答

1回答

Mushishi

2022-05-19

你这是htmltestrunner python3 没解决乱码问题啊

0
13
Mushishi
回复
没有昵称可用___
你报告模块得名字错误了啊。如果你没改里面得名字的话,默认应该是HTMLTestRunner 但是你导入得是import HTMLTextTestRunner
2022-05-29
共13条回复

Python接口自动化测试框架实战 从设计到开发

接口自动化测试框架的设计与开发,并教你如何开发桩服务

1720 学习 · 831 问题

查看课程