Socket
Socket
Sign inDemoInstall

@wdio/sumologic-reporter

Package Overview
Dependencies
35
Maintainers
3
Versions
255
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @wdio/sumologic-reporter

A WebdriverIO reporter that sends test results to Sumologic for data analyses


Version published
Weekly downloads
1.1K
increased by26.46%
Maintainers
3
Created
Weekly downloads
 

Readme

Source

WebdriverIO Sumologic Reporter

A WebdriverIO reporter that sends test results to Sumologic for data analyses

Sumologic Dashboard

Installation

The easiest way is to keep @wdio/sumologic-reporter as a devDependency in your package.json, via:

npm install @wdio/sumologic-reporter --save-dev

Instructions on how to install WebdriverIO can be found here.

Configuration

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.

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

Add Source

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:

// wdio.conf.js
module.exports = {
  // ...
  reporters: [
    'spec',
    ['sumologic', {
        // define sync interval how often logs get pushed to Sumologic
        syncInterval: 100,
        // endpoint of collector source
        sourceAddress: process.env.SUMO_SOURCE_ADDRESS
    }]
  ],
  // ...
};

After running the first tests with the reporter you should be able to check out the tests logs with the following query:

_source=wdio
| parse "\"type\":\"*:*\"" as type,status
| json auto

I will provide some useful dashboard templates for Sumologic soon.


For more information on WebdriverIO see the homepage.

Keywords

FAQs

Last updated on 20 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc