Skip to content
CodeKruPro

Give the CI server a test report from pytest

QuizEasy-MediumPython only

Jenkins should show pytest results per test, with history and failure details. What do you add to the pytest command?

  • --junitxml=reports/junit.xml, then publish that file (for example with the Jenkins junit step)
  • -v, so the console shows each test
  • --report=jenkins
  • Nothing: Jenkins reads the exit code per test

This question is part of Pro+

Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.

See Pro+

Already have Pro+? Sign in