看了不少精准测试的文章,我收集如下,这些主要是大厂出品,内容也比较精彩和全面,是了解精准测试比较全面的文章.
我摘录一些这些文章中关于精准测试的概念目标的说明:
网易文章的说明:
或者用字节文章中的说明:
在日常的研发活动中,我们经常会遇到下列场景:
- 这次需要研发自测保障了, 我的用例集是不是全都有效覆盖了?
- 这次技术重构改动挺大的,会影响哪些已有功能?
- 基础工具 SDK 有重大升级,我是涉及到的业务方,哪些功能需要测试验证?
- 版本要上线了,大家都走一下全量回归 Case,测试重点在哪里?回归测试用例集全量执行是不是必要的?
- 在项目研发团队中的每个同学质量标准是不是都统一了?
京东云:
精准测试是中国自己有知识产权的完全的理论体系,它同时关注功能点和代码相关逻辑这样一个方法论,是一种灰盒的测试模式。
最开始在 2014 年的国际软件测试大会上发布精准测试的时候,它叫穿线测试,英文名字叫 Threading Test,
表达了精准测试的本质,Threading 这个英文单词本身有两个含义,一个是穿线一个是线程,
建立用例和代码的关系,相当于把黑盒和白盒关联起来,做黑盒测试也能看到白盒数据,同时把开发和测试能够关联起来,测试一做完,
开发的逻辑马上就能自动生成。另一个层面,精准测试最本质就是线程测试,因为精准测试基于覆盖率白盒理论产生,
它跟白盒最大的区别是它的覆盖率是线程级的,也就是说要追溯到用例这个级别。
对于京东云文章中说到精准测试一开始是 threading testing,由于提到是精准测试的起源,想来一开始的目的是比较有意义的,
所以特意查了一下:
thread testing 这个术语 (terminology/glossary) 令人惊讶的在istqb-Standard Glossary of Terms Used in Software Testing
这个网站上查不到,那这个从哪里来?哪个 2014 年的国际软件测试大会上发布?再一查,还是没有查到,可能是我的搜索能力有限
再查了一些外网关于这个 thread testing:
Thread Testing is one such type of software testing that is usually
conducted during the early stages of System Integration Testing.
A thread is the smallest unit of work that can be carried out by the system and
it is mainly used to verify the functional capabilities of a specific task or thread.
In thread testing, testers focus on testing individual logical execution paths
in context of the entire system.
几个搜索出处:
综合以上,个人认为 thread testing 不是精准测试的起源,而是如何尽可能尽早的进行主要功能的集成测试,用一个测试 (thread test) 尽可能
覆盖足够好独立的功能. 你说他精准吧,可能也说的通,但是他的定义是集成测试的一种,所以还是集成测试.
总结以上几个文章我总结的一些我自己认为精准测试要解决的问题:
看了这些文章之后,这些精准测试系统主要实现的思路都是:
以上我觉得都很好,但是在小公司,自己的疑问就是:
考虑以上的一些问题不能得到回答,还是觉得放弃精准测试平台这个路,可能做好一下几点就足够了:
所以最后还是放弃精准测试平台这个路,管好测试用例,做好接口自动化,做好代码 review 和开发沟通或许是目前最合适的方法。
既然查了一下相关内容,然后一时对于代码插桩这个描述,是在不知道是个什么东西,最后查了一下,英文是: code instrumentation 这个
不确定为什么要翻译成代码插桩,但是我也不知道翻译成什么好, 就是叫成代码插桩感觉哪里不对,不能叫代码测量吗?
In software engineering the need for secure and high quality software has spurred intense
research activity in the areas on software debugging, testing and constraint analysis.
Code instrumentation is a common technique used to track application behaviour.
The most popular usages for code instrumentation are software debugging,
performance analysis, monitoring, distributed computing and aspect oriented programming.
Typical instrumentation techniques provide information about code coverage during software testing activities.
Current approaches make use of instrumentation by inserting additional code that monitors the behavior of a specific component.
This thesis presents and applies two novel approaches that use an instrumentation technique:
(1) A Runtime Debugging approach is aimed at detecting and resolving runtime faults in object-oriented code.
The approach relies on bytecode instrumentation in order to provide code coverage for predefined unit tests.
The results are analysed using Reverse Engineered techniques. The approach consists in merging both succesfull and
faulty code execution traces and detecting the faults by analysing the differences in the output traces.
(2) A Security Constraint Checking approach uses the notion of security consistency in designs. Byte code instrumentation techniques are used to provide code coverage for selected unit tests. Direct acyclic graphs are constructed from the output traces using reverse engineered techniques. The graphs contain object method calls in a similar manner to UML Sequence Diagrams. This approach uses the results of the instrumentation to check for consistency with design generated security constraints. Furthermore this approach analyzes these views for
security inconsistencies, and generates a set of recommendations.