Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testes Unitários - Listar Pendências. #724

Open
4 tasks
amelquia opened this issue Nov 25, 2024 · 4 comments
Open
4 tasks

Testes Unitários - Listar Pendências. #724

amelquia opened this issue Nov 25, 2024 · 4 comments
Assignees
Labels
melhoria New feature or request

Comments

@amelquia
Copy link

Sua solicitação de melhoria está relacionada a um problema? Por favor descreva.

Não.


Descreva a solução que você gostaria

Executar testes unitários para o método listarPendencias


Critérios de aceite:

  • Configurar o ambiente de testes, incluindo dependências e mocks necessários.
  • Casos de sucesso (retorno esperado).
  • Casos de erro (tratamento de exceções).

Definição de Feito (D.O.D. - Definition of Done)

  • Evidências dos testes realizados.

Links úteis

https://homolog.api.processoeletronico.gov.br/swagger/swagger-ui/index.html#/


@NinetiesPaul
Copy link
Contributor

Aberto PR para criação do teste unitário que valida o método listarPendencias

Execute-o com: make test-unit teste=ProcessoEletronicoRN/ListarPendenciasTest

Evidencia de execução
image

@sergioadao
Copy link

sergioadao commented Dec 4, 2024

Boa tarde @amelquia, @NinetiesPaul, @Mauro1706 e @mateus....segue evidência de funcionamento correto do teste:

$ make test-unit teste=ProcessoEletronicoRN/ListarPendenciasTest

Ambiente: SEI 4.1.2
Branch feat/rest

==========================================================================================
GIT LOG

commit 7394514 (HEAD -> feat/rest, origin/feat/rest)
Author: Paul Richard Pereira Martins dos Anjos [email protected]
Date: Wed Dec 4 11:48:59 2024 -0300

feat: criado teste unitario que valida o metodo consultarHipotesesLegais

commit 27f8ad9
Author: mauro [email protected]
Date: Tue Dec 3 15:21:29 2024 -0300

test: teste unitario

Teste unitario receber recibo de tramite; Correção teste buscar estrutura

commit 6dd67e5
Author: Paul Richard Pereira Martins dos Anjos [email protected]
Date: Tue Dec 3 15:23:28 2024 -0300

feat: criado teste unitario que valida o metodo cancelarTramite

commit e95bf67
Author: Paul Richard [email protected]
Date: Tue Dec 3 14:43:23 2024 -0300

feat: criado teste unitario que valida o metodo listarPendencias (#745)

Co-authored-by: Paul Richard Pereira Martins dos Anjos <[email protected]>

commit 81fda88
Author: Mauro Costa [email protected]
Date: Tue Dec 3 09:45:35 2024 -0300

test: teste unitário ciência recusa (#744)

Teste unitario ciencia recusa

============================================================================================
RESULTADO DO TESTE

$ make test-unit teste=ProcessoEletronicoRN/ListarPendenciasTest
docker compose -f tests_sei41/funcional/docker-compose.yml run --rm -w /tests php-test-unit bash -c 'XDEBUG_MODE=coverage vendor/bin/phpunit --testdox --coverage-html html rn/ProcessoEletronicoRN/ListarPendenciasTest.php'
WARN[0000] /home/toor/Documentos/ministerio_economia/aplicacao_sei/sei_versoes/sei-trad-4.1.2/sei/web/modulos/mod-sei-pen/tests_sei41/funcional/docker-compose.yml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion
PHPUnit 9.6.21 by Sebastian Bergmann and contributors.

Runtime: PHP 7.3.33 with Xdebug 3.0.4
Configuration: /tests/phpunit.xml

Listar Pendencias
✔ Listar pendencias sucesso 45 ms
✔ Listar pendencias lanca excecao 5 ms

Time: 00:01.561, Memory: 36.00 MB

OK (2 tests, 7 assertions)

Generating code coverage report in HTML format ... done [00:18.552]

=============================================================================

image

==============================================================================

$ make test-unit teste=ProcessoEletronicoRN/ListarPendenciasTest

Ambiente: SEI 4.0.12.15

================================================================================
RESULTADO DO TESTE

$ make test-unit teste=ProcessoEletronicoRN/ListarPendenciasTest
docker compose -f tests_super/funcional/docker-compose.yml run --rm -w /tests php-test-unit bash -c 'XDEBUG_MODE=coverage vendor/bin/phpunit --testdox --coverage-html html rn/ProcessoEletronicoRN/ListarPendenciasTest.php'
WARN[0000] /home/toor/Documentos/ministerio_economia/aplicacao_sei/sei_versoes/sei-trad-4.0.12.15/src/sei/web/modulos/mod-sei-pen/tests_super/funcional/docker-compose.yml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion
PHPUnit 9.6.21 by Sebastian Bergmann and contributors.

Runtime: PHP 7.3.33 with Xdebug 3.0.4
Configuration: /tests/phpunit.xml

Listar Pendencias
✔ Listar pendencias sucesso 56 ms
✔ Listar pendencias lanca excecao 5 ms

Time: 00:01.628, Memory: 36.00 MB

OK (2 tests, 7 assertions)

Generating code coverage report in Cobertura XML format ... done [00:16.718]

Generating code coverage report in HTML format ... done [00:03.387]

===================================================================================

image

@sergioadao
Copy link

Boa tarde @amelquia, @NinetiesPaul, @Mauro1706 e @mateus....segue evidência de funcionamento correto do teste:

$ make test-unit teste=ProcessoEletronicoRN/ListarPendenciasTest

**Ambiente utilizado foi :

SEI 4.1.2
Branch: feat/rest
BANCO SQLSERVER

RESULTADO: OK

PHPUnit 9.6.22 by Sebastian Bergmann and contributors.

Runtime: PHP 7.3.28 with Xdebug 3.0.4
Configuration: /tests/phpunit.xml

Listar Pendencias
✔ Listar pendencias sucesso 62 ms
✔ Listar pendencias lanca excecao 25 ms

Time: 00:01.877, Memory: 36.00 MB

OK (2 tests, 7 assertions)

Generating code coverage report in HTML format ... done [00:19.138]

@sergioadao
Copy link

Bom dia @amelquia, @NinetiesPaul, @Mauro1706 e @mateus....segue evidência de funcionamento correto do teste:

$ make test-unit teste=ProcessoEletronicoRN/ListarPendenciasTest

**Ambiente utilizado foi :

SEI 4.0.12.15
Branch: feat/rest
BANCO SQLSERVER

RESULTADO: OK

$ make test-unit teste=ProcessoEletronicoRN/ListarPendenciasTest
docker compose -f tests_super/funcional/docker-compose.yml run --rm -w /tests php-test-unit bash -c 'XDEBUG_MODE=coverage vendor/bin/phpunit --testdox --coverage-html html rn/ProcessoEletronicoRN/ListarPendenciasTest.php'
WARN[0000] /home/toor/Documentos/ministerio_economia/aplicacao_sei/sei_versoes/sei-trad-4.0.12.15/src/sei/web/modulos/mod-sei-pen/tests_super/funcional/docker-compose.yml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion
PHPUnit 9.6.21 by Sebastian Bergmann and contributors.

Runtime: PHP 7.3.33 with Xdebug 3.0.4
Configuration: /tests/phpunit.xml

Listar Pendencias
✔ Listar pendencias sucesso 50 ms
✔ Listar pendencias lanca excecao 5 ms

Time: 00:01.744, Memory: 36.00 MB

OK (2 tests, 7 assertions)

Generating code coverage report in Cobertura XML format ... done [00:15.611]

Generating code coverage report in HTML format ... done [00:03.242]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
melhoria New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants