How to run Python selenium script in jenkins?

Viewed 3680

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 Answers

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

Related