In this article, Yina Mou explains how Jenkins CI can be used to automate build, deploy and test Convertigo projects.
The Jenkins CI plugin
Jenkins CI is used for Building/testing software projects continuously. In a nutshell, Jenkins provides an easy-to-use so-called continuous integration system, making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. The automated, continuous build increases the productivity. Jenkins uses plugins to extend functionalities, so we developed a new Jenkins Plugin to integrate Convertigo with Jenkins. Get more information on wiki.jenkins-ci.org.Installing the Plugin
- To install the plugin, download it from here .. ConvertigoPluginArtifact-1.0.hpi Then, manage Jenkins and follow these steps :
- 1) Upload the Plugin to jenkins. Choose the .HPI file you downloaded.
- 3) Select the ConvertigoPluginArtifact.hpi
- 4) Click the Upload button
- 5) Seet that the plugin is installed
Using the Plugin
-
Configure SCM
-
Link to Convertigo Q&A Server
- The first part is to link the Plugin to a Convertigo Q&A server. This can be any Convertigo Standard Edition Server, installed and up and running. Give in this section the server’s URL and admin console credentials. (Usually admin/admin).
-
Configure Build options
-
Using Test Cases
- When the “Enable test” option is checked you will have the opportunity to select the project you want to test in the drop down list (Warning, this box can take some time to fillup…)
- (S)project.sequences.testcase for sequence testcases or
- (T)project.connector.transaction.testcase for transactions
Now in the Assert window you will be able to write your assertions this way:
Assert ok <My Xpath ok 1> <My Xpath ok 2> ... <My Xpath ok 3> Assert nok <My Xpath not ok 1> <My Xpath not ok 2> <My Xpath not ok 3>To have this test case to be a success:
- you must have all the <my Xpath ok> to match
- and none of the <xpath not ok> to match.
- You can add as many test cases from any project for this Jenkins step you want. By clicking on “Add test case”
Using test results
Convertigo Jenkins Plugin will generate a .xml file in the /TestReports directory. This is a standard Junit XML test format that can be read by any other Jenkins Plugin.- For example configure in the Post build step the Result reader
- When you run a Jenkins Build you can see in the Console the plugin execution
- And the test results .