WebdriverIO Tests Integration with Jenkins

Image for post
Image for post
https://youtu.be/TpJ0Mh_cfRw

In this post, we’ll take a look at how to get local Jenkins job setup and integrate it with WebdriverIO tests.

Prerequisite

  • Install Jenkins locally — you can watch this video to learn how to do that.
  • Publish your code to Github (or any other source code management tool)

Setup a new Job

Once Jenkins is installed, do the following to set up a new job:

  1. Click on ‘Create a job’
  2. Create a new ‘Freestyle’ project
  3. Source Code Management:
  • Add your test repository URL under the ‘Source Code Management’ section
  • You will also need to add in your credentials to authorize Jenkins to pull changes

4. Build:

  • Select ‘Execute Windows Batch Command’ (or ‘Execute Shell’ for mac users) under the ‘Add build step’ dropdown. In the ‘command’ section add —
  • Select again and add in the next step to run tests -

5. Save changes

Run Build

Click on ‘Build now’ to execute the build and you will see a new build is triggered. Jenkins will pull all your test changes and will begin to execute the tests.

Image for post
Image for post

This was a quick intro on how to get your first build working in Jenkins.

Check out the video below to see a detailed explanation on how to get your Jenkins job setup as well as integrate JUnit reporting to see the test results.

https://youtu.be/TpJ0Mh_cfRw

To learn more about WebdriverIO, check out my free tutorial series here -

https://www.youtube.com/watch?v=e8goAKb6CC0&list=PL6AdzyjjD5HBbt9amjf3wIVMaobb28ZYN.

I hope this post helped you out, let me know in the comments below!

Happy testing! 😄

Follow @automationbro on Twitter for latest updates
Subscribe to my YouTube channel to see more content like this

Written by

I enjoy discussing topics related to Test Automation | Quality Assurance | Web Dev. Check out my Youtube channel — AutomationBro

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store