Bird
0
0

You want Jenkins to run Selenium Python tests only if the code changes affect the tests/ folder. Which Jenkins feature helps achieve this?

hard📝 Workflow Q8 of 15
Selenium Python - CI/CD Integration
You want Jenkins to run Selenium Python tests only if the code changes affect the tests/ folder. Which Jenkins feature helps achieve this?
AScheduling tests to run daily only
BAdding a manual approval step before tests
CRunning tests on every build regardless of changes
DUsing 'when' condition with 'changeset' in Pipeline
Step-by-Step Solution
Solution:
  1. Step 1: Identify Jenkins conditional execution features

    Jenkins Pipeline supports when conditions to control stage execution.
  2. Step 2: Use 'changeset' condition to check folder changes

    Using when { changeset '**/tests/**' } runs tests only if files in tests folder changed.
  3. Final Answer:

    Using 'when' condition with 'changeset' in Pipeline -> Option D
  4. Quick Check:

    Conditional test run = A [OK]
Quick Trick: Use 'when { changeset }' to run stages conditionally [OK]
Common Mistakes:
  • Relying on manual approval instead of automation
  • Running tests every build unnecessarily
  • Using schedule instead of change detection

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Selenium Python Quizzes