首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到19条相似文献,搜索用时 187 毫秒
1.
基于.NET的单元测试自动化方法研究   总被引:2,自引:0,他引:2  
本文在.NET的框架下,运用Reflection,CodeDom以及与Excel、XML相结合的应用技术,完成了自动生成测试数据、测试脚本,还运用程序切片技术快速找到缺陷部位,改进了单元测试.实现了单元测试的自动化.  相似文献   

2.
软件测试对确保软件质量有着不可替代的作用。自动化测试框架有效提高了测试效率,自动化测试框架的成熟是软件测试走向标准化的必经之路。文章改进了自动化单元测试框架NUnit,使测试代码和测试数据分离,解决了使用NUnit测试时测试代码存在大量冗余的问题。在改进的NUnit框架中,相似的测试用例只需测试人员编写一次,框架将自动生成其他测试用例。  相似文献   

3.
单元测试及测试工具的研究与应用   总被引:1,自引:0,他引:1  
软件测试在软件生命周期中占据重要的地位,是软件产品交付用户使用之前保证软件质量的重要手段。在软件测试V模型中,测试阶段通常分为单元测试、集成测试、系统测试和验收测试。所谓好的开头是成功的一半,单元测试作为整个测试过程的第一阶段,自然占据看十分重要的地位。由于单元测试的高覆盖率要求,往往需要反复的运行诸多测试用例,这将增加大量的人力物力成本。如能正确熟练的使用单元测试工具,将极大地提高单元测试工作的效率和质量。但是,在软件测试课程中,对于单元测试的学习具有较大的难度。本文针对高职高专院校开设软件测试技术课程的现状,分析了单元测试的学习过程,并且针对目前流行的Java开发环境,选用Junit单元测试工具作为实例,介绍了Junit工具的使用方法和测试脚本的编写规范,并讨论了单元测试用例的设计方法,来全面的完成单元测试知识的教学。  相似文献   

4.
在软件测试中,单元测试不仅能够优化软件系统设计,还大大简化了功能测试的测试量。但是在一些情况下进行单元测试比较困难,本文引入了模拟对象Mock Object的概念,利用Mock Object进行单位测试,解决了传统单元测试中存在的一些问题。  相似文献   

5.
基于脚本的构件测试自动化框架   总被引:1,自引:0,他引:1       下载免费PDF全文
倪铭  黄萍 《计算机工程》2010,36(6):94-96
针对传统的测试自动化技术已不适用于构件的问题,提出基于脚本的构件测试自动化框架。将面向对象单元测试自动化框架xUnit与数据驱动的测试框架结合并改进,实现构件测试脚本自动生成、测试脚本自动执行、测试结果自动验证与记录。实例表明,该框架能有效对构件进行自动化测试,自动化程度较高。  相似文献   

6.
在面向对象软件测试领域,合理选择测试用例集合,覆盖复杂的多态交互情形,一直是软件测试研究的热点。该文基于pair-wise测试理论,提出一种选择测试用例的贪心算法,该算法可以有效地筛选测试用例,提高测试效率,降低测试成本。并介绍了在多态交互的单元测试框架中使用装饰型设计模式,有效地提高了测试代码的效率。  相似文献   

7.
基于XML的API自动化测试工具设计与实现   总被引:5,自引:0,他引:5       下载免费PDF全文
在研究应用编程接口(API)测试特点的基础上,运用软件测试技术与方法对API进行了正确性测试,设计了API自动化测试框架,采用XML语言进行API自动化测试工具的设计和实现方案。使用该工具可在API信息提取、测试用例生成及测试用例执行、测试报告生成等方面实现自动化。该工具主要用于验证第三方提供的API,由于单元测试中较多地使用了API测试,因此也可运用于软件的单元测试。  相似文献   

8.
XML技术在软件测试自动化中的应用   总被引:12,自引:0,他引:12  
朱经纬 《计算机工程》2005,31(2):94-95,132
将XML技术应用到软件测试自动化技术中,提出了测试脚本的XML Schema数据模型,给出了如何利用XSLT从该模型得到测试驱动程序、测试报告等文档的方法。  相似文献   

9.
电子电器产品中嵌入式软件的故障和失效已是产品质量出现问题的重要原因之一,软件测试是保证软件质量的重要手段,单元测试作为软件测试过程的第一阶段,高质量的测试效果是确保整个测试的必要条件。通过对典型嵌入式软件测试工具RTRT(Rational Test RealTime)的分析及利用RTRT进行实际电器产品软件单元测试的试验,结果表明RTRT是一个可以有效得应用于电子电器产品嵌入式软件开发和测试阶段的自动化测试工具,利用RTRT进行软件单元测试可以减少测试工作量,加快测试进度和提高软件测试质量。  相似文献   

10.
一个基于XML的自动化类测试框架   总被引:1,自引:0,他引:1  
针对当前自动化类测试工具/框架存在的问题,提出了一个基于XML的类测试框架。框架采用基于XML的自动化测试过程数据流模型,用XML语言来描述和组织测试用例,自动生成测试驱动程序,自动执行测试并生成测试结果。框架可用于不同语言应用程序的自动化类测试,框架实现测试设计、测试实现和测试执行的分离,利于测试脚本的维护,并保证测试脚本与测试用例的一致性。  相似文献   

11.
With the growing complexity of industrial software applications, industrials are looking for efficient and practical methods to validate the software. This paper develops a model‐based statistical testing approach that automatically generates online and offline test cases for embedded software. It discusses an integrated framework that combines solutions for three major software testing research questions: (i) how to select test inputs; (ii) how to predict the expected results of a test; and (iii) when to stop testing software. The automatic selection of test inputs is based on a stochastic test model that accounts for the main particularity of embedded software: time sensitivity. Software test practitioners may design one or more test models when they generate random, user‐oriented, or fault‐oriented test inputs. A formal framework integrating existing and appropriate specification techniques was developed for the design of automated test oracles (executable software specifications) and the formal measurement of functional coverage. The decision to stop testing software is based on both test coverage objectives and cost constraints. This approach was tested on two representative case studies from the automotive industry. The experiment was performed at unit testing level in a simulated environment on a host personal computer (automatic test execution). The two software functionalities tested had previously been unit tested and validated using the test design approach conventionally used in the industry. Applying the proposed model‐based statistical testing approach to these two case studies, we obtained significant improvements in performing functional unit testing in a real and complex industrial context: more bugs were detected earlier and in a shorter time. Copyright © 2012 John Wiley & Sons, Ltd.  相似文献   

12.
嵌入式软件语句覆盖率测试插桩技术   总被引:1,自引:0,他引:1  
孙红利  王忠民  王文浪 《计算机应用》2010,30(10):2738-2740
针对基于宿主机的嵌入式软件测试,提出一种单元测试中通用的语句覆盖率测试方法,通过插桩技术,采用向源代码插桩实现语句覆盖率测试。设计了测试代码的实现算法,通过测试代码可以自动完成向被测代码插桩。这些方法被成功地应用到笔者所在项目组开发的嵌入式软件仿真测试平台ARMtest上。利用这些方法,在嵌入式硬件系统未完成开发之前,可通过宿主机环境和仿真环境及时发现嵌入式软件开发初期的一些不足并加以完善。  相似文献   

13.
张洁 《计算机时代》2014,(6):50-52,55
结合实践探讨了在现有生产软件的中小型企业中,如何将软件测试与软件开发相结合,使软件测试管理的质量得以提升。介绍了一些目前常用的软件测试工具及测试管理工具,对软件测试管理中应注意到的80:20问题进行阐述分析,提出对测试管理中可能存在的风险可采取一些方法来应对。实践证明,使用全程软件测试管理对解决测试管理工作中存在的问题有很大帮助。  相似文献   

14.

