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

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

3.
测试数据生成是软件测试的核心与关键,本文介绍了迭代松弛法以及对迭代松弛法进行改进,改进后的方法比原方法生成测试数据的能力更强,不仅能够用于白盒测试数据的自动生成,还能够用于黑盒测试数据的自动生成。在此基础上提出一个面向路径的测试数据生成框架。并讨论该框架在单元测试、组装测试中的应用。  相似文献   

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

5.
单元测试框架下的软件测试将产生大量的测试脚本, 在软件测试过程中如何有效利用现有的测试脚本, 实现软件测试脚本(代码)的重用成为业界关心的一个重要问题。业界最常见的复用需求是当开发项目更换新的测试框架时, 如何重用开发人员在原单元测试框架下积累的测试脚本。针对这一问题, 提出了基于测试脚本移植的重用方案。通过对单元测试脚本的分析和自动翻译方法, 将原测试脚本中包含的信息提取出来, 解析为基于XML的中间脚本, 然后再利用XSLT技术, 依据XML记录的信息, 自动生成目标框架的单元测试脚本, 从而解决单元测试脚本的重用问题。最后实验验证了方案的可行性。  相似文献   

6.
《软件工程师》2014,(7):25-27
软件测试技术在软件质量控制过程中一直起着非常重要的作用。JUnit是被广泛应用的Java单元测试框架,主要测试基于java语言编写的程序代码,用于编写和运行可重复的测试。Feed4JUnit是开源的基于JUnit的扩展,通过使用Feed4JUnit提供的注释,用户可以很方便地把测试数据存放在文件或其他数据源。本文分析了应用Feed4JUnit进行单元测试的方法,并通过实际开发示例实现数据与代码分离的测试。  相似文献   

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

8.
一种基于约束的变异测试数据生成方法   总被引:1,自引:0,他引:1  
作为衡量测试用例集完备性的测试策略,变异测试是一种"面向缺陷"的单元测试技术,主要用来生成完备的测试用例集.其中面向路径测试数据生成技术通过约束系统构造和求解过程实现用例集生成,是一种高效的测试用例生成技术.但目前大部分面向路径测试用例生成技术只考虑了程序语句间的控制依赖,即通过对控制流图的分析来构建约束系统,而忽略了语句间的数据依赖对约束系统的影响.充分考虑两种依赖关系,针对域削减的测试数据生成技术进行了改进,提出了一种考虑数据依赖的域削减方法.实验表明,这种方法在变异测试数据生成的成功率和执行效率上都有较大程度的提高.  相似文献   

9.
随着Web应用的不断普及,Web应用软件的测试越来越重要。论文针对Web应用的测试数据生成和组织结构问题,提出了一种元模型驱动的数据池技术,并实现了一个测试数据生成与组织框架。该框架依据Web页面上的输入域类型、输入变量的数据类型以及实例化约束条件,支持手工或自动产生测试数据。  相似文献   

10.
为了解决单元测试工具Nunit本身不支持数据驱动测试的问题,提出了在Nunit框架下实现数据驱动测试的方法。该方法首先将测试类所使用的测试数据基本信息设定在ini文件中,将输入数据及预期结果存放于Excel文件中。随后通过属性标签[TestFixtureSetUp]标记的方法动态读取ini文件中的基本信息,再根据这些基本信息读取Excel文件中的测试数据,并将测试数据保存于自定义的结构体数组中供各测试方法使用。该方法有效地实现了测试数据与测试脚本的分离,能降低测试脚本的维护工作量,提高测试效率。  相似文献   

11.
Aspect‐oriented programming yields new types of programming faults due to the introduction of new constructs for dealing with crosscutting concerns. To reveal aspect faults, this paper presents a framework for testing whether or not aspect‐oriented programs conform to their state models. It supports two families of strategies (i.e. structure‐oriented and property‐oriented) for automated generation of aspect tests from aspect‐oriented state models. A structure‐oriented testing strategy derives tests and test code from an aspect‐oriented state model to meet a given structural coverage criterion, such as state coverage, transition coverage, or round trip. A property‐oriented testing strategy generates test code from the counterexamples of model checking. Two such strategies are checking an aspect‐oriented state model against trap properties and checking mutants of aspect models against system properties. Mutation analysis of aspect‐oriented programs is used to evaluate the effectiveness of these testing strategies. The experiments demonstrate that testing aspect‐oriented programs against their state models can detect many aspect faults. The comparative evaluations also reveal that the structure‐oriented and property‐oriented testing strategies complement each other—some aspect faults were detected by the structure‐oriented strategies, but not by the property‐oriented strategies and vice versa. Copyright © 2010 John Wiley & Sons, Ltd.  相似文献   

