摘要
论文分析了网络安全工作中创建优质的网络安全测试脚本文档的必要性,对Docstring编写风格进行了介绍,并对Sphinx文档生成系统和reStructuredText标记语言进行了说明。同时,提出了一种基于Sphinx的网络安全测试脚本文档生成方案,利用Sphinx的第三方扩展、对内建注释工具的有效利用、对注释字段的针对性扩充,使生成注释文档更加清晰、规范,切合网络安全人员使用代码的实际需求,有效地提高了测试代码的可维护性和复用效率。
In this paper,the necessity of a high quality network security test script documentation is analyzed.The documenting styles of Python's docstring are introduced,as well as the Sphinx documentation creation tool and the reStructuredText scripting language.A method of network security test script documentation creation based on Sphinx is proposed.This method makes use of third party extensions,making effective utilization of built-in documenting functionalities,and extending specific field lists,which effectively improves the clearness and normativity of documentation.This method fits in with the requirement of security testers in code processing,increasing the test script's maintainability and reuse efficiency.
作者
刘岳
张海峰
张良
杨秉杰
边帅
Liu Yue;Zhang Haifeng;Zhang Liang;Yang Bingjie;Bian Shuai(National Internet Emergency Center,Henan Branch,Henan Zhengzhou 450003)
出处
《网络空间安全》
2019年第2期74-79,共6页
Cyberspace Security
基金
国家互联网应急中心青年科技基金项目(项目编号:2018Q20)