Commit ad7c7b00 authored by Daniel Abarca's avatar Daniel Abarca

Primera entrega

parents
# Default ignored files
/shelf/
/workspace.xml
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredIdentifiers">
<list>
<option value="asposecells" />
</list>
</option>
</inspection_tool>
<inspection_tool class="RobotKeywordNotFound" enabled="false" level="ERROR" enabled_by_default="false" />
</profile>
</component>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11 (RobotAutomatizacionServicios)" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/RobotAutomatizacionServicios.iml" filepath="$PROJECT_DIR$/.idea/RobotAutomatizacionServicios.iml" />
</modules>
</component>
</project>
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR INDIVIDUOS
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=individual.identification=='${item}[4]*'
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/party/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/party
# log to console ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Gestor Agentes - Individuos PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR ORGANIZACIONES
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=organization.name=='${item}[1]*';(type==O)
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/party/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/party
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Gestor Agentes - Organización PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR ROLES
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=name=='${item}[1]*'
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/role/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/role
log to console ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Roles PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR CALENDARIOS
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=id=='${item}[1]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/calendar/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/calendar
&{body_excepciones}= create dictionary caleId=${ID} sortDirection=asc columnName=description
${valores_excepciones}= Obtener data - calendario excepciones ${header} ${body_excepciones} ${session} /service/config-service/calendar-exception/find-by-calendar-id ${ID}
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Calendario PRIMARIA ${flag_reporte} ${reporte} ${valores_excepciones}
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR CATALOGOS
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=identifier=='${item}[1]*'
&{body2}= create dictionary currentPage=0 itemsPerPage=50
# LOG TO CONSOLE ${body}
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/catalog/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/catalog
${valores_catalogos}= Obtener data - catalogos ${header} ${body} ${ID} ${session} /service/config-service/characteristic-value/list-value-group-pagination
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Catalogos PRIMARIA ${flag_reporte} ${reporte} ${valores_catalogos}
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR CICLOS LIQUIDACION
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=name=='${item}[1]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/billing-cycle/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/billing-cycle
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Ciclos de Liquidacion PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR CLASES UBIGEO
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=identifier=='${item}[1]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/class-ubigeo/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/class-ubigeo
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Clase Ubigeo PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR CONCEPTOS
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=identifier=='${item}[1]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/concept/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/concept
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Conceptos PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR EQUIVALENCIAS
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=identifier=='${item}[1]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/equivalence-entity/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/equivalence-entity
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Equivalencias PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR IMPUESTOS
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=code=='${item}[1]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/tax/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/tax
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Impuestos PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR INTERVALOS
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=identifier=='${item}[1]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/interval/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/interval
&{body_condiciones}= crear json
${valores_condiciones}= obtener data - condicion intervalos ${header} ${ID} ${session} /service/config-service/interval-condition/page/${ID}?searchString= ${body_condiciones}
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores_condiciones}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Intervalo PRIMARIA ${flag_reporte} ${reporte} ${valores_condiciones}
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR MONEDAS
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=code=='${item}[1]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/currency/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/currency
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Moneda PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR PARAMETROS DE NEGOCIO
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=key=='${item}[1]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/business-parameter/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/business-parameter
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Parametros de Negocio PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR PARAMETROS DE SISTEMA
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=identifier=='${item}[1]*'
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/input/system-field/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/input/system-field
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Parámetros de sistema PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR TAREAS PROGRAMADAS
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=description=='${item}[1]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/settings/scheduler-task/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/settings/scheduler-task
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Tareas Programadas PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR TIPO DE CAMBIOS
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body_moneda}= create dictionary filterExpression=name=='${item}[1]*'
&{body_moneda_target}= create dictionary filterExpression=name=='${item}[2]*'
${ID_moneda}= Obtener_ID ${header} ${body_moneda} ${session} /service/config-service/currency/page
${ID_moneda_target}= Obtener_ID ${header} ${body_moneda_target} ${session} /service/config-service/currency/page
&{body}= create dictionary filterExpression=currency.id=='${ID_moneda}';targetCurrency.id=='${ID_moneda_target}'
# LOG TO CONSOLE ${body}
${valores}= obtener data - tipo cambio ${header} ${body} ${session} /service/config-service/currency-exchange/page ${item}
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Tipo de Cambio PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR TIPOS CATALOGOS
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
${NUM_SUBSECCIONES}= GET LENGTH ${data_excel}[6]
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=id=='${item}[1]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/catalog-type/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/catalog-type
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Tipos de catálogo PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR TIPOS DE AJUSTES
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=identifier=='${item}[1]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/adjustment-type/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/adjustment-type
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Tipos de Ajuste PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR UBIGEOS
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=identifier=='${item}[1]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/ubigeo/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/ubigeo
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Ubigeo PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR VALORES POSIBLES
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=concept=='${item}[1]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/possible-value/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/possible-value
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Valores posibles PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR CONEXIONES
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=description=='${item}[2]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/database-connection-inventory/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/database-connection-inventory
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Conexiones PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR CREDENCIALES
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=identifier=='${item}[1]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/credential/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/credential
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Credenciales PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Resource ../../Funciones/FuncionesRobot/FuncionesVarias.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR INSUMOS
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=description=='${item}[2]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener ID ${header} ${body} ${session} /service/config-service/input/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/input
# log to console TERMINO DE CONSEGUIR LOS VALORES : ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Insumos PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR REPOSITORIOS
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=identifier=='${item}[1]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/repository/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/repository
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Repositorios PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Resource ../../Funciones/FuncionesRobot/FuncionesVarias.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR ACUERDOS
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=description=='${item}[1]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener ID - Agreement Version ${header} ${body} ${session} /service/config-service/agreement/page ${item}[2]
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/agreement-version
${ID_plan}= obtener id - plan acuerdo ${valores}
${valores_plan}= Obtener data ${header} ${ID_plan} ${session} /service/config-service/commission-plan-version/version
# log to console TERMINO DE CONSEGUIR LOS VALORES DEL PLAN: ${valores_plan}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Acuerdos PRIMARIA ${flag_reporte} ${reporte} ${valores_plan}
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR AJUSTES
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=period=='${item}[2]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener ID - AJUSTES ${header} ${body} ${session} /service/config-service/adjustment/page ${item}
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/adjustment
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Ajustes PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR ESTRUCTURAS
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=description=='${item}[2]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener ID ${header} ${body} ${session} /service/config-service/commission-structure/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/commission-structure
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Estructura de Comisión PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR EXCEPCIONES
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=identifier=='${item}[1]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener ID - Current Version ${header} ${body} ${session} /service/config-service/exception/page ${item}[1] Excepciones
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/exception-version
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Excepciones PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR MATRICES
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=description=='${item}[2]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener ID ${header} ${body} ${session} /service/config-service/point-matrix/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/point-matrix
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Matriz de puntos PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR PENALIDADES
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=description=='${item}[1]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener ID - Current Version ${header} ${body} ${session} /service/config-service/sanction/page ${item}[1] Penalidades
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/sanction-version
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Penalidades PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR PLANES
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
log to console ESTE ES EL ITEM ACTUAL: ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=description=='${item}[1]*'
# LOG TO CONSOLE ${body}
${ID}= Obtener_ID_PLANES ${header} ${body} ${session} /service/config-service/commission-plan/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/commission-plan/version
# log to console TERMINO DE CONSEGUIR LOS VALORES ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Plan de comision PRIMARIA ${flag_reporte} ${reporte}
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR FILTROS
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
# log to console ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=identifier=='${item}[1]*'
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/filter/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/filter
# log to console ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Filtros PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../../Funciones/FuncionesRobot/FuncionesValidacion.robot
Variables ../../Variables/variables.py
*** Variables ***
*** Keywords ***
VALIDAR VISTAS
[Arguments] ${data_excel} ${flag_reporte} ${reporte}
# log to console ${data_excel}
${datos}= get from list ${data_excel} 4
${campos}= get from list ${data_excel} 3
${llave_campos}= get from list ${data_excel} 5
FOR ${item} IN @{datos}
# log to console ${item}[1]
&{header}= create dictionary Content-Type=application/json Authorization=${TOKEN}
&{body}= create dictionary filterExpression=description=='${item}[2]*'
${ID}= Obtener_ID ${header} ${body} ${session} /service/config-service/view/page
${valores}= Obtener data ${header} ${ID} ${session} /service/config-service/view
# log to console ${valores}
validar configuracion ${item} ${valores} ${campos} ${llave_campos} ${data_excel} Vistas PRIMARIA ${flag_reporte} ${reporte} -
END
\ No newline at end of file
from reportlab.platypus import SimpleDocTemplate, Table, Paragraph, Spacer, TableStyle, Image
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.lib.units import inch
from reportlab.lib import colors
from reportlab.lib.pagesizes import A4, landscape
import datetime
import json
def cambiar_formato_archivo(ruta):
ruta_nueva = ruta.replace(".json", ".pdf")
return ruta_nueva
def GenerarReporte(reporte):
ruta = cambiar_formato_archivo(reporte)
doc = SimpleDocTemplate(
ruta,
rightMargin=72, leftMargin=72,
topMargin=72, bottomMargin=18,
pagesize=A4
)
doc.pagesize = landscape(A4)
styles = getSampleStyleSheet()
conjunto_lineas = []
spacer = Spacer(1, 0.25 * inch)
titulo = 'PRUEBA DE VALIDACION DE ENTIDADES DEL MENU DE CONFIGURACION'
para = Paragraph(titulo, styles["Heading1"])
conjunto_lineas.append(para)
fecha = 'FECHA: ' + str(datetime.date.today())
para = Paragraph(fecha, styles["Normal"])
conjunto_lineas.append(para)
conjunto_lineas.append(spacer)
with open(reporte, 'r+') as json_file:
diccionario = json.load(json_file)
contador1 = 1
for i in diccionario:
opcion = diccionario[i]
subtitulo = str(contador1) + '. ' + i
para = Paragraph(subtitulo, styles["Heading2"])
conjunto_lineas.append(para)
contador2 = 1
for elementos in opcion:
subtitulo2 = str(contador1) + '.' + str(contador2) + ' ' + i + ' - ID: ' + str(elementos['ID'])
para = Paragraph(subtitulo2, styles["Heading3"])
conjunto_lineas.append(para)
# SI EXISTE ENTIDAD CORRECTAMENTE CONFIGURADA
if((str(elementos['Valores en excel']) == "[]") and (str(elementos['Valores en interfaz']) == "[]")):
data = [
['Resultado'],
[str(elementos['Resultado'])],
]
# SI EXISTE ENTIDAD PERO NO CORRECTAMENTE CONFIGURADA O SI NO EXISTE ENTIDAD
else:
data = [
['Resultado', 'Valores en excel', 'Valores en interfaz'],
[str(elementos['Resultado']), str(elementos['Valores en excel']),
str(elementos['Valores en interfaz'])],
]
tblstyle = TableStyle([
('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black),
('BOX', (0, 0), (-1, -1), 0.25, colors.black),
('ALIGN', (0, -1), (-1, -1), 'CENTER'),
])
textoNuevoFormato = getSampleStyleSheet()
textoNuevoFormato = textoNuevoFormato["BodyText"]
textoNuevoFormato.wordWrap = 'CJK'
data2 = [[Paragraph(cell, textoNuevoFormato) for cell in row] for row in data]
tbl = Table(data2)
tbl.setStyle(tblstyle)
conjunto_lineas.append(tbl)
if 'Subseccion' in elementos:
subentidades = elementos['Subseccion']
letra = 'A'
for subentidad in subentidades:
tipos_subentidad = list(subentidad.keys())
for num in range(0, len(tipos_subentidad)):
tipo_subentidad = tipos_subentidad[num]
subtitulo3 = letra + '. ' + str(tipo_subentidad)
para = Paragraph(subtitulo3, styles["Heading4"])
conjunto_lineas.append(para)
data = [
['Resultado', 'Valores en excel', 'Valores en interfaz'],
]
tblstyle = TableStyle([
('INNERGRID', (0, 0), (-1, -1), 0.25, colors.black),
('BOX', (0, 0), (-1, -1), 0.25, colors.black),
('ALIGN', (0, -1), (-1, -1), 'CENTER'),
])
filas_subentidad = subentidad[tipo_subentidad]
for fila in filas_subentidad:
print(fila['Valores en excel'])
# EXISTE SUBENTIDAD CORRECTAMENTE CONFIGURADA
if ((str(fila['Valores en excel']) == "[] ") and (
str(fila['Valores en interfaz']) == "[] ")):
registro = [
[str(fila['Resultado']), ' - ',
' - '],
]
else:
registro = [str(fila['Resultado']), str(fila['Valores en excel']),
str(fila['Valores en interfaz'])]
data.append(registro)
textoNuevoFormato = getSampleStyleSheet()
textoNuevoFormato = textoNuevoFormato["BodyText"]
textoNuevoFormato.wordWrap = 'CJK'
data2 = [[Paragraph(cell, textoNuevoFormato) for cell in row] for row in data]
tbl = Table(data2)
tbl.setStyle(tblstyle)
conjunto_lineas.append(tbl)
letra = chr(ord(letra) + 1)
contador2 = contador2 + 1
contador1 = contador1 + 1
doc.build(conjunto_lineas)
if __name__ == '__main__':
ruta_reporte = input('Ingrese ruta del reporte: ')
GenerarReporte(ruta_reporte)
\ No newline at end of file
import json
import os
import random
from datetime import datetime
# import FuncionesPDF
def crear_reporte(ruta_reporte):
if(ruta_reporte == ''):
try:
os.mkdir('CarpetaReportes')
ruta_reporte = 'CarpetaReportes'
except OSError:
pass
num = random.randint(0, 20)
now = datetime.now()
months = ("Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic")
dia = str(now.day)
mes = months[now.month - 1]
año = str(now.year)
hora = str(now.hour)
minuto = str(now.minute)
segundo = str(now.second)
fecha = dia+mes+año+'-'+hora+'-'+minuto+'-'+segundo
reporte = ruta_reporte + '\\Reporte'+str(num)+'-'+fecha+'.json'
return reporte
def llenarReporte_Subentidad(reporte, opcion, id, cadena, valores_excel, valores_interfaz, subseccion):
with open(reporte, 'r+') as json_file:
diccionario = json.load(json_file)
elementos = diccionario[opcion]
for elemento in elementos:
if elemento['ID'] == id :
if 'Subseccion' in elemento:
subentidades = elemento['Subseccion']
# print(subentidades)
for subentidad in subentidades:
if subseccion in subentidad:
data = {
'Valores en excel': valores_excel,
'Valores en interfaz': valores_interfaz,
'Resultado': cadena
}
with open(reporte, 'r+') as file:
subentidad[subseccion].append(data)
file.seek(0)
json.dump(diccionario, file, indent=4)
else:
data = []
valores = {
'Valores en excel': valores_excel,
'Valores en interfaz': valores_interfaz,
'Resultado': cadena
}
data.append(valores)
with open(reporte, 'r+') as file:
subentidad[subseccion] = data
file.seek(0)
json.dump(diccionario, file, indent=4)
else:
data = []
valores_subseccion = {
'Valores en excel': valores_excel,
'Valores en interfaz': valores_interfaz,
'Resultado': cadena
}
data.append(valores_subseccion)
data2 = []
valores = {
subseccion: data
}
data2.append(valores)
with open(reporte, 'r+') as file:
elemento['Subseccion'] = data2
file.seek(0)
json.dump(diccionario, file, indent=4)
def llenarReporte(reporte, opcion, cadena, valores_excel, valores_interfaz, id, estado_reporte):
if estado_reporte != 'Terminado':
existe = os.path.exists(reporte)
if existe == True:
with open(reporte, 'r+') as json_file:
lista_opciones = json.load(json_file)
if opcion in lista_opciones:
data = {
'ID': id,
'Valores en excel': valores_excel,
'Valores en interfaz': valores_interfaz,
'Resultado': cadena
}
with open(reporte, 'r+') as file:
file_data = json.load(file)
file_data[opcion].append(data)
file.seek(0)
json.dump(file_data, file, indent=4)
else:
data = []
valores = {
'ID': id,
'Valores en excel': valores_excel,
'Valores en interfaz': valores_interfaz,
'Resultado': cadena
}
data.append(valores)
with open(reporte, 'r+') as file:
file_data = json.load(file)
file_data[opcion] = data
file.seek(0)
json.dump(file_data, file, indent=4)
else:
data = {}
data[opcion] = []
data[opcion].append(
{
'ID': id,
'Valores en excel': valores_excel,
'Valores en interfaz': valores_interfaz,
'Resultado': cadena
}
)
with open(reporte, 'w') as file:
json.dump(data, file, indent=4)
# else:
# FuncionesPDF.GenerarReporte(reporte)
import json
import ast
import datetime
def modificar_fecha_excepcion(fecha):
fechaN = fecha.split('T')
fechaN = fechaN[0]
return fechaN
print(modificar_fecha_excepcion('2023-10-29T00:00:00-05:00'))
def separar_string(cadena):
lista = cadena.split('/##/')
return lista
def modificar_tipo_excepcion(cadena):
if (cadena=="Salario Base"):
tipo = "B"
elif (cadena=="Meta"):
tipo = "M"
elif (cadena == "Sueldo Variable"):
tipo = "V"
return tipo
def modificar_origen_excepcion(cadena):
if (cadena=="Formacion" or cadena=="Formación"):
tipo = "FOR"
elif (cadena=="Suspension" or cadena=="Suspensión"):
tipo = "SUS"
elif (cadena == "Incapacidad"):
tipo = "INC"
elif (cadena == "Vacaciones"):
tipo = "VAC"
elif (cadena == "Termino de relaciones laborales"):
tipo = "TRL"
return tipo
def elemento_API_esta_en_Lista_elemento_EXCEL(lista, cadena):
lista2 = separar_string(cadena)
RESULTADO = False
contador = 0
for i in lista:
for j in lista2:
if(i == j):
contador += 1
if (contador==len(lista)):
RESULTADO = True
return RESULTADO
lista = ['Postpago','MIFI']
lista2 = ['MIF','Postpago']
cadena = 'Postpago/##/MIFI'
print(elemento_API_esta_en_Lista_elemento_EXCEL(lista2,cadena))
def crear_json():
dict = {
"currentPage":0,
"itemsPerPage":100,
"data":[]
}
return dict
# print(crear_json())
def modificar_comillas(cadena):
cadena = ast.literal_eval(cadena)
return cadena
def mostrar_tipo(c):
tipo = type(c)
return tipo
# c = "{'32': {'id': 54, 'version': 0, 'identifier': 'huawei', 'description': 'Huawei', 'value': 'Huawei', 'defaultValue': True}, '29': 'Id01', '30': 'Celular usado xxxx', '31': '15', 'id_catalog_item': '317'}"
# print(type(modificar_comillas(c)))
def quitar_corchetes(cadena):
cadena_nueva = cadena[1:]
cadena_nueva = cadena_nueva[:-1]
return cadena_nueva
def cambiar_dia(dia):
dia = str(dia)
if ((dia=="Lunes") or (dia=="lunes")):
n_dia = 1
elif ((dia=="Martes") or (dia=="martes")):
n_dia = 2
elif ((dia=="Miercoles") or (dia=="miercoles") or (dia=="Miércoles") or (dia=="miércoles")):
n_dia = 3
elif ((dia=="Jueves") or (dia=="jueves")):
n_dia = 4
elif ((dia=="Viernes") or (dia=="viernes")):
n_dia = 5
elif ((dia=="Sabado") or (dia=="sabado") or (dia=="Sábado") or (dia=="sábado")):
n_dia = 6
elif ((dia=="Domingo") or (dia=="domingo")):
n_dia = 7
else:
n_dia = 0
return n_dia
def change_hour_API(hora):
hora_nueva=hora.replace('Z','')
return hora_nueva
def change_hour(hora, P):
unidad_hora = hora.hour
if ((P == "PM") & (unidad_hora != 12)):
unidad_hora = unidad_hora + 12
if ((P == "AM") & (unidad_hora == 12)):
unidad_hora = 0
hora2 = hora.replace(hour=unidad_hora)
hora2 = hora2.strftime("%H:%M:%S")
return hora2
def change_format_date2(fecha):
fechaN = fecha.strftime('%Y-%m-%d')
return fechaN
def change_format_date(fecha):
fechaN = fecha.strftime('%d/%m/%Y')
return fechaN
def modificar_si_es_fecha(cadena):
if(isinstance(cadena, datetime.datetime)):
cadena = change_format_date(cadena)
return cadena
def modificar_valor_excel(valor, campo):
if (campo=="Frecuencia"):
if ((valor == "Unico") or (valor == "Único") or (valor == "unico") or (valor == "único")):
valor_nuevo = "U"
elif ((valor == "Rango") or (valor == "rango") or (valor == "Entre rango de fechas") or (valor == "entre rango de fechas")):
valor_nuevo = "R"
elif ((valor == "Anual") or (valor == "anual") or (valor == "Anual - Día específico") or (valor == "anual - dia especifico") or (valor == "Anual - Dia especifico") or (valor == "anual - día específico")):
valor_nuevo = "Y"
elif ((valor == "Semanal") or (valor == "semanal") or (valor == "Anual - Semana del mes") or (valor == "anual - semana del mes")):
valor_nuevo = "W"
else:
valor_nuevo = "-"
elif (campo=="Tipo"):
if ((valor == "Feriado") or (valor == "feriado")):
valor_nuevo = "H"
elif ((valor == "Excepción no laboral") or (valor == "Excepcion no laboral") or (valor == "excepción no laboral") or (valor == "excepcion no laboral")):
valor_nuevo = "N"
elif ((valor == "Excepción laboral") or (valor == "excepción laboral") or (valor == "Excepcion laboral") or (valor == "excepcion laboral")):
valor_nuevo = "W"
else:
valor_nuevo = "-"
else:
valor_nuevo = "-"
return valor_nuevo
def concatenar(cadena, cadena2):
nueva_cadena = str(cadena) + "&" + str(cadena2)
return nueva_cadena
def concatenar2(cadena, cadena2):
nueva_cadena = str(cadena) + str(cadena2)
return nueva_cadena
def traer_campos_subseccion_de_lista(datos, n):
n = int(n)
campos = datos[7]
campos_subseccion = campos[n]
return campos_subseccion
def traer_valores_subseccion_de_lista(datos, n, id):
n = int(n)
valores = datos[8]
lista_valores = []
valor = valores[n]
for j in valor:
valor_id = j[0]
if (valor_id == id):
lista_valores.append(j)
return lista_valores
def traer_ubicacion_campos_subseccion_de_lista(datos, n):
n = int(n)
ubica_campos = datos[9]
ubica_campos_subseccion = ubica_campos[n]
return ubica_campos_subseccion
def obtener_ubicacion_de_lista(ubicaciones, n):
n = int(n)
lista_ubicacion = ubicaciones[n]
return lista_ubicacion
def mostrar_json_en_consola(resultado, val_excel, val_interfaz):
json = {
'Resultado': resultado,
'Valores en excel': val_excel,
'Valores en interfaz': val_interfaz
}
return json
def sumar(n,m):
z = int(n) + int(m)
return z
def separarRutaJSON(cadena):
lista = cadena.split('[${i}].')
return lista
print(separarRutaJSON('intervalConditionBeanList[${i}].intervalRangeBeanList[${i}].startRange'))
# def find_escape_sequence(cadena,caracter):
#
# cadena = str(cadena)
# pos = []
#
# pos_ini = cadena.find(caracter)
#
# return pos
def remove_escape_sequences(string):
cadena = string.encode('utf-8').decode('unicode_escape')
# cadena_json = json.loads(cadena, strict=False)
cadena = cadena.replace('ó','o')
# return cadena_json
return cadena
def cambiarCaracterUTF8(cadena):
nueva_cadena = str(cadena)
# nueva_cadena = nueva_cadena.encode(encoding='UTF-8',errors="ignore")
# nueva_cadena = "''" + str(cadena) + "''"
# nueva_cadena = nueva_cadena.replace("\u0000", '')
# nueva_cadena = nueva_cadena.replace("\xc3\x81", 'A')
# nueva_cadena = nueva_cadena.replace("\xc3\x89", 'E')
# nueva_cadena = nueva_cadena.replace("\xc3\x8d", 'I')
# nueva_cadena = nueva_cadena.replace("\xc3\x91", 'N')
# nueva_cadena = nueva_cadena.replace("\xc3\x93", 'O')
# nueva_cadena = nueva_cadena.replace("\xc3\x9a", 'U')
# nueva_cadena = nueva_cadena.replace("\xc3\x9c", 'U')
# nueva_cadena = nueva_cadena.replace("\xc3\xa1", 'a')
# nueva_cadena = nueva_cadena.replace("\xc3\xa9", 'e')
# nueva_cadena = nueva_cadena.replace("\xc3\xad", 'i')
# nueva_cadena = nueva_cadena.replace("\xc3\xb1", 'n')
# nueva_cadena = nueva_cadena.replace("\xc3\xb3", 'o')
# nueva_cadena = nueva_cadena.replace("\xc3\xba", 'u')
# nueva_cadena = nueva_cadena.replace("\xc3\xbc", 'u')
return nueva_cadena
# print(cambiarCaracterUTF8("""{"id":81,"version":3,"type":"O","status":"A","creationDate":"2022-02-23T00:00:00-05:00","liquidation":"Y","email":"","phone":"","person":"","organizationBean":{"id":22,"version":1,"type":"O","name":"LIQ E5 Digital Inspire","identification":"901164937","channelType":"I","channelClass":"C","logo":"","organizationUnitType":"\u0000","organizationStructureBeanList":[{"id":220,"version":0,"from":"2022-02-23T00:00:00-05:00","party":78,"individual":55,"individualName":"LIQ E5 Manrique","role":23,"roleName":"Organizaci\xc3\xb3n Remoto - Agentes E-dealers"}],"responsible":55,"responsibleName":"LIQ E5 Manrique","representative":84,"representativeName":"LIQ LUIS ERNESTO MU\xc3\x91OZ BALLESTEROS / LIQ E1 WOM 13ENE","liquidationIndividual":false,"segmentationBeanList":[]},"partyBeanList":[]}"""))
# print(remove_escape_sequences("""{"id":81,"version":3,"type":"O","status":"A","creationDate":"2022-02-23T00:00:00-05:00","liquidation":"Y","email":"","phone":"","person":"","organizationBean":{"id":22,"version":1,"type":"O","name":"LIQ E5 Digital Inspire","identification":"901164937","channelType":"I","channelClass":"C","logo":"","organizationUnitType":"\u0000","organizationStructureBeanList":[{"id":220,"version":0,"from":"2022-02-23T00:00:00-05:00","party":78,"individual":55,"individualName":"LIQ E5 Manrique","role":23,"roleName":"Organizaci\xc3\xb3n Remoto - Agentes E-dealers"}],"responsible":55,"responsibleName":"LIQ E5 Manrique","representative":84,"representativeName":"LIQ LUIS ERNESTO MU\xc3\x91OZ BALLESTEROS / LIQ E1 WOM 13ENE","liquidationIndividual":false,"segmentationBeanList":[]},"partyBeanList":[]}"""))
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../Componentes/MenuAgentes/Roles.robot
Resource ../Componentes/MenuAgentes/Individuos.robot
Resource ../Componentes/MenuAgentes/Organizaciones.robot
Library ../Funciones/FuncionesPython/LecturaExcel.py
Library ../Funciones/FuncionesPython/FuncionesReporte.py
Variables ../Variables/variables.py
*** Variables ***
*** Test Cases ***
TC VALIDACION DEL MENU DE CONFIGURACION
Create Session ${session} ${URL_BASE}
${reporte}= crear reporte ${ruta_reporte}
# ${data_excel}= llamar datos excel Roles ${ruta_excel} Agentes
# VALIDAR ROLES ${data_excel} ${flag_reporte} ${reporte}
#
# ${data_excel}= llamar datos excel Gestor Agentes - Individuos ${ruta_excel} Agentes
# VALIDAR INDIVIDUOS ${data_excel} ${flag_reporte} ${reporte}
${data_excel}= llamar datos excel Gestor Agentes - Organización ${ruta_excel} Agentes
VALIDAR ORGANIZACIONES ${data_excel} ${flag_reporte} ${reporte}
llenarreporte ${reporte} - - - - - Terminado
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../Componentes/MenuConfiguracion/Calendarios.robot
Resource ../Componentes/MenuConfiguracion/Catalogos.robot
Resource ../Componentes/MenuConfiguracion/CicloLiquidacion.robot
Resource ../Componentes/MenuConfiguracion/ClaseUbigeo.robot
Resource ../Componentes/MenuConfiguracion/Conceptos.robot
Resource ../Componentes/MenuConfiguracion/Equivalencias.robot
Resource ../Componentes/MenuConfiguracion/Impuestos.robot
Resource ../Componentes/MenuConfiguracion/Intervalos.robot
Resource ../Componentes/MenuConfiguracion/Moneda.robot
Resource ../Componentes/MenuConfiguracion/ParametroNegocio.robot
Resource ../Componentes/MenuConfiguracion/ParametroSistema.robot
Resource ../Componentes/MenuConfiguracion/TareaProgramada.robot
Resource ../Componentes/MenuConfiguracion/TipoCambio.robot
Resource ../Componentes/MenuConfiguracion/TipoCatalogo.robot
Resource ../Componentes/MenuConfiguracion/TiposAjuste.robot
Resource ../Componentes/MenuConfiguracion/Ubigeo.robot
Resource ../Componentes/MenuConfiguracion/ValoresPosibles.robot
Library ../Funciones/FuncionesPython/LecturaExcel.py
Library ../Funciones/FuncionesPython/FuncionesReporte.py
Variables ../Variables/variables.py
*** Variables ***
*** Test Cases ***
TC VALIDACION DEL MENU DE CONFIGURACION
Create Session ${session} ${URL_BASE}
${reporte}= crear reporte ${ruta_reporte}
${data_excel}= llamar datos excel Parámetros de sistema ${ruta_excel} Parametros
VALIDAR PARAMETROS DE SISTEMA ${data_excel} ${flag_reporte} ${reporte}
#
# ${data_excel}= llamar datos excel Parametros de Negocio ${ruta_excel} Parametros
# VALIDAR PARAMETROS DE NEGOCIO ${data_excel} ${flag_reporte} ${reporte}
#
# ${data_excel}= llamar datos excel Tareas Programadas ${ruta_excel} Parametros
# VALIDAR TAREAS PROGRAMADAS ${data_excel} ${flag_reporte} ${reporte}
#
# ${data_excel}= llamar datos excel Moneda ${ruta_excel} Parametros
# VALIDAR MONEDAS ${data_excel} ${flag_reporte} ${reporte}
# ${data_excel}= llamar datos excel Ubigeo ${ruta_excel} Parametros
# VALIDAR UBIGEOS ${data_excel} ${flag_reporte} ${reporte}
#
# ${data_excel}= llamar datos excel Tipos de Ajuste ${ruta_excel} Parametros
# VALIDAR TIPOS DE AJUSTES ${data_excel} ${flag_reporte} ${reporte}
# ${data_excel}= llamar datos excel Calendario ${ruta_excel} Parametros
# VALIDAR CALENDARIOS ${data_excel} ${flag_reporte} ${reporte}
# ${data_excel}= llamar datos excel Tipos de catálogo ${ruta_excel} Parametros
# VALIDAR TIPOS CATALOGOS ${data_excel} ${flag_reporte} ${reporte}
# NECESITA LA FUNCION ENCODE
# ${data_excel}= llamar datos excel Catalogos ${ruta_excel} Parametros
# VALIDAR CATALOGOS ${data_excel} ${flag_reporte} ${reporte}
##
# ${data_excel}= llamar datos excel Valores posibles ${ruta_excel} Parametros
# VALIDAR VALORES POSIBLES ${data_excel} ${flag_reporte} ${reporte}
# NECESITA FUNCION BUSQUEDA
# ${datos}= llamar datos excel Tipo de Cambio ${ruta_excel} Parametros
# validar tipo de cambios ${datos} ${flag_reporte} ${reporte}
# ${data_excel}= llamar datos excel Ciclos de Liquidacion ${ruta_excel} Parametros
# VALIDAR CICLOS LIQUIDACION ${data_excel} ${flag_reporte} ${reporte}
##
# ${data_excel}= llamar datos excel Conceptos ${ruta_excel} Parametros
# VALIDAR CONCEPTOS ${data_excel} ${flag_reporte} ${reporte}
#
# ${data_excel}= llamar datos excel Equivalencias ${ruta_excel} Parametros
# VALIDAR EQUIVALENCIAS ${data_excel} ${flag_reporte} ${reporte}
#
# ${data_excel}= llamar datos excel Impuestos ${ruta_excel} Parametros
# VALIDAR IMPUESTOS ${data_excel} ${flag_reporte} ${reporte}
#
# ${data_excel}= llamar datos excel Clase Ubigeo ${ruta_excel} Parametros
# VALIDAR CLASES UBIGEO ${data_excel} ${flag_reporte} ${reporte}
#
# ${data_excel}= llamar datos excel Intervalo ${ruta_excel} Parametros
# VALIDAR INTERVALOS ${data_excel} ${flag_reporte} ${reporte}
llenarreporte ${reporte} - - - - - Terminado
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../Componentes/MenuExtraccion/Conexiones.robot
Resource ../Componentes/MenuExtraccion/Credenciales.robot
Resource ../Componentes/MenuExtraccion/Insumos.robot
Resource ../Componentes/MenuExtraccion/Repositorios.robot
Resource ../Componentes/MenuConfiguracion/ParametroSistema.robot
Library ../Funciones/FuncionesPython/LecturaExcel.py
Library ../Funciones/FuncionesPython/FuncionesReporte.py
Variables ../Variables/variables.py
*** Variables ***
*** Test Cases ***
TC VALIDACION DEL MENU DE EXTRACCION
Create Session ${session} ${URL_BASE}
${reporte}= crear reporte ${ruta_reporte}
# ${data_excel}= llamar datos excel Credenciales ${ruta_excel} Extraccion
# VALIDAR CREDENCIALES ${data_excel} ${flag_reporte} ${reporte}
# ${data_excel}= llamar datos excel Conexiones ${ruta_excel} Extraccion
# VALIDAR CONEXIONES ${data_excel} ${flag_reporte} ${reporte}
# ${data_excel}= llamar datos excel Repositorios ${ruta_excel} Extraccion
# VALIDAR REPOSITORIOS ${data_excel} ${flag_reporte} ${reporte}
${data_excel}= llamar datos excel Insumos ${ruta_excel} Extraccion
VALIDAR INSUMOS ${data_excel} ${flag_reporte} ${reporte}
llenarreporte ${reporte} - - - - - Terminado
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../Componentes/MenuGestores/Acuerdos.robot
Resource ../Componentes/MenuGestores/Ajustes.robot
Resource ../Componentes/MenuGestores/Estructuras.robot
Resource ../Componentes/MenuGestores/Excepciones.robot
Resource ../Componentes/MenuGestores/Matrices.robot
Resource ../Componentes/MenuGestores/Penalidades.robot
Resource ../Componentes/MenuGestores/Planes.robot
Library ../Funciones/FuncionesPython/LecturaExcel.py
Library ../Funciones/FuncionesPython/FuncionesReporte.py
Variables ../Variables/variables.py
*** Variables ***
*** Test Cases ***
TC VALIDACION DEL MENU DE GESTORES
Create Session ${session} ${URL_BASE}
${reporte}= crear reporte ${ruta_reporte}
# ${data_excel}= llamar datos excel Ajustes ${ruta_excel} Gestores
# VALIDAR AJUSTES ${data_excel} ${flag_reporte} ${reporte}
# ${data_excel}= llamar datos excel Plan de comision ${ruta_excel} Gestores
# VALIDAR PLANES ${data_excel} ${flag_reporte} ${reporte}
# ${data_excel}= llamar datos excel Penalidades ${ruta_excel} Gestores
# VALIDAR PENALIDADES ${data_excel} ${flag_reporte} ${reporte}
# ${data_excel}= llamar datos excel Matriz de puntos ${ruta_excel} Gestores
# VALIDAR MATRICES ${data_excel} ${flag_reporte} ${reporte}
# ${data_excel}= llamar datos excel Excepciones ${ruta_excel} Gestores
# VALIDAR EXCEPCIONES ${data_excel} ${flag_reporte} ${reporte}
# ${data_excel}= llamar datos excel Acuerdos ${ruta_excel} Gestores
# VALIDAR ACUERDOS ${data_excel} ${flag_reporte} ${reporte}
${data_excel}= llamar datos excel Estructura de Comisión ${ruta_excel} Gestores
VALIDAR ESTRUCTURAS ${data_excel} ${flag_reporte} ${reporte}
llenarreporte ${reporte} - - - - - Terminado
\ No newline at end of file
*** Settings ***
Library RequestsLibrary
Library JSONLibrary
Library Collections
Library SeleniumLibrary
Resource ../Funciones/FuncionesRobot/FuncionesAPI.robot
Resource ../Componentes/MenuInterfaz/Filtros.robot
Resource ../Componentes/MenuInterfaz/Vistas.robot
Library ../Funciones/FuncionesPython/LecturaExcel.py
Library ../Funciones/FuncionesPython/FuncionesReporte.py
Variables ../Variables/variables.py
*** Test Cases ***
TC VALIDACION DEL MENU DE INTERFAZ
Create Session ${session} ${URL_BASE}
${reporte}= crear reporte ${ruta_reporte}
${data_excel}= llamar datos excel Vista ${ruta_excel} Interfaz
VALIDAR VISTAS ${data_excel} ${flag_reporte} ${reporte}
${data_excel}= llamar datos excel Filtro ${ruta_excel} Interfaz
VALIDAR FILTROS ${data_excel} ${flag_reporte} ${reporte}
llenarreporte ${reporte} - - - - - Terminado
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
PARAMETRO DE NEGOCIO
http://int.bcom.tbs.com:980/service/config-service/business-parameter/page
http://int.bcom.tbs.com:980/service/config-service/business-parameter/84
CALENDARIO
http://int.bcom.tbs.com:980/service/config-service/calendar/page
http://int.bcom.tbs.com:980/service/config-service/calendar/zzzzz
http://int.bcom.tbs.com:980/service/config-service/calendar-exception/find-by-calendar-id
TAREA PROGRAMADA
http://int.bcom.tbs.com:980/service/config-service/settings/scheduler-task/page
http://int.bcom.tbs.com:980/service/config-service/settings/scheduler-task/2
PARAMETRO DE SISTEMA
http://int.bcom.tbs.com:980/service/config-service/input/system-field/page
http://int.bcom.tbs.com:980/service/config-service/input/system-field/3
TIPO DE CATALOGO
http://int.bcom.tbs.com:980/service/config-service/catalog-type/page
http://int.bcom.tbs.com:980/service/config-service/catalog-type/sub-tcatalog
CATALOGO
http://int.bcom.tbs.com:980/service/config-service/catalog/page
http://int.bcom.tbs.com:980/service/config-service/catalog/68
http://int.bcom.tbs.com:980/service/config-service/characteristic-value/list-value-group-pagination/68
VALORES POSIBLES
http://int.bcom.tbs.com:980/service/config-service/possible-value/page
http://int.bcom.tbs.com:980/service/config-service/possible-value/15
MONEDA
http://int.bcom.tbs.com:980/service/config-service/currency/page
http://int.bcom.tbs.com:980/service/config-service/currency/13
TIPO DE CAMBIO
http://int.bcom.tbs.com:980/service/config-service/currency-exchange/page
CICLO DE LIQUIDACION
http://int.bcom.tbs.com:980/service/config-service/billing-cycle/page
http://int.bcom.tbs.com:980/service/config-service/billing-cycle/4
CONCEPTOS
http://int.bcom.tbs.com:980/service/config-service/concept/page
http://int.bcom.tbs.com:980/service/config-service/concept/1
EQUIVALENCIAS
http://int.bcom.tbs.com:980/service/config-service/equivalence-entity/page
http://int.bcom.tbs.com:980/service/config-service/equivalence-entity/10
CLASE UBIGEO
http://int.bcom.tbs.com:980/service/config-service/class-ubigeo/page
http://int.bcom.tbs.com:980/service/config-service/class-ubigeo/5
UBIGEO
http://int.bcom.tbs.com:980/service/config-service/ubigeo/page
http://int.bcom.tbs.com:980/service/config-service/ubigeo/3
IMPUESTOS
http://int.bcom.tbs.com:980/service/config-service/tax/page
http://int.bcom.tbs.com:980/service/config-service/tax/4
INTERVALO
http://int.bcom.tbs.com:980/service/config-service/interval/page
http://int.bcom.tbs.com:980/service/config-service/interval/3
TIPOS DE AJUSTES
http://int.bcom.tbs.com:980/service/config-service/adjustment-type/page
http://int.bcom.tbs.com:980/service/config-service/adjustment-type/3
http://192.168.27.29:38080/service/config-service/interval-condition/page/621?searchString=
http://192.168.27.29:38080/service/config-service/interval-condition/25921/ranges
ROLES
http://int.bcom.tbs.com:980/service/config-service/role/page
http://int.bcom.tbs.com:980/service/config-service/role/46
INDIVIDUOS
http://int.bcom.tbs.com:980/service/config-service/party/page
http://int.bcom.tbs.com:980/service/config-service/party/233
ORGANIZACIONES
http://int.bcom.tbs.com:980/service/config-service/party/page
http://int.bcom.tbs.com:980/service/config-service/party/232
INSUMOS
http://int.bcom.tbs.com:980/service/config-service/input/page
http://int.bcom.tbs.com:980/service/config-service/input/146
REPOSITORIOS
http://int.bcom.tbs.com:980/service/config-service/repository/page
http://int.bcom.tbs.com:980/service/config-service/repository/27
CREDENCIALES
http://int.bcom.tbs.com:980/service/config-service/credential/page
http://int.bcom.tbs.com:980/service/config-service/credential/7
CONEXIONES
http://int.bcom.tbs.com:980/service/config-service/database-connection-inventory/page
http://int.bcom.tbs.com:980/service/config-service/database-connection-inventory/2
MATRICES
http://int.bcom.tbs.com:980/service/config-service/point-matrix/page
http://int.bcom.tbs.com:980/service/config-service/point-matrix/10
ESTRUCTURAS
http://int.bcom.tbs.com:980/service/config-service/commission-structure/page
http://int.bcom.tbs.com:980/service/config-service/commission-structure/80
PENALIDADES
http://int.bcom.tbs.com:980/service/config-service/sanction/page
http://int.bcom.tbs.com:980/service/config-service/sanction-version/7
PLANES
http://int.bcom.tbs.com:980/service/config-service/commission-plan/page
http://int.bcom.tbs.com:980/service/config-service/commission-plan/version/51&1
ACUERDOS
http://int.bcom.tbs.com:980/service/config-service/agreement/page
http://int.bcom.tbs.com:980/service/config-service/agreement-version/76
http://int.bcom.tbs.com:980/service/config-service/commission-plan-version/version/90 <-- para obtener plan y luego estructura
EXCEPCIONES
http://int.bcom.tbs.com:980/service/config-service/exception/page
http://int.bcom.tbs.com:980/service/config-service/exception-version/1
AJUSTES
http://int.bcom.tbs.com:980/service/config-service/adjustment/page
http://int.bcom.tbs.com:980/service/config-service/adjustment/8
VISTAS
http://int.bcom.tbs.com:980/service/config-service/view/page
http://int.bcom.tbs.com:980/service/config-service/view/27
FILTROS
http://int.bcom.tbs.com:980/service/config-service/filter/page
http://int.bcom.tbs.com:980/service/config-service/filter/27
\ No newline at end of file
URL_BASE = 'http://int.bcom.tbs.com:980'
# URL_BASE = 'http://192.168.27.29:38080'
TOKEN = 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJZMXdqNFd4NlUwaDVkTW1aY3U0Z0praURaUFM5UnVCeURHQmpubDZPY2ZZIn0.eyJleHAiOjE2ODc4ODEyNzUsImlhdCI6MTY4Nzg4MDk3NSwiYXV0aF90aW1lIjoxNjg3ODgwOTY3LCJqdGkiOiI2NWZmNWYzNC1lYzlkLTQzODctYjEyZS02MzE3ZGQyYmUwNTkiLCJpc3MiOiJodHRwOi8vdGVzdC5iY29tLnRicy5jb206NDgwOTUvYXV0aC9yZWFsbXMvQkNPTSIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiJlZmE0MzVjNC1kNmFiLTRkNzAtYWVmMC00NjBmNjMxMWEzNzEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJiY29tLWZyb250ZW5kIiwibm9uY2UiOiI5YzNjYzJjNy1lOWFlLTQ1MDItYjljOS0wMGZiY2IyMmMxZmMiLCJzZXNzaW9uX3N0YXRlIjoiNmZkN2QwMzYtZGVmOC00MWFkLWEzNzgtYTJiZDhlMjI3MjRlIiwiYWNyIjoiMSIsImFsbG93ZWQtb3JpZ2lucyI6WyJodHRwOi8vZGV2LmtleWNsb2FrLmJjb20udGJzLmNvbTo4MDgwIiwiaHR0cHM6Ly9kZXYuYmNvbS50YnMuY29tOjg0NDMiLCJodHRwOi8vZGV2LmJjb20udGJzLmNvbTo4MDgwIiwiaHR0cDovLzE5Mi4xNjguMjcuMTMyOjMxMDI3IiwiaHR0cDovL2xvY2FsaG9zdDo0MjAwIiwiaHR0cDovL2ludC5iY29tLnRicy5jb206OTgwIiwiaHR0cDovL2Rldi5saXF1aWRhdGlvbi5iY29tLnRicy5jb206ODA4MCIsImh0dHA6Ly9xYS5iY29tLnRicy5jb206ODA4MCIsImh0dHA6Ly90ZXN0LmJjb20udGJzLmNvbTo1ODA4MCIsImh0dHA6Ly8xOTIuMTY4LjI3LjEzMzozMTAyNyIsImh0dHBzOi8vZGV2LmxpcXVpZGF0aW9uLmJjb20udGJzLmNvbTo4NDQzIiwiaHR0cDovL2ludC5iY29tLnRicy5jb206MzgwODAiLCJodHRwOi8vaW50LmJjb20udGJzLmNvbTo4MDgwIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJiYXRjaC1leGVjdXRpb24iLCJhZ2VudGUiLCJxdWVyeV9zZXJ2aWNlX3JvbGUiLCJhdXRoX3Jlc291cmNlX3JvbGUiLCJlamVjdXRpdm8iLCJhZG1pbiIsImFnZW50ZS1jb21lcmNpYWwtZXh0ZXJubyIsImd1ZXNzIiwib2ZmbGluZV9hY2Nlc3MiLCJhZ2VudGUtY29tZXJjaWFsIiwidW1hX2F1dGhvcml6YXRpb24iLCJjb25maWciLCJ1c2VyIiwic3VwZXJ2aXNvciJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoib3BlbmlkIGVtYWlsIHByb2ZpbGUiLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwibmFtZSI6Ikx1aXMgVmFzcXVleiIsInByZWZlcnJlZF91c2VybmFtZSI6Imx2YXNxdWV6IiwiZ2l2ZW5fbmFtZSI6Ikx1aXMiLCJsb2NhbGUiOiJlcyIsImZhbWlseV9uYW1lIjoiVmFzcXVleiIsInRlbmFudCI6InRlbmFudDEiLCJlbWFpbCI6Imx2YXNxdWV6QGJ5dGVzdy5jb20ifQ.QQrg67ZtU7vaxK8HwbGLWN7nn3rE0mlymb6EdysARbHK2fZT2bo9bXU1PnfYAEC7oMzvKr8wj-xympiJRbr8_vsVyuGv5Pab4eb_nd3muwA9ZBd2BE2LjeF_GWnXYRt3mTMm8E8ZWrs1SFT2cIK-4MRVJtwhA886tEas8dqnIqoFad3wl8uIIVx85MMllEYCYybvUME-U1esPeT9opg6c241Lal-eWVuFM1tuZeWUW9IcvFa3v6f4haGSBboWrbp_f1NRTSrPHUQthBu3QB_yXuvVXfpZoo0p53jl66Q2N4qqTFwNa8r4v3mwerldSLC0rIiFhWD8nLBhD_TiP9dNQ'
session = 'BCOM'
# VARIABLES NECECESARIAS PARA EXTRACCIÓN DE DATOS
ruta_excel = "D:\\DATOS 14 10 22\\Escritorio\\Proyectos y Trabajos personales\\Empresa BYTE\\ficheros ROBOT\\Configuracion_API.xlsx"
# VARIABLES NECESARIAS PARA LA CREACION Y MANEJO DEL REPORTE (RUTA DEL REPORTE Y FLAG DE REPORTE)
# EN LA RUTA NO INCLUIR EL NOMBRE DEL REPORTE, SOLO LA UBICACION
# EN CASO NO SE QUIERA ESPECIFICAR UNA RUTA PARA EL REPORTE,
# DEJAR LA VARIABLE DE LA SIGUIENTE MANERA:
# ruta_reporte = ''
ruta_reporte = 'C:\\Users\\Daniel\\Desktop\\REPORTE'
# POSIBLES VALORES PARA DETERMINAR LA FORMA DE MOSTRAR EL REPORTE:
# CONSOLA --> IMPRIMIR EN TERMINAL
# REPORTE --> IMPRIMIR UN REPORTE EN UN ARCHIVO JSON
# AMBOS --> IMPRIME EN CONSOLA Y EN REPORTE
flag_reporte = 'AMBOS'
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment