PHPackages                             controleonline/smoke-tests-playground - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. controleonline/smoke-tests-playground

ActiveSymfony-bundle[API Development](/categories/api)

controleonline/smoke-tests-playground
=====================================

Symfony bundle for exposing browser smoke test indexes and artifacts as JSON APIs in ControleOnline projects.

0632↑183.3%

Since Aug 4Compare

[ Source](https://github.com/ControleOnline/smoke-tests-playground)[ Packagist](https://packagist.org/packages/controleonline/smoke-tests-playground)[ RSS](/packages/controleonline-smoke-tests-playground/feed)WikiDiscussions Synced 1w ago

READMEChangelogDependenciesVersions (4)Used By (0)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/be51123ab58e0141df5c4c48d2898a8e501730fa277c9fb16121fbeebcf821b4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636f6e74726f6c656f6e6c696e652f736d6f6b652d74657374732d706c617967726f756e642f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/controleonline/smoke-tests-playground/?branch=master)

Smoke Tests Playground
======================

[](#smoke-tests-playground)

Bundle Symfony para expor smoke tests browser como API JSON.

`composer require controleonline/smoke-tests-playground:dev-master`

O pacote nao renderiza UI HTML. A leitura publica acontece por:

- `GET /tests`
- `GET /tests/index.json`
- `GET /tests/api`

Os artifacts publicados pelos smoke tests ficam disponiveis por:

- `GET /tests/artifacts/{suiteId}/{arquivo}`

O frontend separado em `tests-frontend-tool` consome essa API com `X-API-KEY`.

O que o Playwright publica
--------------------------

[](#o-que-o-playwright-publica)

Cada tipo e suite continuam gravando em:

- `var/tests///report.json`
- `var/tests///report.xml`
- `var/tests///*.png`
- `var/tests///*/*.png`

O `report.json` ou `report.xml` fica por suite. O bundle varre todos os tipos e suites e monta um `index.json` agregado com:

- status geral
- progresso geral
- resumo de suites e testes
- resumo de tipos
- lista de tipos
- lista de suites
- testes de cada suite
- etapas de cada teste
- prints com URLs autenticadas

Instalacao
----------

[](#instalacao)

1. Instale o Node.js com `nvm` no servidor, se ainda nao existir:

```
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.bashrc
nvm install --lts
nvm use --lts
```

2. No projeto consumidor, instale o Playwright e os browsers com o mesmo usuario que executa o app:

```
npm install -D @playwright/test
node node_modules/@playwright/test/cli.js install
```

3. Instale o pacote com Composer.
4. Registre o bundle em `config/bundles.php`:

```
ControleOnline\SmokeTestsPlayground\SmokeTestsPlaygroundBundle::class => ['all' => true],
```

5. Rode o bootstrap do pacote:

```
php bin/console smoke-tests-playground:install
```

O instalador escreve:

- `.env` com os defaults do smoke
- `config/routes/smoke_tests_playground.yaml`
- `config/services/smoke_tests_playground.yaml`

Se a instalacao dos browsers falhar por permissao, o comando imprime instrucoes para executar como `root`.

Variaveis de ambiente
---------------------

[](#variaveis-de-ambiente)

- `PLAYWRIGHT_BROWSERS_PATH="0"` evita depender do cache global do usuario.
- `SMOKE_TESTS_PLAYGROUND_TESTS_PATH` aponta para a raiz dos smoke tests, por padrao `var/tests`.
- `SMOKE_TESTS_PLAYGROUND_RUN_COMMAND` define o comando do runner, por padrao:

```
node node_modules/@playwright/test/cli.js test --config=playwright.config.cjs tests/browser/*.spec.js
```

- `SMOKE_TESTS_PLAYGROUND_RUN_WORKDIR` define o diretorio de execucao.
- `SMOKE_TESTS_PLAYGROUND_RUN_TIMEOUT` define o timeout em segundos.

Rotas
-----

[](#rotas)

- `GET /tests` retorna o mesmo JSON de `GET /tests/index.json`
- `GET /tests/index.json` retorna o indice agregado
- `GET /tests/api` retorna o mesmo JSON para compatibilidade
- `GET /tests/artifacts/{suiteId}/{arquivo}` entrega os artifacts publicados
- `POST /tests/run` continua disponivel para disparar o runner do backend

Contrato do indice
------------------

[](#contrato-do-indice)

O indice publico tem a estrutura geral:

```
{
  "generatedAt": "2026-07-06T18:51:19.924Z",
  "status": "failed",
  "progress": 50,
  "message": "1 suite com falha em 2 publicadas.",
  "lastRunAt": "2026-07-06T18:51:19.924Z",
  "summary": {
    "types": {
      "total": 2,
      "passed": 1,
      "failed": 1
    },
    "suites": {
      "total": 2,
      "passed": 1,
      "failed": 1
    },
    "tests": {
      "total": 2,
      "passed": 1,
      "failed": 1
    }
  },
  "types": [],
  "suites": []
}
```

Cada tipo publica:

- `type`
- `displayName`
- `status`
- `progress`
- `message`
- `summary`
- `suites[]`

Cada suite publica:

- `type`
- `typeDisplayName`
- `suite`
- `suitePath`
- `suiteId`
- `displayName`
- `generatedAt`
- `updatedAt`
- `status`
- `summary`
- `tests[]`
- `links.report`

Cada screenshot publica:

- `label`
- `name`
- `url`
- `mimeType`
- `kind`
- `available`

Frontend separado
-----------------

[](#frontend-separado)

O projeto `tests-frontend-tool` consome a API via `.env`:

```
API_ENTRYPOINT=https://staging.frethical.com
HTACCESS_USER=
HTACCESS_PASSWORD=
```

Ele nao executa smoke tests. Ele so le `index.json`, mostra suites/tests/etapas e faz preview dos artifacts.

Conferencia manual
------------------

[](#conferencia-manual)

Exemplo de leitura do indice:

```
curl -H "Accept: application/json" \
  -H "X-API-KEY: " \
  "https:///tests/index.json"
```

Exemplo de artifact:

```
curl -H "X-API-KEY: " \
  "https:///tests/artifacts//01-login-screen.png" \
  --output login-screen.png
```

Testes
------

[](#testes)

O pacote tem testes para:

- indice vazio
- multiplas suites
- JSON invalido
- resposta de run
- entrega de artifacts

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9436682?v=4)[Controle Online](/maintainers/controleonline)[@ControleOnline](https://github.com/ControleOnline)

### Embed Badge

![Health badge](/badges/controleonline-smoke-tests-playground/health.svg)

```
[![Health](https://phpackages.com/badges/controleonline-smoke-tests-playground/health.svg)](https://phpackages.com/packages/controleonline-smoke-tests-playground)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.5M7](/packages/exsyst-swagger)[lucasdotvin/laravel-soulbscription

A straightforward interface to handle subscriptions and features consumption.

709209.3k](/packages/lucasdotvin-laravel-soulbscription)[pimax/fb-messenger-php

Facebook Messenger Bot PHP API

313188.5k2](/packages/pimax-fb-messenger-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
