Short Description
This article is a continuation of my previous one about Ghost Inspector. Here are described available reporting options, as well as, integration of Ghost Inspector with Jenkins for achieving Continues Delivery and Continuous Testing paradigm.
Ghost Inspector Plugin for Jenkins
Ghost Inspector offers you the opportunity to run your Test Suits from Jenkins. For that purpose, there is an official plugin for running Ghost Inspector Tests inside your Jenkins CI build process. First, you need to download ghost-inspector.hpi plugin file. The plugin can be installed from the Jenkins UI.
Steps for plugin installation in Jenkins:
- Navigate to “Manage Jenkins” and then click on “Manage Plugins”.
- After “Manage Plugins” screen is displayed, click on the “Advanced” tab and scroll down till “Upload Plugin” section. Here you will have to upload already downloaded ghost-inspector.hpi plugin file.
Configuring the Ghost Inspector plugin
Since the Ghost Inspector plugin is already installed, you should have a new build step option for running Tests. The next step is to create your Jenkins project.
Open the Project configuration from the Jenkins Dashboard and scroll down to the “Build” section. Click on “Add build step” and select the option “Run Ghost Inspector Test Suite”.
Now you will have to enter your API Key and Suite ID. You can find these values under Test suite and Account settings in your Ghost Inspector account.
At the end save your configuration changes in Jenkins after adding Ghost Inspector API Key and Suite ID.
E-mail Notification Setup in Ghost Inspector
If you want to receive email notifications about the results of the triggered test suite you can set it in Ghost Inspector. Notifications can be controlled on the test, suite and organization level. On Suite level under “Settings” there is “Notifications” option, so here you can enable email notifications, select frequency and add Recipient E-mail(s). For Email Alerts frequency are offered following options:
- Send once if a test fails
- Send once if a test fails, than once when everything passes again
- Continue to send every time a test fails, than once when everything passes again
- Send every time a suite is executed
- Send every time a test is executed
Figure 8. Ghost Inspector-Notifications
So now if you schedule a build of your project in Jenkins, you can see the results in the Jenkins Console Output and also you will receive an email notification with the test results.
If the user clicks on the link of the email results, he will be redirected to Ghost Inspector Test results and can see the results.
Conclusion
Ghost Inspector has very good integration with Jenkins and can be easily utilized as part of a continuous delivery process for web applications in the domain of automated test execution. In addition with its easy-to-configure e-mail reporting capabilities, it can provide information on the build status in terms of the status of executed tests. As I have stated in my previous blog, Ghost Inspector is a very solid test automation tool for web applications, which requires no configuration, is easy to learn and use, has good documentation, and with many useful options for test development or test status reporting. The main drawback is it limited browser support. As it can be seen from https://ghostinspector.com/docs/faq/#collapseFour currently supported browsers are Firefox and Chrome, where Chrome is supported only for paid versions. However, Ghost Inspector provides the capability for exporting developed tests in Selenium format if cross-browser testing is required.