Browse Source

Testfall-Projekte sollen helfen, Testfälle zu gruppieren. #5

qa_0.6_Release
Daniel Quathamer 2 years ago
parent
commit
79bc702db4
  1. 54
      src-modules/module/qa/conf/qa.xml
  2. 127
      src-modules/module/qa/datentabellen/qa_dbtest_ausfuehren.sql
  3. 1
      src-modules/module/qa/masken/37000_felderinfo.unl
  4. 1
      src-modules/module/qa/masken/37000_masken_felder_bez.unl
  5. 2
      src-modules/module/qa/masken/37000_maskeninfo.unl
  6. 1
      src-modules/module/qa/masken/37020_felderinfo.unl
  7. 1
      src-modules/module/qa/masken/37020_masken_felder_bez.unl
  8. 2
      src-modules/module/qa/masken/37020_maskeninfo.unl
  9. 26
      src-modules/module/qa/masken/37140_maskeninfo.unl

54
src-modules/module/qa/conf/qa.xml

@ -222,7 +222,33 @@ notnull="true">
</rs></primaryKeys> </rs></primaryKeys>
<!-- TODO indices--> <!-- TODO indices-->
</table> </table>
<table name="qa_mask_execution2project" caption="Masken-Test zu Projekt" thema="Qualitätssicherung" typ="Schlüsseltabelle">
<columns><column name="tid" type ="SERIAL" size ="10" default ="" notnull ="true" description=""/>
<column name="mask_execution_id" type ="INTEGER" size ="255" default ="" notnull ="true" isKey="true" description="DB-Test"/>
<column name="project_id" type ="INTEGER" size ="10" default ="" notnull ="true" description="Projekt"/>
<column name="issue_id" type ="VARCHAR" size ="255" default ="" notnull ="false" description="Ticketnummer"><comment></comment></column>
</columns>
<indexes>
<index name="ix_qa_mask_execution2project_id" type="unique">
<index-column name="mask_execution_id"/>
<index-column name="project_id"/>
</index>
</indexes>
<primaryKeys><rs>
<row>
<fld name='table_cat'></fld>
<fld name='table_schem'></fld>
<fld name='table_name'>qa_mask_execution2project</fld>
<fld name='column_name'>tid</fld>
<fld name='key_seq'>1</fld>
<fld name='pk_name'>pk_qa_mask_execution2project</fld>
</row>
</rs></primaryKeys>
<foreignKeys></foreignKeys>
<importedKeys></importedKeys>
<privileges><rs>
</rs></privileges>
</table>
<!--Tabellenvergleiche --> <!--Tabellenvergleiche -->
<table name="qa_tablecomp_profile" thema="Qualitätssicherung" typ="Schlüsseltabelle" > <table name="qa_tablecomp_profile" thema="Qualitätssicherung" typ="Schlüsseltabelle" >
<description>Tabellenvergleich Name des Profils</description> <description>Tabellenvergleich Name des Profils</description>
@ -276,6 +302,8 @@ notnull="true">
<!-- TODO indices--> <!-- TODO indices-->
</table> </table>
<table name="qa_tablecomp_aggregation" thema="Qualitätssicherung" typ="Schlüsseltabelle" > <table name="qa_tablecomp_aggregation" thema="Qualitätssicherung" typ="Schlüsseltabelle" >
<description>Tabellenvergleich Abgleiche Summen im Rahmen eines Profils</description> <description>Tabellenvergleich Abgleiche Summen im Rahmen eines Profils</description>
<columns> <columns>
@ -700,6 +728,18 @@ delete="FALSE" displayType="select" visibleFields="name"
format="%s"> format="%s">
<relation-column from="tid" to="systeminfo_id" /> <relation-column from="tid" to="systeminfo_id" />
</relation> </relation>
<!--qa_mask_execution2project-->
<relation from="qa_project" to="qa_mask_execution2project"
delete="FALSE" displayType="select" visibleFields="name"
format="%s">
<relation-column from="tid" to="project_id" />
</relation>
<relation from="qa_mask_execution" to="qa_mask_execution2project"
delete="FALSE" displayType="select" visibleFields="name"
format="%s">
<relation-column from="tid" to="mask_execution_id" />
</relation>
<!-- qa_mask_field_sel --> <!-- qa_mask_field_sel -->
<relation from="qa_mask_execution" to="qa_mask_field_sel" <relation from="qa_mask_execution" to="qa_mask_field_sel"
delete="FALSE" displayType="select" visibleFields="name" delete="FALSE" displayType="select" visibleFields="name"
@ -834,6 +874,8 @@ format="%s">
<action> <action>
<nativeaction sql="" scriptfile="$QA_PFAD/schluesseltabellen/qa_mask_execution_update.sql" <nativeaction sql="" scriptfile="$QA_PFAD/schluesseltabellen/qa_mask_execution_update.sql"
database=""/> database=""/>
<nativeaction sql="" scriptfile="$QA_PFAD/datentabellen/qa_dbtest_ausfuehren.sql"
database=""/>
<nativeaction sql="update systeminfo set datum=today() where tid in (260)" scriptfile="" database=""/> <nativeaction sql="update systeminfo set datum=today() where tid in (260)" scriptfile="" database=""/>
</action> </action>
@ -903,6 +945,16 @@ mode="update_insert_delete_copy">
<customfield name="output_filename" visibleSize="50" nullFieldValue="" /> <customfield name="output_filename" visibleSize="50" nullFieldValue="" />
--> -->
<customfield name="systeminfo_id" visibleSize="50" nullFieldValue="" /> <customfield name="systeminfo_id" visibleSize="50" nullFieldValue="" />
<customfield name="Projekt" type="subform" multipart="false" autoUpdate="false"
maxRows="*" table="qa_mask_execution2project" parentField="tid" childField="mask_execution_id"
orderBy="" allowNew="true"
mode="update_insert_delete">
<field-selection complete="false" />
<customfield name="mask_execution_id" type="hidden" overrideValue="tid" />
<customfield name="project_id" nullFieldValue="" visibleSize="5" />
<customfield name="issue_id" nullFieldValue="" visibleSize="5" />
</customfield>
</form> </form>
<form name="qa_tablecomp_profile_list" <form name="qa_tablecomp_profile_list"
table="qa_tablecomp_profile" table="qa_tablecomp_profile"

127
src-modules/module/qa/datentabellen/qa_dbtest_ausfuehren.sql

@ -0,0 +1,127 @@
--Freemarker Template
--Achtung: Diese Script ist auch das select_stmt der Maske 37140
<#include "SQL_lingua_franca"/>
<#include "SuperX_general"/>
<sqlvars>
<sqlvar name="qa_dbtests" type='hashsequence'>
select
R.fieldclause,
R.fromclause,
R.groupbyclause,
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
;
</sqlvar>
<sqlvar name="qa_dbtest_assertions" type='hashsequence'>
select
A.dbtest_id,
A.tid,
A.rownr ,
A.def_col_caption,
A.def_col_name,
A.def_col_value
FROM qa_dbtest_assertion A
where A.dbtest_id in (select T.tid
from qa_dbtest T where T.active=1)
;
</sqlvar>
</sqlvars>
<#assign inEtl=true />
<#if Maskennummer?exists && Maskennummer=37140>
<#assign inEtl=false />
</#if>
<#assign dbtest_id="" />
<#if inEtl>
<#else>
/* <#assign dbtest_id="<<DB-Test>>" />*/
</#if>
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
into temp tmp_anfang;
select ${dbtest.fieldclause}
into temp tmp_rs
from ${dbtest.fromclause}
<#if dbtest.whereclause !=''>
where ${dbtest.whereclause}
</#if>
<#if dbtest.groupbyclause !=''>
group by ${dbtest.groupbyclause}
</#if>
<#if dbtest.orderbyclause !=''>
order by ${dbtest.orderbyclause}
</#if>
;
<#foreach dbtest_assertion in qa_dbtest_assertions>
<#if dbtest_assertion.dbtest_id==dbtest.tid>
insert into qa_dbtest_result(
dbtest_assertion_id,
execution_start ,
execution_end ,
result_code ,
result_value )
select
${dbtest_assertion.tid},
A.beginn,
now(),
case when T.${dbtest_assertion.def_col_name}='${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})
;
insert into tmp_qa_dbtest_result_id(qa_dbtest_result_id)
<#if SQLdialect='Postgres'>
select currval('qa_dbtest_result_tid_seq') from xdummy
<#else>
select max(tid) from qa_dbtest_result
</#if>
;
</#if>
</#foreach>
drop table tmp_rs;
drop table tmp_anfang;
</#if>
</#foreach>
<#if !inEtl>
select T.tid as dbtest_id,
T.name,
R.execution_start,
R.execution_end,
case when R.result_code=0 then 'Erfolg' else 'Warnung' end as result_str,
R.result_value,
'37100&DB-Test=' || T.tid as nexttable
FROM qa_dbtest T, qa_dbtest_result R,qa_dbtest_assertion A
where A.tid=R.dbtest_assertion_id
and T.tid=A.dbtest_id
and T.tid=<<DB-Test>>
and R.tid in (select qa_dbtest_result_id from tmp_qa_dbtest_result_id)
order by 4 desc;
</#if>

