Bird
0
0

Which Jenkins Pipeline step correctly executes a Selenium Python test file named login_test.py?

easy📝 Syntax Q3 of 15
Selenium Python - CI/CD Integration
Which Jenkins Pipeline step correctly executes a Selenium Python test file named login_test.py?
Abat 'run login_test.py'
Bsh 'python3 login_test.py'
Cexecute 'selenium login_test.py'
Drun 'python login_test.py'
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct shell command

    On Unix/Linux agents, Jenkins uses 'sh' to run shell commands.
  2. Step 2: Correct Python command

    Python scripts run with 'python3 scriptname.py' on most systems.
  3. Final Answer:

    sh 'python3 login_test.py' -> Option B
  4. Quick Check:

    Use 'sh' for shell commands on Unix agents [OK]
Quick Trick: Use 'sh' with python3 to run scripts [OK]
Common Mistakes:
  • Using 'bat' on Unix agents
  • Using invalid commands like 'execute' or 'run'
  • Omitting 'python3' or using wrong interpreter

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Selenium Python Quizzes