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.
 
 
 

103 lines
3.4 KiB

import model.entity
import basic.constants as B
import basic.Testserver
def get_entity_object(job, name, args):
if name in [B.SUBJECT_STEPS, B.SUBJECT_STEP]:
entity = getStep(job)
elif name in [B.SUBJECT_STORIES, B.SUBJECT_STORY, "storys"]:
entity = getStory(job)
elif name in [B.SUBJECT_VARIANTS, B.SUBJECT_VARIANT]:
entity = getVariant(job)
elif name in [B.SUBJECT_DATATABLES, B.SUBJECT_DATATABLE]:
entity = getDatatable(job)
elif name in [B.SUBJECT_USECASES, B.SUBJECT_USECASE]:
entity = getUsecase(job)
elif name in [B.SUBJECT_PROJECTS, B.SUBJECT_PROJECT]:
entity = getProject(job)
elif name in [B.SUBJECT_APPS, B.SUBJECT_APP]:
entity = getApplication(job)
elif name in [B.SUBJECT_COMPS, B.SUBJECT_COMP]:
entity = getComponent(job)
elif name in [B.SUBJECT_ARTIFACTS, B.SUBJECT_ARTIFACT]:
entity = getEnvironment(job)
elif name in [B.SUBJECT_TESTCASES, B.SUBJECT_TESTCASE]:
entity = getTestcase(job)
elif name in [B.SUBJECT_TESTSUITES, B.SUBJECT_TESTSUITE]:
entity = getTestsuite(job)
elif name in [B.SUBJECT_TESTPLANS, B.SUBJECT_TESTPLAN]:
entity = getTestplan(job)
elif name in [B.SUBJECT_USERS, B.SUBJECT_USER]:
entity = getUser(job)
elif name in [B.SUBJECT_REL, B.SUBJECT_RELS]:
entity = getRelease(job)
elif name in [B.SUBJECT_ENVIRONMENT, B.SUBJECT_ENVIRONMENTS]:
entity = getEnvironment(job)
else:
return None
entity.setAttributes(job, args, name, entity.getFieldList(), entity.getNodeList(), entity.getSubtableList())
#testserver = basic.Testserver.getInstance(job)
return entity
def getRelease(job=None, name=""):
import model.release
return model.release.Release(job)
def getEnvironment(job=None, name=""):
import model.environment
return model.environment.Environment(job)
def getArtifact(job=None, name=""):
import model.artifact
return model.artifact.Artifact(job)
def getApplication(job=None, args={}, name=""):
import model.application
return model.application.Application(job)
def getProject(job=None, name=""):
import model.project
return model.project.Project(job)
def getComponent(job=None, name=""):
import model.component
return model.component.Component(job)
def getTestplan(job=None, project="", application="", name=""):
import model.testplan
return model.testplan.Testplan(job, project)
def getTestsuite(job=None, project="", application="", name=""):
import model.testsuite
return model.testsuite.Testsuite(job, project)
def getTestcase(job=None, project="", application="", name=""):
import model.testcase
return model.testcase.Testcase(job, project, name=name)
def getStep(job=None, project="", name=""):
import model.step
return model.step.Step(job, project, name)
def getStory(job=None, project="", name=""):
import model.story
return model.story.Story(job, name)
def getUsecase(job=None, project="", name=""):
import model.usecase
return model.usecase.Usecase(job, name)
def getUser(job=None, project="", name=""):
import model.user
return model.user.User(job, name)
def getVariant(job=None, project="", name=""):
import model.variant
return model.variant.Variant(job, name)
def getDatatable(job=None, project="", name=""):
import model.datatable
return model.datatable.Datatable(job, project, name)