diff --git a/src-modules/module/qa/conf/qa.xml b/src-modules/module/qa/conf/qa.xml index 8a762d3..39f53b5 100644 --- a/src-modules/module/qa/conf/qa.xml +++ b/src-modules/module/qa/conf/qa.xml @@ -1,6 +1,6 @@ - @@ -9,7 +9,58 @@ system="Qualitätssicherung" thema="Qualitätssicherung" thema_parent="Abfragen" rightname="CS_BIA_STANDARDREPORTS_ADMIN[QA]" /> - + +
Berichtsausführung @@ -193,6 +244,56 @@ notnull="true">
+ Ergebnis nach Berichtsausführung @@ -208,6 +309,7 @@ notnull="true"> +0=Erfolg @@ -222,14 +324,14 @@ notnull="true">
- +
- + @@ -688,12 +790,6 @@ parent="Qualitätssicherung">Abfragen zur Administration $QA_PFAD/masken - - Datenbank-Tests Protokoll - - $QA_PFAD/masken - - Datenbank-Tests planen @@ -875,9 +971,10 @@ format="%s"> + - diff --git a/src-modules/module/qa/datentabellen/qa_dbtest_ausfuehren.sql b/src-modules/module/qa/datentabellen/qa_dbtest_ausfuehren.sql index 8189514..a33df33 100644 --- a/src-modules/module/qa/datentabellen/qa_dbtest_ausfuehren.sql +++ b/src-modules/module/qa/datentabellen/qa_dbtest_ausfuehren.sql @@ -57,18 +57,24 @@ create temp table tmp_qa_dbtest_result_id <#foreach dbtest in qa_dbtests> <#if dbtest_id == "" || dbtest_id==dbtest.tid?string> -select now() as beginn +select ${dbtest.tid}::integer as dbtest_id,now() as beginn into temp tmp_anfang; -select ${dbtest.fieldclause} +select ${dbtest.fieldclause},(row_number () over (<#if dbtest.orderbyclause !=''> +order by ${dbtest.orderbyclause} +))::integer as _rownumber into temp tmp_rs from ${dbtest.fromclause} + <#if dbtest.whereclause !=''> -where ${dbtest.whereclause} +where <#assign inlineTemplate=dbtest.whereclause?interpret /> +<@inlineTemplate/> + <#if dbtest.groupbyclause !=''> group by ${dbtest.groupbyclause} + <#if dbtest.orderbyclause !=''> order by ${dbtest.orderbyclause} @@ -99,7 +105,10 @@ then 0 else 1 end as result_code, T.${dbtest_assertion.def_col_name} as result_value from tmp_anfang A left outer join tmp_rs T -on (1=${dbtest_assertion.rownr}) +on (A.dbtest_id=${dbtest_assertion.dbtest_id} +and _rownumber=${dbtest_assertion.rownr} +) + ; insert into tmp_qa_dbtest_result_id(qa_dbtest_result_id) <#if SQLdialect='Postgres'> diff --git a/src-modules/module/qa/datentabellen/qa_mask_execution2qa_dbtest.sql b/src-modules/module/qa/datentabellen/qa_mask_execution2qa_dbtest.sql new file mode 100644 index 0000000..3146350 --- /dev/null +++ b/src-modules/module/qa/datentabellen/qa_mask_execution2qa_dbtest.sql @@ -0,0 +1,133 @@ +--Beispielscript kopiert Masken-Testfälle auf der Basis Studierende Datenblatt zu DB-Tests +--Achtung: uniquenames müssen angepaßt werden + +-- truncate table qa_dbtest_assertion + -- ; + -- truncate table qa_dbtest2project + -- ; + -- truncate table qa_dbtest + -- ; + begin work; + + select E.tid,E.name,E.uniquename,F.name as feldname,S.field_value, +(case when F.name='Filter Studierende' then '${' || trim(S.field_value) || '}' +when F.name in ('Hörerstatus','Köpfe oder Fälle ?') then S.field_value +when F.name='Status' then 'kz_rueck_beur_ein in (' || trim(S.field_value) || ')' +when F.name='Bis Semester' then 'sem_rueck_beur_ein<=' || S.field_value +when F.name='Seit Semester' then 'sem_rueck_beur_ein>=' || S.field_value +when F.name='Stichtag' then 'stichtag=' || S.field_value +when F.name='bis Fachsemester' then 'fach_sem_zahl <=' || S.field_value +when F.name='Geschlecht' then 'geschlecht=' || S.field_value +when F.name='Felder' then '' +else 'Unbekanntes Feld' end)::varchar(255) as sqlwhere +into tmp_tc + from qa_mask_execution E, qa_mask_field_sel S, felderinfo F +where E.tid=S.mask_execution_id +and F.tid=S.felderinfo_id +--and E.uniquename='160440_Köpfe_20182_amtlich_01.4_04_Bachelor_mit_LA' +and E.maskeninfo_id=160440 +and 2=(select count(*) +from qa_mask_field_sel S2, felderinfo F2 +where E.tid=S2.mask_execution_id +and F2.tid=S2.felderinfo_id +and ( +(F2.name='Felder'and S2.field_value='sos_stg_aggr.summe') +or +(F2.name='Stichtag' and S2.field_value='1') +) +) +order by 1,2; + +select distinct E.tid into temp tmp_invalid +from tmp_tc E where sqlwhere = 'Unbekanntes Feld'; +delete from tmp_tc where tid in (select V.tid from tmp_invalid V); + +select A.result_value_max,E.* +into tmp_dbtest +from qa_mask_execution_assert A, tmp_tc E +where E.tid=A.mask_execution_id +and result_value_max=result_value_min +and is_active=1 +and rownr=1 +and colnr=1; + + +insert into qa_dbtest(tid, + uniquename, + name, + systeminfo_id, + resultset_id, + whereclause, + description, + active + ) +select tid, + uniquename, + name, + 7 as systeminfo_id, + (select R.tid from qa_resultset R where R.uniquename='students_dp_amtlich_summen') as resultset_id, + array_to_string(array_agg(sqlwhere),' and ') as whereclause, + '' as description, + 1 as active + from tmp_dbtest T + where T.sqlwhere !='' +group by 1,2,3,4,5; + +insert into qa_dbtest2project +( + dbtest_id, + project_id ) + select distinct T.tid, + (select P.tid from qa_project P where P.uniquename='Studierende amtlich Summen') +FROM tmp_dbtest T + ; + +insert into qa_dbtest_assertion +( + dbtest_id, + rownr, + def_col_caption, + def_col_name, + def_col_value) + select distinct T.tid, + 1 as rownr, + 'Summe', + 'summe', + T.result_value_max +FROM tmp_dbtest T + ; + + select 'Erfolgreich migrierte Tests'; + + select distinct T.name + from tmp_dbtest T + order by 1; + + delete from qa_mask_execution_assert_result + where mask_execution_assert_id in (select A.tid + from qa_mask_execution_assert A, tmp_dbtest T + where A.mask_execution_id=T.tid); + + + delete from qa_mask_execution_assert + where mask_execution_id in (select T.tid from tmp_dbtest T); + + delete from qa_mask_field_sel + where mask_execution_id in (select T.tid from tmp_dbtest T); + + delete from qa_mask_execution + where tid in (select T.tid + from tmp_dbtest T); + + drop table tmp_dbtest; + drop table tmp_tc; + + select sp_update_sequence('qa_dbtest'); + commit; + +-- truncate table qa_dbtest_assertion + -- ; + -- truncate table qa_dbtest2project + -- ; + -- truncate table qa_dbtest + -- ; diff --git a/src-modules/module/qa/datentabellen/qa_mask_execution_assert_result_code_setzen.sql b/src-modules/module/qa/datentabellen/qa_mask_execution_assert_result_code_setzen.sql new file mode 100644 index 0000000..f0b2394 --- /dev/null +++ b/src-modules/module/qa/datentabellen/qa_mask_execution_assert_result_code_setzen.sql @@ -0,0 +1,201 @@ +--Autor: D. Quathamer +--Datum: 2.8.2019 +--Freemarker Template +<#include "SQL_lingua_franca"/> +<#include "SuperX_general"/> +--Achtung: Diese Script ist auch das select_stmt der Maske 37020 + +<#assign resultValueNative="result_value::float" /> +<#if SQLdialect='Postgres'> +<#assign resultValueNative="round(decval(replace(result_value,'.',',')),0) " /> + + +<#assign inEtl=true /> +<#if Maskennummer?exists && Maskennummer=37020> +<#assign inEtl=false /> + + +<#assign mask_execution_id="" /> +<#if inEtl> + + + +<@selectintotmp +select="A.tid as qa_mask_execution_assert_result_tid, +R.tid, +R.mask_execution_id, +R.execution_start, +R.execution_end, +R.result_code, +null::integer as result_status, +''::char(255) as result_status_str, +A.result_value, +E.tid as execution_id, +E.name as execution_name, +E.uniquename, +E.systeminfo_id, +''::char(255) as systeminfo_id_str, +E.maskeninfo_id, +''::char(255) as maskeninfo_id_str, +A.mask_execution_assert_id, +null::integer as result_value_min, +null::integer as result_value_max, +null::varchar(255) as assert_caption, +null::varchar(255)[] as fields +" +source="qa_mask_execution E, qa_mask_execution_result R inner join qa_mask_execution_assert_result A on (A.mask_execution_result_id=R.tid)" +target="tmp_qa_mask_execution"> +-- nested in selectinto muss die where Bedingung u. ggfs. group by etc kommen + where + E.tid=R.mask_execution_id +and A.result_code is null + + <@informixnolog/>; + +<#else> + + +<@selectintotmp +select="A.tid as qa_mask_execution_assert_result_tid, +R.tid, +R.mask_execution_id, +R.execution_start, +R.execution_end, +R.result_code, +null::integer as result_status, +''::char(255) as result_status_str, +A.result_value, +E.tid as execution_id, +E.name as execution_name, +E.uniquename, +E.systeminfo_id, +''::char(255) as systeminfo_id_str, +E.maskeninfo_id, +''::char(255) as maskeninfo_id_str, +A.mask_execution_assert_id, +null::integer as result_value_min, +null::integer as result_value_max, +null::varchar(255) as assert_caption, +null::varchar(255)[] as fields, +('' || E.maskeninfo_id || '&')::text as nextmask, + ('../edit/qa/qa_mask_execution_edit.jsp|tid=' || E.tid)::varchar(255) as nextedit +" +source="qa_mask_execution E, qa_mask_execution_result R left outer join qa_mask_execution_assert_result A on (A.mask_execution_result_id=R.tid)" +target="tmp_qa_mask_execution"> +-- nested in selectinto muss die where Bedingung u. ggfs. group by etc kommen + where + E.tid=R.mask_execution_id + /* and E.is_active=<> */ + /* and E.maskeninfo_id=<> */ + /* and E.userinfo_id=<> */ + /* and E.systeminfo_id=<> */ + /* and E.name ilike '%<>%' */ + /* and E.uniquename ilike '%<>%' */ + /* and date(R.execution_start) >= date_val(<>) */ + /* and E.tid in (select P.mask_execution_id from qa_mask_execution2project P where P.project_id=<>) */ + /* and R.tid=<> */ + + <@informixnolog/>; + + + +<#if SQLdialect='Postgres'> +update tmp_qa_mask_execution set result_value_min=A.result_value_min, +result_value_max=A.result_value_max, +assert_caption=coalesce(A.caption,'Zeile ' || A.rownr || ' Spalte ' || A.colnr) +from qa_mask_execution_assert A +where A.tid=tmp_qa_mask_execution.mask_execution_assert_id; +<#else> +--Informix Dialekt: +update tmp_qa_mask_execution set (result_value_min, + result_value_max, + assert_caption) + = ((select + A.result_value_min, + A.result_value_max, + nvl(A.caption,'Zeile ' || A.rownr || ' Spalte ' || A.colnr) +from qa_mask_execution_assert A +where A.tid=tmp_qa_mask_execution.mask_execution_assert_id +)) +where tmp_qa_mask_execution.mask_execution_assert_id in (select A.tid +from qa_mask_execution_assert A) +; + + + +update tmp_qa_mask_execution set result_status=2, +result_status_str='Fehler' +where result_code!=0; + +update tmp_qa_mask_execution set result_status=0, +result_status_str='Erfolg' +where result_code=0 +and ( +(${resultValueNative} >= result_value_min or result_value_min is null) +and +(${resultValueNative} <= result_value_max or result_value_max is null) +) +; + +update tmp_qa_mask_execution set result_status=1, +result_status_str='Warnung' +where result_status is null; + +<#if inEtl> + +update qa_mask_execution_assert_result set result_code=T.result_status +from tmp_qa_mask_execution T +where T.qa_mask_execution_assert_result_tid=qa_mask_execution_assert_result.tid +and qa_mask_execution_assert_result.result_code is null; + +drop table tmp_qa_mask_execution; + +<#else> + +/* delete from tmp_qa_mask_execution where result_status not in (<>) ; */ + + +update tmp_qa_mask_execution set systeminfo_id_str=(select name from systeminfo S +where S.tid=tmp_qa_mask_execution.systeminfo_id); + +update tmp_qa_mask_execution set maskeninfo_id_str=(select name from maskeninfo M +where M.tid=tmp_qa_mask_execution.maskeninfo_id); + +<#if SQLdialect='Postgres'> + +update tmp_qa_mask_execution set fields=(select array_agg(trim(F.name) || '=' || trim(S.field_value)) +from qa_mask_field_sel S, felderinfo F +where S.felderinfo_id=F.tid +and S.is_active=1 +and S.mask_execution_id=tmp_qa_mask_execution.execution_id +); + +update tmp_qa_mask_execution set nextmask=nextmask || array_to_string(fields,'&','') +where fields is not null; + + + +select systeminfo_id_str, +execution_name, +uniquename, +maskeninfo_id_str, +nextmask, +execution_start, +<#if SQLdialect='Postgres'> +round(extract(second from (execution_end-execution_start))::decimal,0)::integer as dauer, +<#else> +execution_end-execution_start as dauer, + +assert_caption, +result_value_min, +result_value_max, +result_value, +result_status_str, +('37040&Ergebnis=' || tid)::varchar(255) as nexttable +<#if UserIsAdmin> +,nextedit + +from tmp_qa_mask_execution +order by 1,2,3,4,5,6,7; + + diff --git a/src-modules/module/qa/datentabellen/qa_testcase_fuellen.sql b/src-modules/module/qa/datentabellen/qa_testcase_fuellen.sql new file mode 100644 index 0000000..c2d0706 --- /dev/null +++ b/src-modules/module/qa/datentabellen/qa_testcase_fuellen.sql @@ -0,0 +1,92 @@ +--OBSOLET: + +begin work; + +--welche Maskentests sind noch nicht migriert? +insert into qa_testcase( + name, + userinfo_id, + testcase_type_id, + is_active, + systeminfo_id, + uniquename, + mask_execution_id, + dbtest_id, + testcase_status_id +) +select name, + userinfo_id, + 1 as testcase_type_id, + is_active, + systeminfo_id, + uniquename, + E.tid as mask_execution_id, + null::integer as dbtest_id, + 2 as testcase_status_id --Migration +FROM qa_mask_execution E +where E.tid not in (select mask_execution_id +from qa_testcase +where mask_execution_id is not null) + ; + +--Anhängige Tabellen füllen: +insert into qa_testcase2project( +testcase_id, +project_id, +issue_id) +select C.tid, +P.project_id, +P.issue_id +FROM qa_mask_execution2project P, qa_testcase C +where C.mask_execution_id=P.mask_execution_id +and C.testcase_status_id=2 +; + +--jetzt dbtests: +insert into qa_testcase( + name, + userinfo_id, + testcase_type_id, + is_active, + systeminfo_id, + uniquename, + mask_execution_id, + dbtest_id, + testcase_status_id +) +select name, + null::integer as userinfo_id, + 2 as testcase_type_id, + D.active, + D.systeminfo_id, + D.uniquename, + null::integer as mask_execution_id, + D.tid as dbtest_id, + 2 as testcase_status_id --Migration +FROM qa_dbtest D +where D.tid not in (select dbtest_id +from qa_testcase +where dbtest_id is not null) + ; + +--Anhängige Tabellen füllen: +insert into qa_testcase2project( +testcase_id, +project_id, +issue_id) +select C.tid, +P.project_id, +P.issue_id +FROM qa_dbtest2project P, qa_testcase C +where C.dbtest_id=P.dbtest_id +and C.testcase_status_id=2 +; + + +--migriert: +update qa_testcase set testcase_status_id=1 +where testcase_status_id=2; + + +commit; + diff --git a/src-modules/module/qa/datentabellen/qa_testcase_result_fuellen.sql b/src-modules/module/qa/datentabellen/qa_testcase_result_fuellen.sql new file mode 100644 index 0000000..c09210e --- /dev/null +++ b/src-modules/module/qa/datentabellen/qa_testcase_result_fuellen.sql @@ -0,0 +1,58 @@ +--OBSOLET: +--truncate table qa_testcase_result; + +--maskentests: +insert into qa_testcase_result( + testcase_id, + mask_execution_result_id, + assertion_def_col_caption, + execution_start, + execution_end, + result_value, + result_code, + result_log) + select + C.tid as testcase_id, + P.tid as mask_execution_result_id, + nvl(A.caption,'' || result_value_min || '-'|| result_value_max) as assertion_def_col_caption, + P.execution_start, + P.execution_end, + R.result_value, + R.result_code, + P.result_log +FROM qa_mask_execution_result P, qa_mask_execution_assert_result R, qa_mask_execution_assert A, qa_testcase C +where R.mask_execution_result_id=P.tid +and C.mask_execution_id=P.mask_execution_id +and A.tid=R.mask_execution_assert_id +and P.tid not in (select R.mask_execution_result_id +from qa_testcase_result R +where R.mask_execution_result_id is not null) +; + +--DB-Tests: +insert into qa_testcase_result( + testcase_id, + dbtest_result_id, + assertion_def_col_caption, + execution_start, + execution_end, + result_value, + result_code, + result_log) + select + C.tid as testcase_id, + P.tid as dbtest_result_id, + A.def_col_caption, + P.execution_start, + P.execution_end, + P.result_value, + P.result_code, + P.result_value +FROM qa_dbtest_result P, qa_dbtest_assertion A, qa_testcase C +where C.dbtest_id=A.dbtest_id +and A.tid=P.dbtest_assertion_id +and P.tid not in ( +select R.dbtest_result_id from qa_testcase_result R +where R.dbtest_result_id is not null) +; + diff --git a/src-modules/module/qa/etl/mask_execution/mask_execution_mail.x b/src-modules/module/qa/etl/mask_execution/mask_execution_mail.x new file mode 100755 index 0000000..8c44452 --- /dev/null +++ b/src-modules/module/qa/etl/mask_execution/mask_execution_mail.x @@ -0,0 +1,46 @@ +#!/bin/bash + +# Verzeichnis in dem Die Dateien abgelegt werden sollen +FILE_DIR="$QA_PFAD/etl/mask_execution/tmp" +mkdir -p $FILE_DIR + +# Dateiname +export FILE_NAME="Testfall_Protokoll" + +# Masken TID +export MASKEN_TID=37020 + +# Datum für das Feld "Ab Datum" +export DATUM_EXEC=$(date "+%d.%m.%Y") + +# Masken Parameter +export MASK_PARAM="Ausführungs-Status=1,2&Ab Datum=${DATUM_EXEC}" + + +# ExecuteMask funktioniert nur im WEB-INF Ordner +cd $WEBAPP/WEB-INF + +echo CMD -cp "$JDBC_CLASSPATH" $JAVA_OPTS de.superx.bin.ExecuteMask -tid:$MASKEN_TID -out:$FILE_DIR/$FILE_NAME.pdf -user:admin "-params:${MASK_PARAM}&stylesheet=tabelle_fo_pdf.xsl&contenttype=application/pdf" -logger:$SUPERX_DIR/db/conf/logging.properties + +# PDF +java -cp "$JDBC_CLASSPATH" $JAVA_OPTS de.superx.bin.ExecuteMask -tid:$MASKEN_TID -out:$FILE_DIR/$FILE_NAME.pdf -user:admin "-params:${MASK_PARAM}&stylesheet=tabelle_fo_pdf.xsl&contenttype=application/pdf" -logger:$SUPERX_DIR/db/conf/logging.properties + +# XML +#java -cp "$JDBC_CLASSPATH" $JAVA_OPTS de.superx.bin.ExecuteMask -tid:$MASKEN_TID -out:$FILE_DIR/$FILE_NAME.xml -user:admin "-params:${MASK_PARAM}&stylesheet=tabelle_fo_pdf.xsl&contenttype=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -logger:$SUPERX_DIR/db/conf/logging.properties + +# CSV +java -cp "$JDBC_CLASSPATH" $JAVA_OPTS de.superx.bin.ExecuteMask -tid:$MASKEN_TID -out:$FILE_DIR/$FILE_NAME.csv -user:admin "-params:${MASK_PARAM}&stylesheet=tabelle_fo_pdf.xsl&contenttype=text/csv" -logger:$SUPERX_DIR/db/conf/logging.properties + +# Verzeichnis in dem die Dateien abgelegt wurden. Zum zählen und verschicken. +cd $FILE_DIR +sed -i 's/\^/ \| /g' $FILE_DIR/$FILE_NAME.csv + +#Zuerst Warnungen und Fehler zählen +export W_ANZ=$(grep -c Warnung $FILE_DIR/$FILE_NAME.csv) +export F_ANZ=$(grep -c Fehler $FILE_DIR/$FILE_NAME.csv) + + +#Mail Versand +cat $FILE_DIR/$FILE_NAME.csv | $MAILPROG -s "Testfall-Protokoll | $W_ANZ Warnungen | $F_ANZ Fehler" -a $FILE_DIR/$FILE_NAME.pdf "${LOGMAIL}" + + diff --git a/src-modules/module/qa/etl/testfall_import/create_tables_testfall_import.sql b/src-modules/module/qa/etl/testfall_import/create_tables_testfall_import.sql new file mode 100644 index 0000000..dc3c1d7 --- /dev/null +++ b/src-modules/module/qa/etl/testfall_import/create_tables_testfall_import.sql @@ -0,0 +1,32 @@ + +drop table if exists tmp_testfall_import_felder; +drop table if exists tmp_testfall_import_feldwerte; +drop table if exists tmp_testfall_import_erg; + + +create table tmp_testfall_import_felder( +testfall_schluessel varchar(255), +feldnr integer, +feldname varchar(255) +); + + +create table tmp_testfall_import_feldwerte( +systeminfo_id integer, +testfall_schluessel varchar(255), +maskeninfo_id integer, +feldnr integer, +feldwert varchar(255) +); + +create table tmp_testfall_import_erg( +testfall_schluessel varchar(255), +systeminfo_id integer, +mask_execution_id INTEGER , +rownr INTEGER , +colnr INTEGER , +result_value_min FLOAT , +result_value_max FLOAT , +is_active smallint default 1 not null, +caption varchar(255) +); diff --git a/src-modules/module/qa/etl/testfall_import/testfall_import.kjb b/src-modules/module/qa/etl/testfall_import/testfall_import.kjb index 5ec553b..611709a 100644 --- a/src-modules/module/qa/etl/testfall_import/testfall_import.kjb +++ b/src-modules/module/qa/etl/testfall_import/testfall_import.kjb @@ -1,325 +1,299 @@ - - + testfall_import 0 - / + / - - 2020/02/23 21:14:53.737 + 2020/02/23 21:14:53.737 - - 2020/02/23 21:14:53.737 - - - PATH_TO_UPLOADFILE - file:///home/superx/git/Memtext-Interna/Projekte/duisburg-essen_uni/impl/db_module/qa/ects_testfaelle/qa_importdatei.xlsx - - - - userid - 803 - - - - - eduetl - localhost - POSTGRESQL - Native - eduetl_ude - 9998 - superx - Encrypted 2be98afc86aa7f292a20aa77fd0c3fa9e - superx_host_iso - - - - FORCE_IDENTIFIERS_TO_LOWERCASEN - FORCE_IDENTIFIERS_TO_UPPERCASEN - IS_CLUSTEREDN - PORT_NUMBER9998 - PRESERVE_RESERVED_WORD_CASEY - QUOTE_ALL_FIELDSN - SUPPORTS_BOOLEAN_DATA_TYPEY - SUPPORTS_TIMESTAMP_DATA_TYPEY - USE_POOLINGN - - - - - - - -
- - - - - ID_JOB - Y - ID_JOB - - - CHANNEL_ID - Y - CHANNEL_ID - - - JOBNAME - Y - JOBNAME - - - STATUS - Y - STATUS - - - LINES_READ - Y - LINES_READ - - - LINES_WRITTEN - Y - LINES_WRITTEN - - - LINES_UPDATED - Y - LINES_UPDATED - - - LINES_INPUT - Y - LINES_INPUT - - - LINES_OUTPUT - Y - LINES_OUTPUT - - - LINES_REJECTED - Y - LINES_REJECTED - - - ERRORS - Y - ERRORS - - - STARTDATE - Y - STARTDATE - - - ENDDATE - Y - ENDDATE - - - LOGDATE - Y - LOGDATE - - - DEPDATE - Y - DEPDATE - - - REPLAYDATE - Y - REPLAYDATE - - - LOG_FIELD - Y - LOG_FIELD - - - EXECUTING_SERVER - N - EXECUTING_SERVER - - - EXECUTING_USER - N - EXECUTING_USER - - - START_JOB_ENTRY - N - START_JOB_ENTRY - - - CLIENT - N - CLIENT - - - - - -
- - - ID_BATCH - Y - ID_BATCH - - - CHANNEL_ID - Y - CHANNEL_ID - - - LOG_DATE - Y - LOG_DATE - - - JOBNAME - Y - TRANSNAME - - - JOBENTRYNAME - Y - STEPNAME - - - LINES_READ - Y - LINES_READ - - - LINES_WRITTEN - Y - LINES_WRITTEN - - - LINES_UPDATED - Y - LINES_UPDATED - - - LINES_INPUT - Y - LINES_INPUT - - - LINES_OUTPUT - Y - LINES_OUTPUT - - - LINES_REJECTED - Y - LINES_REJECTED - - - ERRORS - Y - ERRORS - - - RESULT - Y - RESULT - - - NR_RESULT_ROWS - Y - NR_RESULT_ROWS - - - NR_RESULT_FILES - Y - NR_RESULT_FILES - - - LOG_FIELD - N - LOG_FIELD - - - COPY_NR - N - COPY_NR - - - - - -
- - - ID_BATCH - Y - ID_BATCH - - - CHANNEL_ID - Y - CHANNEL_ID - - - LOG_DATE - Y - LOG_DATE - - - LOGGING_OBJECT_TYPE - Y - LOGGING_OBJECT_TYPE - - - OBJECT_NAME - Y - OBJECT_NAME - - - OBJECT_COPY - Y - OBJECT_COPY - - - REPOSITORY_DIRECTORY - Y - REPOSITORY_DIRECTORY - - - FILENAME - Y - FILENAME - - - OBJECT_ID - Y - OBJECT_ID - - - OBJECT_REVISION - Y - OBJECT_REVISION - - - PARENT_CHANNEL_ID - Y - PARENT_CHANNEL_ID - - - ROOT_CHANNEL_ID - Y - ROOT_CHANNEL_ID - - - N - + 2020/02/23 21:14:53.737 + + + PATH_TO_UPLOADFILE + file:///home/superx/git/Memtext-Interna/Projekte/duisburg-essen_uni/impl/db_module/qa/ects_testfaelle/qa_importdatei.xlsx + + + + userid + 803 + + + + + + + +
+ + + + + ID_JOB + Y + ID_JOB + + + CHANNEL_ID + Y + CHANNEL_ID + + + JOBNAME + Y + JOBNAME + + + STATUS + Y + STATUS + + + LINES_READ + Y + LINES_READ + + + LINES_WRITTEN + Y + LINES_WRITTEN + + + LINES_UPDATED + Y + LINES_UPDATED + + + LINES_INPUT + Y + LINES_INPUT + + + LINES_OUTPUT + Y + LINES_OUTPUT + + + LINES_REJECTED + Y + LINES_REJECTED + + + ERRORS + Y + ERRORS + + + STARTDATE + Y + STARTDATE + + + ENDDATE + Y + ENDDATE + + + LOGDATE + Y + LOGDATE + + + DEPDATE + Y + DEPDATE + + + REPLAYDATE + Y + REPLAYDATE + + + LOG_FIELD + Y + LOG_FIELD + + + EXECUTING_SERVER + N + EXECUTING_SERVER + + + EXECUTING_USER + N + EXECUTING_USER + + + START_JOB_ENTRY + N + START_JOB_ENTRY + + + CLIENT + N + CLIENT + + + + + +
+ + + ID_BATCH + Y + ID_BATCH + + + CHANNEL_ID + Y + CHANNEL_ID + + + LOG_DATE + Y + LOG_DATE + + + JOBNAME + Y + TRANSNAME + + + JOBENTRYNAME + Y + STEPNAME + + + LINES_READ + Y + LINES_READ + + + LINES_WRITTEN + Y + LINES_WRITTEN + + + LINES_UPDATED + Y + LINES_UPDATED + + + LINES_INPUT + Y + LINES_INPUT + + + LINES_OUTPUT + Y + LINES_OUTPUT + + + LINES_REJECTED + Y + LINES_REJECTED + + + ERRORS + Y + ERRORS + + + RESULT + Y + RESULT + + + NR_RESULT_ROWS + Y + NR_RESULT_ROWS + + + NR_RESULT_FILES + Y + NR_RESULT_FILES + + + LOG_FIELD + N + LOG_FIELD + + + COPY_NR + N + COPY_NR + + + + + +
+ + + ID_BATCH + Y + ID_BATCH + + + CHANNEL_ID + Y + CHANNEL_ID + + + LOG_DATE + Y + LOG_DATE + + + LOGGING_OBJECT_TYPE + Y + LOGGING_OBJECT_TYPE + + + OBJECT_NAME + Y + OBJECT_NAME + + + OBJECT_COPY + Y + OBJECT_COPY + + + REPOSITORY_DIRECTORY + Y + REPOSITORY_DIRECTORY + + + FILENAME + Y + FILENAME + + + OBJECT_ID + Y + OBJECT_ID + + + OBJECT_REVISION + Y + OBJECT_REVISION + + + PARENT_CHANNEL_ID + Y + PARENT_CHANNEL_ID + + + ROOT_CHANNEL_ID + Y + ROOT_CHANNEL_ID + + + N + START @@ -347,7 +321,7 @@ TRANS filename - ${Internal.Job.Filename.Directory}/testfall_import.ktr + ${Internal.Job.Filename.Directory}/testfall_import.ktr N N @@ -380,10 +354,10 @@ create table tmp_testfall_import SQL - drop table if exists tmp_testfall_import_felder; drop table if exists tmp_testfall_import_feldwerte; drop table if exists tmp_testfall_import_erg; drop table if exists tmp_testfall_import_felder; create table tmp_testfall_import_felder( testfall_schluessel varchar(255), feldnr integer, feldname varchar(255) ); create table tmp_testfall_import_felder( testfall_schluessel varchar(255), feldnr integer, feldname varchar(255) ); create table tmp_testfall_import_feldwerte( systeminfo_id integer, testfall_schluessel varchar(255), maskeninfo_id integer, feldnr integer, feldwert varchar(255) ); create table tmp_testfall_import_erg( testfall_schluessel varchar(255), systeminfo_id integer, mask_execution_id INTEGER , rownr INTEGER , colnr INTEGER , result_value_min FLOAT , result_value_max FLOAT , is_active smallint default 1 not null, caption varchar(255) ); + F - F - + T + ${Internal.Job.Filename.Directory}/create_tables_testfall_import.sql F eduetl N @@ -399,7 +373,7 @@ T T - ${Internal.Job.Filename.Directory}/testfall_import.sql + ${Internal.Job.Filename.Directory}/testfall_import.sql F eduetl N @@ -440,7 +414,7 @@ - TODO: Parameter userid aus Maskenfeld + TODO: Parameter userid aus Maskenfeld 472 234 273 diff --git a/src-modules/module/qa/etl/testfall_import/testfall_import_dbtest.kjb b/src-modules/module/qa/etl/testfall_import/testfall_import_dbtest.kjb index 4f392e7..2d070a6 100644 --- a/src-modules/module/qa/etl/testfall_import/testfall_import_dbtest.kjb +++ b/src-modules/module/qa/etl/testfall_import/testfall_import_dbtest.kjb @@ -1,325 +1,299 @@ - - + testfall_import 0 - / + / - - 2020/02/23 21:14:53.737 + 2020/02/23 21:14:53.737 - - 2020/02/23 21:14:53.737 - - - PATH_TO_UPLOADFILE - file:///home/superx/git/Memtext-Interna/Projekte/duisburg-essen_uni/impl/db_module/qa/ects_testfaelle/qa_importdatei_dbtest.xlsx - - - - userid - 803 - - - - - eduetl - localhost - POSTGRESQL - Native - eduetl_ude - 9998 - superx - Encrypted 2be98afc86aa7f292a20aa77fd0c3fa9e - superx_host_iso - - - - FORCE_IDENTIFIERS_TO_LOWERCASEN - FORCE_IDENTIFIERS_TO_UPPERCASEN - IS_CLUSTEREDN - PORT_NUMBER9998 - PRESERVE_RESERVED_WORD_CASEY - QUOTE_ALL_FIELDSN - SUPPORTS_BOOLEAN_DATA_TYPEY - SUPPORTS_TIMESTAMP_DATA_TYPEY - USE_POOLINGN - - - - - - - -
- - - - - ID_JOB - Y - ID_JOB - - - CHANNEL_ID - Y - CHANNEL_ID - - - JOBNAME - Y - JOBNAME - - - STATUS - Y - STATUS - - - LINES_READ - Y - LINES_READ - - - LINES_WRITTEN - Y - LINES_WRITTEN - - - LINES_UPDATED - Y - LINES_UPDATED - - - LINES_INPUT - Y - LINES_INPUT - - - LINES_OUTPUT - Y - LINES_OUTPUT - - - LINES_REJECTED - Y - LINES_REJECTED - - - ERRORS - Y - ERRORS - - - STARTDATE - Y - STARTDATE - - - ENDDATE - Y - ENDDATE - - - LOGDATE - Y - LOGDATE - - - DEPDATE - Y - DEPDATE - - - REPLAYDATE - Y - REPLAYDATE - - - LOG_FIELD - Y - LOG_FIELD - - - EXECUTING_SERVER - N - EXECUTING_SERVER - - - EXECUTING_USER - N - EXECUTING_USER - - - START_JOB_ENTRY - N - START_JOB_ENTRY - - - CLIENT - N - CLIENT - - - - - -
- - - ID_BATCH - Y - ID_BATCH - - - CHANNEL_ID - Y - CHANNEL_ID - - - LOG_DATE - Y - LOG_DATE - - - JOBNAME - Y - TRANSNAME - - - JOBENTRYNAME - Y - STEPNAME - - - LINES_READ - Y - LINES_READ - - - LINES_WRITTEN - Y - LINES_WRITTEN - - - LINES_UPDATED - Y - LINES_UPDATED - - - LINES_INPUT - Y - LINES_INPUT - - - LINES_OUTPUT - Y - LINES_OUTPUT - - - LINES_REJECTED - Y - LINES_REJECTED - - - ERRORS - Y - ERRORS - - - RESULT - Y - RESULT - - - NR_RESULT_ROWS - Y - NR_RESULT_ROWS - - - NR_RESULT_FILES - Y - NR_RESULT_FILES - - - LOG_FIELD - N - LOG_FIELD - - - COPY_NR - N - COPY_NR - - - - - -
- - - ID_BATCH - Y - ID_BATCH - - - CHANNEL_ID - Y - CHANNEL_ID - - - LOG_DATE - Y - LOG_DATE - - - LOGGING_OBJECT_TYPE - Y - LOGGING_OBJECT_TYPE - - - OBJECT_NAME - Y - OBJECT_NAME - - - OBJECT_COPY - Y - OBJECT_COPY - - - REPOSITORY_DIRECTORY - Y - REPOSITORY_DIRECTORY - - - FILENAME - Y - FILENAME - - - OBJECT_ID - Y - OBJECT_ID - - - OBJECT_REVISION - Y - OBJECT_REVISION - - - PARENT_CHANNEL_ID - Y - PARENT_CHANNEL_ID - - - ROOT_CHANNEL_ID - Y - ROOT_CHANNEL_ID - - - N - + 2020/02/23 21:14:53.737 + + + PATH_TO_UPLOADFILE + file:///home/superx/git/Memtext-Interna/Projekte/duisburg-essen_uni/impl/db_module/qa/ects_testfaelle/qa_importdatei_dbtest.xlsx + + + + userid + 803 + + + + + + + +
+ + + + + ID_JOB + Y + ID_JOB + + + CHANNEL_ID + Y + CHANNEL_ID + + + JOBNAME + Y + JOBNAME + + + STATUS + Y + STATUS + + + LINES_READ + Y + LINES_READ + + + LINES_WRITTEN + Y + LINES_WRITTEN + + + LINES_UPDATED + Y + LINES_UPDATED + + + LINES_INPUT + Y + LINES_INPUT + + + LINES_OUTPUT + Y + LINES_OUTPUT + + + LINES_REJECTED + Y + LINES_REJECTED + + + ERRORS + Y + ERRORS + + + STARTDATE + Y + STARTDATE + + + ENDDATE + Y + ENDDATE + + + LOGDATE + Y + LOGDATE + + + DEPDATE + Y + DEPDATE + + + REPLAYDATE + Y + REPLAYDATE + + + LOG_FIELD + Y + LOG_FIELD + + + EXECUTING_SERVER + N + EXECUTING_SERVER + + + EXECUTING_USER + N + EXECUTING_USER + + + START_JOB_ENTRY + N + START_JOB_ENTRY + + + CLIENT + N + CLIENT + + + + + +
+ + + ID_BATCH + Y + ID_BATCH + + + CHANNEL_ID + Y + CHANNEL_ID + + + LOG_DATE + Y + LOG_DATE + + + JOBNAME + Y + TRANSNAME + + + JOBENTRYNAME + Y + STEPNAME + + + LINES_READ + Y + LINES_READ + + + LINES_WRITTEN + Y + LINES_WRITTEN + + + LINES_UPDATED + Y + LINES_UPDATED + + + LINES_INPUT + Y + LINES_INPUT + + + LINES_OUTPUT + Y + LINES_OUTPUT + + + LINES_REJECTED + Y + LINES_REJECTED + + + ERRORS + Y + ERRORS + + + RESULT + Y + RESULT + + + NR_RESULT_ROWS + Y + NR_RESULT_ROWS + + + NR_RESULT_FILES + Y + NR_RESULT_FILES + + + LOG_FIELD + N + LOG_FIELD + + + COPY_NR + N + COPY_NR + + + + + +
+ + + ID_BATCH + Y + ID_BATCH + + + CHANNEL_ID + Y + CHANNEL_ID + + + LOG_DATE + Y + LOG_DATE + + + LOGGING_OBJECT_TYPE + Y + LOGGING_OBJECT_TYPE + + + OBJECT_NAME + Y + OBJECT_NAME + + + OBJECT_COPY + Y + OBJECT_COPY + + + REPOSITORY_DIRECTORY + Y + REPOSITORY_DIRECTORY + + + FILENAME + Y + FILENAME + + + OBJECT_ID + Y + OBJECT_ID + + + OBJECT_REVISION + Y + OBJECT_REVISION + + + PARENT_CHANNEL_ID + Y + PARENT_CHANNEL_ID + + + ROOT_CHANNEL_ID + Y + ROOT_CHANNEL_ID + + + N + START @@ -347,7 +321,7 @@ TRANS filename - ${Internal.Job.Filename.Directory}/testfall_import_dbtest_def.ktr + ${Internal.Job.Filename.Directory}/testfall_import_dbtest_def.ktr N N @@ -380,7 +354,64 @@ create table tmp_testfall_import SQL - drop table if exists tmp_qa_dbtest; drop table if exists tmp_qa_dbtest_assertion; drop TABLE if exists tmp_qa_resultset; drop table if exists tmp_testfall_import_felder; drop table if exists tmp_testfall_import_feldwerte; CREATE TABLE tmp_qa_dbtest ( tid serial NOT NULL, uniquename varchar(255) NOT NULL, name varchar(255), systeminfo_id integer, resultset_id integer , resultset_uniquename varchar(255), whereclause text, description text, active smallint DEFAULT 1 ); CREATE TABLE tmp_qa_dbtest_assertion ( tid serial NOT NULL, dbtest_id integer, dbtest_uniquename varchar(255), systeminfo_id integer, rownr integer, def_col_caption varchar(255), def_col_name varchar(255), def_col_value varchar(255) ); CREATE TABLE tmp_qa_resultset ( tid serial NOT NULL, uniquename varchar(255) NOT NULL, name varchar(255), systeminfo_id integer NOT NULL, fromclause text, fieldclause text, groupbyclause varchar(255), orderbyclause varchar(255) ); create table tmp_testfall_import_felder( feldnr integer, feldname varchar(255) ); create table tmp_testfall_import_erg( feldnr integer, feldname varchar(255) ); create table tmp_testfall_import_feldwerte( systeminfo_id integer, testfall_schluessel varchar(255), resultset_uniquename varchar(255), feldnr integer, feldwert varchar(255) ); + +drop table if exists tmp_qa_dbtest; +drop table if exists tmp_qa_dbtest_assertion; +drop TABLE if exists tmp_qa_resultset; +drop table if exists tmp_testfall_import_felder; +drop table if exists tmp_testfall_import_feldwerte; + +CREATE TABLE tmp_qa_dbtest +( + tid serial NOT NULL, + uniquename varchar(255) NOT NULL, + name varchar(255), + systeminfo_id integer, + resultset_id integer , +resultset_uniquename varchar(255), + whereclause text, + description text, + active smallint DEFAULT 1 +); +CREATE TABLE tmp_qa_dbtest_assertion +( + tid serial NOT NULL, + dbtest_id integer, +dbtest_uniquename varchar(255), +systeminfo_id integer, + rownr integer, + def_col_caption varchar(255), + def_col_name varchar(255), + def_col_value varchar(255) +); +CREATE TABLE tmp_qa_resultset +( + tid serial NOT NULL, + uniquename varchar(255) NOT NULL, + name varchar(255), + systeminfo_id integer NOT NULL, + fromclause text, + fieldclause text, + groupbyclause varchar(255), + orderbyclause varchar(255) +); +create table tmp_testfall_import_felder( +feldnr integer, +feldname varchar(255) +); +create table tmp_testfall_import_erg( +feldnr integer, +feldname varchar(255) +); + +create table tmp_testfall_import_feldwerte( +systeminfo_id integer, +testfall_schluessel varchar(255), +resultset_uniquename varchar(255), +feldnr integer, +feldwert varchar(255) +); + F F @@ -399,7 +430,7 @@ T T - ${Internal.Job.Filename.Directory}/testfall_import_dbtest.sql + ${Internal.Job.Filename.Directory}/testfall_import_dbtest.sql F eduetl N @@ -414,7 +445,7 @@ TRANS filename - ${Internal.Job.Filename.Directory}/testfall_import_dbtest.ktr + ${Internal.Job.Filename.Directory}/testfall_import_dbtest.ktr N N @@ -484,7 +515,7 @@ - TODO: Parameter userid aus Maskenfeld + TODO: Parameter userid aus Maskenfeld 472 234 273 diff --git a/src-modules/module/qa/etl/testfall_import/testfall_import_dbtest.ktr b/src-modules/module/qa/etl/testfall_import/testfall_import_dbtest.ktr index f059a2e..508cb25 100644 --- a/src-modules/module/qa/etl/testfall_import/testfall_import_dbtest.ktr +++ b/src-modules/module/qa/etl/testfall_import/testfall_import_dbtest.ktr @@ -1,5 +1,4 @@ - - + testfall_import @@ -7,11 +6,11 @@ Normal 0 - / + / PATH_TO_UPLOADFILE - file:///home/superx/git/Memtext-Interna/Projekte/duisburg-essen_uni/impl/db_module/qa/ects_testfaelle/qa_importdatei_dbtest.xlsx + file:///home/superx/git/Memtext-Interna/Projekte/duisburg-essen_uni/impl/db_module/qa/ects_testfaelle/qa_importdatei_dbtest.xlsx @@ -429,47 +428,18 @@ N 1000 100 - - - - - - - - + + + + - - 2020/02/23 11:24:17.033 + 2020/02/23 11:24:17.033 - - 2020/02/23 11:24:17.033 - H4sIAAAAAAAAAAMAAAAAAAAAAAA= + 2020/02/23 11:24:17.033 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= N - - - - eduetl - localhost - POSTGRESQL - Native - eduetl_ude - 9998 - superx - Encrypted 2be98afc86aa7f292a20aa77fd0c3fa9e - superx_host_iso - - - - FORCE_IDENTIFIERS_TO_LOWERCASEN - FORCE_IDENTIFIERS_TO_UPPERCASEN - IS_CLUSTEREDN - PORT_NUMBER9998 - PRESERVE_RESERVED_WORD_CASEY - QUOTE_ALL_FIELDSN - SUPPORTS_BOOLEAN_DATA_TYPEY - SUPPORTS_TIMESTAMP_DATA_TYPEY - USE_POOLINGN - - + Sort rows @@ -561,7 +531,7 @@ - * + * -1 -1 N @@ -569,18 +539,15 @@ - - - - + + 512 64 Y - - + Filter rows 3 2 FilterRows @@ -592,30 +559,27 @@ none -write tmp_testfall_import_feldwerte - + write tmp_testfall_import_feldwerte + - - N - Feldwert - IS NOT NULL - - + + N + Feldwert + IS NOT NULL + + - - - - + + 832 272 Y - - + Microsoft Excel Input ExcelInput @@ -643,7 +607,7 @@ - ${PATH_TO_UPLOADFILE} + ${PATH_TO_UPLOADFILE} N @@ -657,7 +621,7 @@ -1 none N - # + # @@ -675,7 +639,7 @@ - Testfall Schlüssel + Testfall Schlüssel String -1 -1 @@ -693,7 +657,7 @@ -1 none N - # + # @@ -705,7 +669,7 @@ -1 none N - # + # @@ -717,7 +681,7 @@ -1 none N - # + # @@ -729,7 +693,7 @@ -1 none N - # + # @@ -741,7 +705,7 @@ -1 none N - # + # @@ -753,7 +717,7 @@ -1 none N - # + # @@ -765,7 +729,7 @@ -1 none N - # + # @@ -777,7 +741,7 @@ -1 none N - # + # @@ -789,7 +753,7 @@ -1 none N - # + # @@ -801,7 +765,7 @@ -1 none N - # + # @@ -813,7 +777,7 @@ -1 none N - # + # @@ -837,7 +801,7 @@ -1 none N - # + # @@ -848,7 +812,7 @@ Tabelle1 1 0 - + N N @@ -870,18 +834,15 @@ POI - - - - + + 128 64 Y - - + Row Normaliser 2 Normaliser @@ -893,51 +854,70 @@ none - feldnr - Feld 1 + feldnr + + + Feld 1 1 Feldwert - Feld 2 + + + Feld 2 2 Feldwert - Feld 3 + + + Feld 3 3 Feldwert - Feld 4 + + + Feld 4 4 Feldwert - Feld 5 + + + Feld 5 5 Feldwert - Feld 6 + + + Feld 6 6 Feldwert - Feld 7 + + + Feld 7 7 Feldwert - Feld 8 + + + Feld 8 8 Feldwert - Feld 9 + + + Feld 9 9 Feldwert - Feld 10 + + + Feld 10 10 Feldwert - + + + - - - - + + 544 272 Y - - + Select resultset SelectValues @@ -949,25 +929,28 @@ none - Tabelle + + + Tabelle resultset - Komponente + + + Komponente systeminfo_id - N - + + N + + - - - - + + 368 64 Y - - + Select values 2 SelectValues @@ -979,13 +962,15 @@ none - Y - feldnr + + Y + + feldnr feldnr_int Integer -2 -2 - # + # false @@ -995,20 +980,19 @@ - + + + - - - - + + 688 272 Y - - + Sort rows SortRows @@ -1020,13 +1004,13 @@ none - %%java.io.tmpdir%% - out - 1000000 - - N - - N + %%java.io.tmpdir%% + out + 1000000 + + N + + N resultset @@ -1055,18 +1039,15 @@ - - - - + + 624 64 Y - - + Unique rows Unique @@ -1078,30 +1059,35 @@ none - N - - N - - resultset + N + + N + + + + resultset N - systeminfo_id + + + systeminfo_id N - fieldclause + + + fieldclause Y - + + + - - - - + + 832 64 Y - - + write qa_resultset TableOutput @@ -1131,41 +1117,38 @@ N - - uniquename - resultset - - - name - resultset - - - systeminfo_id - systeminfo_id - - - fieldclause - fieldclause - - - fromclause - resultset - + + uniquename + resultset + + + name + resultset + + + systeminfo_id + systeminfo_id + + + fieldclause + fieldclause + + + fromclause + resultset + - - - - + + 1088 64 Y - - + write tmp_qa_dbtest TableOutput @@ -1195,37 +1178,34 @@ N - - systeminfo_id - Komponente - - - name - Testfall Name - - - uniquename - Testfall Schlüssel - - - resultset_uniquename - Tabelle - + + systeminfo_id + Komponente + + + name + Testfall Name + + + uniquename + Testfall Schlüssel + + + resultset_uniquename + Tabelle + - - - - + + 816 160 Y - - + write tmp_testfall_import_feldwerte TableOutput @@ -1255,41 +1235,38 @@ N - - testfall_schluessel - Testfall Schlüssel - - - feldnr - feldnr_int - - - feldwert - Feldwert - - - resultset_uniquename - Tabelle - - - systeminfo_id - Komponente - + + testfall_schluessel + Testfall Schlüssel + + + feldnr + feldnr_int + + + feldwert + Feldwert + + + resultset_uniquename + Tabelle + + + systeminfo_id + Komponente + - - - - + + 1040 272 Y - - + Row Normaliser 2 2 Normaliser @@ -1301,27 +1278,30 @@ none - ergnr - erg1 + ergnr + + + erg1 1 erg - erg2 + + + erg2 2 erg - + + + - - - - + + 112 288 Y - - + Select values SelectValues @@ -1333,13 +1313,15 @@ none - Y - Testfall Schlüssel - Testfall Schlüssel + + Y + + Testfall Schlüssel + Testfall Schlüssel String -2 -2 - # + # false @@ -1349,12 +1331,14 @@ - Ergebnis 1 + + + Ergebnis 1 erg1 String -2 -2 - # + # false @@ -1364,12 +1348,14 @@ - Ergebnis 2 + + + Ergebnis 2 erg2 String -2 -2 - # + # false @@ -1379,7 +1365,9 @@ - Komponente + + + Komponente Komponente Integer -2 @@ -1394,20 +1382,19 @@ - + + + - - - - + + 256 240 Y - - + erg nicht leer FilterRows @@ -1419,30 +1406,27 @@ none -write tmp_testfall_import_erg - + write tmp_testfall_import_erg + - - N - erg - IS NOT NULL - - + + N + erg + IS NOT NULL + + - - - - + + 64 368 Y - - + write tmp_testfall_import_erg TableOutput @@ -1472,40 +1456,35 @@ N tid - - dbtest_uniquename - Testfall Schlüssel - - - def_col_name - ergnr - - - def_col_value - erg - - - systeminfo_id - Komponente - + + dbtest_uniquename + Testfall Schlüssel + + + def_col_name + ergnr + + + def_col_value + erg + + + systeminfo_id + Komponente + - - - - + + 32 464 Y - - - - - - + + + N diff --git a/src-modules/module/qa/etl/testfall_import/testfall_import_dbtest_def.ktr b/src-modules/module/qa/etl/testfall_import/testfall_import_dbtest_def.ktr index a0c4b1e..4b5d821 100644 --- a/src-modules/module/qa/etl/testfall_import/testfall_import_dbtest_def.ktr +++ b/src-modules/module/qa/etl/testfall_import/testfall_import_dbtest_def.ktr @@ -1,5 +1,4 @@ - - + testfall_import @@ -7,11 +6,11 @@ Normal 0 - / + / PATH_TO_UPLOADFILE - file:///home/superx/git/Memtext-Interna/Projekte/duisburg-essen_uni/impl/db_module/qa/ects_testfaelle/qa_importdatei_dbtest.xlsx + file:///home/superx/git/Memtext-Interna/Projekte/duisburg-essen_uni/impl/db_module/qa/ects_testfaelle/qa_importdatei_dbtest.xlsx @@ -429,47 +428,18 @@ N 1000 100 - - - - - - - - + + + + - - 2020/02/23 11:24:17.033 + 2020/02/23 11:24:17.033 - - 2020/02/23 11:24:17.033 - H4sIAAAAAAAAAAMAAAAAAAAAAAA= + 2020/02/23 11:24:17.033 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= N - - - - eduetl - localhost - POSTGRESQL - Native - eduetl_ude - 9998 - superx - Encrypted 2be98afc86aa7f292a20aa77fd0c3fa9e - superx_host_iso - - - - FORCE_IDENTIFIERS_TO_LOWERCASEN - FORCE_IDENTIFIERS_TO_UPPERCASEN - IS_CLUSTEREDN - PORT_NUMBER9998 - PRESERVE_RESERVED_WORD_CASEY - QUOTE_ALL_FIELDSN - SUPPORTS_BOOLEAN_DATA_TYPEY - SUPPORTS_TIMESTAMP_DATA_TYPEY - USE_POOLINGN - - + Filter rows 2 @@ -523,30 +493,27 @@ none -write tmp_testfall_import_felder - + write tmp_testfall_import_felder + - - N - Feldname - IS NOT NULL - - + + N + Feldname + IS NOT NULL + + - - - - + + 416 384 Y - - + Filter rows 2 2 FilterRows @@ -558,30 +525,27 @@ none -write tmp_testfall_import_erg - + write tmp_testfall_import_erg + - - N - ergname - IS NOT NULL - - + + N + ergname + IS NOT NULL + + - - - - + + 96 448 Y - - + Microsoft Excel Input ExcelInput @@ -609,7 +573,7 @@ - ${PATH_TO_UPLOADFILE} + ${PATH_TO_UPLOADFILE} N @@ -623,7 +587,7 @@ -1 none N - # + # @@ -641,7 +605,7 @@ - Testfall Schlüssel + Testfall Schlüssel String -1 -1 @@ -659,7 +623,7 @@ -1 none N - # + # @@ -671,7 +635,7 @@ -1 none N - # + # @@ -683,7 +647,7 @@ -1 none N - # + # @@ -695,7 +659,7 @@ -1 none N - # + # @@ -707,7 +671,7 @@ -1 none N - # + # @@ -719,7 +683,7 @@ -1 none N - # + # @@ -731,7 +695,7 @@ -1 none N - # + # @@ -743,7 +707,7 @@ -1 none N - # + # @@ -755,7 +719,7 @@ -1 none N - # + # @@ -767,7 +731,7 @@ -1 none N - # + # @@ -779,7 +743,7 @@ -1 none N - # + # @@ -803,7 +767,7 @@ -1 none N - # + # @@ -814,7 +778,7 @@ Tabelle1 0 0 - + N N @@ -836,18 +800,15 @@ POI - - - - + + 128 64 Y - - + Row Normaliser Normaliser @@ -859,51 +820,70 @@ none - feldnr - Feld 1 + feldnr + + + Feld 1 1 Feldname - Feld 2 + + + Feld 2 2 Feldname - Feld 3 + + + Feld 3 3 Feldname - Feld 4 + + + Feld 4 4 Feldname - Feld 5 + + + Feld 5 5 Feldname - Feld 6 + + + Feld 6 6 Feldname - Feld 7 + + + Feld 7 7 Feldname - Feld 8 + + + Feld 8 8 Feldname - Feld 9 + + + Feld 9 9 Feldname - Feld 10 + + + Feld 10 10 Feldname - + + + - - - - + + 368 80 Y - - + Row Normaliser 3 Normaliser @@ -915,27 +895,30 @@ none - feldnr - Ergebnis 1 + feldnr + + + Ergebnis 1 1 ergname - Ergebnis 2 + + + Ergebnis 2 2 ergname - + + + - - - - + + 176 208 Y - - + feldnr_int SelectValues @@ -947,13 +930,15 @@ none - Y - feldnr + + Y + + feldnr feldnr_int Integer -2 -2 - # + # false @@ -963,20 +948,19 @@ - + + + - - - - + + 336 272 Y - - + feldnr_int 2 SelectValues @@ -988,13 +972,15 @@ none - Y - feldnr + + Y + + feldnr feldnr_int Integer -2 -2 - # + # false @@ -1004,20 +990,19 @@ - + + + - - - - + + 96 368 Y - - + write tmp_testfall_import_erg TableOutput @@ -1047,29 +1032,26 @@ N - - feldnr - feldnr_int - - - feldname - ergname - + + feldnr + feldnr_int + + + feldname + ergname + - - - - + + 272 512 Y - - + write tmp_testfall_import_felder TableOutput @@ -1099,32 +1081,27 @@ N - - feldnr - feldnr_int - - - feldname - Feldname - + + feldnr + feldnr_int + + + feldname + Feldname + - - - - + + 592 384 Y - - - - - - + + + N diff --git a/src-modules/module/qa/masken/37020_felderinfo.unl b/src-modules/module/qa/masken/37020_felderinfo.unl index 95425c8..a1e44b6 100644 --- a/src-modules/module/qa/masken/37020_felderinfo.unl +++ b/src-modules/module/qa/masken/37020_felderinfo.unl @@ -7,3 +7,4 @@ 37026^Ab Datum^40^0^0^150^80^1^date^200^0^0^ ^^<> select today()-3 from xdummy^ 37027^Testfall-Schlüssel^55^0^0^150^150^1^sql^50^0^0^^^^ 37028^Projekt^15^0^0^150^80^1^integer^200^0^1^<> select tid,name from qa_project where active=1 /* and systeminfo_id=<> */ order by 2;^^^ +37029^Testfall-Typ^1000^300^-1^170^150^1^integer^30^0^1^<> select 1,'Maskenausführung' from xdummy union select 2,'Datenbank-Test' from xdummy^^ ^ diff --git a/src-modules/module/qa/masken/37020_masken_felder_bez.unl b/src-modules/module/qa/masken/37020_masken_felder_bez.unl index 2d89dc7..6fbe052 100644 --- a/src-modules/module/qa/masken/37020_masken_felder_bez.unl +++ b/src-modules/module/qa/masken/37020_masken_felder_bez.unl @@ -7,3 +7,4 @@ 37020^37026^ 37020^37027^ 37020^37028^ +37020^37029^ diff --git a/src-modules/module/qa/masken/37020_maskeninfo.unl b/src-modules/module/qa/masken/37020_maskeninfo.unl index d5cbff9..490f932 100644 --- a/src-modules/module/qa/masken/37020_maskeninfo.unl +++ b/src-modules/module/qa/masken/37020_maskeninfo.unl @@ -1,18 +1,67 @@ -37020^Masken-Ausführung Protokoll^--Autor: D. Quathamer\ +37020^Testfall-Protokoll^--Autor: D. Quathamer\ --Datum: 2.8.2019\ --Freemarker Template\ <#include "SQL_lingua_franca"/>\ <#include "SuperX_general"/>\ -\ +--Achtung: Diese Script ist auch das select_stmt der Maske 37020\ \ <#assign resultValueNative="result_value::float" />\ <#if SQLdialect='Postgres'>\ <#assign resultValueNative="round(decval(replace(result_value,'.',',')),0) " />\ \ \ +<#assign inEtl=true />\ +<#if Maskennummer?exists && Maskennummer=37020>\ +<#assign inEtl=false />\ +\ +\ +<#assign mask_execution_id="" />\ +<#if inEtl>\ +\ +\ +\ +<@selectintotmp \ +select="1::integer as testcase_type,\ +A.tid as qa_mask_execution_assert_result_tid,\ +R.tid,\ +R.mask_execution_id,\ +R.execution_start,\ +R.execution_end,\ +R.result_code,\ +null::integer as result_status,\ +''::char(255) as result_status_str,\ +A.result_value,\ +E.tid as execution_id,\ +E.name as execution_name,\ +E.uniquename,\ +E.systeminfo_id,\ +''::char(255) as systeminfo_id_str,\ +E.maskeninfo_id,\ +''::char(255) as maskeninfo_id_str,\ +A.mask_execution_assert_id,\ +null::integer as dauer,\ +null::integer as result_value_min,\ +null::integer as result_value_max,\ +null::varchar(255) as assert_caption,\ +null::varchar(255) as assert_value_range,\ +null::varchar(255)[] as fields\ +"\ +source="qa_mask_execution E, qa_mask_execution_result R inner join qa_mask_execution_assert_result A on (A.mask_execution_result_id=R.tid)"\ +target="tmp_testcase">\ +-- nested in selectinto muss die where Bedingung u. ggfs. group by etc kommen\ + where \ + E.tid=R.mask_execution_id\ +and A.result_code is null\ +\ + <@informixnolog/>;\ +\ +<#else>\ +\ \ <@selectintotmp \ -select="R.tid,\ +select="1::integer as testcase_type,\ +A.tid as qa_mask_execution_assert_result_tid,\ +R.tid,\ R.mask_execution_id,\ R.execution_start,\ R.execution_end,\ @@ -25,18 +74,22 @@ E.name as execution_name,\ E.uniquename,\ E.systeminfo_id,\ ''::char(255) as systeminfo_id_str,\ +''::varchar(255) as ticket_link,\ E.maskeninfo_id,\ ''::char(255) as maskeninfo_id_str,\ A.mask_execution_assert_id,\ +null::decimal(20,6) as dauer,\ null::integer as result_value_min,\ null::integer as result_value_max,\ null::varchar(255) as assert_caption,\ +null::varchar(255) as assert_value_range,\ null::varchar(255)[] as fields, \ ('' || E.maskeninfo_id || '&')::text as nextmask,\ - ('../edit/qa/qa_mask_execution_edit.jsp|tid=' || E.tid)::varchar(255) as nextedit\ + ('../edit/qa/qa_mask_execution_edit.jsp|tid=' || E.tid)::varchar(255) as nextedit,\ + ('37040&Ergebnis=' || R.tid)::varchar(255) as nexttable\ "\ source="qa_mask_execution E, qa_mask_execution_result R left outer join qa_mask_execution_assert_result A on (A.mask_execution_result_id=R.tid)"\ -target="tmp_qa_mask_execution">\ +target="tmp_testcase">\ -- nested in selectinto muss die where Bedingung u. ggfs. group by etc kommen\ where \ E.tid=R.mask_execution_id\ @@ -48,19 +101,21 @@ target="tmp_qa_mask_execution">\ /* and E.uniquename ilike '%<>%' */\ /* and date(R.execution_start) >= date_val(<>) */\ /* and E.tid in (select P.mask_execution_id from qa_mask_execution2project P where P.project_id=<>) */\ -\ + /* and 1=<> */\ \ <@informixnolog/>;\ \ +\ +\ <#if SQLdialect='Postgres'>\ -update tmp_qa_mask_execution set result_value_min=A.result_value_min,\ +update tmp_testcase set result_value_min=A.result_value_min,\ result_value_max=A.result_value_max,\ assert_caption=coalesce(A.caption,'Zeile ' || A.rownr || ' Spalte ' || A.colnr) \ from qa_mask_execution_assert A\ -where A.tid=tmp_qa_mask_execution.mask_execution_assert_id;\ +where A.tid=tmp_testcase.mask_execution_assert_id;\ <#else>\ --Informix Dialekt:\ -update tmp_qa_mask_execution set (result_value_min,\ +update tmp_testcase set (result_value_min,\ result_value_max,\ assert_caption) \ = ((select \ @@ -68,18 +123,19 @@ update tmp_qa_mask_execution set (result_value_min,\ A.result_value_max,\ nvl(A.caption,'Zeile ' || A.rownr || ' Spalte ' || A.colnr)\ from qa_mask_execution_assert A\ -where A.tid=tmp_qa_mask_execution.mask_execution_assert_id\ +where A.tid=tmp_testcase.mask_execution_assert_id\ ))\ -where tmp_qa_mask_execution.mask_execution_assert_id in (select A.tid\ +where tmp_testcase.mask_execution_assert_id in (select A.tid\ from qa_mask_execution_assert A)\ ;\ \ - \ -update tmp_qa_mask_execution set result_status=2,\ +\ +\ +update tmp_testcase set result_status=2,\ result_status_str='Fehler'\ where result_code!=0;\ \ -update tmp_qa_mask_execution set result_status=0,\ +update tmp_testcase set result_status=0,\ result_status_str='Erfolg'\ where result_code=0\ and (\ @@ -89,29 +145,154 @@ and\ )\ ;\ \ -update tmp_qa_mask_execution set result_status=1,\ +update tmp_testcase set result_status=1,\ result_status_str='Warnung'\ where result_status is null;\ \ -/* delete from tmp_qa_mask_execution where result_status not in (<>) ; */\ +update tmp_testcase set assert_value_range=result_value_min || '-' || result_value_max;\ \ +update tmp_testcase set dauer=\ +<#if SQLdialect='Postgres'>\ +round(extract(second from (execution_end-execution_start))::decimal,0)::decimal\ +<#else>\ +execution_end-execution_start\ +\ +;\ +update tmp_testcase set ticket_link=P.issue_link || TP.issue_id\ +from qa_mask_execution2project TP, qa_project P\ +where TP.mask_execution_id=tmp_testcase.mask_execution_id\ +and P.tid=TP.project_id\ +;\ +--nun DB-Tests:\ +<@selectintotmp \ +select="\ +T.tid,\ +T.name,\ +T.uniquename,\ +R.execution_start,\ +R.execution_end,\ +R.result_code,\ +null::integer as result_status,\ +''::char(255) as result_status_str,\ +R.result_value,\ +T.systeminfo_id,\ +''::char(255) as systeminfo_id_str,\ +A.tid as qa_dbtest_assertion_id,\ +A.def_col_caption,\ +A.def_col_name,\ +A.def_col_value,\ +''::varchar(255) as ticket_link,\ + ('../edit/qa/qa_dbtest_edit.jsp|tid=' || T.tid)::varchar(255) as nextedit\ +"\ +source="qa_dbtest T, qa_dbtest_assertion A inner join qa_dbtest_result R \ +on (R.dbtest_assertion_id=A.tid /* and date(R.execution_start) >= date_val(<>) */\ +/* and R.tid=<> */\ +)"\ +target="tmp_qa_dbtest">\ + where \ + T.tid=A.dbtest_id\ + /* and T.active=<> */\ + /* and T.tid in (select P.dbtest_id from qa_dbtest2project P where P.project_id=<>) */\ + /* and E.userinfo_id=<> */\ + /* and T.systeminfo_id=<> */\ + /* and T.name ilike '%<>%' */\ + /* and T.tid=<> */\ + /* and 2=<> */\ + \ + <@informixnolog/>;\ \ -update tmp_qa_mask_execution set systeminfo_id_str=(select name from systeminfo S\ -where S.tid=tmp_qa_mask_execution.systeminfo_id);\ +update tmp_qa_dbtest set ticket_link=P.issue_link || TP.issue_id\ +from qa_dbtest2project TP, qa_project P\ +where TP.dbtest_id=tmp_qa_dbtest.tid\ +and P.tid=TP.project_id\ +;\ +update tmp_qa_dbtest set --result_status=1,\ +result_status_str='Warnung'\ + where result_code=1;\ +update tmp_qa_dbtest set result_status=2,\ + result_status_str='Fehler'\ + where result_code is null;\ +-- \ +update tmp_qa_dbtest set \ + result_status_str='Erfolg'\ + where result_code=0\ + ;\ \ -update tmp_qa_mask_execution set maskeninfo_id_str=(select name from maskeninfo M\ -where M.tid=tmp_qa_mask_execution.maskeninfo_id);\ +/* delete from tmp_qa_dbtest where result_code not in ( <>) ; */\ \ +\ +\ +insert into tmp_testcase(testcase_type,\ +systeminfo_id,\ +execution_name,\ +uniquename,\ +--maskeninfo_id_str,\ +--nextserverlink,\ +ticket_link,\ +--nextmask,\ +execution_start,\ +dauer,\ +assert_caption,\ +assert_value_range,\ +result_value,\ +result_status_str,\ +nexttable,\ +nextedit\ +)\ +select 2::integer as testcase_type, --DB-Test\ +systeminfo_id,\ +name,\ +uniquename,\ +case when ticket_link !='' then 'Ticket|' || ticket_link else '' end as ticket_link,\ +execution_start,\ <#if SQLdialect='Postgres'>\ +round(extract(second from (execution_end-execution_start))::decimal,0)::integer as dauer,\ +<#else>\ +execution_end-execution_start as dauer,\ +\ +nvl(def_col_caption,def_col_name) as assert_caption,\ +def_col_value as assert_value_range,\ +result_value,\ +result_status_str,\ +'' as nexttable,\ +nextedit\ +from tmp_qa_dbtest\ +;\ \ -update tmp_qa_mask_execution set fields=(select array_agg(trim(F.name) || '=' || trim(S.field_value))\ +drop table tmp_qa_dbtest;\ +\ +\ +\ +<#if inEtl>\ +\ +update qa_mask_execution_assert_result set result_code=T.result_status\ +from tmp_testcase T\ +where T.qa_mask_execution_assert_result_tid=qa_mask_execution_assert_result.tid \ +and qa_mask_execution_assert_result.result_code is null;\ +\ +drop table tmp_testcase;\ +\ +<#else>\ +\ +/* delete from tmp_testcase where result_status not in (<>) ; */\ +\ +\ +update tmp_testcase set systeminfo_id_str=(select name from systeminfo S\ +where S.tid=tmp_testcase.systeminfo_id);\ +\ +update tmp_testcase set maskeninfo_id_str=(select name from maskeninfo M\ +where M.tid=tmp_testcase.maskeninfo_id);\ +\ +<#if SQLdialect='Postgres'>\ +\ +update tmp_testcase set fields=(select array_agg(trim(F.name) || '=' || trim(S.field_value))\ from qa_mask_field_sel S, felderinfo F\ where S.felderinfo_id=F.tid\ and S.is_active=1\ -and S.mask_execution_id=tmp_qa_mask_execution.execution_id\ +and S.mask_execution_id=tmp_testcase.execution_id\ );\ \ -update tmp_qa_mask_execution set nextmask=nextmask || array_to_string(fields,'&','')\ +update tmp_testcase set nextmask=nextmask || array_to_string(fields,'&','')\ where fields is not null;\ \ \ @@ -121,23 +302,21 @@ execution_name,\ uniquename,\ maskeninfo_id_str,\ nextmask,\ +ticket_link as nextserverlink,\ execution_start,\ -<#if SQLdialect='Postgres'>\ -round(extract(second from (execution_end-execution_start))::decimal,0)::integer as dauer,\ -<#else>\ -execution_end-execution_start as dauer,\ -\ +dauer,\ assert_caption,\ -result_value_min,\ -result_value_max,\ +assert_value_range,\ result_value,\ result_status_str,\ -('37040&Ergebnis=' || tid)::varchar(255) as nexttable\ +nexttable\ <#if UserIsAdmin>\ ,nextedit\ \ -from tmp_qa_mask_execution\ -order by 1,2,3,4,5,6,7;^--freemarker template\ +from tmp_testcase\ +order by 1,2,3,4,5,6,7;\ +\ +^--freemarker template\ XIL List\ drop_and_delete movable_columns sizable_columns horizontal_scrolling\ white_space_color=COLOR_WHITE fixed_columns=2\ @@ -157,6 +336,9 @@ Column CID=1 heading_text="Maske" center_heading\ Column CID=1 heading_text="Maske\\naufrufen" center_heading\ row_selectable col_selectable heading_platform readonly\ width=40 text_size=200\ +Column CID=1 heading_text="Ticket" center_heading\ + row_selectable col_selectable heading_platform readonly\ + width=40 text_size=200\ Column CID=1 heading_text="Ausführungszeit\\nStart" center_heading\ row_selectable col_selectable heading_platform readonly\ width=14 text_size=200\ @@ -166,13 +348,10 @@ Column CID=1 heading_text="Dauer\\n(Sek.)" center_heading\ Column CID=1 heading_text="Erwarteter Wert\\n(Zelle)" center_heading\ row_selectable col_selectable heading_platform readonly\ width=15 text_size=200\ -Column CID=1 heading_text="Erwarteter Wert\\n(Minimum)" center_heading\ - row_selectable col_selectable heading_platform readonly\ - width=15 text_size=200\ -Column CID=1 heading_text="Erwarteter Wert\\n(Maximum)" center_heading\ +Column CID=1 heading_text="Erwarteter Wert" center_heading\ row_selectable col_selectable heading_platform readonly\ width=15 text_size=200\ -Column CID=1 heading_text="Wert" center_heading\ +Column CID=1 heading_text="Gefundener Wert" center_heading\ row_selectable col_selectable heading_platform readonly\ width=5 text_size=200\ Column CID=1 heading_text="Ausführungsstatus" center_heading\ @@ -186,4 +365,4 @@ Column CID=1 heading_text="Bearbeiten" center_heading\ row_selectable col_selectable heading_platform readonly\ width=5 text_size=200\ \ -@@@^^^Protokoll der Masken-Ausführung ausgeben^drop table tmp_qa_mask_execution;^^1^440^360^0^1^^ +@@@^^^Protokoll der Masken-Ausführung ausgeben^drop table tmp_testcase;^^1^440^360^0^1^^ diff --git a/src-modules/module/qa/masken/37100_felderinfo.unl b/src-modules/module/qa/masken/37100_felderinfo.unl index b2e87a0..c402c4e 100644 --- a/src-modules/module/qa/masken/37100_felderinfo.unl +++ b/src-modules/module/qa/masken/37100_felderinfo.unl @@ -1,5 +1,5 @@ 37100^Benutzer/in^60^0^0^150^200^1^integer^200^0^1^<> select tid,nvl(name,benutzer) from userinfo order by 2;^^^ -37101^Ausführungs-Status^0^0^0^150^80^1^integer^200^0^1^<> select 0,'Erfolgreich' from xdummy union select 1,'Warnung' from xdummy union select 2,'Fehler' from xdummy order by 1^^^ +37101^Ausführungs-Status^0^0^0^150^80^10^integer^200^0^1^<> select 0,'Erfolgreich' from xdummy union select 1,'Warnung' from xdummy union select 2,'Fehler' from xdummy order by 1^^^ 37102^Projekt^20^0^0^150^80^1^integer^200^0^1^<> select tid,name from qa_project where active=1 /* and systeminfo_id=<> */ order by 2;^^^ 37103^Testfall-Name (Stichwort)^50^0^0^150^150^1^sql^50^0^0^^^^ 37104^Komponente^10^0^0^150^200^1^integer^200^0^1^<> select tid,name from systeminfo order by 2;^^^ @@ -9,3 +9,4 @@ /* and T.tid in (select P.dbtest_id from qa_dbtest2project P where P.project_id=<>) */ \ /* and T.systeminfo_id=<> */\ order by 2^ ^ ^ +37108^Result-ID^1000^300^-1^170^150^1^integer^30^0^13^ ^^ ^ diff --git a/src-modules/module/qa/masken/37100_masken_felder_bez.unl b/src-modules/module/qa/masken/37100_masken_felder_bez.unl index e25cd7e..8bd899b 100644 --- a/src-modules/module/qa/masken/37100_masken_felder_bez.unl +++ b/src-modules/module/qa/masken/37100_masken_felder_bez.unl @@ -6,3 +6,4 @@ 37100^37105^ 37100^37106^ 37100^37107^ +37100^37108^ diff --git a/src-modules/module/qa/masken/37100_maskeninfo.unl b/src-modules/module/qa/masken/37100_maskeninfo.unl index 41f88aa..7ec4d67 100644 --- a/src-modules/module/qa/masken/37100_maskeninfo.unl +++ b/src-modules/module/qa/masken/37100_maskeninfo.unl @@ -30,7 +30,10 @@ A.def_col_name,\ A.def_col_value,\ ''::varchar(255) as ticket_link\ "\ -source="qa_dbtest T, qa_dbtest_assertion A left outer join qa_dbtest_result R on (R.dbtest_assertion_id=A.tid /* and date(R.execution_start) >= date_val(<>) */)"\ +source="qa_dbtest T, qa_dbtest_assertion A inner join qa_dbtest_result R \ +on (R.dbtest_assertion_id=A.tid /* and date(R.execution_start) >= date_val(<>) */\ +/* and R.tid=<> */\ +)"\ target="tmp_qa_dbtest">\ where \ T.tid=A.dbtest_id\ @@ -60,7 +63,7 @@ update tmp_qa_dbtest set \ where result_code=0\ ;\ \ -/* delete from tmp_qa_dbtest where result_code!= <> ; */\ +/* delete from tmp_qa_dbtest where result_code not in ( <>) ; */\ \ \ update tmp_qa_dbtest set systeminfo_id_str=(select name from systeminfo S\ diff --git a/src-modules/module/qa/masken/37140_maskeninfo.unl b/src-modules/module/qa/masken/37140_maskeninfo.unl index 02d537b..6ac281b 100644 --- a/src-modules/module/qa/masken/37140_maskeninfo.unl +++ b/src-modules/module/qa/masken/37140_maskeninfo.unl @@ -13,11 +13,12 @@ R.orderbyclause,\ T.tid,\ T.uniquename,\ T.name,\ -T.whereclause\ -FROM qa_dbtest T, qa_resultset R\ -where \ -T.resultset_id=R.tid\ -and T.active=1\ +T.whereclause,\ +C.tid as testcase_id\ +FROM qa_testcase C, qa_dbtest T, qa_resultset R\ +where C.dbtest_id=T.tid\ +and T.resultset_id=R.tid\ +and C.is_active=1\ ;\ \ \ @@ -28,7 +29,8 @@ A.tid,\ A.rownr ,\ A.def_col_caption,\ A.def_col_name,\ -A.def_col_value\ +A.def_col_value,\ +A.def_col_function\ FROM qa_dbtest_assertion A\ where A.dbtest_id in (select T.tid\ from qa_dbtest T where T.active=1)\ @@ -49,24 +51,27 @@ from qa_dbtest T where T.active=1)\ \ /* <#assign dbtest_id="<>" />*/\ \ +\ create temp table tmp_qa_dbtest_result_id\ (qa_dbtest_result_id integer);\ \ -\ <#foreach dbtest in qa_dbtests>\ <#if dbtest_id == "" || dbtest_id==dbtest.tid?string>\ \ -select now() as beginn\ +select ${dbtest.tid}::integer as dbtest_id,now() as beginn\ into temp tmp_anfang;\ \ -select ${dbtest.fieldclause}\ +select ${dbtest.fieldclause},(row_number () over (<#if dbtest.orderbyclause !=''>\ +order by ${dbtest.orderbyclause}\ +))::integer as _rownumber\ into temp tmp_rs\ from ${dbtest.fromclause}\ <#if dbtest.whereclause !=''>\ -where ${dbtest.whereclause}\ +where <#assign inlineTemplate=dbtest.whereclause?interpret />\ +<@inlineTemplate/>\ \ <#if dbtest.groupbyclause !=''>\ -group by ${dbtest.whereclause}\ +group by ${dbtest.groupbyclause}\ \ <#if dbtest.orderbyclause !=''>\ order by ${dbtest.orderbyclause}\ @@ -88,11 +93,20 @@ select \ ${dbtest_assertion.tid},\ A.beginn,\ now(),\ -case when T.${dbtest_assertion.def_col_name}='${dbtest_assertion.def_col_value}' then 0\ +case when T.${dbtest_assertion.def_col_name}=\ +<#if dbtest_assertion.def_col_function !="">\ +${dbtest_assertion.def_col_function}('${dbtest_assertion.def_col_value}')\ +<#else>\ +'${dbtest_assertion.def_col_value}' \ +\ +then 0\ else 1 end as result_code,\ T.${dbtest_assertion.def_col_name} as result_value\ from tmp_anfang A left outer join tmp_rs T\ -on (1=${dbtest_assertion.rownr})\ +on (A.dbtest_id=${dbtest_assertion.dbtest_id}\ +and _rownumber=${dbtest_assertion.rownr} \ +)\ +\ ;\ insert into tmp_qa_dbtest_result_id(qa_dbtest_result_id)\ <#if SQLdialect='Postgres'>\ diff --git a/src-modules/module/qa/masken/37160_felderinfo.unl b/src-modules/module/qa/masken/37160_felderinfo.unl new file mode 100644 index 0000000..55d699d --- /dev/null +++ b/src-modules/module/qa/masken/37160_felderinfo.unl @@ -0,0 +1,11 @@ +37160^Benutzer/in^60^0^0^150^200^1^integer^200^0^1^<> select tid,nvl(name,benutzer) from userinfo order by 2;^^^ +37161^Ausführungs-Status^0^0^0^150^80^10^integer^200^0^1^<> select 0,'Erfolgreich' from xdummy union select 1,'Warnung' from xdummy union select 2,'Fehler' from xdummy order by 1^^^ +37162^Projekt^20^0^0^150^80^1^integer^200^0^1^<> select tid,name from qa_project where active=1 /* and systeminfo_id=<> */ order by 2;^^^ +37163^Testfall-Name (Stichwort)^50^0^0^150^150^1^sql^50^0^0^^^^ +37164^Komponente^10^0^0^150^200^1^integer^200^0^1^<> select tid,name from systeminfo order by 2;^^^ +37165^Nur aktive^30^0^0^150^80^1^integer^200^0^1^<> select 1,'Ja' from xdummy union select 0,'nein' from xdummy order by 1 desc;^^<>select 1,'Ja' from xdummy^ +37166^Ab Datum^40^0^0^150^80^1^date^200^0^0^ ^^<> select today()-3 from xdummy^ +37167^Testfall^100^0^0^150^200^1^integer^200^0^1^<> select T.tid,T.name from qa_testcase T where is_active=1 \ +/* and T.tid in (select P.testcase_id from qa_testcase2project P where P.project_id=<>) */ \ +/* and T.systeminfo_id=<> */\ +order by 2^ ^ ^ diff --git a/src-modules/module/qa/masken/37160_maske_system_bez.unl b/src-modules/module/qa/masken/37160_maske_system_bez.unl new file mode 100644 index 0000000..b71f856 --- /dev/null +++ b/src-modules/module/qa/masken/37160_maske_system_bez.unl @@ -0,0 +1 @@ +37160^260^ diff --git a/src-modules/module/qa/masken/37160_masken_felder_bez.unl b/src-modules/module/qa/masken/37160_masken_felder_bez.unl new file mode 100644 index 0000000..d7be957 --- /dev/null +++ b/src-modules/module/qa/masken/37160_masken_felder_bez.unl @@ -0,0 +1,8 @@ +37160^37160^ +37160^37161^ +37160^37162^ +37160^37163^ +37160^37164^ +37160^37165^ +37160^37166^ +37160^37167^ diff --git a/src-modules/module/qa/masken/37160_maskeninfo.unl b/src-modules/module/qa/masken/37160_maskeninfo.unl new file mode 100644 index 0000000..345b01f --- /dev/null +++ b/src-modules/module/qa/masken/37160_maskeninfo.unl @@ -0,0 +1,126 @@ +37160^Testfall-Protokoll^--Autor: D. Quathamer\ +--Datum: 2.8.2019\ +--Freemarker Template\ +<#include "SQL_lingua_franca"/>\ +<#include "SuperX_general"/>\ +\ +\ +<#assign resultValueNative="result_value::float" />\ +<#if SQLdialect='Postgres'>\ +<#assign resultValueNative="round(decval(replace(result_value,'.',',')),0) " />\ +\ +\ +\ +<@selectintotmp \ +select="\ +T.tid,\ +T.name,\ +T.uniquename,\ +R.assertion_def_col_caption,\ +R.execution_start,\ +R.execution_end,\ +R.result_code,\ +R.result_value,\ +null::integer as result_status,\ +''::char(255) as result_status_str,\ +R.result_log,\ +T.systeminfo_id,\ +''::char(255) as systeminfo_id_str,\ +''::varchar(255) as ticket_link,\ +''::varchar(255) as nexttable,\ +R.mask_execution_result_id,\ +R.dbtest_result_id\ +"\ +source="qa_testcase T inner join qa_testcase_result R on (R.testcase_id=T.tid /* and date(R.execution_start) >= date_val(<>) */)"\ +target="tmp_qa_testcase">\ + where \ + 1=1\ + /* and T.is_active=<> */\ + /* and T.tid in (select P.testcase_id from qa_testcase2project P where P.project_id=<>) */\ + /* and T.userinfo_id=<> */\ + /* and T.systeminfo_id=<> */\ + /* and T.name ilike '%<>%' */\ + /* and T.tid=<> */\ + \ + <@informixnolog/>;\ +\ +update tmp_qa_testcase set ticket_link=P.issue_link || TP.issue_id\ +from qa_testcase2project TP, qa_project P\ +where TP.testcase_id=tmp_qa_testcase.tid\ +and P.tid=TP.project_id\ +;\ +\ +update tmp_qa_testcase set nexttable='37020&Result-ID=' || mask_execution_result_id\ +where mask_execution_result_id is not null;\ +update tmp_qa_testcase set nexttable='37100&Result-ID=' || dbtest_result_id\ +where dbtest_result_id is not null;\ +\ +\ +update tmp_qa_testcase set --result_status=1,\ +result_status_str='Warnung'\ + where result_code=1;\ +update tmp_qa_testcase set result_status=2,\ + result_status_str='Fehler'\ + where result_code is null;\ +-- \ +update tmp_qa_testcase set \ + result_status_str='Erfolg'\ + where result_code=0\ + ;\ +\ +/* delete from tmp_qa_testcase where result_code not in ( <> ); */\ +\ +\ +update tmp_qa_testcase set systeminfo_id_str=(select name from systeminfo S\ +where S.tid=tmp_qa_testcase.systeminfo_id);\ +\ +select systeminfo_id_str,\ +name,\ +uniquename,\ +case when ticket_link !='' then 'Ticket|' || ticket_link else '' end as nextserverlink,\ +assertion_def_col_caption,\ +execution_start,\ +<#if SQLdialect='Postgres'>\ +round(extract(second from (execution_end-execution_start))::decimal,0)::integer as dauer,\ +<#else>\ +execution_end-execution_start as dauer,\ +\ +result_value,\ +result_status_str,\ +nexttable\ +from tmp_qa_testcase\ +order by 1,2,3,4,5,6,7;^XIL List\ + drop_and_delete movable_columns sizable_columns horizontal_scrolling\ + white_space_color=COLOR_WHITE fixed_columns=2\ + min_heading_height=35\ +Column CID=0 heading_text="Komponente" center_heading\ + row_selectable col_selectable heading_platform readonly\ + width=20 text_size=100\ +Column CID=1 heading_text="Testfall" center_heading\ + row_selectable col_selectable heading_platform readonly\ + width=50 text_size=200\ +Column CID=1 heading_text="Testfall\\nSchlüssel" center_heading\ + row_selectable col_selectable heading_platform readonly\ + width=10 text_size=200\ +Column CID=1 heading_text="Ticket" center_heading\ + row_selectable col_selectable heading_platform readonly\ + width=10 text_size=200\ +Column CID=1 heading_text="Erwartung" center_heading\ + row_selectable col_selectable heading_platform readonly\ + width=20 text_size=200\ +Column CID=1 heading_text="Ausführungszeit\\nStart" center_heading\ + row_selectable col_selectable heading_platform readonly\ + width=10 text_size=200\ +Column CID=1 heading_text="Dauer\\n(Sek.)" center_heading\ + row_selectable col_selectable heading_platform readonly\ + width=10 text_size=200\ +Column CID=1 heading_text="Gefundener Wert" center_heading\ + row_selectable col_selectable heading_platform readonly\ + width=10 text_size=200\ +Column CID=1 heading_text="Ausführungsstatus" center_heading\ + row_selectable col_selectable heading_platform readonly\ + width=15 text_size=200\ +Column CID=1 heading_text="Details" center_heading\ + row_selectable col_selectable heading_platform readonly\ + width=15 text_size=200\ +@@@^^^Übersicht über das Laufzeitverhalten von Masken- und Datenbanktestfällen^drop table tmp_qa_testcase;^^1^440^360^0^1^^ diff --git a/src-modules/module/qa/masken/37160_sachgeb_maske_bez.unl b/src-modules/module/qa/masken/37160_sachgeb_maske_bez.unl new file mode 100644 index 0000000..26da9bb --- /dev/null +++ b/src-modules/module/qa/masken/37160_sachgeb_maske_bez.unl @@ -0,0 +1 @@ +260^37160^ diff --git a/src-modules/module/qa/qa_update.x b/src-modules/module/qa/qa_update.x new file mode 100755 index 0000000..9c73f93 --- /dev/null +++ b/src-modules/module/qa/qa_update.x @@ -0,0 +1,78 @@ +#!/bin/bash + +#Arbeitsverzeichnis fuer crontab +PFAD=$2 +if [ "$PFAD" != "" ] +then + +cd $PFAD + +fi +#Umgebung einlesen: +if [ "$QA_PFAD" = "" ] +then +echo "ACHTUNG: Die Umgebungsvariable QA_PFAD ist nicht gesetzt. Bitte prüfen Sie $SUPERX_DIR/db/bin/SQL_ENV" + +exit 1 + +fi +if [ "$QA_ERRORMAIL" != "" ] +then +ERRORMAIL=$QA_ERRORMAIL +export ERRORMAIL +fi +if [ "$QA_LOGMAIL" != "" ] +then +LOGMAIL=$QA_LOGMAIL +export LOGMAIL +fi +if [ "$QA_BACKUP" != "" ] +then +MODULE_BACKUP=$QA_BACKUP +export MODULE_BACKUP +fi +#hier geht es los + +#bei QA gibt es keine Rohdaten, daher Tagesdatum: +date +'%d.%m.%Y' > $QA_LOAD_PFAD/superx.datum +echo "qa-Update startet" >$QA_ERRORDAT + + + +runAndCheck.x $QA_PFAD/etl/mask_execution "qa_mask_execution.x" EXIT_ON_ERROR SEND_ERRORMAIL SEND_LOGMAIL "QA update$MANDANTID Masken" +runAndCheck.x $QA_PFAD "module_etl.x qa $QA_PFAD $QA_LOAD_PFAD" EXIT_ON_ERROR SEND_ERRORMAIL SEND_LOGMAIL "QA update$MANDANTID" +cat etl/mask_execution/L_QA_update$MANDANTID.log >>$QA_PFAD/L_QA_update$MANDANTID.log +echo "---------------------------Beginn Prüfroutine-----------------------------------" >>$QA_ERRORDAT +cat $QA_PFAD/L_QA_update$MANDANTID.log >>$QA_ERRORDAT +#cat $QA_PFAD/L_qa_Test$MANDANTID.log >>$QA_ERRORDAT +#pruefmail.x $QA_PFAD/L_qa_Test$MANDANTID.log $ERRORMAIL + + +#Bei Fehlern Datum zurücksetzen: +fgrep -s "not found" $QA_ERRORDAT +FLAG1=$? +fgrep -i -s "error" $QA_ERRORDAT +FLAG2=$? +fgrep -i -s "nicht gefunden" $QA_ERRORDAT +FLAG3=$? +fgrep -i -s "fehler" $QA_ERRORDAT +FLAG4=$? + +if [ $FLAG1 -eq 0 -o $FLAG2 -eq 0 -o $FLAG3 -eq 0 -o $FLAG4 -eq 0 ] +then + echo "Fehler beim QA-Update " + echo "---------------------------------------" + echo "Fehlerprotokoll in $QA_ERRORDAT" + echo "Das Datum wird zurückgesetzt. Kopieren Sie die Datei superx.datum ggf. auf den QA-Rechner" + echo "---------------------------------------" + cp $QA_LOAD_PFAD/superx.datum.alt $QA_LOAD_PFAD/superx.datum +else + echo "QA-Update erfolgreich" + if [ "$QA_LOGMAIL" != "" -a "$MAILPROG" != "" ] + then + echo "Masken-Ausführung Protokoll ausführen und versenden" + $QA_PFAD/etl/mask_execution/mask_execution_mail.x >>$QA_ERRORDAT 2>&1 + fi + +fi + diff --git a/src-modules/module/qa/upgrade/qa_upgrade_testcases0.6.sql b/src-modules/module/qa/upgrade/qa_upgrade_testcases0.6.sql new file mode 100644 index 0000000..0bbd15a --- /dev/null +++ b/src-modules/module/qa/upgrade/qa_upgrade_testcases0.6.sql @@ -0,0 +1,90 @@ +begin work; + +--welche Maskentests sind noch nicht migriert? +insert into qa_testcase( + name, + userinfo_id, + testcase_type_id, + is_active, + systeminfo_id, + uniquename, + mask_execution_id, + dbtest_id, + testcase_status_id +) +select name, + userinfo_id, + 1 as testcase_type_id, + is_active, + systeminfo_id, + uniquename, + E.tid as mask_execution_id, + null::integer as dbtest_id, + 2 as testcase_status_id --Migration +FROM qa_mask_execution E +where E.tid not in (select mask_execution_id +from qa_testcase +where mask_execution_id is not null) + ; + +--Anhängige Tabellen füllen: +insert into qa_testcase2project( +testcase_id, +project_id, +issue_id) +select C.tid, +P.project_id, +P.issue_id +FROM qa_mask_execution2project P, qa_testcase C +where C.mask_execution_id=P.mask_execution_id +and C.testcase_status_id=2 +; + +--jetzt dbtests: +insert into qa_testcase( + name, + userinfo_id, + testcase_type_id, + is_active, + systeminfo_id, + uniquename, + mask_execution_id, + dbtest_id, + testcase_status_id +) +select name, + null::integer as userinfo_id, + 2 as testcase_type_id, + D.active, + D.systeminfo_id, + D.uniquename, + null::integer as mask_execution_id, + D.tid as dbtest_id, + 2 as testcase_status_id --Migration +FROM qa_dbtest D +where D.tid not in (select dbtest_id +from qa_testcase +where dbtest_id is not null) + ; + +--Anhängige Tabellen füllen: +insert into qa_testcase2project( +testcase_id, +project_id, +issue_id) +select C.tid, +P.project_id, +P.issue_id +FROM qa_dbtest2project P, qa_testcase C +where C.dbtest_id=P.dbtest_id +and C.testcase_status_id=2 +; + + +--migriert: +update qa_testcase set testcase_status_id=1 +where testcase_status_id=2; + + +commit; +