Пример #1
0
class Parameter(Model):
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String)
    # TODO: Constrain
    type = db.Column(db.String)
    data = db.Column(JSONB)
    parameter_group_id = db.Column(db.Integer, db.ForeignKey('parameter_group.id'))
Пример #2
0
class Step(Model):
    id = db.Column(db.Integer, primary_key=True)
    test_case_id = db.Column(db.Integer, db.ForeignKey('test_case.id'))
    execution_id = db.Column(db.Integer, db.ForeignKey('execution.id'))
    order = db.Column(db.Integer)

    execution_runs = db.relationship("ExecutionRun", backref="step")
Пример #3
0
class Execution(Model):
    id = db.Column(db.Integer, primary_key=True)
    description = db.Column(db.String)
    # TODO: Constrain
    type = db.Column(db.String)
    strategy = db.Column(db.String)
    data = db.Column(JSONB)

    steps = db.relationship("Step", backref="execution")
Пример #4
0
class TestSuite(Model):
    id = db.Column(db.Integer, primary_key=True)
    short_name = db.Column(db.String)
    name = db.Column(db.String)
    description = db.Column(db.String)

    parameter_group_id = db.Column(db.Integer,
                                   db.ForeignKey('parameter_group.id'))

    test_cases = db.relationship("TestCase",
                                 secondary=test_cases,
                                 backref=db.backref('test_cases',
                                                    lazy='dynamic'))

    test_suite_runs = db.relationship("TestSuiteRun",
                                      backref='test_suite',
                                      lazy='dynamic')
Пример #5
0
class TestRun(Model):
    id = db.Column(db.Integer, primary_key=True)
    test_case_id = db.Column(db.ForeignKey("test_case.id"))
    message = db.Column(db.String)
    start_time = db.Column(db.DateTime)
    end_time = db.Column(db.DateTime)
    task_id = db.Column(db.String)
    # TODO: Constrain
    status = db.Column(db.String)
    runtime_data = db.Column(JSONB)

    parameter_id = db.Column(db.Integer, db.ForeignKey('parameter.id'))

    execution_runs = relationship("ExecutionRun", backref='TestRun')
Пример #6
0
class TestSuiteRun(Model):
    id = db.Column(db.Integer, primary_key=True)
    test_suite_id = db.Column(db.ForeignKey("test_suite.id"))
    message = db.Column(db.String)
    start_time = db.Column(db.DateTime)
    end_time = db.Column(db.DateTime)
    task_id = db.Column(db.String)
    # TODO: Constrain
    status = db.Column(db.String)
    runtime_data = db.Column(JSONB)

    parameter_id = db.Column(db.Integer, db.ForeignKey('parameter.id'))

    test_case_runs = db.relationship("TestRun",
                                     secondary=test_case_runs,
                                     backref=db.backref('test_runs',
                                                        lazy='dynamic'))
Пример #7
0
class ExecutionRun(Model):
    id = db.Column(db.Integer, primary_key=True)
    test_run_id = db.Column(
        db.Integer, db.ForeignKey('test_run.id'))  # , primary_key=True)
    step_id = db.Column(db.Integer,
                        db.ForeignKey('step.id'))  # , primary_key=True)
    message = db.Column(db.String)
    context = db.Column(db.String)
    status = db.Column(db.String)
Пример #8
0
class TestCase(Model):
    id = db.Column(db.Integer, primary_key=True)
    short_name = db.Column(db.String)
    name = db.Column(db.String)
    description = db.Column(db.String)
    expected_success = db.Column(db.Boolean, default=True)

    parameter_group_id = db.Column(db.Integer,
                                   db.ForeignKey('parameter_group.id'))

    test_suite_id = db.Column(db.Integer, db.ForeignKey('test_suite.id'))

    test_runs = db.relationship("TestRun", backref='test_case', lazy='dynamic')
    steps = db.relationship("Step", backref='test_cases', lazy='dynamic')
Пример #9
0
from sqlalchemy.dialects.postgresql import JSONB
from taas.database import Model, db

test_case_runs = db.Table(
    'test_suite_case_runs',
    db.Column('test_case_run_id', db.Integer, db.ForeignKey('test_run.id')),
    db.Column('test_suite_run_id', db.Integer,
              db.ForeignKey('test_suite_run.id')))


class TestSuiteRun(Model):
    id = db.Column(db.Integer, primary_key=True)
    test_suite_id = db.Column(db.ForeignKey("test_suite.id"))
    message = db.Column(db.String)
    start_time = db.Column(db.DateTime)
    end_time = db.Column(db.DateTime)
    task_id = db.Column(db.String)
    # TODO: Constrain
    status = db.Column(db.String)
    runtime_data = db.Column(JSONB)

    parameter_id = db.Column(db.Integer, db.ForeignKey('parameter.id'))

    test_case_runs = db.relationship("TestRun",
                                     secondary=test_case_runs,
                                     backref=db.backref('test_runs',
                                                        lazy='dynamic'))
Пример #10
0
class ParameterGroup(Model):
    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String)

    parameters = relationship("Parameter", backref='ParameterGroup')