GroundTest
# GroundTest相关规范
## MySQL test_message 表格字段规范
| 字段名| 数据类型 | 允许为 NULL| 描述|
| ---- | ---- | ---- | ---- |
|**InitiatedTest_Index** |int(11)| NO |测试索引,主键|
|**InitiatedTestName**| varchar(96) |YES| 测试名称|
|**_InitiatedTest_Status_**| text| YES |测试状态|
|OMS_Response_Msg_Index| int(11)| YES| OMS响应消息索引|
|OMS_Command_Msg_Index| int(11)| YES| OMS指令消息索引|
|TestIdentificationCode| int(11)| YES |测试识别码|
|**TestType**| int(11)| YES |测试类型|
|**ATA** |varchar(96)| YES| ATA章节号|
|**MemberSystemID** | int(11)| YES| 成员系统ID|
|**MemberSystemName** | varchar(96)| YES| 成员系统名称|
|PassFailDetectionMethod| int(11) |YES| 通过失败检测方法|
|**TestDurationTime**| int(11)| YES| 测试持续时间|
|TestIsAbortable| int(11) |YES |测试是否可中止|
|AbleToTestBitApplies| int(11)| YES| 适用于测试位|
|IsInteractiveTest| int(11)| YES |是否为交互式测试|
|ResultsDelayTime| int(11) |YES |结果延迟时间|
|**NumPreconditions**| int(11) |YES |先决条件数量|
|**Preconditions**| text|YES |先决条件|
|**NumInhibitConditions**| int(11) |YES |抑制条件数量|
|**InhibitConditions_RP_Index**| text| YES |抑制条件_RP索引|
|**_InhibitConditions_Trigger_Index_**| text| YES |抑制条件触发器索引|
|**InhibitCondition_Text**| text |YES |抑制条件文本|
|**NumInterferingTests**| int(11)| YES |干扰测试数量|
|**InterferingTests_Index**| text| YES |干扰测试索引|
|**_InterferingTests_Trigger_Index_**| text| YES |干扰测试触发器:索引|
|**NumFailingFault**| int(11) |YES |失败故障数量|
|**FailingFault_Index**| text| YES |失败故障索引|
|**_FailingFault_Trigger_Index_**| text| YES |失败故障触发器索引|
|**NumScreens**| int(11)| YES| 屏幕数量|
|**_Screen_Trigger_Index_**| text| YES| 屏幕触发器索引|
|**ScreenId**| tinytext| YES| 屏幕ID|
|**InteractiveScreenText**| text| YES |交互式屏幕文本|
|**ResponseMessage**| json| YES| 响应消息|
**加粗**的字段为实际用到的字段,**_加粗且斜体_** 的字段为实际用到且实时动态维护的字段。
## OMS 指令规范
OMS指令指的是WebServer发给OMS软件的操作指令
示例1:
```json
{
// 用户身份字段
UserID: "00001",
// 命令种类字段
OrderType: "ABORT",
// 该命令涉及的测试的相关信息字段
currentPage: "TestList",
InitiatedTest_Index: ["32"],
MemberSystemID: "NULL",
// InteractiveTest页面的专属字段
currentScreenId: "",
selectedOption: "",
}
```
示例2:
```json
{
// 用户身份字段
UserID: "00001",
// 命令种类字段
OrderType: "CONTINUE",
// 该命令涉及的测试的相关信息字段
currentPage: "InteractiveTest",
InitiatedTest_Index: ["126"],
MemberSystemID: "NULL",
// InteractiveTest页面的专属字段
currentScreenId: "14",
selectedOption: "4",
}
```
### OrderType指令种类
| OrderType | 描述|
| ---- | ---- |
| PAGEINIT | 用户初次进入**currentPage**字段代表的页面 |
| LEAVE | 用户离开页面 |
| ABORT | 中断某个正在进行的、索引为**InitiatedTest_Index**的测试 |
| ABORTALL | 中断所有正在进行的测试 |
| START | 启动InitiatedTest_Index中的所有测试 |
| CONTINUE | **InteractiveTest**页面中,用在**currentScreenId**所代表的项目中选择了**selectedOption**所代表的选项 |
### 返回信息
成功信息:
```json
{
status: "success",
message: "Successfully connected"
}
```
失败信息:
```json
{
status: "fail",
message: "Can't connect the server."
}
```