Bird
0
0

Which of the following is the correct syntax to run a regression test suite in Python using pytest?

easy📝 Conceptual Q3 of 15
Testing Fundamentals - Testing Types and Levels

Which of the following is the correct syntax to run a regression test suite in Python using pytest?

Apytest -m regression
Bpytest --regression
Cpytest --run regression
Dpytest regression
Step-by-Step Solution
Solution:
  1. Step 1: Recall pytest marker usage

    Pytest uses '-m' to select tests by marker name like 'regression'.
  2. Step 2: Check options

    Only '-m regression' is valid syntax to run regression tests.
  3. Final Answer:

    pytest -m regression -> Option A
  4. Quick Check:

    Pytest marker run = pytest -m [OK]
Quick Trick: Use '-m' to run marked tests in pytest [OK]
Common Mistakes:
  • Using invalid flags
  • Omitting '-m' for markers
  • Passing arguments without dashes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Testing Fundamentals Quizzes