3

Could anyone describe the steps to run python selenium test on jenkins. python is created in eclipse on windows machine. I want to run my test every time I build my environment.

Please help me to get this started.

1 Answer 1

1

Make sure you have chromedriver plugin,selenium plugin, Shining panda plugin, installed on your Jenkins(Go to Jenkins>Manage Jenkins> plugin's).

Select the step run shell script from PostBuild actions,

If you are using unittest module for writing your test's then, use the below command

#!/bin/sh
python -m unittest discover --pattern=test_testcasename.py

Please take the reference of the below link https://www.youtube.com/watch?v=nFYsO-xPaE8

Sign up to request clarification or add additional context in comments.

5 Comments

HI kaushik, I have installed all 3 plugins. But there is no option to run shell script. refer: screencast.com/t/b7FpgJIIGz Also where should I store script file so that jenkin can access it.
Hi, under Build steps you can find execute shell option.
I added a video to the to explain steps in detail for you...! Please see if it helps..!!
It ran with a simple command. C: cd C:\Users\Anand\eclipse-workspace\Program\com\intro py Hello.py
Did this fix your issue, @ashishkoli? If so, please mark @kaushik 's answer as correct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.