打造第二代测试框架TestDriven 2.0(五)—— 测试框架初步展示
2010-03-18 21:05
260 查看
------------------
前言 Preface
------------------
本文是第二代测试框架系列文章,同时也是软件工程革命三部曲中的技术文献。
本文展示了测试驱动框架的原型,系统稳定后会放出源代码。
------------------
效果展示 Gallary
------------------
1. 自动生成测试代码
代码
using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.TestDrivens;
using Pixysoft.Framework.AutoUpdates;
namespace Pixysoft.Framework.AutoUpdates.TestDrivens
{
[TestDriven(TestDrivenType.UnitTest, "Pixysoft.Framework.AutoUpdates.Class1", typeof(Pixysoft.Framework.AutoUpdates.Class1))]
class UnitTest_000_Class1
{
[TestCase("hello")]
public static void TestCase_000_hello()
{
Assert.IsEqual("pixysoft", new Class1().hello());
Assert.IsEqual("hello", new Class1().hello());
try
{
throw new Exception("test exception");
}
catch (Exception ex)
{
LoggerHelper.Fatal(ex);
}
}
}
}
3. 查看当前运行的日志
4. 升级测试代码
------------------
后记
------------------
基本功能都实现了,不过效果和易用性有待优化。
前言 Preface
------------------
本文是第二代测试框架系列文章,同时也是软件工程革命三部曲中的技术文献。
本文展示了测试驱动框架的原型,系统稳定后会放出源代码。
------------------
效果展示 Gallary
------------------
1. 自动生成测试代码
代码
using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.TestDrivens;
using Pixysoft.Framework.AutoUpdates;
namespace Pixysoft.Framework.AutoUpdates.TestDrivens
{
[TestDriven(TestDrivenType.UnitTest, "Pixysoft.Framework.AutoUpdates.Class1", typeof(Pixysoft.Framework.AutoUpdates.Class1))]
class UnitTest_000_Class1
{
[TestCase("hello")]
public static void TestCase_000_hello()
{
Assert.IsEqual("pixysoft", new Class1().hello());
Assert.IsEqual("hello", new Class1().hello());
try
{
throw new Exception("test exception");
}
catch (Exception ex)
{
LoggerHelper.Fatal(ex);
}
}
}
}
3. 查看当前运行的日志
4. 升级测试代码
------------------
后记
------------------
基本功能都实现了,不过效果和易用性有待优化。
相关文章推荐
- 打造第二代测试框架TestDriven 2.0(一)—— Assert
- 打造第二代测试框架TestDriven 2.0(二)—— 类的依赖性分析
- 打造第二代测试框架TestDriven 2.0(六)—— 最新测试思路分析
- 打造第二代测试框架TestDriven 2.0(三)—— 测试还是调试?玩玩BreakPoint!
- 打造第二代测试框架TestDriven 2.0(四)—— 代码对象化建模技术
- 打造第二代测试框架TestDriven 2.0(七)—— 让测试驱动更加的自动吧!
- 腾讯WeTest为Unity开发者打造免费自动化测试框架——20个体验资格免费发放
- #测试框架推荐# test4j,数据库测试
- Python unittest测试框架详解
- VisualStudio 自动化测试框架 - Coded UI Test
- 如何用QTP采用关键字驱动测试框架来完成TechExcel DevTest产品的回归测试
- 使用 Spring TestContext 测试框架
- unittest框架测试项目讲解
- 有人会用TestDriven.NET 进行测试吗?
- 关于使用TestDriven.Net 2.0的一点补充
- [翻译]pytest测试框架(一)
- Redis源代码分析(十)--- testhelp.h小测试框架和redis-check-aof.c 日志检测
- 玩转Google开源C++单元测试框架Google Test系列(gtest)之八 - 打造自己的单元测试框架
- python测试框架——unittest和nosetest
- 使用unittest测试框架来写selenium的TestCase