Run tests in Jenkins automatically after each commit (change)

Go To


I an using jenkins and I would like my tests to run automatically after each commit.

I followed the instructions in the following link:

I clicked Let Jenkins auto-manage hook URLs in global configuearion/ Githup Web Hook and I added my username and password for githup but still after changes and pushing to the repo, my tests do not run!

Github Hook Log: Polling has not run yet.

Is there anything that I forgot?

P.S. I can run my tests manually (Click on Build now) and I can see my commits (changes) when I build my test.

2012-04-04 20:08
by Shahrzad


I would first check if the post-receive URL has really been set by Jenkins. Go to and open Post-Receive URLs

If there is nothing, you could follow the instructions above on how to install the hook yourself.

If the hook is there in, try to click on the Test Hook button. Did it trigger a build?

If the build still does not work, check if there is a firewall in between github and your Jenkins that could prevent from connecting to your jenkins.

More information on debugging github hooks is at

2012-04-04 20:34
by sti
I have http://localhost:8080/github-webhook/ in the Post-Receive URLs but when I click Test Hook, it does not build my tests! Should I run "gem install hook" - Shahrzad 2012-04-04 21:54
I think the problem as you mentioned should be about the firewall! When I click Github Web Hook/Override Hook URL, it says "If your Jenkins runs inside the firewall and not directly reachable from the internet, set up a reverse proxy, port tunneling, and so on so that GitHub can deliver a POST request to your Jenkins at http://localhost:8080/github-webhook/. Then specify the URL that GitHub should POST to here." whats the solution then - Shahrzad 2012-04-04 22:11
The address you configure into Post-Receive URLs cannot have hostname localhost. If you tell Github to notify localhost, it would try to notify itself. Your Jenkins is probably running in your computer, not Github's. You need to have your Jenkins accessible from Github. You need an externally accessible DNS name or IP address for your computer. You need to ask your ISP or network admin about that - sti 2012-04-05 20:08


I have same issue to solve that i add a Poll SCM Builds Triggers and Schedule it for every 2 min H/2 * * * *

2015-09-16 10:42
by Navrattan Yadav