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

zephyrscale-integration

v1.0.0

Published

CLI simples e intuitiva para upload de relatórios JUnit para Zephyr Scale com configuração global de tokens e suporte a múltiplos frameworks de teste

Downloads

3

Readme

Zephyr Uploader CLI

CLI simples e intuitiva para upload de relatórios JUnit para Zephyr Scale com configuração global de tokens, suporte a múltiplos frameworks de teste (Playwright, Cucumber/Ruby e outros) e integração facilitada em pipelines CI/CD.

ㅤ ㅤ

📋 Pré-requisitos

  • Node.js versão 18 ou superior
  • Token de acesso do Zephyr Scale
  • Project Key do projeto no Zephyr

Como obter o Token do Zephyr:

Acessar Documentação ㅤㅤ ㅤ ㅤ

🚀 Instalação

# Instalação global (recomendado)
npm install -g zephyrscale-integration

ㅤ ㅤ

🔧 Configuração

Configurar token globalmente (recomendado)

# Configurar token uma única vez
zephyr config eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...

# Verificar configuração
zephyr config

O token será salvo em ~/.zephyr.json e usado automaticamente em futuros uploads.

Opções da CLI

| Opção | Descrição | Padrão | |-------|-----------|--------| | -p, --project-key | Chave do projeto no Zephyr | - | | -t, --auth-token | Token de autenticação | - | | -d, --reports-dir | Diretório com relatórios JUnit | ./logs/junit | | -o, --output | Arquivo ZIP de saída | ./logs/junit.zip | | -h, --help | Mostrar ajuda | - |

ㅤ ㅤ

🔧 Integração com Frameworks

Playwright

// playwright.config.js
const { defineConfig } = require('@playwright/test');

module.exports = defineConfig({
  // ... outras configurações
  reporter: [
    ['html'],
    // Incluir a linha de geraçãop dos arquivos junit no diretorio ./logs/junit
    ['junit', { outputFile: './logs/junit' }]
  ]
});

// package.json
{
  "scripts": {
    "test": "playwright test",
    "test:zephyr": "playwright test && zephyr -p ID_PROJECT"
  }
}

Cucumber/Ruby

# cucumber.yml
# Incluir a linha de geraçãop dos arquivos junit no diretorio ./logs/junit
  default: --publish-quiet -p junit
  junit: --format junit --out ./logs/junit

Integração com Zephyr

Após os passos anteriores executado com sucesso, desde baixado a dependência até a geração dos relatórios JUnit, basta executar os comandos abaixo:

# Upload básico (usa token global configurado)
zephyr -p ID_PROJECT
# Upload com credenciais específicas(informando token)
zephyr -p ID_PROJECT -t seu-token

ㅤ ㅤ

Comandos disponíveis:

# Configurar token globalmente (CASO NÃO TENHA CONFIGURADO ANTERIORMENTE, PARA VALIDAR EXECUTE: zephyr-integration config)
zephyr config <seu-token>

# Verificar configuração atual
zephyr config

# Upload básico (usa token configurado)
zephyr -p ID_PROJECT

# Upload com credenciais específicas
zephyr -p ID_PROJECT -t seu-token

# Upload com diretório customizado
zephyr -p ID_PROJECT -d ./custom-reports

# Upload com arquivo de saída customizado
zephyr -p ID_PROJECT -o ./custom-output.zip

# Mostrar ajuda
zephyr --help

ㅤ ㅤ

🔍 Troubleshooting

Erro: "zephyr: command not found"

# Instalar globalmente
npm install -g zephyrscale-integration

Erro: "Project Key e Auth Token são obrigatórios"

# Configurar token globalmente
zephyr config seu-token

Erro: "Directory not found"

# Verificar se os testes foram executados com reporter junit
# Verificar se o diretório de saída está correto
ls -la ./logs/junit

Erro: "Configuração inválida"

  • Verificar se o projectKey está correto
  • Verificar se o token está válido

Erro de upload para Zephyr

  • Verificar conexão com a internet
  • Verificar se o arquivo ZIP foi criado corretamente
  • Verificar logs de erro da API do Zephyr ㅤ ㅤ

📊 Logs Esperados

Sucesso:

🚀 Zephyr Uploader CLI
========================

📦 Criando arquivo ZIP...
📤 Fazendo upload para Zephyr...
✅ Upload realizado com sucesso!
📊 Ciclo de teste: PROJ-123
🧹 Arquivo ZIP removido

Erro:

❌ Falha no upload: HTTP 401: Unauthorized - Invalid token

ㅤ ㅤ

📝 Notas Importantes

  1. Segurança: Nunca commitar tokens no repositório
  2. Versões: Sempre usar a versão mais recente da CLI
  3. Backup: Manter backup dos relatórios locais
  4. Limpeza: Arquivos ZIP são removidos automaticamente após upload
  5. Performance: O upload pode levar alguns segundos dependendo do tamanho do arquivo
  6. CLI: A CLI facilita o uso e configuração do token globalmente
  7. Compatibilidade: A CLI é compatível com Node.js 18+