1
src-modules/module/qa/masken/37000_felderinfo.unl

@ -1,4 +1,5 @@
37000^Benutzer/in^50^0^0^150^200^1^integer^200^0^1^<<SQL>> select tid,nvl(name,benutzer) from userinfo order by 2;^^^ 37000^Benutzer/in^50^0^0^150^200^1^integer^200^0^1^<<SQL>> select tid,nvl(name,benutzer) from userinfo order by 2;^^^
37001^Testfall-Schlüssel^10^0^0^150^150^1^sql^50^0^0^^^^ 37001^Testfall-Schlüssel^10^0^0^150^150^1^sql^50^0^0^^^^
37002^Projekt^10^0^0^150^80^1^integer^200^0^1^<<SQL>> select tid,name from qa_project where active=1 /* and systeminfo_id=<<Komponente>> */ order by 2;^^^
37003^Name^20^0^0^150^150^1^sql^50^0^0^^^^ 37003^Name^20^0^0^150^150^1^sql^50^0^0^^^^
37004^Komponente^1^0^0^150^200^1^integer^200^0^1^<<SQL>> select tid,name from systeminfo order by 2;^^^ 37004^Komponente^1^0^0^150^200^1^integer^200^0^1^<<SQL>> select tid,name from systeminfo order by 2;^^^

1
src-modules/module/qa/masken/37000_masken_felder_bez.unl

@ -1,4 +1,5 @@
37000^37000^ 37000^37000^
37000^37001^ 37000^37001^
37000^37002^
37000^37003^ 37000^37003^
37000^37004^ 37000^37004^

2
src-modules/module/qa/masken/37000_maskeninfo.unl

