06 Sep Kobiton – Jenkins Integration
What Is Continuous Integration
• Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.
• Jenkins, the leading open source automation server, Jenkins provides hundreds of plugins to support building, deploying and automating any project. It is written in the Java programming language for testing and reporting on isolated changes in a large code base in real time. The software enables developers to find and solve defects in a code base rapidly and to automate testing of their builds.
- CI tool is installed and set up properly. In this example, we will use Jenkins, which is a popular CI and easy to integrate with.
- NodeJS is installed from your Mac or installed through Jenkins Plugin Manager.
- Create a New item in Jenkins
- Enter job name (e.g “Kobiton Jenkins Integration Tests”), and then choose “Pipeline”
- Select “Configure” for “Kobiton Jenkins Integration Tests” job
- Check “
- Add String Parameter KOBITON_USERNAME and enter your name as the default value
- Add String Parameter KOBITON_API_KEY and enter your apiKey as the default value
- In the Pipeline part, we choose pipeline script
- Copy the script below and paste into Pipeline script
- We will use Kobiton Samples at https://github.com/kobiton/samples.git to integration with Jenkins Pipeline.
- It will fetch the source code from Github and install node_modules at your Mac
- We will have 4 test cases and run with NodeJS language
- Execute Android web testing
- Execute iOS web testing
- Execute Android app testing
- Execute iOS app testing
- Select “Build with Parameters”
- Then, click the Build button
- We can view the result through Jenkins Console Output
- Select the latest build in Build History
- Select Console Output
- Or access https://portal.kobiton.com/sessions to get your test sessions