1 readme of shlib testing
3 Copyright (C) 2022- Free Software Foundation, Inc.
5 Copying and distribution of this file, with or without modification,
6 are permitted in any medium without royalty provided the copyright
7 notice and this notice are preserved.
9 The following contributions warranted legal paper exchanges with the
10 Free Software Foundation.
12 # shlib testing content
15 testing include several part:
16 @ soft-pkg running enviroument testing, it test weather the pkg can running on current enviroument.
17 @ testing program test, it test 'scripttest', and its features.
18 @ feature module testing dir. some feature is published same version, create a testing dir, and include the feature module testing dir in it.
20 # testing catalog file
23 catalog file descript the testing dir, it's an catalog for testing content as a user document. scripttest use it to generate testing dir framework.
24 catalog file is a catalog struct text file. generate testing dir by text string per-line.the string format is:
26 [unit] 1.running_enviroument_testing.系统运行环境测试
27 [item] 1 scripttest_param_h 测试程序-h参数-程序使用文档
29 @ "[unit]", it shows testing item type. 'unit' means it's a function module. 'item' means it's a testing item for one feature. 'dir' means it's a dir of feature testing set.
30 @ "1", an index digital value for catalog item id in current catalog dir.
31 @ "running_enviroument_testing", testing short name.
32 @ "系统运行环境测试", testing descript string that would be displayed on console.
33 @ "scripttest_param_h", it is used for test script file name.
34 @ "测试程序-h参数-程序使用文档", the test item descript string display ed on console when testing item is started.
36 there is a problem for this format, the colum string is seperated by blank, it works well in CJK char enviroument, but it can not work on latin char string, because there are several blanks in a string.
42 # 一个程序测试包含多个方面。一个软件分为多个功能模块,每个较为独立
43 # 的功能模块,代码耦合度较低的模块,更适合单元测试。
45 # 夹中以一个目录的形式存放测试脚本内容。运行scripttest unit <uname>
46 # 来运行一个功能单元的测试。一个功能单元中,可以包含多个测试单元。
47 # 一个测试单元由多个测试item构成,每个item对单个功能特性进行测试。
48 # 一个item由test_script_file.sh和test_script_file.sh.中文描述.txt
49 # 两个文件组成。根据测试脚本文件名,可获取测试中文描述信息,在控制台
50 # 显示输出,同时运行脚本的输出内容与txt文件进行比较,相同则ok,不同则
51 # 显示failed。scripttest item test_script_file.sh的命令行形式
52 # 进行调用。如果txt文件为空,输出测试脚本内容,不进行比较。
53 # 测试的单元可以是某个目录,也可以是all。集成测试和接口测试也为
55 # 测试程序除了要使用脚本运行方式,还可以使用交互式菜单方式。运行
56 # scripttest进行交互式测试。运行script menu 1.2.3 进行第一个单元
57 # 的第二个子单元的item 3 进行测试。
58 # 有时需要浏览测试目录概要,使用scriottest list输出树状测试目录。
59 # 输出的目录可保存到function_list.txt文件。同时可根据该文件自动生成
60 # 测试目录和文件框架。scripttest autogen <catalog-file>。可使用
61 # scripttest sync <catalog-file>与实际的目录文件同步更新。
62 # 测试可并行化测试,对于一些运行时间相对较长的测试程序,可使一些
63 # 快捷的测试同时运行。已测试的item可保存在一个临时文件中,当前测试项