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 - Ciência Recusa. #726

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

Testes Unitários - Ciência Recusa. #726

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

Comments

@amelquia
Copy link

amelquia commented Nov 25, 2024

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 cienciaRecusa


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#/


@amelquia amelquia added the melhoria New feature or request label Nov 25, 2024
@Mauro1706 Mauro1706 self-assigned this Dec 2, 2024
@Mauro1706
Copy link
Contributor

Realizado a implementação do teste no PR:
ModTramitaGovBR -> #744

Segue evidências dos testes:
https://github.com/user-attachments/assets/4479471f-30c8-4dd5-9152-d3e2d16e50a5

@sergioadao
Copy link

sergioadao commented Dec 5, 2024

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

$ make test-unit teste=ProcessoEletronicoRN/CienciaRecusaTest

Ambiente: SEI 4.0.12.15
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/CienciaRecusaTest
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/CienciaRecusaTest.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

Ciencia Recusa
✔ Ciencia recusa com sucesso 47 ms
✔ Ciencia recusa com erro 6 ms

Time: 00:01.737, Memory: 36.00 MB

OK (2 tests, 8 assertions)

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

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

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

image

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

Ambiente: SEI 4.1.2
Branch: feat/rest

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

$ make test-unit teste=ProcessoEletronicoRN/CienciaRecusaTest
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/CienciaRecusaTest.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

Ciencia Recusa
✔ Ciencia recusa com sucesso 690 ms
✔ Ciencia recusa com erro 12 ms

Time: 00:03.668, Memory: 36.00 MB

OK (2 tests, 8 assertions)

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

===================================================================================
image

@sergioadao
Copy link

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

$ make test-unit teste=ProcessoEletronicoRN/CienciaRecusaTest

**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

Ciencia Recusa
✔ Ciencia recusa com sucesso 57 ms
✔ Ciencia recusa com erro 5 ms

Time: 00:01.806, Memory: 36.00 MB

OK (2 tests, 8 assertions)

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

@sergioadao
Copy link

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

$ make test-unit teste=ProcessoEletronicoRN/CienciaRecusaTest

**Ambiente utilizado foi :

SEI 4.0.12.15
Branch: feat/rest
BANCO SQLSERVER

RESULTADO: OK

$ make test-unit teste=ProcessoEletronicoRN/CienciaRecusaTest
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/CienciaRecusaTest.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

Ciencia Recusa
✔ Ciencia recusa com sucesso 46 ms
✔ Ciencia recusa com erro 6 ms

Time: 00:01.808, Memory: 36.00 MB

OK (2 tests, 8 assertions)

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

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

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