Skip to content

Commit

Permalink
Feat/446 Categorizar Testes Super (#448)
Browse files Browse the repository at this point in the history
* Grupos de teste no Super Ajuste de performance para super

* Ajuste no job para criar diretorio temp
  • Loading branch information
marlinhares authored Mar 14, 2024
1 parent e38ef81 commit cec9130
Show file tree
Hide file tree
Showing 49 changed files with 212 additions and 3 deletions.
18 changes: 17 additions & 1 deletion jenkins/01-Teste-Unico-ou-Grupo.groovy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\/*
/*
Usuario jenkins precisa ter permissao de sudo
Jenkins minimo em 2.332
Expand Down Expand Up @@ -380,6 +380,20 @@ pipeline {
make destroy
make up
make check-isalive
set +e
echo ""
echo "Vamos rodar o make update. A saida n sera mostrada aqui. Apenas se houver erro..."
make update 2>&1 > tempinstall.txt
es=\$?
set -e
if [ "\$es" = "0" ]; then
echo "Make update sem erro"
else
cat tempinstall.txt
exit 1
fi
rm -rf tempinstall.txt
# apenas teste, lembrar de retirar ao final
sleep 5
Expand All @@ -402,6 +416,8 @@ pipeline {
# apenas teste, lembrar de retirar ao final
docker-compose -f tests_${SISTEMA}/funcional/docker-compose.yml --env-file tests_${SISTEMA}/funcional/.env exec org1-http bash -c "> /etc/cron.d/sei; > /etc/cron.d/sip"
docker-compose -f tests_${SISTEMA}/funcional/docker-compose.yml --env-file tests_${SISTEMA}/funcional/.env exec org2-http bash -c "> /etc/cron.d/sei; > /etc/cron.d/sip"
docker-compose -f tests_${SISTEMA}/funcional/docker-compose.yml --env-file tests_${SISTEMA}/funcional/.env exec org1-http bash -c "mkdir -p /opt/sei/temp; chown apache /opt/sei/temp"
docker-compose -f tests_${SISTEMA}/funcional/docker-compose.yml --env-file tests_${SISTEMA}/funcional/.env exec org2-http bash -c "mkdir -p /opt/sip/temp; chown apache /opt/sip/temp"
pwd
""", label: "Configura sobe ambiente e instala modulo"
Expand Down
12 changes: 10 additions & 2 deletions tests_super/funcional/src/paginas/PaginaProcesso.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ public function ehDocumentoCancelado($nomeDocumentoArvore)
{
try
{
$to = $this->test->timeouts()->getLastImplicitWaitValue();
$this->test->timeouts()->implicitWait(300);
$this->test->frame(null);
$this->test->frame("ifrArvore");
$this->test->byLinkText($nomeDocumentoArvore)->byXPath(".//preceding-sibling::a[1]/img[contains(@src,'svg/documento_cancelado.svg?')]");
Expand All @@ -183,13 +185,17 @@ public function ehDocumentoCancelado($nomeDocumentoArvore)
catch(Exception $e)
{
return false;
}
}finally{
$this->test->timeouts()->implicitWait($to);
}
}

public function ehDocumentoMovido($nomeDocumentoArvore)
{
try
{
$to = $this->test->timeouts()->getLastImplicitWaitValue();
$this->test->timeouts()->implicitWait(300);
$this->test->frame(null);
$this->test->frame("ifrArvore");
$this->test->byLinkText($nomeDocumentoArvore)->byXPath(".//preceding-sibling::a[1]/img[contains(@src,'svg/documento_movido.svg?')]");
Expand All @@ -198,7 +204,9 @@ public function ehDocumentoMovido($nomeDocumentoArvore)
catch(Exception $e)
{
return false;
}
}finally{
$this->test->timeouts()->implicitWait($to);
}
}

private function selecionarItemArvore($nomeArvore)
Expand Down
6 changes: 6 additions & 0 deletions tests_super/funcional/src/paginas/PaginaReciboTramite.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,23 @@ public function contemTramite($mensagemTramite, $verificaReciboEnvio=false, $ver
//Verifica se recibo de envio do processo foi localizado
if($result && $verificaReciboEnvio) {
try{
$to = $this->test->timeouts()->getLastImplicitWaitValue();
$this->test->timeouts()->implicitWait(300);
$colunas[1]->element($this->test->using('css selector')->value(utf8_encode('a > img[title=\'Recibo de Confirmação de Envio\']')));
}
catch(Exception $e){ $result = false; }
finally{ $this->test->timeouts()->implicitWait($to); }
}

//Verifica se recibo de conclusão do trâmite processo foi localizado
if($result && $verificaReciboConclusao) {
try{
$to = $this->test->timeouts()->getLastImplicitWaitValue();
$this->test->timeouts()->implicitWait(300);
$colunas[1]->element($this->test->using('css selector')->value(utf8_encode('a > img[title=\'Recibo de Conclusão de Trâmite\']')));
}
catch(Exception $e){ $result = false; }
finally{ $this->test->timeouts()->implicitWait($to); }
}

if($result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
/**
* Testes de mapeamento de tipos de processo e relacionamento entre orgãos
* Desativar e reativar mapeamento entre orgãos
*
* Execution Groups
* @group execute_alone_group1
*/
class MapeamentoTipoProcessoDesativarReativarTest extends CenarioBaseTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
/**
* Testes de mapeamento de tipos de processo e relacionamento entre orgãos
* Excluir mapeamento entre orgãos
*
* Execution Groups
* @group execute_alone_group1
*/
class MapeamentoTipoProcessoExcluirTest extends CenarioBaseTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
* Testes de mapeamento de tipos de processo e relacionamento entre orgãos
* Exportar tipos de processos
* Pesquisar tipos de processos
*
* Execution Groups
* @group execute_alone_group1
*/
class MapeamentoTipoProcessoExportarTest extends CenarioBaseTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
/**
* Testes de mapeamento de tipos de processo reativar
* Reativar tipos de processos
*
* Execution Groups
* @group execute_alone_group1
*/
class MapeamentoTipoProcessoReativarTest extends CenarioBaseTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
/**
* Testes de mapeamento de tipos de processo e relacionamento entre orgãos
* Cadastro mapeamento de orgãos
*
* Execution Groups
* @group execute_alone_group1
*/
class MapeamentoTipoProcessoRelacionamentoOrgaosCadastroTest extends CenarioBaseTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
* Testes de mapeamento de tipos de processo e relacionamento entre orgãos
* Listar mapeamento entre orgãos
* Importar tipos de processo para relacionamento
*
* Execution Groups
* @group execute_alone_group1
*/
class MapeamentoTipoProcessoRelacionamentoOrgaosListagemImportacaoTest extends CenarioBaseTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

use \utilphp\util;

/**
* Execution Groups
* @group execute_alone_group4
*/
class RecebimentoRecusaJustificativaGrandeTest extends CenarioBaseTestCase
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

/**
* Testes de trâmite de processos anexado considerando a devolução do mesmo para a entidade de origem
* Execution Groups
* @group execute_alone_group4
*/
class TramiteProcessoAnexadoComDevolucaoTest extends CenarioBaseTestCase
{
Expand Down
3 changes: 3 additions & 0 deletions tests_super/funcional/tests/TramiteProcessoAnexadoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

/**
* Testes de trâmite de processos anexado
*
* Execution Groups
* @group execute_parallel_group2
*/
class TramiteProcessoAnexadoTest extends CenarioBaseTestCase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?php

/**
* Testes de trâmite de processos anexado considerando a devolução do mesmo para a entidade de origem
*
* Execution Groups
* @group execute_without_receiving
*/
class TramiteProcessoComCancelamentoTest extends CenarioBaseTestCase
{
public static $remetente;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

/**
* Execution Groups
* @group execute_alone_group3
*/
class TramiteProcessoComDevolucaoAlteracaoURLTest extends CenarioBaseTestCase
{
public static $remetente;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
*
* O resultado esperado é que o novo processo recebido seja criado no remetente e o processo tramitado anteriormente
* seja reaberto, atualizado e anexado ao novo processo recem criado
*
* Execution Groups
* @group execute_alone_group5
*/
class TramiteProcessoComDevolucaoAnexadoOutroTest extends CenarioBaseTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*
* O resultado esperado é que o processo seja desbloqueado na origem, e o processo anexado seja criado e adicionado
* na posição correta dentro do processo.
*
* Execution Groups
* @group execute_alone_group5
*/
class TramiteProcessoComDevolucaoContendoOutroAnexadoTest extends CenarioBaseTestCase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
*
* Execution Groups
* @group execute_alone_group6
*/
class TramiteProcessoComDevolucaoTest extends CenarioBaseTestCase
{
public static $remetente;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
*
* Execution Groups
* @group execute_alone_group3
*/
class TramiteProcessoComDevolucaoUnidadeDiferenteTest extends CenarioBaseTestCase
{
public static $remetente;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

/**
* Execution Groups
* @group execute_alone_group2
*/
class TramiteProcessoComDocumentoRestritoHipotesePadraoTest extends CenarioBaseTestCase
{
public static $remetente;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

/**
* Execution Groups
* @group execute_alone_group2
*/
class TramiteProcessoComDocumentoRestritoTest extends CenarioBaseTestCase
{
public static $remetente;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

/**
* Execution Groups
* @group execute_parallel_group3
*/
class TramiteProcessoComHistoricoTest extends CenarioBaseTestCase
{
public static $remetente;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
*
* Execution Groups
* @group execute_parallel_with_two_group1
*/
class TramiteProcessoContendoDocumentoBeSimpleCorrompidoTest extends CenarioBaseTestCase
{
public static $remetente;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*
* Este mesmo documento deve ser recebido e assinalado com cancelado no destinatário e
* a devolução do mesmo processo não deve ser impactado pela inserção de outros documentos
*
* Execution Groups
* @group execute_parallel_group1
*/
class TramiteProcessoContendoDocumentoCanceladoSemTamanhoTest extends CenarioBaseTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*
* Este mesmo documento deve ser recebido e assinalado com cancelado no destinatário e
* a devolução do mesmo processo não deve ser impactado pela inserção de outros documentos
*
* Execution Groups
* @group execute_parallel_with_two_group1
*/
class TramiteProcessoContendoDocumentoCanceladoTest extends CenarioBaseTestCase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

/**
* Execution Groups
* @group execute_parallel_group1
*/
class TramiteProcessoContendoDocumentoExternoMesmoOrgaoTest extends CenarioBaseTestCase
{
public static $remetente;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* @group rodarseparado
* @group rodarseparado2
* @group execute_alone_group1
*/
class TramiteProcessoContendoDocumentoExternoParticionadoTest extends CenarioBaseTestCase
{
public static $remetente;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
*
* Execution Groups
* @group execute_parallel_group1
*/
class TramiteProcessoContendoDocumentoExternoTest extends CenarioBaseTestCase
{
public static $remetente;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

/**
* Execution Groups
* @group execute_parallel_group1
*/
class TramiteProcessoContendoDocumentoGeradoMesmoOrgaoTest extends CenarioBaseTestCase
{
public static $remetente;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

/**
* Execution Groups
* @group execute_alone_group1
*/
class TramiteProcessoContendoDocumentoGeradoTest extends CenarioBaseTestCase
{
public static $remetente;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

/**
* Execution Groups
* @group execute_parallel_group1
*/
class TramiteProcessoContendoDocumentoInternoExternoTest extends CenarioBaseTestCase
{
public static $remetente;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
19-verificar correto recebimento do processo no destino (Órgão 1)
*/

/**
*
* Execution Groups
* @group exxecute_parallel
*/
class TramiteProcessoContendoDocumentoMovidoDestino extends CenarioBaseTestCase
{
public static $remetente;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*
* Este mesmo documento deve ser recebido e assinalado como cancelado no destinatário e
* a devolução do mesmo processo não deve ser impactado pela inserção de outros documentos
*
* Execution Groups
* @group execute_alone_group6
*/
class TramiteProcessoContendoDocumentoMovidoSemAnexoTest extends CenarioBaseTestCase
{
Expand Down
Loading

0 comments on commit cec9130

Please sign in to comment.