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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@houndly/reporter-playwright

v1.3.1

Published

Playwright reporter for Houndly - automatically send test results to Houndly

Readme

@houndly/reporter-playwright

Manda os resultados do Playwright para o Houndly: cada teste automatizado vira uma execução no caso de teste correspondente, com erro, duração, tentativas de retry e os artefatos que o Playwright já produz — screenshot, vídeo, trace.

npm install --save-dev @houndly/reporter-playwright

Configuração

No playwright.config.ts:

import { defineConfig } from '@playwright/test';

export default defineConfig({
  reporter: [
    ['list'],
    [
      '@houndly/reporter-playwright',
      {
        apiUrl: 'https://acme.moraylab.ai',
        subdomain: 'acme',
        projectKey: 'STUDIO',
        authToken: process.env.HOUNDLY_AUTH_TOKEN,
        environment: 'staging',
        branch: process.env.GITHUB_REF_NAME,
        commit: process.env.GITHUB_SHA,
      },
    ],
  ],
});

| Campo | Obrigatório | O que é | |---|---|---| | apiUrl | sim | Endereço do workspace, https://acme.moraylab.ai | | subdomain | sim, em qualquer Houndly implantado | O subdomínio do workspace, acme | | projectKey | sim | A chave do projeto, STUDIO | | authToken | sim | Chave de API pessoal, criada em Integrações → Chaves de API pessoais | | testRunId | não | Manda os resultados para uma execução que já existe | | executor | não | Quem rodou: GitHub Actions, Jenkins, Local | | environment | não | staging, production | | branch, commit | não | De onde veio o código | | uploadArtifacts | não | Sobe screenshots, vídeos e traces (padrão: sim) | | maxArtifactSize | não | Tamanho máximo por arquivo, em bytes (padrão: 25 MB; o servidor recusa acima de 50 MB) | | metadata | não | Qualquer coisa a mais que você queira guardar junto | | debug | não | Imprime o que foi enviado e o que foi ignorado |

O subdomain não é opcional na prática. Cada workspace do Houndly tem seu próprio banco, e atrás de um proxy a API não deduz qual é pelo host. Faltando esse campo a resposta é 401 Tenant database context not found — que parece erro de token, e não é.

Marcar os testes

O reporter só envia testes que digam a qual caso correspondem. Três formas, e qualquer uma serve:

// Tag — a forma nativa do Playwright, e a mais limpa
test('o histórico abre em ordem reversa', { tag: '@STUDIO-TC-0182' }, async ({ page }) => {});

// No título
test('@houndly:STUDIO-TC-0182 o histórico abre em ordem reversa', async ({ page }) => {});
test('@tc:STUDIO-TC-0182 o histórico abre em ordem reversa', async ({ page }) => {});

// Annotation, quando o título tem que ficar intacto
test('o histórico abre em ordem reversa', {
  annotation: { type: 'houndly', description: 'STUDIO-TC-0182' },
}, async ({ page }) => {});

Vale o id que aparece na tela (STUDIO-TC-0182) ou o id interno do caso, o cmt8foic30005u094mzx370xo que vem da API — esse, exatamente como está. Outras tags convivem sem problema — @smoke, @slow — só a que tem forma de id é lida.

Teste sem marcador não é enviado. O reporter avisa em cada um e resume no fim quantos ficaram de fora. Se a execução aparecer no Houndly com zero resultados, é isto.

Evidência da falha

Com uploadArtifacts ligado — o padrão —, tudo que o Playwright guardar da tentativa sobe junto com o resultado: screenshot, vídeo e trace.

O trace é o que vale a pena entender. É um zip que o Playwright produz com as requisições de rede, o console e o DOM a cada passo do teste, e é o único lugar onde essa informação existe depois que o processo terminou. No Houndly ele aparece na execução, para baixar e abrir:

npx playwright show-trace trace.zip

Quem decide o que é produzido é o seu playwright.config.ts, não o reporter — os padrões do Playwright só guardam artefato quando o teste falha:

use: {
  screenshot: 'only-on-failure',
  video: 'retain-on-failure',
  trace: 'on-first-retry',
},

Um arquivo maior que maxArtifactSize não é enviado, e o reporter avisa no console dizendo qual foi e por quê. O envio é binário — o caminho antigo passava o arquivo em base64 dentro de um JSON, e um trace de teste de tela estourava o limite do servidor e respondia 500 sem dizer o motivo. O resultado do teste vai de qualquer jeito: perder a execução inteira porque um vídeo não coube seria trocar o principal pelo acessório.

Retries

Toda tentativa é enviada, não só a última. Um teste que falha e passa no retry é a evidência mais limpa de flakiness que existe — nada no código mudou entre as duas. As estatísticas da execução contam só a tentativa que decidiu o resultado, então um retry não transforma uma suíte de 20 testes em uma de 21.

Em CI

- name: Rodar os testes
  env:
    HOUNDLY_AUTH_TOKEN: ${{ secrets.HOUNDLY_AUTH_TOKEN }}
    GITHUB_REF_NAME: ${{ github.ref_name }}
    GITHUB_SHA: ${{ github.sha }}
  run: npx playwright test

A chave é pessoal e age com as permissões de quem a criou — guarde como secret, e revogue em Integrações → Chaves de API pessoais quando não precisar mais.

Licença

MIT