posts - 195,  comments - 1305,  trackbacks - 5
  2007年10月17日
http://code.google.com/p/eft/

About Eft

Eft is an acceptance and functional testing tool for Windows application. You can use it to test WIN32, Windows forms, WPF application and hopefully other applications.

Eft is currently build upon Win32 api and Windows UIAutomation framework in .net 3.0. It supports W3C CSS selector like syntax to locate Window and Control in an application, and related operations on them. It also provides many handy functionality for you to automate the testing of your application.

Getting started

View the 10 seconds tutorial to get to use Eft very quickly.

Features

  • Support CSS selector syntax to locate elements in the window
  • Flexible clicking support, such as click using left button, right button, middle button etc., click with modifier keys, click several times.
  • Support minimize, maximize and restore etc. on Window
  • Support text related operations such as type, clearText, get text on an element.
  • Support wait operation for some condition fulfilled.
posted @ 2007-10-17 09:06 taowen 阅读(428) | 评论 (1)编辑
  2007年10月14日

这是一个基于.NET的元脚本语言。顾名思义就是用来创造脚本语言的框架。项目主页:http://code.google.com/p/viscript/

主要思想很简单:
用方法来创造句法,用句号隔开句子,然后由句子构成脚本。在构成句法方面,支持用下划线表达字符,参数任意位置插入,参数类型可扩展,支持从句,支持引号表示字面意义,支持歧义分析。

未来的发展方向是写一个IDE,并支持重构。

Sample:

Sentence <-> Method

c# 代码
  1. [Scriptable]  
  2. void user_login_with_password(string user, string password)  

Script <-> Sentences

taowen login with password 123. he send a message hello to qq. qq should receive message hello.

Clause <-> Delegate

