From 45367826d1b230159244f687cc1e65692eb85fc7 Mon Sep 17 00:00:00 2001 From: Miykael_xxm Date: Fri, 23 Jul 2021 10:39:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0src/SUMMARY.md,=20src/course/?= =?UTF-8?q?test/log.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/SUMMARY.md | 3 ++- src/course/test/log.md | 44 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 src/course/test/log.md diff --git a/src/SUMMARY.md b/src/SUMMARY.md index fad051e..aa8eb61 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -20,8 +20,9 @@ - [支持动作](course/actions.md) - [添加课程](course/create.md) - [测试课程](course/test.md) + - [课程调试](course/test/log.md) - [发布课程](course/publish.md) --- -[常见Q&A](user/q&a.md) \ No newline at end of file +[常见Q&A](user/q&a.md) diff --git a/src/course/test/log.md b/src/course/test/log.md new file mode 100644 index 0000000..ac48d19 --- /dev/null +++ b/src/course/test/log.md @@ -0,0 +1,44 @@ + +# 课程调试 + +// 2021-07-22 更新 + +为了方便制作课程中的调试,我们在测试课程中增加了日志输出记录(目前为测试课程相关的全部日志部分,暂未对异常进行特殊显示,需要自行根据日志判断出错位置,以便进行调整) + +以下是课程调试日志的一个demo: + +![课程测试日志](https://codechina.csdn.net/codechina/operation-work/uploads/dcbb71b19a4a356b6780388e2ab312bf/test-log.gif) + +> 注:目前课程调试日志仅针输出 **测试课程** 中的相关日志。 + +## 部分名词解释 + +### `Current Task` + +`Current Task` 是指当前课程执行到哪一步,对应 `index.yml` 中的 `step` 部分: + +```yaml +step1: + link: '{{chapter_3_issue}}' + description: "Setext 标题" +``` + +### `Current Transition` + +`Current Transition` 是指当前正在执行的 transition,对应 `index.yml` 中的 `transitions` 部分: + +```yaml +step1: + link: '{{chapter_3_issue}}' + description: "Setext 标题" + transitions: + events: ['note_events'] + action: + - type: issue_comment.created + with: 003_2_Setext_header.md + - type: choice + with: next.md + to: step2 +``` + +在课程测试过程中,可以先简单根据 `log` 输出来确认课程执行的步骤以及结果输出,并根据相应的日志输出对 `index.yml` 进行调整&测试。 -- GitLab