Unit testing is widely used in software development. One important activity in unit testing is automatic test data generation. Constraint-based test data generation is a technique for automatic generation of test data, which uses symbolic execution to generate constraints. Unit testing only tests functions instead of the whole program, where individual functions typically have preconditions imposed on their inputs. Conventional symbolic execution cannot detect these preconditions, let alone converting these preconditions into constraints. To overcome these limitations, we propose a novel unit test data generation approach using rule-directed symbolic execution for dealing with functions with missing input preconditions. Rule-directed symbolic execution uses predefined rules to detect preconditions in the individual function, and generates constraints for inputs based on preconditions. We introduce implicit constraints to represent preconditions, and unify implicit constraints and program constraints into integrated constraints. Test data generated based on integrated constraints can explore previously unreachable code and help developers find more functional faults and logical faults. We have implemented our approach in a tool called CTS-IC, and applied it to real-world projects. The experimental results show that rule-directed symbolic execution can find preconditions (implicit constraints) automatically from an individual function. Moreover, the unit test data generated by our approach achieves higher coverage than similar tools and efficiently mitigates missing input preconditions problems in unit testing for individual functions.

  相似文献   

15.
单元测试的目标是覆盖代码单元的功能逻辑,内部输入是单元测试的关键问题.目前大多采用打桩技术解决内部输入问题,但打桩会造成函数失真,而且难于解决底层函数不可控、难于初始化,静态输入,中断输入等内部输入问题.针对这些问题,提出了c/c++单元测试底层模拟技术,在测试用例中模拟、控制子函数的行为,使得底层函数产生的数据像参数一样可以在用例中设置,并且可以模拟局部数据和中断,解决了打桩难于实现的多种内部输入问题.  相似文献   

16.
With the advent of object‐oriented languages and the portability of Java, the development and use of class libraries has become widespread. Effective class reuse depends on class reliability which in turn depends on thorough testing. This paper describes a class testing approach based on modeling each test case with a tuple and then generating large numbers of tuples to thoroughly cover an input space with many interesting combinations of values. The testing approach is supported by the Roast framework for the testing of Java classes. Roast provides automated tuple generation based on boundary values, unit operations that support driver standardization, and test case templates used for code generation. Roast produces thorough, compact test drivers with low development and maintenance cost. The framework and tool support are illustrated on a number of non‐trivial classes, including a graphical user interface policy manager. Quantitative results are presented to substantiate the practicality and effectiveness of the approach. Copyright © 2002 John Wiley & Sons, Ltd.  相似文献   

17.
航空电源控制保护器测试系统设计与实现   总被引:2,自引:1,他引:1  
电源控制保护器在飞机供电系统的控制保护中居于核心地位,其工作的可靠性直接影响到飞机的安全.对电源控制保护器的检测复杂而繁琐,为实现自动化检测,设计实现了航空电源控制保护器计算机测试系统.介绍了测试系统的软、硬件设计原理及实现,并描述了利用计算机软件对航空电源控制保护器的各项性能参数进行测试的过程,重点论述了测试系统在实现过程中解决的技术难点.  相似文献   

18.
测试自动化是提高软件测试效率的重要途径。基于UML模型的面向对象软件测试是当前研究的热点。这些研究大都是类或集成测试,对于如何自动生成较为完整、合理的系统测试用例较少。在总结研究现状的基础上,以应用举例的方式提出一种从描述系统用例问顺序依赖关系的活动图和用例实现的活动图中获取系统功能测试线索的方法。  相似文献   

19.
Unit and integration testing are two expected levels of testing for conventionally designed programs. This article presents a system for the automatic generation of test plans for incremental unit and integration testing. Starting from a global task of planning integration testing, the system generates a detailed test plan automatically for a given program on the basis of its decomposition as a software structure. The system is implemented as a frame-based system. It supports four standard ways of assembling units during integration, and two ways of testing according to parallelism. It also takes into account the units that require more testing than others. The system greatly improves the productivity of planning integration testing in comparison with the current practice of producing test plans manually. Experiments have shown a minimum productivity increase of 55 times. © 1998 John Wiley & Sons, Ltd.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号