Very recently, I started learning and doing hands-on on Cucumber in Java and wrote my first Cucumber+TestNG+Selenium Automation Test Framework. I used a couple of third party reporting plugins to generate detailed HTML reports website containing single and/or many web pages. Though I liked the reports and found them useful, yet I needed a better and unified overview of the results which is UI agnostic.
With the clear requirement in mind, I did some research on internet and talk with colleagues around me. I came across the ELK (Elasticserach, Logstash, Kibana) solution but all 3 were quite new to me, though I installed all three on my machine and started exploring them. Very soon, I figured out that it would be quite a challenge and time consuming to learn and perform the desired result with Logstash and its various plugins.
Being a Java developer at heart and learning the fact that the 2 of the reporting plugins I used and mentioned above, are using the JSON test result file(s) as input and writing the HTML files as output, I decided to go for the solution same way but change the output destination (Elastic Search not HTML pages).
With test report data in Elastic Search, I can have a unified dashboard on UI agnostic tools like Kibana/Grafana for all tests with the possibility to filter and analyze the data, extend and share it across teams.
- Java/Maven solution - Java has been among top 3 preferred languages in the world for BDD implementation. Hence the solution can easily be plugged in with the system.
- Plug and Play - With cucumber test result data in Elastic Search, the user can easily plugin any tool/script (Kibana, Grafana, Shell, REST) and play around the test result data.
- UI agnostic - No static HTML web page(s), hence the control of creation and management of Dashboard fully lies into the hands of the end user using a tool like Kibana. The end users can select what they want to/not to see on their dashboard.
- Continuous Integration - Can easily be integrated with Jenkins.
- Power of Elastic Search - Enables the plugin as well as end user to get all the benefits of Elastic Search.
- Power of Kibana - Enables the end user to apply filter and analyze the data, extend and share it across teams.
- Handy Configurable options - The plugin user has set of configuration options available to control things like,
- skip reading the Cucumber Test Report(JSON file(s)) and ask the plugin to exit(defaults to false).
- change/overwrite the Hostname of Elastic Search Server (defaults to localhost).
- change/overwrite sending the Feature, Scenario, Step, Tag specific JSON documents to Elastic Search(defaults to false).
- change/overwrite the 'index' and 'document_type' for Feature, Scenario, Step, Tag specific documents for Elastic Search.
- Details of failures like assertion failures/stacktrace (screenshots in case of selenium) not available.
- Give a nice name to the plugin. Ask the colleagues for suggestions. I named it Cucelastic plugin.
- Give an icon to the plugin. I made an icon but need some editing.
- Publish the plugin on Maven Cenral.
- Write Blogs to let the world know and use it.
- Discuss and take feedback for future improvement and enhancement.