Skip to content

Instantly share code, notes, and snippets.

@VladFrost
Last active October 2, 2017 14:34
Show Gist options
  • Save VladFrost/7294068da4cb3fbd2843f517523b7c3d to your computer and use it in GitHub Desktop.
Save VladFrost/7294068da4cb3fbd2843f517523b7c3d to your computer and use it in GitHub Desktop.
node {
def UserTest = load "../${JOB_NAME}@script/Jenkinsfiles.16x/UserTest.groovy"
UserTest.doUserTest('"Абнагимова (продажи)"::1540')
}
node {
def UserTest = load "../${JOB_NAME}@script/Jenkinsfiles.16x/UserTest.groovy"
UserTest.doUserTest('"Романов (Сервис)"::1542')
}
def doUserTest(TESTCLIENT) {
env.RUNNER_V8VERSION='8.3.10.2580'
env.RUNNER_DBUSER='Абдулов (директор)'
env.RUNNER_IBCONNECTION='/F./build/ib'
env.RUNNER_PATHXUNIT='C:/xUnitFor1C/xddTestRunner.epf'
stage('Очистка папок') {
deleteDir()
}
stage('Подготовка окружения') {
git branch: 'develop', url: 'git@gitserver.local:vladfrost/sbm-qa.git'
}
stage('Создание инфобазы из файла') {
cmd('runner init-dev --dt d:/SmallBusiness/buildallfeatures_1_6_x.dt')
}
stage('Установка признака \"Это копия информационной базы\"') {
cmd('runner run --execute ПометитьКакКопиюИБ.epf')
}
stage('Прогон тестов пользователя') {
timeout(60) {cmd("runner xunit tests/user --testclient ${TESTCLIENT} --reportsxunit ГенераторОтчетаJUnitXML{user-junit.xml};ГенераторОтчетаAllureXML{user-testsuite.xml}")}
step([$class: 'JUnitResultArchiver', testResults: '**/user-junit.xml'])
}
}
def cmd(command) {
// при запуске Jenkins не в режиме UTF-8 нужно написать chcp 1251 вместо chcp 65001
if (isUnix()) { sh "${command}" } else { bat "chcp 65001\n${command}"}
}
return this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment