How can I test code before it reaches master?

9 views
Skip to first unread message

Joshua Fox

unread,
Sep 4, 2016, 3:32:55 AM9/4/16
to Jenkins Users
How can we make sure that all unit tests pass before developer code reaches master? Ideally Jenkins would run the tests on an integration branch that is local to the cloud test VM, then merge to master only if all tests pass

Jenkins Pretested Integration Plugin can help, but I'd like to ask: What if a second developer pushes while the tests are running for the first developer? In that case,  the second merger will not reflect the latest master (i.e, with the first developer's changes.). This could allow merger of incorrect code (i.e., code such that the tests would fail), or there might be a failure-to-merge (which the second developer would deal with, but this would cause a big hassle as people trip over each other's commits and try to coordinate waiting for each other. (Waiting around for your turn to push would  make for an inefficient collaboration,)


Using Jenkins 1.6.47 with Git (Bitbucket) and Java TestNG.
Reply all
Reply to author
Forward
0 new messages