This is an automated email from the ASF dual-hosted git repository. zky pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/incubator-devlake-website.git
commit 9f1a6067533b4f9377b1a4e6b4ed48ce7a1d8f20 Author: linyh <[email protected]> AuthorDate: Tue Jul 5 13:48:06 2022 +0800 fix: fix for review --- docs/DeveloperManuals/E2E-Test-Guide.md | 2 +- .../current/DeveloperManuals/E2E-Test-Guide.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/DeveloperManuals/E2E-Test-Guide.md b/docs/DeveloperManuals/E2E-Test-Guide.md index 4a5b0108..5aaa653e 100644 --- a/docs/DeveloperManuals/E2E-Test-Guide.md +++ b/docs/DeveloperManuals/E2E-Test-Guide.md @@ -178,7 +178,7 @@ To facilitate the generation of the file mentioned above, DevLake has adopted a But note! Please do two things after the snapshot is created: 1. check if the file is generated correctly 2. re-run it to make sure there are no errors between the generated results and the re-run results. These two operations are critical and directly related to the quality of test writing. We should treat the snapshot file in `.csv' format like a code file. -If there is a problem with this step, there are usually 2 kinds of problems. +If there is a problem with this step, there are usually 2 ways to solve it. 1. The validated fields contain fields like create_at runtime or self-incrementing ids, which cannot be repeatedly validated and should be excluded. 2. there is `\n` or `\r\n` or other escape mismatch fields in the run results. Generally, when parsing the `httpResponse` error, you can follow these solutions: 1. modify the field type of the content in the api model to `json. diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/DeveloperManuals/E2E-Test-Guide.md b/i18n/zh/docusaurus-plugin-content-docs/current/DeveloperManuals/E2E-Test-Guide.md index 44d353bc..fc9efd0b 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/DeveloperManuals/E2E-Test-Guide.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/DeveloperManuals/E2E-Test-Guide.md @@ -180,12 +180,12 @@ func TestMeetingDataFlow(t *testing.T) { 但注意!自动生成后并不是高枕无忧,还需要做两件事:1. 检查文件生成是否正确 2. 再次运行,以便于确定生成结果和再次运行的结果没有差错。 这两项操作非常重要,直接关系到测试编写的质量,我们应该像对待代码文件一样对待`.csv`格式的 snapshot 文件。 -如果这一步出现了问题,一般会是2种问题, +如果这一步出现了问题,一般会有2种可能, 1. 验证的字段中含有类似create_at运行时间或者自增id的字段,这些无法重复验证的字段应该排除。 2. 运行的结果中存在`\n`或`\r\n`等转义不匹配的字段,一般是解析`httpResponse`时出现的错误,可以参考如下方案解决: 1. 修改api模型中,内容的字段类型为`json.RawMessage` 2. 在解析时再将其转化为string - 3. 如此操作,即可原封不动的保存`\n`符号,避免数据库或操作系统对换行符的解析 + 3. 经过以上操作,即可原封不动的保存`\n`符号,避免数据库或操作系统对换行符的解析 比如在`github`插件中,是这么处理的:
