Python unittests in Jenkins?

前端 未结 6 600
长情又很酷
长情又很酷 2020-12-07 07:35

How do you get Jenkins to execute python unittest cases? Is it possible to JUnit style XML output from the builtin unittest package?

6条回答
  •  佛祖请我去吃肉
    2020-12-07 08:11

    You can install the unittest-xml-reporting package to add a test runner that generates XML to the built-in unittest.

    We use pytest, which has XML output built in (it's a command line option).

    Either way, executing the unit tests can be done by running a shell command.

提交回复
热议问题