@ -52,6 +52,8 @@ where M.tid=E.maskeninfo_id\
/* and E.uniquename ilike '%<<Testfall-Schlüssel>>%' */\ /* and E.uniquename ilike '%<<Testfall-Schlüssel>>%' */\
/* and E.systeminfo_id=<<Komponente>> */\ /* and E.systeminfo_id=<<Komponente>> */\
/* and E.maskeninfo_id=<<Maske>> */\ /* and E.maskeninfo_id=<<Maske>> */\
/* and E.tid in (select P.mask_execution_id from qa_mask_execution2project P where P.project_id=<<Projekt>>) */\
\
;\ ;\
\ \
update tmp_ergebnis set stylesheet_str=(select S.filename\ update tmp_ergebnis set stylesheet_str=(select S.filename\

1
src-modules/module/qa/masken/37020_felderinfo.unl

@ -6,3 +6,4 @@
37025^Nur aktive^30^0^0^150^80^1^integer^200^0^1^<<SQL>> select 1,'Ja' from xdummy union select 0,'nein' from xdummy order by 1 desc;^^<<SQL>>select 1,'Ja' from xdummy^ 37025^Nur aktive^30^0^0^150^80^1^integer^200^0^1^<<SQL>> select 1,'Ja' from xdummy union select 0,'nein' from xdummy order by 1 desc;^^<<SQL>>select 1,'Ja' from xdummy^
37026^Ab Datum^40^0^0^150^80^1^date^200^0^0^ ^^<<SQL>> select today()-3 from xdummy^ 37026^Ab Datum^40^0^0^150^80^1^date^200^0^0^ ^^<<SQL>> select today()-3 from xdummy^
37027^Testfall-Schlüssel^55^0^0^150^150^1^sql^50^0^0^^^^ 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^<<SQL>> select tid,name from qa_project where active=1 /* and systeminfo_id=<<Komponente>> */ order by 2;^^^

1
src-modules/module/qa/masken/37020_masken_felder_bez.unl

@ -6,3 +6,4 @@
37020^37025^ 37020^37025^
37020^37026^ 37020^37026^
37020^37027^ 37020^37027^
37020^37028^

2
src-modules/module/qa/masken/37020_maskeninfo.unl

@ -47,6 +47,8 @@ target="tmp_qa_mask_execution">\
/* and E.name ilike '%<<Testfall-Name (Stichwort)>>%' */\ /* and E.name ilike '%<<Testfall-Name (Stichwort)>>%' */\
/* and E.uniquename ilike '%<<Testfall-Schlüssel>>%' */\ /* and E.uniquename ilike '%<<Testfall-Schlüssel>>%' */\
/* and date(R.execution_start) >= date_val(<<Ab Datum>>) */\ /* and date(R.execution_start) >= date_val(<<Ab Datum>>) */\
/* and E.tid in (select P.mask_execution_id from qa_mask_execution2project P where P.project_id=<<Projekt>>) */\
\
</@selectintotmp>\ </@selectintotmp>\
<@informixnolog/>;\ <@informixnolog/>;\
\ \

26
src-modules/module/qa/masken/37140_maskeninfo.unl

@ -1,4 +1,5 @@
37140^Datenbank-Test ausführen^--Freemarker Template\ 37140^Datenbank-Test ausführen^--Freemarker Template\
--Achtung: Diese Script ist auch das select_stmt der Maske 37140\
<#include "SQL_lingua_franca"/>\ <#include "SQL_lingua_franca"/>\
<#include "SuperX_general"/>\ <#include "SuperX_general"/>\
<sqlvars>\ <sqlvars>\
@ -16,7 +17,7 @@ T.whereclause\
FROM qa_dbtest T, qa_resultset R\ FROM qa_dbtest T, qa_resultset R\
where \ where \
T.resultset_id=R.tid\ T.resultset_id=R.tid\
and T.tid=<<DB-Test>>\ and T.active=1\
;\ ;\
\ \
</sqlvar>\ </sqlvar>\
@ -29,18 +30,31 @@ A.def_col_caption,\
A.def_col_name,\ A.def_col_name,\
A.def_col_value\ A.def_col_value\
FROM qa_dbtest_assertion A\ FROM qa_dbtest_assertion A\
where A.dbtest_id=<<DB-Test>>\ where A.dbtest_id in (select T.tid\
from qa_dbtest T where T.active=1)\
;\ ;\
\ \
</sqlvar>\ </sqlvar>\
</sqlvars>\ </sqlvars>\
\ \
<#assign inEtl=true />\
<#if Maskennummer?exists && Maskennummer=37140>\
<#assign inEtl=false />\
</#if>\
\
<#assign dbtest_id="" />\
<#if inEtl>\
\
<#else>\
\
/* <#assign dbtest_id="<<DB-Test>>" />*/\
</#if>\
create temp table tmp_qa_dbtest_result_id\ create temp table tmp_qa_dbtest_result_id\
(qa_dbtest_result_id integer);\ (qa_dbtest_result_id integer);\
\ \
\ \
<#foreach dbtest in qa_dbtests>\ <#foreach dbtest in qa_dbtests>\
\ <#if dbtest_id == "" || dbtest_id==dbtest.tid?string>\
\ \
select now() as beginn\ select now() as beginn\
into temp tmp_anfang;\ into temp tmp_anfang;\
@ -92,10 +106,11 @@ select max(tid) from qa_dbtest_result\
</#foreach>\ </#foreach>\
drop table tmp_rs;\ drop table tmp_rs;\
drop table tmp_anfang;\ drop table tmp_anfang;\
</#if> \
</#foreach>\ </#foreach>\
\ \
\ \
\ <#if !inEtl>\
select T.tid as dbtest_id,\ select T.tid as dbtest_id,\
T.name,\ T.name,\
R.execution_start,\ R.execution_start,\
@ -108,7 +123,8 @@ where A.tid=R.dbtest_assertion_id\
and T.tid=A.dbtest_id\ and T.tid=A.dbtest_id\
and T.tid=<<DB-Test>>\ and T.tid=<<DB-Test>>\
and R.tid in (select qa_dbtest_result_id from tmp_qa_dbtest_result_id)\ and R.tid in (select qa_dbtest_result_id from tmp_qa_dbtest_result_id)\
order by 4 desc;^XIL List\ order by 4 desc;\
</#if>^XIL List\
drop_and_delete movable_columns sizable_columns horizontal_scrolling\ drop_and_delete movable_columns sizable_columns horizontal_scrolling\
white_space_color=COLOR_WHITE fixed_columns=2\ white_space_color=COLOR_WHITE fixed_columns=2\
min_heading_height=35\ min_heading_height=35\

Loading…
Cancel
Save