Ghost Inspector – Cloud-Based solution for Web Automated Testing (Part II)

    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 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”.

    Figure 1. Manage Jenkins

    • 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.

    Figure 2. Upload Plugin in Jenkins

    Configuring Ghost Inspector plugin

    Since Ghost Inspector plugin is already installed, now you should have a new build step option for running Tests. Next step is to create your Jenkins project.

    Figure 3. Jenkins Project Creation

    Open 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”.

    Figure 4. Add build step – 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.

    Figure 5. Suite ID in Ghost Inspector

    Figure 6. API Key in Ghost Inspector

    At the end save your configuration changes in Jenkins after adding Ghost Inspector API Key and Suite ID.

    Figure 7. Run Ghost Inspector Test Suite

    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.

    Figure 9. Test Suite Results in Jenkins Console Output

    Figure 10. Email with test results

    If user clicks on the link of the email results, he will be redirected to Ghost Inspector Test results and can see the results.

    Figure 11. Test Results in Ghost Inspector

    Conclusion

    Ghost Inspector has very good integration with Jenkins and can be easily utilized as part of 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 of the build status in terms of status of executed tests. As I have stated in my previous blog, Ghost Inspector is very solid test automation tool for web applications, which requires no configuration, easy to learn and use, 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 version. However, Ghost Inspector provides capability for exporting developed tests in Selenium format if cross-browser testing is required.

     

    Aleksandra Sekulovska

    Sr. Technical Consultant