コード例 #1
0
class TestcaseInfo(db.Model):
    __tablename__ = 'testcase_info'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    create_time = db.Column(db.DateTime, default=db.func.now())
    update_time = db.Column(db.DateTime, onupdate=db.func.now())
    testcase_name = db.Column(db.String(100), nullable=False)
    type = db.Column(db.Integer, default=0, nullable=False)
    include = db.Column(db.String(400))
    request = db.Column(db.Text, nullable=False)
    testsuite_id = db.Column(db.Integer, db.ForeignKey('testsuite_info.id'))
    module_id = db.Column(db.Integer, db.ForeignKey('module_info.id'))
    system_id = db.Column(db.Integer, db.ForeignKey('system_info.id'))
    testsuite = db.relationship('TestsuiteInfo',
                                backref=db.backref('testcases'))
    module = db.relationship('ModuleInfo', backref=db.backref('testcases'))
    system = db.relationship('SystemInfo', backref=db.backref('testcases'))

    def __repr__(self):
        return '<TestcaseInfo %r, id %r>' % (self.testcase_name, self.id)
コード例 #2
0
class ModuleInfo(db.Model):
    __tablename__ = 'module_info'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    create_time = db.Column(db.DateTime, default=db.func.now())
    update_time = db.Column(db.DateTime, onupdate=db.func.now())
    module_name = db.Column(db.String(80), nullable=False)
    test_user = db.Column(db.String(50))
    simple_desc = db.Column(db.String(100))
    system_id = db.Column(db.Integer, db.ForeignKey('system_info.id'))
    system = db.relationship('SystemInfo', backref=db.backref('modules'))

    def __repr__(self):
        return '<ModuleInfo %r, id %r>' % (self.module_name, self.id)
コード例 #3
0
class TestsuiteInfo(db.Model):
    __tablename__ = 'testsuite_info'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    create_time = db.Column(db.DateTime, default=db.func.now())
    update_time = db.Column(db.DateTime, onupdate=db.func.now())
    testsuite_name = db.Column(db.String(80), nullable=False)
    simple_desc = db.Column(db.String(100))
    intf_type = db.Column(db.String(20))
    intf_info = db.Column(db.String(200))
    module_id = db.Column(db.Integer, db.ForeignKey('module_info.id'))
    module = db.relationship('ModuleInfo', backref=db.backref('testsuites'))

    def __repr__(self):
        return '<TestsuiteInfo %r, id %r>' % (self.testsuite_name, self.id)
コード例 #4
0
class TestReport(db.Model):
    __tablename__ = 'test_report'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    create_time = db.Column(db.DateTime, default=db.func.now())
    update_time = db.Column(db.DateTime, onupdate=db.func.now())
    start_at = db.Column(db.String(50))
    duration = db.Column(db.String(50))
    status = db.Column(db.String(50))
    run_type = db.Column(db.Integer)
    report = db.Column(db.Text(4294000000), nullable=False)
    url = db.Column(db.String(150))
    system_id = db.Column(db.Integer, db.ForeignKey('system_info.id'))
    url = db.Column(db.String(150))
    system = db.relationship('SystemInfo', backref=db.backref('test_reports'))

    def __repr__(self):
        return '<TestReport %r, id %r>' % (self.env_name, self.id)