-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathAutoTestDesign
More file actions
69 lines (53 loc) · 1.25 KB
/
AutoTestDesign
File metadata and controls
69 lines (53 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
## 一、需求
1. 从指定的仓库 clone/download 代码文件
- 解压文件
2. 顺序测试全部代码
- 运行指定命令行
- 记录时间、错误正确情况
- 测试正确性
- 题目数量是否正确
- 答案与题目是否一一对应
- 答案是否正确
- 题目与答案所使用的数字范围是否合理
- 题目是否重复
- a + b 等价于 b + a
- a × b 等价于 b × a
- 输出格式是否正确
- out.txt
- 空格
- 题号
- 符号 -+×÷
- 余数 ...
- 空行
- 测试鲁棒性/仅需记录输出,然后人工判断
3. 测试指定代码
4. 打分
## 二、设计
1. 从config文件中读取配置
```json
{
"repo":"https://github.com/qixjing/MathExam2018",
"correct":[
"1",
...
"1 2",
...
],
"robust":[
"-1",
...
]
}
```
```
命令格式
首先读取config
检查是否下载了repo
没有,下载repo
如果 --all
全部测试
如果 --single
只测试单个学号
test.exe test --all --config ./configpath
test.exe test --single xxxx --config ./configpath
```