10、用例执行结果展示
1. 定义模型类
1)models.py 中增加 TestCaseExecuteResult 模型类,用于记录用例执行结果。
from django.db import models
from smart_selects.db_fields import GroupedForeignKey # pip install django-smart-selects:后台级联选择
from django.contrib.auth.models import User
class Project(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField('项目名称', max_length=50, unique=True, null=False)
proj_owner = models.CharField('项目负责人', max_length=20, null=False)
test_owner = models.CharField('测试负责人', max_length=20, null=False)
dev_owner = models.CharField('开发负责人', max_length=20, null=False)
desc = models.CharField('项目描述', max_length=100, null=True)
crea