Data-Test-Executer Framework speziell zum Test von Datenverarbeitungen mit Datengenerierung, Systemvorbereitungen, Einspielungen, ganzheitlicher diversifizierender Vergleich
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

47 lines
2.0 KiB

#!/usr/bin/python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------------------------------------
# Author : Ulrich Carmesin
# Source : gitea.ucarmesin.de
# ---------------------------------------------------------------------------------------------------------
import basic.toolHandling
import utils.data_const as D
import basic.constants as B
import basic.entity
class Testplan(basic.entity.Entity):
name = ""
description = ""
release = ""
testsuites = {}
steps = []
def __init__(self, job):
"""
to be initialized by readSpec
:param job:
"""
self.job = job
def getSchema(self):
dbtype = self.job.conf.confs[B.TOPIC_NODE_DB][B.ATTR_TYPE]
dbi = basic.toolHandling.getDbTool(self.job, None, dbtype)
sql = dbi.getCreateTable("testplan")
sql += dbi.getSchemaAttribut("tpid", "id")+","
sql += dbi.getSchemaAttribut("name", D.TYPE_STR)+","
sql += dbi.getSchemaAttribut("description", D.TYPE_TEXT)+","
sql += dbi.getSchemaAttribut("project", D.TYPE_STR)+","
sql += dbi.getSchemaAttribut("prelease", D.TYPE_STR)+","
sql += dbi.getSchemaAttribut("attributes", D.TYPE_TEXT)+","
sql += self.getHistoryFields()
sql += ");\n"
sql += self.getHistoryIndex("testplan")
for attr in ["testsuite"]:
sql += dbi.getSchemaSubtable("tp", [{"attr":attr, "atype": D.TYPE_STR}])+"\n"
sql += dbi.getSchemaIndex(dbi.getIndexName("tp", attr),
dbi.getSubTableId(dbi.getSubTableName("tp", attr), attr))+"\n"
for attr in ["step"]:
sql += dbi.getSchemaSubtable("tp", [{"attr":attr, "atype": D.TYPE_STR}, {"attr":"attributes", "atype": D.TYPE_TEXT}])+"\n"
sql += dbi.getSchemaIndex(dbi.getSubTableName("tp", attr),
dbi.getSubTableId(dbi.getSubTableName("tp", attr), attr))+"\n"
return sql