Integrate test with robot framework
parent
26886e474b
commit
ad9a8d8388
|
@ -28,6 +28,13 @@ pipeline {
|
||||||
'''
|
'''
|
||||||
echo "Deploy API server for DHCP with Vagrant"
|
echo "Deploy API server for DHCP with Vagrant"
|
||||||
sh 'vagrant up --provider=vmware_esxi --provision'
|
sh 'vagrant up --provider=vmware_esxi --provision'
|
||||||
|
echo 'Create Python venv to work with robotframework'
|
||||||
|
sh '''
|
||||||
|
python3 -m venv robotframework
|
||||||
|
source venv/bin/activate
|
||||||
|
pip install -r requirements.txt
|
||||||
|
'''
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +54,13 @@ pipeline {
|
||||||
}
|
}
|
||||||
stage('Run API tests') {
|
stage('Run API tests') {
|
||||||
steps {
|
steps {
|
||||||
|
dir ('tests/API-dhcp') {
|
||||||
echo 'Running API tests'
|
echo 'Running API tests'
|
||||||
|
sh '''
|
||||||
|
source robotframework/bin/activate
|
||||||
|
robot -d results/ robot/
|
||||||
|
'''
|
||||||
|
}
|
||||||
// Aquí incluirías los comandos para ejecutar tus pruebas
|
// Aquí incluirías los comandos para ejecutar tus pruebas
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,6 +74,13 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
always {
|
always {
|
||||||
|
// Recoger los resultados de los tests
|
||||||
|
robot outputPath: 'tests/API-dhcp/results' ,
|
||||||
|
outputFileName: 'output.xml',
|
||||||
|
logFileName: 'log.html',
|
||||||
|
reportFileName: 'report.html',
|
||||||
|
passThreshold: 100.0,
|
||||||
|
unstableThreshold: 75.0,
|
||||||
// Siempre se ejecutará, independientemente del resultado
|
// Siempre se ejecutará, independientemente del resultado
|
||||||
script {
|
script {
|
||||||
// Elimina la entrada del /etc/hosts
|
// Elimina la entrada del /etc/hosts
|
||||||
|
|
Loading…
Reference in New Issue