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-azure-devops-service-ts

v1.0.3

Published

Wdio Service to inject result of automatic test run in Azure DevOps TestPlan

Downloads

52

Readme

WDIO Azure Devops Service

version downloads

Publishes WebdriverIO results on Azure DevOps Test Plans.

Core features:

  • Support for Jasmine/Jest/Mocha and Cucumber runtime frameworks
  • Test results are aggregated under the same test run if you are executing more spec(test) files and they are belongs to the same suite
  • Using Azure Configurations, test results can be categorized as per the configuration (dev/stage/prod) used
  • Results are reported immediately after single test execution (real-time reporting)
  • Test run is closed after last spec(test) file has been finished
  • Multi suite support

Installation

Install this module locally with the following command to be used as a (dev-)dependency:

npm install --save wdio-azure-devops-service-ts
npm install --save-dev wdio-azure-devops-service-ts

Instructions on how to install WebdriverIO can be found here.

Usage

wdio-azure-devops-service-ts supports NodeJS 8 or higher

wdio-azure-devops-service-ts supports commonjs and esm

Configuration

Since wdio-azure-devops-service-ts is a service, you can set it up in your wdio.conf.js or .ts file as follows

import AzureDevopsService from "wdio-azure-devops-service-ts";
// wdio.conf.js or .ts
exports.config = {
    // ...
    // =====
    // Setup
    // =====
    services: [
        [
              AzureDevopsService,
              {
                  pat: 'u46xjx2ol4px36zg3z565uz52dbvshctlulkhrsecxiamn6nhtwa',
                  organizationUrl: 'https://dev.azure.com/',
                  projectId: '8b3c68ac-f69d-41c6-bbad-921d8bae9819',
                  planId: 263072,
                  suiteId: 263073,
                  runName: 'FE regression tests for TestPlan',
                  configurationName: 'stage'
              },
          ],
    ],
    // ...
};

Test case setup

Your WDIO tests should include the ID of your Azure test case. Make sure your test case IDs are distinct from your test titles:

Mocha style:

// Good:
it("C123 Can authenticate a valid user", ...

// Bad:
it("C123Can authenticate a valid user", ...
it("Can authenticate a valid user C123", ...

Cucumber style:

## Good:
@C123
Scenario Can authenticate a valid user
@c123
Scenario Can authenticate a valid user,

## Bad:
@c123stringTest
Scenario Can authenticate a valid user

Azure DevOps Report Example

This is an example of the results pushed on AZ Test Plans, during a test run

AzureDevops Test Plans example

If you have multiple Configurations, using configurationName test results can be categorized

AzureDevops Test Plans Configurations

AzureDevops Test Results History

AzureDevops Test Point History

Service Options

pat

The Personal Access token generated in Azure DevOps with API permission set.

Example: "u46xjx2ol4px36zg3z565uz52dbvshctlulkhrsecxiamn6nhtwa"

Type: string

Required: true

organizationUrl

The base url of your Azure DevOps instance.

Example: "https://dev.azure.com/"

Type: string

Required: true

projectId

The id of the project in Azure DevOps.

To find the projectId use GET {organizationUrl}/_apis/projects?api-version=6.0 and copy the appropriate id.

Example: "3cf7dbc9-cb1e-4240-93f2-9a5960ab3945"

Type: string

Required: true

planId

The test plainId that you can retrieve in Azure DevOps Test Plan section.

Example: 124

Type: integer

Required: true

suiteId

The suiteId that you can retrieve in Azure DevOps Test Plan section, in case of nested suites, get the root suiteId, the service iterates over all the child suites.

Example: 21

Type: integer

Required: true

runName

A descriptive name for the test run.

Example: "FE regression tests run"

Type: string

Required: true

caseIdRegex

Custom regular expression to match the testCaseId from tag or title test case.

Type: string

Default: "@?[cC](\d+)"

Required: false

configurationName

If you have multiple Configurations in Azure (Test Plans - Configurations) apart from the default-one, you need to mention the configuration name to filter the test points as per the configuration while creating test run & update test results.

Example: "prod"

Type: string

Required: false