File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,11 @@ parameters:
66 - name : utplsqlVersion
77 default : " "
88 - name : utplsqlDir
9- default : " "
9+ default : " "
10+ - name : test_user
11+ default : " "
12+ - name : test_pwd
13+ default : " "
1014 - name : targetDatabases
1115 type : object
1216 default :
@@ -68,3 +72,27 @@ steps:
6872 connectionString : ${{ trg_db.connectionString}}
6973 script : ${{ script.script}}
7074 displayName : ${{ script.displayName}}
75+
76+ - template : t-extend-utplsqlcli.yml
77+ parameters :
78+ work_dir : $(Build.SourcesDirectory)
79+ connectionString : ${{ trg_db.connectionString}}
80+ test_user : ${{ parameters.test_user }}
81+ test_pwd : ${{ parameters.test_pwd }}
82+ source_path : " source"
83+ test_path : " test"
84+ options : " --debug --failure-exit-code=0"
85+
86+ - task : PublishTestResults@2
87+ inputs :
88+ testResultsFormat : ' JUnit'
89+ testResultsFiles : ' **/junit_test_results.xml'
90+ testRunTitle : ' Publish test results'
91+ displayName : ' Publish test results'
92+
93+ - task : PublishCodeCoverageResults@1
94+ inputs :
95+ codeCoverageTool : ' Cobertura'
96+ summaryFileLocation : ' cobertura.xml'
97+ pathToSources : ' source'
98+ displayName : ' Publish coverage'
Original file line number Diff line number Diff line change 1+ parameters :
2+ - name : work_dir
3+ default : $(Build.SourcesDirectory)
4+ - name : connectionString
5+ default : " "
6+ - name : test_user
7+ default : " "
8+ - name : test_pwd
9+ default : " "
10+ - name : source_path
11+ default : " "
12+ - name : test_path
13+ default : " "
14+ - name : options
15+ default : " "
16+
17+ steps :
18+ - bash : |
19+ cd ${{ parameters.work_dir }}
20+ utplsql run ${{ parameters.test_user }}/${{ parameters.test_pwd }}@//${{ parameters.connectionString }}?oracle.net.disableOob=true \
21+ -source_path=${{ parameters.source_path }} \
22+ -test_path=${{ parameters.test_path }} \
23+ -f=ut_documentation_reporter -c \
24+ -f=ut_coverage_sonar_reporter -o=coverage.xml \
25+ -f=ut_sonar_test_reporter -o=test_results.xml \
26+ -f=ut_coverage_cobertura_reporter -o=cobertura.xml \
27+ -f=ut_junit_reporter -o=junit_test_results.xml \
28+ ${{ parameters.options }}
29+ cat test_results.xml
30+ cat coverage.xml
31+ displayName : ' Run Tests'
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ variables:
1111 UTPLSQL_CLI_VERSION : ' v3.1.8'
1212 UTPLSQL_VERSION : ' v3.1.11'
1313 DOCKHER_HUB_REPO : ' utplsqlv3/oracledb'
14+ DB_USER : ut3_demo
15+ DB_PASS : ut3_demo
1416
1517steps :
1618- template : templates/t-extend-download-binaries.yml
3436 parameters :
3537 utplsqlVersion : ${UTPLSQL_VERSION}
3638 utplsqlDir : ${UTPLSQL_DIR}
39+ test_user : ${DB_USER}
40+ test_pwd : ${DB_PASS}
3741 targetDatabases :
3842 - oracleVersion : " 19c-se2-small"
3943 connectionString : " 127.0.0.1:1521/ORCLCDB"
@@ -46,3 +50,21 @@ steps:
4650 script : " install_headless.sql UT3 UT3 users"
4751 work_dir : " ${UTPLSQL_DIR}/source"
4852
53+ - displayName : " Create Test User"
54+ user : " sys"
55+ password : " oracle"
56+ script : " source/create_user.sql"
57+ work_dir : " $(Build.SourcesDirectory)"
58+
59+ - displayName : " Install Source"
60+ user : " ${DB_USER}"
61+ password : " ${DB_PASS}"
62+ script : " source/install.sql"
63+ work_dir : " $(Build.SourcesDirectory)"
64+
65+ - displayName : " Install Tests"
66+ user : " ${DB_USER}"
67+ password : " ${DB_PASS}"
68+ script : " test/install.sql"
69+ work_dir : " $(Build.SourcesDirectory)"
70+
You can’t perform that action at this time.
0 commit comments