Testing Questions and Answers
Practice ModeShowing 10 of 25 questions
Q21
Which decorator in pytest is used to parametrize tests?
Answer: Option C
Explanation: It allows running a test with different data sets.
Q22
Which command is used to install pytest?
Answer: Option C
Explanation: Most Python packages are installed using pip.
Q23
In unittest, which method checks if two items are not equal?
Answer: Option B
Explanation: It is the opposite of assertEqual().
Q24
Which of the following are integration tests mainly focused on?
Answer: Option B
Explanation: Integration tests check combined components' functioning.
Q25
What type of testing ensures that new changes do not break existing functionality?
Answer: Option B
Explanation: The goal is to confirm old features still work properly.