12.
Tile basic features of object-oriented software makes it difficult to apply traditional testing methods in objectoriented systems. Control Flow Graph (CFG) is a well-known model used for identification of independent paths in procedural software. This paper highlights the problem of constructing CFG in object-oriented systems and proposes a new model named Extended Control Flow Graph (ECFG) for code based analysis of Object-Oriented (OO) software. ECFG is a layered CFG where nodes refer to methods rather than statements. A new metrics Extended Cyclomatic Complexity (E-CC) is developed which is analogous to McCabe's Cyclomatic Complexity (CC) and refers to the number of independent execution paths within the OO software. The different ways in which CFG's of individual methods are connected in an ECFG are presented and formulas for E-CC for these different cases are proposed. Finally we have considered an example in Java and based on its ECFG, applied these cases to arrive at the E-CC of the total system as well as proposed a methodology for calculating the basis set, i.e., the set of independent paths for the OO system that will help in creation of test cases for code testing.  相似文献   

13.
周庆  余正伟 《测控技术》2012,31(6):134-138
通过对软件测试框架的研究,给出了测试框架表述的三层模型,并从研究解决的软件测试问题域出发,提出基于缺陷知识的测试框架,具体阐述了该测试框架的三层模型,并且实现了基于缺陷知识的静态分析和灰盒动态测试技术。该测试框架为后续测试技术的研究提供了整体的理论支持。  相似文献   

14.
本文通过对金融业务核心系统测试所面临问题的分析,设计了一套可回归测试框架,利用源码分析技术及变更差异准确界定回归测试的范围,通过用例规则的适用产生交易用例模板和测试数据集,并通过优化算法实现测试数据集的压缩,从而在业务层面上完成软件测试决策支持,保证了回归测试的可行性、效率和覆盖率.  相似文献   

15.
关键字驱动测试框架的研究与实现   总被引:1,自引:1,他引:0  
为有效解决C++接口测试问题,研究了自动化测试框架的原理和技术.基于关键字驱动方法,通过对目前C++接口测试工具使用复杂,测试脚本脆弱等特点的分析和研究,提出一个具有高易用性和灵活性的测试框架,通过解析由关键字定义的测试描述文件和多种格式的数据文件,自动生成可执行的C++测试代码.测试人员只需编写少量测试代码和数据,即可实现复杂的测试.在实际应用中减少了测试人员工作量,降低了测试成本,取得了很好的效果.  相似文献   

16.
通过分析软件安全领域存在的问题。以软件工程思想为基础,运用系统安全工程的原则,提出一个软件安全性保障框架。在软件开发生命周期过程中,将软件安全保障集成到需求分析,设计编码,测试,维护四个环节中,详细阐述了每个环节要进行的安全性处理的任务,采用一系列安全预测和分析技术,确保软件开发的安全性和可靠性。  相似文献   

17.
Although the importance of models continuously grows in software development, common development approaches are less able to integrate the automatic management of model integrity into the development process. These critically important constraints may ensure the coherence of models in the evolution process to prevent manipulations that could violate defined constraints on a model. This paper proposes an integrity framework in the context of model-driven architecture to achieve sufficient structural code coverage at a higher program representation level than machine code. Our framework offers to propagate the modifications from a platform-independent specification to the corresponding test template model while keeping the consistency and integrity constraints after system evolution. To examine the efficiency of the proposed framework, a quantitative analysis plan is evaluated based on two experimental case studies. In addition, we propose coverage criteria for integrity regression testing (IRT), derived from logic coverage criteria that apply different conceptual levels of testing for the formulation of integrity requirements. The defined criteria for IRT reduce the inherent complexity and cost of verifying complex design changes in regression testing while keeping the fault detection capability with respect to the changes. The framework aims to keep pace with IRT in a formal way. The framework can solve a number of restricted outlooks in model integrity and some limiting factors of incremental maintenance and retesting. The framework satisfies several valuable quality attributes in software testing, such as safety percentage, precision, abstract fault detection performance measurable coverage level, and generality.  相似文献   

18.
Techniques for detecting defects in source code are fundamental to the success of any software development approach. A software development organization therefore needs to understand the utility of techniques such as reading or testing in its own environment. Controlled experiments have proven to be an effective means for evaluating software engineering techniques and gaining the necessary understanding about their utility. This paper presents a characterization scheme for controlled experiments that evaluate defect-detection techniques. The characterization scheme permits the comparison of results from similar experiments and establishes a context for cross-experiment analysis of those results. The characterization scheme is used to structure a detailed survey of four experiments that compared reading and testing techniques for detecting defects in source code. We encourage educators, researchers, and practitioners to use the characterization scheme in order to develop and conduct further instances of this class of experiments. By repeating this experiment we expect the software engineering community will gain quantitative insights about the utility of defect-detection techniques in different environments.This work was conducted while the author was with the Department of Computer Science, University of Kaiserslautern, 67653 Kaiserslautern, Germany.  相似文献   

19.
为有效解决目前回归测试测试效率低以及手工测试操作复杂的问题,研究了自动化测试技术的原理和方法,提出了一种基于关键字驱动的自动化测试方法;介绍了Web自动化测试实施的过程和自动化测试框架的主要功能.在遵从保证产品质量和提高测试效率的原则基础上,对系统进行自动化测试的可行性分析,再进行自动化测试开发工具的选择、制作Demo和自动化测试框架开发,实现了以关键字驱动为核心,Ruby为开发语言的自动化测试框架.实验结果表明,该方法提高了回归测试效率和测试系统的可移植性.  相似文献   

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

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