A WebdriverIO reporter that sends test results to Sumologic for data analyses
The easiest way is to keep
@wdio/sumologic-reporter as a devDependency in your
You can simple do it by:
Instructions on how to install
WebdriverIO can be found here.
First we have to create a new collector that collects all logs of your tests. To do that click on Manage in the navigation bar and go to Collection. There you need to add a new "Hosted Collector". Apply a suited name, e.g. "test integration logs", description and a category, e.g. "wdio". Click on Save to create the collector.
Next step is to add a source. It makes sense to have an own source for each of your environment (e.g. branch build, integration). Click on the "Add Source" link next to your collector and add an HTTP Source. Apply again a suiteable name and description and set a "Source Category" that reflects the environment. Leave the other options in default state and click on save.
A modal pops up with the source endpoint. Copy that url and paste it into your wdio.conf.js so the reporter know where to send the data.
Following code shows the default wdio test runner configuration. Just add
'sumologic' as reporter to the array and add your source endpoint:
After running the first tests with the reporter you should be able to check out the tests logs with the following query:
I will provide some useful dashboard templates for Sumologic soon.
For more information on WebdriverIO see the homepage.