c# 代码
  1. [Scriptable]  
  2. public void action_repeat_count_times(Clause action, int count)  
  3. {  
  4.       while (count-- > 0)  
  5.       {  
  6.             action();  
  7.       }  

posted @ 2007-10-14 19:46 taowen 阅读(240) | 评论 (0)编辑
  2007年4月30日
ajoo同学的酒窝有.NET版本啦!

项目主页:
http://dotnet.dimple.googlepages.com/home

存在意义:
快速制作测试用的stub。手工继承,mock框架之外的第三种选择。

简单使用:
public class StubDbCommand
        {
            
public object ExecuteScalar()
            {
                
return "Hello";
            }
            
public static DbCommand New()
            {
                
return NDimple.Implement<DbCommand>(new StubDbCommand());
            }
        }
Console.WriteLine(StubDbCommand.New().ExecuteScalar());

Output:
Hello

独家特性:
public abstract class AbstractClass
        {
            
protected abstract string AbstractMethod1();
            
protected abstract string AbstractMethod2();
            
public string InvokeAbstractMethod1()
            {
                
return AbstractMethod1();
            }
        }

public abstract class StubAbstractClass : AbstractClass
        {
            
protected override string AbstractMethod1()
            {
                
return "Hello";
            }
            
public static AbstractClass New()
            {
                
return NDimple.Implement<AbstractClass>(typeof (StubAbstractClass));
            }
        }

Console.WriteLine(StubAbstractClass.New().InvokeAbstractMethod1());

Output:
Hello
posted @ 2007-04-30 17:06 taowen 阅读(2320) | 评论 (5)编辑
  2007年4月29日

二进制文件和源代码可以从这里下载到:
http://naive.container.googlepages.com/home

存在的意义:
最简单原始的组件装配

使用:
public class Susan : ContainerBound
    {
        
public void FallInLove()
        {
            Console.WriteLine(
"Susan has fallen in love with " + Get<Boy>().Name);
        }
    }

public class Lily : ContainerBound
    {
        
public void Kiss()
        {
            Console.WriteLine(
"Lily is kissing {0}", Get<Boy>().Name);
        }
    }

public class Lucy : ContainerBound
    {
        
public void Marry()
        {
            Console.WriteLine(
"Lucy is marrying " + Get<Boy>().Name);
        }
    }

配置:
Containers.GetContainerInContext<object>().Put(new GenericBoy("Van"));

Containers.GetContainerInContext
<Lucy>().Put(new GenericBoy("Tom"));

Containers.GetContainerInContext
<Lily>().Put(new GenericBoy("Joy"));

Containers.Close();

更多请参见项目主页

posted @ 2007-04-29 17:47 taowen 阅读(1205) | 评论 (2)编辑
  2007年4月27日
创建对象有很多种方式,可以用工厂,可以用容器装配。所以不在乎再多一种啦。。。在C#上写了一种古怪的创建对象的方式,给大家kk。

首先,这是配置代码。意思是说在Lily的宇宙中(每个人都有一个小宇宙,圣斗士。。。),她的Boy是tom,也就是我的眼中只有你。相应的在Lucy的眼中只有joy。

Tom tom = Void.GiveMe<Tom>();
Joy joy 
= Void.GiveMe<Joy>();
Void.UniverseOf
<Lily>().Exist(tom);
Void.UniverseOf
<Lucy>().Exist(joy);

然后是创建两个女孩子的代码:

Lily lily = Void.GiveMe<Lily>();
lily.Kiss();
Lucy lucy 
= Void.GiveMe<Lucy>();
lucy.Kiss();

运行这段代码就可以看到少儿不宜的场景了。。。:

Lily is kissing Tom
Lucy is kissing Joy

产生这样的结果的原因是:

public abstract class Girl : God
{
    
public abstract string Name { get; }
    
public void Kiss()
    {
        Boy boy 
= GiveMe<Boy>();
        Console.WriteLine(
"{0} is kissing {1}", Name, boy.Name);
    }
}

Girl的男朋友从哪里来的?偷来的?抢来的?骗来的?。。。
GiveMe是哪里来的方法?它是上帝的安排啊:

public abstract class God
{
    
protected abstract T GiveMe<T>();
}

旁白:其实本来没有神,每个人都是神。。。
上帝怎么实现GiveMe的呢?这就是Void关心的事情了。因为女孩子们是这么创建的:

Lily lily = Void.GiveMe<Lily>();
Lucy lucy 
= Void.GiveMe<Lucy>();

所以说,这根本就是一个圈。。。因为我要做的其实是完全废弃标准的new和构造函数,采用自己的方式来创建和初始化对象,所以我不把这个叫做某某框架,独立使用也没有价值,它其实是一种语言。这种语言在后面我会用来干一些fancy的事情,但是还没想好怎么弄。。。

posted @ 2007-04-27 18:31 taowen 阅读(200) | 评论 (1)编辑
  2005年11月28日

http://www.taowen.net

Hope you can follow these links and find me. Good luck!

posted @ 2005-11-28 22:10 taowen 阅读(712) | 评论 (0)编辑
  2005年5月14日

taowen.viwow.net
欢迎大家访问

posted @ 2005-05-14 20:06 taowen 阅读(2427) | 评论 (5)编辑
  2005年4月1日
http://www.sonicchat.com/topicdisplay.asp?BoardID=11&Page=1&TopicID=874230
我的测试结果:
心理年龄:25
你的成熟度是 125%, 你心理处在青年时期。内心不能平息的矛盾冲突是此时你最明显的特征。你渴望独立自主自由洒脱,但还没有摆脱他人的阴影,那第三只眼随时监控着你,你的一举一动在儿童时期是为具体的他人满意,现在是为让这第三只眼满意,本能与人为,现实与理想,自我与超我,这种种矛盾的痛苦是推动人格发展的动力。

和我自我估算的差不多。感受也是一样的。真的很准。
posted @ 2005-04-01 00:32 taowen 阅读(2280) | 评论 (7)编辑
  2005年3月30日

www.mtasc.org
一个开源的actionscript2的编译器。它能够独立创建swf文件。它也能更新已产生的swf文件,替换(或者不替换)以前的class。如果要使用mx的控件,则必须新建一个library内含了所需控件的空白swf文件,然后才能调用createClassObject。
简单google了一下关于作者的信息,是一位O'Caml的大牛。这语言当年曾经耳闻过,稍微了解过一点就放弃了。据他说他们公司写flash都是用自己发明的一种语言写的,比用actionscript还高级。。。不过我不知道他们公司是干什么的(语言不通)。不过我感觉应该是自己做了一些GUI Framework之类的东西,要不然根本没有办法脱离FLASH IDE做开发。
今天在eclipse上装上了asdt(一个actionscript的开发环境),然后写了一个ant文件编译,其实还是用起来很爽的。要不是MTASC对于XIFF的支持还是不行,可能最终就会完全采用mtasc+eclipse来做开发了。
等以后有时间了,用actionscript攒一个纯的GUI Framework应该会比较有意思,那个时候就真的是在写代码了。据说FLASH8对于designer的支持还要更强,相应的我们这些coder的要求就难以申张了。看来eclipse+asdt+mtasc+gui framework的做法还真的有戏,不过可惜现下没有功夫来做这种闲人干的事情。目前还只有老老实实地用FLASH IDE来做郁闷地乌龟式编译了。。。

posted @ 2005-03-30 04:50 taowen 阅读(1923) | 评论 (2)编辑
  2005年3月27日

签名入口:www.viwow.net

posted @ 2005-03-27 01:42 taowen 阅读(1579) | 评论 (2)编辑