npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wdio-sstid-teamcity-reporter

v1.0.1

Published

WebdriverIO TeamCity reporter

Downloads

3

Readme

wdio-teamcity-reporter

WebdriverIO TeamCity reporter based on https://github.com/sullenor/wdio-teamcity-reporter, which makes it possible to display test results in real-time, makes test information available on the Tests tab of the Build Results page.

This version of the WebdriverIO TeamCity reporter incorporates screenshot reporting (see below).

Installation

npm install @danielgallo/wdio-teamcity-reporter --save-dev

Instructions on how to install WebdriverIO can be found here: http://webdriver.io/guide/getstarted/install.html

Configuration

Add reporter in your wdio.conf.js file:

exports.config = {
  // ...
  reporters: ['@danielgallo/wdio-teamcity-reporter'],
  reporterOptions: {
    screenshotPath: 'temp/screenshots/', // optional
    captureStandardOutput: false, // optional
    flowId: true, // optional
    message: '[title]', // optional
  },
  // ...
}

Screenshots

You can capture one or more screenshots by calling browser.takeScreenshot() within the various hooks in your wdio.conf.js file, for example:

Capture a screenshot at the start and end of every test:

beforeTest: function (test, context) {
    browser.takeScreenshot();
},

afterTest: function(test, context, { error, result, duration, passed, retries }) {
    browser.takeScreenshot();
}

The example above shows a useful way of capturing a "before" and "after" screenshot for each test, for subsequent viewing within TeamCity Test results.

Alternatively, you could just capture a screenshot on a failed test:

afterTest: function(test, context, { error, result, duration, passed, retries }) {
    if (!passed) {
        browser.takeScreenshot();
    }
}

By using this reporter, screenshots will then show up in TeamCity Test results as "Screenshot 1", "Screenshot 2", etc, under each test.

Important: In order for TeamCity to see the screenshots, you need to add the screenshot folder as an Artifact Path in TeamCity. By default, screenshots will be saved under ./temp/screenshots/, or you can define a custom path by setting screenshotPath on the reporterOptions within wdio.conf.js (see below).

Note: Screenshots taken within test suites are not currently captured by this reporter. Only screenshots using the browser.takeScreenshot() method within the hooks in wdio.conf.js are captured and reported to TeamCity.

reporterOptions

reporterOptions provide you a possibility to adjust reporter functionality.

  • screenshotPath (string) - define a custom path to save screenshots. Default ./temp/screenshots/.
  • captureStandardOutput (boolean) — if true, all the standard output (and standard error) messages received between testStarted and testFinished messages will be considered test output. The default value is false and assumes usage of testStdOut and testStdErr service messages to report the test output. Default false.
  • flowId (boolean) — if true, flowId property will be added to all messages. Flow tracking is necessary for example to distinguish separate processes running in parallel. Default true.
  • message (string) — possibility to provide particular format for the name property. Possible keys: [browser], [title]. Example, [browser] / [title]. Default [title].

Links

  • Reference to the TeamCity documentation about reporting messages: https://www.jetbrains.com/help/teamcity/reporting-test-metadata.html#Displaying+additional+test+data

License

The MIT License